PageSourceSearch

https://members.britishscreenforum.co.uk/1735.9a0b343c04999f3a.js

js britishscreenforum.co.uk collected 2026-10-05 05:16:15 UTC 44,485 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[1735],{30021:(F,D,i)=>{i.d(D,{Q:()=>C});var s=i(14026),v=i(52805),Z=i(43383),t=i(31079),d=i(92362),E=i(49731);let Q=(()=>{class c extends E.TemplateContainer{}return c.\u0275fac=function(){let T;return function(m){return(T||(T=s.n5z(c)))(m||c)}}(),c.\u0275dir=s.lG2({type:c,selectors:[["","booleanRadioYes",""]],features:[s.qOj]}),c})(),R=(()=>{class c extends E.TemplateContainer{}return c.\u0275fac=function(){let T;return function(m){return(T||(T=s.n5z(c)))(m||c)}}(),c.\u0275dir=s.lG2({type:c,selectors:[["","booleanRadioNo",""]],features:[s.qOj]}),c})();var y=i(64177),f=i(10218);function A(c,T){1&c&&s._UZ(0,"span",6),2&c&&s.Q6J("translate","yes")("tr-namespace","common")}function p(c,T){1&c&&s._UZ(0,"span",6),2&c&&s.Q6J("translate","no")("tr-namespace","common")}function h(c,T){if(1&c&&s.GkF(0,7),2&c){const g=s.oxw();s.Q6J("ngTemplateOutlet",g.customYesTemplate.template)}}function O(c,T){if(1&c&&s.GkF(0,7),2&c){const g=s.oxw();s.Q6J("ngTemplateOutlet",g.customNoTemplate.template)}}let C=(()=>{class c extends d.k{constructor(){super(),this.VAL_N="n",this.VAL_NONE="",this.VAL_Y="y",this.internalValue="",this.value=null}ngOnInit(){this.name=(0,Z.Z)("bool-radio-")}onChange(g){this.internalValue=g,this.value=function S(c){return"y"===c}(g),this.onTouch(),this._onChangeFn(this.value)}writeValue(g){const m=function _(c){return"number"==typeof c?Boolean(c):t.BooleanUtil.stringToBoolean(c)??null}(g);m!==this.value&&(this.value=m,this.internalValue=function w(c){return null===c?"":c?"y":"n"}(m),this.cdr.detectChanges())}}return c.\u0275fac=function(g){return new(g||c)},c.\u0275cmp=s.Xpm({type:c,selectors:[["tg-boolean-radio"]],contentQueries:function(g,m,I){if(1&g&&(s.Suo(I,R,5),s.Suo(I,Q,5)),2&g){let M;s.iGM(M=s.CRH())&&(m.customNoTemplate=M.first),s.iGM(M=s.CRH())&&(m.customYesTemplate=M.first)}},hostVars:2,hostBindings:function(g,m){2&g&&s.ekj("tg-txt-error-boundary",!0)},features:[s._Bn([{multi:!0,provide:v.JU,useExisting:(0,s.Gpc)(()=>c)}]),s.qOj],decls:13,vars:16,consts:[["defaultYes",""],["defaultNo",""],[1,"list-inline"],[1,"tg-txt-error-boundary-receiver"],["type","radio",3,"value","ngModel","disabled","ngModelOptions","name","ngModelChange"],[3,"ngTemplateOutlet",4,"ngIf","ngIfElse"],[3,"translate","tr-namespace"],[3,"ngTemplateOutlet"]],template:function(g,m){if(1&g&&(s.YNc(0,A,1,2,"ng-template",null,0,s.W1O),s.YNc(2,p,1,2,"ng-template",null,1,s.W1O),s.TgZ(4,"ul",2)(5,"li")(6,"label",3)(7,"input",4),s.NdJ("ngModelChange",function(M){return m.onChange(M)}),s.qZA(),s.YNc(8,h,1,1,"ng-container",5),s.qZA()(),s.TgZ(9,"li")(10,"label",3)(11,"input",4),s.NdJ("ngModelChange",function(M){return m.onChange(M)}),s.qZA(),s.YNc(12,O,1,1,"ng-container",5),s.qZA()()()),2&g){const I=s.MAs(1),M=s.MAs(3);s.xp6(4),s.ekj("text-muted",m.disabled),s.xp6(3),s.Q6J("value",m.VAL_Y)("ngModel",m.internalValue)("disabled",m.disabled)("ngModelOptions",m.MODEL_OPTS)("name",m.name),s.xp6(1),s.Q6J("ngIf",m.customYesTemplate)("ngIfElse",I),s.xp6(3),s.Q6J("value",m.VAL_N)("ngModel",m.internalValue)("disabled",m.disabled)("ngModelOptions",m.MODEL_OPTS)("name",m.name),s.xp6(1),s.Q6J("ngIf",m.customNoTemplate)("ngIfElse",M)}},dependencies:[y.O5,y.tP,f.P,v.Fj,v._,v.JJ,v.On],styles:["[_nghost-%COMP%]{display:inline-block}input[_ngcontent-%COMP%]{display:inline-block;margin-right:3px}label[_ngcontent-%COMP%]{font-weight:400}"],changeDetection:0}),c})()},14901:(F,D,i)=>{i.d(D,{K:()=>v});const v=new(i(14026).OlP)("PollContainer")},61804:(F,D,i)=>{i.d(D,{u:()=>V});var s=i(64762),v=i(662),Z=i(5296),t=i(14026),d=i(52805),E=i(40921),Q=i(23055),R=i(26454),y=i(95517),f=i(50725),A=i(91696),p=i(75372),h=i(35673),O=i(75094),C=i(20173),_=i(15134),S=i(12743),w=i(74174),c=i(97482),T=i(93327),g=i(70840),m=i(89763),I=i(51248),M=i(82668),et=i(87399),bt=i(92706),Tt=i(15449),vt=i(25336),z=i(85597),ot=i(3811),Pt=i(89969),yt=i(42809),nt=i(37548),j=i(14901),At=i(94e3);function lt(l){const{max:o,min:e}=l.value;return{errors:{},max:o,min:e,numMax:"number"==typeof o,numMin:"number"==typeof e}}function it(l){return(0,At.Z)(l)?null:l}var st=i(77700);class x{constructor(o,e,n){this.fb=o,this.cdr=e,this.poll=n,this._destroyed$=new bt.c,this.pollCfg=(0,t.f3M)(w.cu)}get form(){const{required:o}=d.kI,e=this.poll?.getInputPoll(),n=this.fb.control(e?.type||_.PollType.SINGLE_SELECT,{validators:o,nonNullable:!0}),u=this.fb.control(n.value===_.PollType.DROPDOWN?C.PollSubType.TEXT:e?.subtype??C.PollSubType.TEXT,[o,({value:b})=>n.value===_.PollType.DROPDOWN&&b!==C.PollSubType.TEXT?{mustUseSubtype:C.PollSubType.TEXT}:null]),P=this.fb.control(this.pollCfg.starRatingOptions[0],b=>n.value===_.PollType.RATING_SCALE?o(b):null),W=this.fb.control(e?.questions||[],{nonNullable:!0,validators:[nt.isNotEmptyValidator,b=>(0,st.V0)(b.value,n.value)]});let X=n.value===_.PollType.MULTI_SELECT?W.value.length:null;const tt=this.fb.control(e?.answers_required||null,[b=>n.value===_.PollType.MULTI_SELECT?function Ot(l){if(!l.value)return null;const{errors:o,max:e,min:n,numMax:r,numMin:a}=lt(l);return a&&(n<=0&&(o.pollAnswersMinLte0=!0),r&&n>e&&(o.pollAnswersReqMinMax=!0)),r&&e<=0&&(o.pollAnswersMaxLte0=!0),it(o)}(b):null,b=>function Et(l,o){if(null===l||!o.value)return null;const{errors:e,max:n,min:r,numMax:a,numMin:u}=lt(o);return u&&r>l&&(e.pollAnswersMinGtQuestions=!0),a&&n>l&&(e.pollAnswersMaxGtQuestions=!0),it(e)}(X,b)]),Y=(0,g.observeControlValue)(n).pipe((0,z.R)(this._destroyed$)),Ct=(0,Tt.H)(0).pipe((0,ot.w)(()=>Y),(0,f.U)(b=>b===_.PollType.MULTI_SELECT),(0,A.x)());return Ct.pipe((0,h.T)(1)).subscribe(this.patchValidityOf(tt)),Ct.pipe((0,ot.w)(b=>b?(0,g.observeControlValue)(W).pipe((0,f.U)(xe=>xe.length||0)):(0,vt.of)(null)),(0,z.R)(this._destroyed$),(0,m.N)(X),(0,Pt.b)(b=>{X=b})).subscribe(this.patchValidityOf(tt)),Y.pipe((0,f.U)(b=>b===_.PollType.DROPDOWN),(0,A.x)(),(0,h.T)(1)).subscribe(this.patchValidityOf(W)),Y.pipe((0,f.U)(b=>b===_.PollType.MULTI_SELECT),(0,A.x)(),(0,h.T)(1)).subscribe(this.patchValidityOf(u)),Y.pipe((0,f.U)(b=>b===_.PollType.RATING_SCALE),(0,A.x)(),(0,h.T)(1)).subscribe(this.patchValidityOf(P)),this.fb.group({abstain_answers:this.fb.control(Boolean(e?.abstain_answers
1)),answers_editable:this.fb.control(Boolean(e?.answers_editable)),answers_required:tt,can_comment:this.fb.control(Boolean(e?.can_comment)),close_date:this.fb.control(e?.close_date||null),description:this.fb.control(e?.description||null),open_date:this.fb.control(e?.open_date||null,o),questions:W,star_count:P,subtype:u,summary_after_vote:this.fb.control(Boolean(e?.summary_after_vote)),timezone:this.fb.control(e?.timezone??"Europe/London",{validators:o,nonNullable:!0}),title:this.fb.control(e?.title||null,o),type:n,visibility:this.fb.control(e?.visibility||S.PollVisibility.PUBLIC,{validators:o,nonNullable:!0})})}get pollTypeCategory$(){return(0,g.observeControlValue)(this.form.controls.type).pipe((0,f.U)(o=>{switch(o){case _.PollType.SINGLE_SELECT:case _.PollType.MULTI_SELECT:case _.PollType.RATING_SCALE:return 1;case _.PollType.DROPDOWN:return 2;default:return 0}}),(0,A.x)(),(0,z.R)(this._destroyed$),(0,Z.H)("[PollEditService.pollTypeCategory$]"),(0,yt.d)(1))}getCloseDateVars(o){const n=o?.createdAt?.getTime()||Date.now(),r=et.utc(new Date(n+864e5)).startOf("minute");return[r,r.toDate()]}getOpenDateVars(){const o=et.utc().startOf("minute");return[o,o.toDate()]}getFormattedValue(){let o=this.form.getRawValue();return o.answers_required&&o.type!==_.PollType.MULTI_SELECT&&(o={...o,answers_required:null}),o}ngOnDestroy(){(0,M.t)(this._destroyed$)}patchValidityOf(o){return()=>{const e=o.valid;o.updateValueAndValidity(),e!==o.valid&&this.cdr.detectChanges()}}}x.\u0275fac=function(o){return new(o||x)(t.LFG(d.qu),t.LFG(t.sBO),t.LFG(j.K,8))},x.\u0275prov=t.Yz7({token:x,factory:x.\u0275fac}),(0,s.gn)([(0,E.a)()],x.prototype,"form",null),(0,s.gn)([(0,E.a)()],x.prototype,"pollTypeCategory$",null);var rt=i(78425),Mt=i(88990),xt=i(10174),Dt=i(25989),Zt=i(48921),Qt=i(76473),St=i(92350),at=i(47946),dt=i(16838),Bt=i(51362),Jt=i(39416),U=i(64177),ct=i(39989),ut=i(26495),pt=i(7933),mt=i(4678),It=i(62441);const gt=Symbol("elRef");class L{constructor(){this.disabled=!1,this[gt]=(0,t.f3M)(t.SBq),this.r2=(0,t.f3M)(t.Qsj)}get btn(){return this[gt].nativeElement}ngOnChanges(o){!o.disabled||this.mirrorDisabledAttribute()}ngOnInit(){this.r2.addClass(this.btn,"btn"),this.r2.setAttribute(this.btn,"type","button"),this.disabled&&this.mirrorDisabledAttribute()}onClick(){this.disabled||this.handleClick()}mirrorDisabledAttribute(){this.btn&&(this.disabled?this.r2.setAttribute(this.btn,"disabled","true"):this.r2.removeAttribute(this.btn,"disabled"))}}L.\u0275fac=function(o){return new(o||L)},L.\u0275dir=t.lG2({type:L,hostBindings:function(o,e){1&o&&t.NdJ("click.passive",function(){return e.onClick()})},inputs:{disabled:"disabled"},features:[t.TTD]}),(0,s.gn)([(0,E.a)(!1,!1,Boolean)],L.prototype,"btn",null);var k=i(85868),N=i(10218);const Rt=["tgAddPollQuestion",""];let Lt=(()=>{class l extends L{handleClick(){this.ctrl.numRows++}ngOnInit(){super.ngOnInit(),this.r2.addClass(this.btn,"btn-primary")}}return l.\u0275fac=function(){let o;return function(n){return(o||(o=t.n5z(l)))(n||l)}}(),l.\u0275cmp=t.Xpm({type:l,selectors:[["button","tgAddPollQuestion",""]],inputs:{ctrl:["tgAddPollQuestion","ctrl"],txt:"txt"},features:[t.qOj],attrs:Rt,decls:2,vars:2,consts:[[1,"fa","fa-plus"],[3,"translate","tr-namespace"]],template:function(e,n){1&e&&t._UZ(0,"i",0)(1,"span",1),2&e&&(t.xp6(1),t.Q6J("translate",n.txt)("tr-namespace","pollAdmin"))},dependencies:[k.G,N.P],styles:["[_nghost-%COMP%]{margin-top:.5em}"],changeDetection:0}),l})();const Vt=["tgPollRemoveButton",""];let Ut=(()=>{class l extends L{handleClick(){this.removeFn()}ngOnInit(){super.ngOnInit(),this.r2.addClass(this.btn,"btn-danger")}}return l.\u0275fac=function(){let o;return function(n){return(o||(o=t.n5z(l)))(n||l)}}(),l.\u0275cmp=t.Xpm({type:l,selectors:[["button","tgPollRemoveButton",""]],inputs:{removeFn:["tgPollRemoveButton","removeFn"],txt:"txt"},features:[t.qOj],attrs:Vt,decls:1,vars:0,consts:[[1,"fa","fa-times"]],template:function(e,n){1&e&&t._UZ(0,"i",0)},dependencies:[k.G],encapsulation:2,changeDetection:0}),l})();var q=i(64683);function Ft(l,o){if(1&l&&t._UZ(0,"tg-help-block",14),2&l){const e=t.oxw().$implicit;t.Q6J("errors",e.errors)}}function Nt(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"div")(1,"div",6)(2,"input",13),t.NdJ("blur",function(r){const u=t.CHM(e).onBlur,P=t.oxw(3);return u(r),t.KtG(P.onTouch())})("keyup.enter",function(){t.CHM(e),t.oxw();const r=t.MAs(13),a=t.oxw(2);return t.KtG(a.addRows(r))}),t.ALo(3,"tr"),t.qZA(),t.TgZ(4,"div",8),t._UZ(5,"button",9),t.qZA()(),t.YNc(6,Ft,1,1,"tg-help-block",12),t.qZA()}if(2&l){const e=o.$implicit,n=o.first,r=o.index,a=o.rm,u=t.oxw(3);t.xp6(1),t.ekj("mt05",!n),t.xp6(1),t.Q6J("formControl",e)("placeholder",t.xi3(3,8,"optionN",u.inputPlaceholderAt(r)))("disableControl",u.disabled),t.xp6(3),t.Q6J("tgPollRemoveButton",a)("disabled",u.disabled),t.xp6(1),t.Q6J("ngIf",e.touched&&e.errors)}}function wt(l,o){if(1&l&&t._UZ(0,"tg-help-block",14),2&l){const e=t.oxw().$implicit;t.Q6J("errors",e.controls.options.errors)}}function Gt(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"tg-panel")(1,"tg-panel-body")(2,"tg-help-block-container")(3,"div",6)(4,"input",7),t.NdJ("blur",function(r){const u=t.CHM(e).onBlur,P=t.oxw(2);return u(r),t.KtG(P.onTouch())}),t.ALo(5,"tr"),t.qZA(),t.TgZ(6,"div",8),t._UZ(7,"button",9),t.qZA()()(),t.TgZ(8,"div",10)(9,"strong"),t._uU(10),t.ALo(11,"tr"),t.qZA(),t.TgZ(12,"div",2,11),t.YNc(14,Nt,7,11,"div",4),t.qZA(),t.YNc(15,wt,1,1,"tg-help-block",12),t._UZ(16,"button",5),t.qZA()()()}if(2&l){const e=o.$implicit,n=o.index,r=o.rm,a=t.MAs(13),u=t.oxw(2);t.xp6(4),t.Q6J("formControl",e.controls.label)("placeholder",t.xi3(5,12,"questionN",u.inputPlaceholderAt(n)))("disableControl",u.disabled),t.xp6(3),t.Q6J("tgPollRemoveButton",r)("disabled",u.disabled),t.xp6(3),t.hij("",t.lcZ(11,15,"options"),":"),t.xp6(2),t.Q6J("tgExtendableFormControl",u.makeStringControl)("formControl",e.controls.options),t.xp6(3),t.Q6J("ngIf",e.controls.options.touched&&e.controls.options.invalid),t.xp6(1),t.Q6J("tgAddPollQuestion",a)("txt","addOption")("disabled",u.disabled)}}function Wt(l,o){if(1&l&&(t.TgZ(0,"div",2,3),t.YNc(2,Gt,17,17,"tg-panel",4),t.qZA(),t._UZ(3,"button",5)),2&l){const e=t.MAs(1),n=t.oxw();t.Q6J("tgExtendableFormControl",n.makeOptsControl)("formControl",n.ctrl),t.xp6(3),t.Q6J("tgAddPollQuestion",e)("txt","addQuestion")("disabled",n.disabled)}}function Yt(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"input",13),t.NdJ("blur",function(r){t.CHM(e);const a=t.oxw().onBlur,u=t.oxw(2);return a(r),t.KtG(u.onTouch())})("keyup.enter",function(){t.CHM(e),t.oxw(2);const r=t.MAs(1),a=t.oxw();return t.KtG(a.addRows(r))}),t.ALo(1,"tr"),t.qZA()}if(2&l){const e=t.oxw(),n=e.$implicit,r=e.index,a=t.oxw(2);t.Q6J("formControl",n.controls.label)("placeholder",t.xi3(1,3,"optionN",a.inputPlaceholderAt(r)))("disableControl",a.disabled)}}function zt(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"tg-datepicker",17),t.NdJ("onPopoverHidden",function(r){t.CHM(e);const a=t.oxw().onBlur,u=t.oxw(2);return a(r),t.KtG(u.onTouch())}),t.ALo(1,"tr"),t.qZA()}if(2&l){const e=t.oxw(),n=e.$implicit,r=e.index,a=t.oxw(2);t.Q6J("formControl",n.controls.label)("showTime",a.dateSubtypeOpts.time)("timezone",a.timezone)("placeholder",t.xi3(1,5,"optionN",a.inputPlaceholderAt(r)))("disableControl",a.disabled)}}function jt(l,o){if(1&l&&t._UZ(0,"tg-help-block",14),2&l){const e=t.oxw().$implicit;t.Q6J("errors",e.controls.label.errors)}}function kt(l,o){if(1&l&&(t.TgZ(0,"div")(1,"div",6),t.YNc(2,Yt,2,6,"ng-template",null,15,t.W1O),t.YNc(4,zt,2,8,"tg-datepicker",16),t.TgZ(5,"div",8),t._UZ(6,"button",9),t.qZA()(),t.YNc(7,jt,1,1,"tg-help-block",12),t.qZA()),2&l){const e=o.$implicit,n=o.first,r=o.rm,a=t.MAs(3),u=t.oxw(2);t.xp6(1),t.ekj("mt05",!n),t.xp6(3),t.Q6J("ngIf",u.dateSubtypeOpts)("ngIfElse",a),t.xp6(1),t.ekj("std-width",u.dateSubtypeOpts),t.xp6(1),t.Q6J("tgPollRemoveButton",r)("disabled",u.disabled),t.xp6(1),t.Q6J("ngIf",e.controls.label.touched&&e.controls.label.invali
1d)}}function qt(l,o){if(1&l&&(t.TgZ(0,"div",2,3),t.YNc(2,kt,8,9,"div",4),t.qZA(),t._UZ(3,"button",5)),2&l){const e=t.MAs(1),n=t.oxw();t.Q6J("tgExtendableFormControl",n.makeOptsControl)("formControl",n.ctrl),t.xp6(3),t.Q6J("tgAddPollQuestion",e)("txt","addOption")("disabled",n.disabled)}}class B extends Qt.S{constructor(o,e){super(),this.editSvc=o,this.poll=e,this._createdControls=[]}addRows(o){o.numRows++}inputPlaceholderAt(o){return{n:o+1}}makeOptsControl(){const o=this.fb.group({id:this.fb.control(null),label:this.fb.control(null,d.kI.required),options:this.fb.control([],[nt.isNotEmptyValidator,(0,St.createIsUniqueValidator)("poll_identical_labels")])});return this._createdControls.push(o,...Object.values(o.controls)),o}makeStringControl(){const o=this.fb.control(null,d.kI.required);return this._createdControls.push(o),o}markAllAsTouched(){for(const o of this._createdControls)o.markAsTouched();this.cdr.detectChanges()}ngOnDestroy(){super.ngOnDestroy(),(0,I.unsubscribeFromAll)(this._sub)}ngOnInit(){this._sub=[],this.initSimpleLabel(),this.initSubtypeIsDate(),super.ngOnInit()}normaliseWriteValue(o){return Array.isArray(o)?o:[]}createCtrl(){return this.fb.control(this.poll?.getInputPoll()?.questions??[])}initSimpleLabel(){this._sub.push((0,g.observeControlValue)(this.editSvc.form.controls.type).pipe((0,f.U)(o=>o!==_.PollType.DROPDOWN),(0,m.N)(this.pollTypeIsSimpleLabel=!0)).subscribe(o=>{this.pollTypeIsSimpleLabel=o,this.cdr.markForCheck()}))}initSubtypeIsDate(){const o=n=>{switch(n){case C.PollSubType.DATE:return{time:!1};case C.PollSubType.DATETIME:return{time:!0}}},e=this.editSvc.form.controls.subtype;this._sub.push(e.valueChanges.pipe((0,f.U)(o),(0,Zt.O)(this.dateSubtypeOpts=o(e.value)),(0,xt.p)(),(0,h.T)(1)).subscribe(n=>{this.dateSubtypeOpts=n,this.cdr.markForCheck()}))}}B.\u0275fac=function(o){return new(o||B)(t.Y36(x),t.Y36(j.K,8))},B.\u0275cmp=t.Xpm({type:B,selectors:[["tg-poll-question-editor"]],inputs:{timezone:"timezone"},features:[t._Bn([{provide:c.z,useValue:"pollAdmin"},{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>B)}]),t.qOj],decls:3,vars:2,consts:[["dropdownQuestionTpl",""],[3,"ngIf","ngIfElse"],[3,"tgExtendableFormControl","formControl"],["exCtrl",""],[4,"tgExtendableFormControlTpl"],[3,"tgAddPollQuestion","txt","disabled"],[1,"input-group"],[1,"form-control",3,"formControl","placeholder","disableControl","blur"],[1,"input-group-btn"],[3,"tgPollRemoveButton","disabled"],[1,"ml1","mt05"],["exInnerCtrl",""],[3,"errors",4,"ngIf"],[1,"form-control",3,"formControl","placeholder","disableControl","blur","keyup.enter"],[3,"errors"],["txtSubtype",""],[3,"formControl","showTime","timezone","placeholder","disableControl","onPopoverHidden",4,"ngIf","ngIfElse"],[3,"formControl","showTime","timezone","placeholder","disableControl","onPopoverHidden"]],template:function(o,e){if(1&o&&(t.YNc(0,Wt,4,5,"ng-template",null,0,t.W1O),t.YNc(2,qt,4,5,"ng-template",1)),2&o){const n=t.MAs(1);t.xp6(2),t.Q6J("ngIf",e.pollTypeIsSimpleLabel)("ngIfElse",n)}},dependencies:[at.X,dt.s,Bt.c,Jt.s,U.O5,ct.d,ut.f,pt._,mt.jl,mt.Av,It.h,d.Fj,d.JJ,d.oH,Lt,Ut,q.H],styles:["[_nghost-%COMP%]{display:block}.mt05[_ngcontent-%COMP%]{margin-top:.5em}.ml1[_ngcontent-%COMP%]{margin-left:1em}.std-width[_ngcontent-%COMP%]{width:auto}"],changeDetection:0}),(0,s.gn)([(0,Mt.qQ)(Dt.Z)],B.prototype,"inputPlaceholderAt",null),(0,s.gn)([(0,rt.h)()],B.prototype,"makeOptsControl",null),(0,s.gn)([(0,rt.h)()],B.prototype,"makeStringControl",null);var Ht=i(54074),Kt=i(26477),$t=i(4087),Xt=i(81117),te=i(99092),H=i(84773),ee=i(13731),_t=i(3814),K=i(61958),oe=i(28295),ne=i(50272),le=i(94246),G=i(92362);let ie=(()=>{class l extends G.k{constructor(e){super(),this.editSvc=e,this.maxValid=!0,this.minValid=!0}ngOnChanges(e){if(!e.errors)return;const n=this.errors;n?n.pollAnswersReqMinMax?this.minValid=this.maxValid=!1:(this.minValid=!n.pollAnswersMinLte0&&!n.pollAnswersMinGtQuestions,this.maxValid=!n.pollAnswersMaxLte0&&!n.pollAnswersMaxGtQuestions):this.minValid=this.maxValid=!0}ngOnInit(){this.value=this.normaliseWriteValue(this.editSvc.getFormattedValue().answers_required)}onChange(e){super.onChange(e.max||e.min?e:null)}onFieldChange(e,n){this.onChange({...this.value,[e]:se(n)})}normaliseWriteValue(e){return{max:e?.max,min:e?.min}}}return l.\u0275fac=function(e){return new(e||l)(t.Y36(x))},l.\u0275cmp=t.Xpm({type:l,selectors:[["tg-poll-answers-required"]],hostVars:4,hostBindings:function(e,n){2&e&&t.ekj("form-inline",!0)("tg-txt-error-boundary",!0)},inputs:{errors:"errors"},features:[t._Bn([{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>l)},{provide:c.z,useValue:"pollAdmin"}]),t.qOj,t.TTD],decls:6,vars:20,consts:[["type","number",1,"form-control",3,"ngModel","ngModelOptions","disabled","placeholder","ngModelChange","blur.passive"],[1,"tg-txt-error-boundary-receiver"]],template:function(e,n){1&e&&(t.TgZ(0,"input",0),t.NdJ("ngModelChange",function(a){return n.onFieldChange("min",a)})("blur.passive",function(){return n.onTouch()}),t.ALo(1,"tr"),t.qZA(),t.TgZ(2,"span",1),t._uU(3,"-"),t.qZA(),t.TgZ(4,"input",0),t.NdJ("ngModelChange",function(a){return n.onFieldChange("max",a)})("blur.passive",function(){return n.onTouch()}),t.ALo(5,"tr"),t.qZA()),2&e&&(t.ekj("internally-invalid",!n.minValid),t.Q6J("ngModel",n.value.min)("ngModelOptions",n.MODEL_OPTS)("disabled",n.disabled)("placeholder",t.lcZ(1,16,"min")),t.uIk("min",0),t.xp6(2),t.ekj("text-muted",n.disabled),t.xp6(2),t.ekj("internally-invalid",!n.maxValid),t.Q6J("ngModel",n.value.max)("ngModelOptions",n.MODEL_OPTS)("disabled",n.disabled)("placeholder",t.lcZ(5,18,"max")),t.uIk("min",0))},dependencies:[d.Fj,d.wV,d.JJ,d.qQ,d.On,q.H],styles:["[_nghost-%COMP%]{display:inline-block}.ng-invalid.ng-touched[_nghost-%COMP%]   .form-control.internally-invalid[_ngcontent-%COMP%]{border-color:#d43f3a}span[_ngcontent-%COMP%]{margin:0 5px}"],changeDetection:0}),l})();function se(l){if(!l||isNaN(l))return null;const o=parseInt(l);return o<=0?null:o}var ft=i(43383);let ht=(()=>{class l extends G.k{constructor(){super(...arguments),this.options=[]}ngOnChanges(e){!e.configEnum||(this.options=Object.values(this.configEnum))}ngOnInit(){this.value=this.options[0]}normaliseWriteValue(e){return e||this.options[0]}}return l.\u0275fac=function(){let o;return function(n){return(o||(o=t.n5z(l)))(n||l)}}(),l.\u0275dir=t.lG2({type:l,inputs:{configEnum:["enum","configEnum"]},features:[t.qOj,t.TTD]}),l})();function re(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"div")(1,"label")(2,"input",5),t.NdJ("ngModelChange",function(r){t.CHM(e);const a=t.oxw();return t.KtG(a.onChange(r))}),t.qZA(),t._UZ(3,"span",6),t.qZA(),t._UZ(4,"span",6),t.qZA()}if(2&l){const e=o.$implicit,n=t.oxw();
1t.xp6(2),t.Q6J("name",n.name)("disabled",n.disabled)("value",e)("ngModel",n.value)("ngModelOptions",n.MODEL_OPTS),t.xp6(1),t.Q6J("translate","POLL_VISIBILITY_"+e),t.xp6(1),t.Q6J("translate","POLL_VISIBILITY_"+e+"_desc")}}let ae=(()=>{class l extends ht{ngOnInit(){super.ngOnInit(),this.name=(0,ft.Z)("poll-privacy-")}}return l.\u0275fac=function(){let o;return function(n){return(o||(o=t.n5z(l)))(n||l)}}(),l.\u0275cmp=t.Xpm({type:l,selectors:[["tg-poll-privacy-select"]],viewQuery:function(e,n){if(1&e&&t.Gf(d.On,5),2&e){let r;t.iGM(r=t.CRH())&&(n.ngm=r.first)}},hostVars:2,hostBindings:function(e,n){2&e&&t.ekj("tg-txt-error-boundary",!0)},features:[t._Bn([{provide:c.z,useValue:"pollAdmin"},{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>l)}]),t.qOj],decls:5,vars:2,consts:[[1,"form-group"],[1,"col-xs-12","col-sm-2",3,"translate"],[1,"col-xs-12","col-sm-10"],[1,"tbl"],[4,"ngFor","ngForOf"],["type","radio",3,"name","disabled","value","ngModel","ngModelOptions","ngModelChange"],[1,"tg-txt-error-boundary-receiver",3,"translate"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"strong",1),t.TgZ(2,"div",2)(3,"div",3),t.YNc(4,re,5,7,"div",4),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("translate","privacy"),t.xp6(3),t.Q6J("ngForOf",n.options))},dependencies:[U.sg,N.P,K.y,d.Fj,d._,d.JJ,d.On],styles:["[_nghost-%COMP%]{display:block}.form-group[_ngcontent-%COMP%]{margin-bottom:0}label[_ngcontent-%COMP%]{font-weight:400;white-space:nowrap}span[_ngcontent-%COMP%]{margin-left:3px}.tbl[_ngcontent-%COMP%]{display:table}.tbl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-row}.tbl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:table-cell}.tbl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{padding-right:10px}"],changeDetection:0}),l})();var de=i(30021);let ce=(()=>{class l extends G.k{ngOnInit(){this.value=!1}normaliseWriteValue(e){return Boolean(e)}}return l.\u0275fac=function(){let o;return function(n){return(o||(o=t.n5z(l)))(n||l)}}(),l.\u0275cmp=t.Xpm({type:l,selectors:[["tg-poll-allow-amend-abstain"]],inputs:{translation:"translation"},features:[t._Bn([{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>l)}]),t.qOj],decls:4,vars:5,consts:[[1,"form-group"],[1,"col-xs-12","col-sm-2",3,"translate","tr-namespace"],[1,"col-xs-12","col-sm-10"],[3,"ngModel","ngModelOptions","disabled","ngModelChange","touched"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"strong",1),t.TgZ(2,"div",2)(3,"tg-boolean-radio",3),t.NdJ("ngModelChange",function(a){return n.onChange(a)})("touched",function(){return n.onTouch()}),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("translate",n.translation)("tr-namespace","pollAdmin"),t.xp6(2),t.Q6J("ngModel",n.value)("ngModelOptions",n.MODEL_OPTS)("disabled",n.disabled))},dependencies:[de.Q,H.s,N.P,d.JJ,d.On],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),l})();var ue=i(25489);let pe=(()=>{class l extends G.k{constructor(){super(),this.dateField="close_date",this.editSvc=(0,t.f3M)(x),this.parent=(0,t.f3M)(j.K,{optional:!0}),(0,ue.P)("tg-input-error-boundary")}ngOnInit(){const e=this.parent?.getInputPoll(),r=e?.[this.dateField];let a,u;switch(r&&(this.value=r),this.dateField){case"open_date":[a,u]=this.editSvc.getOpenDateVars();break;case"close_date":[a,u]=this.editSvc.getCloseDateVars(e);break;default:return}this.startDate=a,this.minDate=u}normaliseWriteValue(e){return e instanceof Date?e:null}}return l.\u0275fac=function(e){return new(e||l)},l.\u0275cmp=t.Xpm({type:l,selectors:[["tg-poll-date-editor"]],inputs:{dateField:"dateField",timezone:"timezone"},features:[t._Bn([{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>l)}]),t.qOj],decls:1,vars:7,consts:[[3,"showTime","currentDate","ngModel","timezone","ngModelOptions","minDate","disabled","ngModelChange","touched"]],template:function(e,n){1&e&&(t.TgZ(0,"tg-datepicker",0),t.NdJ("ngModelChange",function(a){return n.onChange(a)})("touched",function(){return n.onTouch()}),t.qZA()),2&e&&t.Q6J("showTime",!0)("currentDate",n.startDate)("ngModel",n.value)("timezone",n.timezone)("ngModelOptions",n.MODEL_OPTS)("minDate",n.minDate)("disabled",n.disabled)},dependencies:[at.X,dt.s,H.s,d.JJ,d.On],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),l})();function me(l,o){if(1&l&&t._UZ(0,"option",5),2&l){const e=o.$implicit,n=t.oxw();t.Q6J("ngValue",e)("translate",n.trPrefix+e)("tr-namespace","pollAdmin")}}const ge=["*"];let _e=(()=>{class l extends ht{constructor(){super(...arguments),this.change$=new t.vpe}ngOnDestroy(){this.change$.complete()}ngOnInit(){super.ngOnInit(),this.id=(0,ft.Z)("poll-cfg-select-")}}return l.\u0275fac=function(){let o;return function(n){return(o||(o=t.n5z(l)))(n||l)}}(),l.\u0275cmp=t.Xpm({type:l,selectors:[["tg-poll-plain-config-select"]],hostVars:2,hostBindings:function(e,n){2&e&&t.ekj("tg-input-error-boundary",!0)},inputs:{trPrefix:"trPrefix"},outputs:{change$:"change"},features:[t._Bn([{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>l)}]),t.qOj],ngContentSelectors:ge,decls:6,vars:6,consts:[[1,"form-group"],[1,"col-xs-12","col-sm-2",3,"for"],[1,"col-xs-12","col-sm-10"],[1,"form-control",3,"id","disabled","ngModel","ngModelOptions","ngModelChange","blur.passive","change"],[3,"ngValue","translate","tr-namespace",4,"ngFor","ngForOf"],[3,"ngValue","translate","tr-namespace"]],template:function(e,n){1&e&&(t.F$t(),t.TgZ(0,"div",0)(1,"label",1),t.Hsn(2),t.qZA(),t.TgZ(3,"div",2)(4,"select",3),t.NdJ("ngModelChange",function(a){return n.onChange(a)})("blur.passive",function(){return n.onTouch()})("change",function(a){return n.change$.emit(a)}),t.YNc(5,me,1,3,"option",4),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("for",n.id),t.xp6(3),t.Q6J("id",n.id)("disabled",n.disabled)("ngModel",n.value)("ngModelOptions",n.MODEL_OPTS),t.xp6(1),t.Q6J("ngForOf",n.options))},dependencies:[U.sg,N.P,K.y,d.YN,d.Kr,d.EJ,d.JJ,d.On],styles:["select.form-control[_ngcontent-%COMP%]{display:inline-block;width:auto}[_nghost-%COMP%]{display:block}"],changeDetection:0}),l})();var fe=i(37666),he=i(39805);function Ce(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"div",17)(1,"label",25)(2,"tg-info-bubble"),t._uU(3),t.ALo(4,"tr"),t.qZA(),t._UZ(5,"span",11),t.qZA(),t.TgZ(6,"tg-help-block-container",4)(7,"tg-wysiwyg-editor",33),t.NdJ("touched",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.onTouch())}),t.qZA()()()}if(2&l){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,4,"descriptionTT")),t.xp6(2),t.Q6J("translate","description"),t.xp6(2),t.Q6J("formControl",e.form.controls.description)("disableControl",e.shouldDisable("description"))}}const be=function(l){return{count:l}};function Te(l,o){if(1&l&&(t.TgZ(0,"div",35,36),t._UZ(2,"input",37),t.TgZ(3,"label",38),t._uU(4),t.ALo(5,"applyTrPlaceholders"),t.ALo(6,"translateCount"),t.ALo(7,"tr"),t.qZA()()),2&l){const e=o.$implicit,n=t.MAs(1),r=t.oxw(2);t.Q6J("autoId",!1),t.xp6(2),t.Q6J("id",n.id)("value",e)("formControl",r.form.controls.star_count)("disableControl",r.shouldDisable("star_count")),t.xp6(1),t.Q6J("for",n.id),t.xp6(1),t.Oqu(t.xi3(5,7,t.xi3(6,10,t.lcZ(7,13,"stars_label"),e),t.VKq(15,be,e)))}}function ve(l,o){if(1&l&&(t.TgZ(0,"div",17)(1,"label",25)(2,"tg-info-bubble"),t._uU(3),t.ALo(4,"tr"),t.qZA(),t._UZ(5,"span",11),t.qZA(),t.TgZ(6,"div",4),t.YNc(7,Te,8,17,"div",34),t.qZA()()),2&l){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,3,"pollStarCountTT")),t.xp6(2),t.Q6J("translate","pollStarCount"),t.xp6(2),t.Q6J("ngForOf",e.starRatingOptions)}}function Pe(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"div",17)(1,"label",25)(2,"tg-info-bubble"),t._uU(3),t.ALo(4,"tr"),t.qZA(),t._UZ(5,"span",11),t.qZA(),t.TgZ(6,"tg-help-block-container",4)(7,"tg-poll-answers-required",39),t.NdJ("touched",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.onTouch())}),t.qZA()()()}if(2&l){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,5,"pollAnswersReqTT")),t.xp6(2),t.Q6J("translate","pollAnswersReq"),t.xp6(2),t.Q6J("formControl",e.form.controls.answers_required)("errors",e.form.controls.answers_required.errors)("disableControl",e.shouldDisable("answers_required"))}}function ye(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"tg-poll-allow-amend-abstain",24),t.NdJ("touched",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.onTouch())}),t.qZA()}if(2&l){const e=t.oxw();t.Q6J("formControl",e.form.controls.answers_editable)("disableControl",e.shouldDisable("answers_editable"))("translation","makeAnswersEditable")}}function Ae(l,o){if(1&l){const e=t.EpF();t.TgZ(0,"tg-poll-allow-amend-abstain",24),t.NdJ("touched",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.onTouch())}),t.qZA()}if(2&l){const e=t.oxw();t.Q6J("formControl",e.form.controls.abstain_answers)("disableControl",e.shouldDisable("abstain_answers"))("translation","allowMembersToAbstain")}}function Oe(l,o){if(1&l&&t._UZ(0,"tg-help-block",40),2&l){const e=t.oxw();t.Q6J("control",e.form.controls.open_date)("messages",e.dateErrMessages.openDate)}}function Ee(l,o){if(1&l&&t._UZ(0,"tg-help-block",40),2&l){const e=t.oxw();t.Q6J("control",e.form.controls.close_date)("messages",e.dateErrMessages.closeDate)}}const $=function(){return["col-sm-offset-2","col-xs-12","col-sm-10"]},J=Symbol("sub");class V extends T.v{constructor(o,e,n){super(),this.tr=e,this.editSvc=n,this.PollSubType=C.PollSubType,this.PollType=_.PollType,this.PollVisibility=S.PollVisibility,this.disableQuestionEdits=!1,this.hideDescription=!1,this.showOpenDateErrors=!1,this._disabled=!1,this.answersRequiredEnabled=o.answersRequired.enable,this.answerAmendEnabled=o.answersEditable,this.answerAbstainEnabled=o.showAllowAbstainField,this.starRatingOptions=o.starRatingOptions}get timezone(){return this.form.controls.timezone.value}get _ctrlDisableRules(){const o=()=>this.disableQuestionEdits,a=o,u=()=>this._disabled,P={};return Object.defineProperty(P,"type",{get:o}),Object.defineProperty(P,"subtype",{get:()=>o()||this.form.controls.type.value===_.PollType.DROPDOWN}),Object.defineProperty(P,"summary_after_vote",{get:()=>this.disableAfterVoteCheckbox}),Object.defineProperty(P,"questions",{get:o}),Object.defineProperty(P,"answers_required",{get:()=>o()||this.form.controls.type.value!==_.PollType.MULTI_SELECT}),Object.defineProperty(P,"timezone",{get:a}),Object.defineProperty(P,"open_date",{get:u}),Object.defineProperty(P,"close_date",{get:u}),Object.defineProperty(P,"star_count",{get:()=>o()||this.form.controls.type.value!==_.PollType.RATING_SCALE}),P}markAllAsTouched(){this.form.markAllAsTouched(),this.questionEditor?.markAllAsTouched(),this.onTouch(),this.updateShowOpenDateErrors(),this.cdr.detectChanges()}onDateTouch(){this.onTouch(),this.updateShowOpenDateErrors()}ngOnDestroy(){(0,I.unsubscribeFromAll)(this[J])}ngOnInit(){this[J]=[],this.form=this.editSvc.form,!this.answerAmendEnabled&&this.form.controls.answers_editable.value&&this.form.controls.answers_editable.setValue(!1),!this.answerAbstainEnabled&&this.form.controls.abstain_answers.value&&this.form.controls.abstain_answers.setValue(!1),this.initialState=(0,Q.Z)(this.editSvc.getFormattedValue()),this.subtypeErrMessages={mustUseSubtype:this.tr.translate("specificSubtypeRequired","pollAdmin")},this.dateErrMessages={closeDate:{err_endBeforeStart:this.tr.translate("err_endBeforeStart","poll")},openDate:{err_startAfterEnd:this.tr.translate("err_startAfterEnd","poll")}},this.initDateValidation(),this.initValue(),this.initSummaryAfterVoteText(),this.initForcedSubtype(),this.initQuestionLabel(),this.initPollTypeCategoryReset(),this.initDisableAfterVoteCheckbox(),this.initOpenDateErrors()}onSubtypeManuallyChanged(){this.form.controls.questions.setValue([]),this.cdr.markForCheck()}setDisabledState(o){o!==this._disabled&&(this._disabled=o,this.cdr.detectChanges())}shouldDisable(o){return this._disabled||Boolean(this._ctrlDisableRules[o])}writeValue(o){const e={...this.initialState,...(0,R.Z)(o,Object.keys(this.initialState))};e.visibility||(e.visibility=S.PollVisibility.PUBLIC),e.type||(e.type=_.PollType.SINGLE_SELECT),e.subtype||(e.subtype=C.PollSubType.TEXT),this.form.patchValue(e)}initDateValidation(){this[J].push((0,st.ib)(this.form.controls.open_date,this.form.controls.close_date,this.cdr))}initDisableAfterVoteCheckbox(){const o=this.form.controls.visibility;this[J].push((0,g.observeControlValue)(o).pipe((0,f.U)(e=>e===S.PollVisibility.PRIVATE),(0,m.N)(this.disableAfterVoteCheckbox=o.value===S.PollVisibility.PRIVATE)).subscribe(e=>{this.disableAfterVoteCheckbox=e,this.cdr.markForCheck()}))}initForcedSubtype(){const{type:o,subtype:e}=this.form.controls;this[J].push((0,g.observeControlValue)(o).pipe((0,A.x)(),(0,p.h)(n=>n===_.PollType.DROPDOWN&&e.value!==C.PollSubType.TEXT),(0,Z.H)("[TgPollControl.initForcedSubtype]")).subscribe((0,v.e)(()=>{e.setValue(C.PollSubType.TEXT),this.cdr.markForCheck()})))}initOpenDateErrors(){const{open_date:o,close_date:e}=this.form.controls;this[J].push((0,y.T)(o.statusChanges,o.valueChanges,e.statusChanges,e.valueChanges).subscribe(()=>{this.updateShowOpenDateErrors(),this.cdr.markForCheck()}))}initPollTypeCategoryReset(){const o=this.form.controls.questions;this[J].push(this.editSvc.pollTypeCategory$.pipe((0,h.T)(1),(0,O.g)(0),(0,p.h)(()=>{const e=o.value;return!Array.isArray(e)||e.length>0})).subscribe(()=>{o.setValue([]),this.cdr.markForCheck()}))}initQuestionLabel(){const o=this.form.controls.type,e=n=>n===_.PollType.DROPDOWN?"questions":"options";this[J].push((0,g.observeControlValue)(o).pipe((0,f.U)(e),(0,m.N)(this.questionLabel=e(o.value))).subscribe(n=>{this.questionLabel=n,this.cdr.markForCheck()}))}initSummaryAfterVoteText(){const o=this.form.controls.visibility,e=n=>n===S.PollVisibility.PUBLIC?"summaryBreakdownAfterVote":"summaryAfterVote";this[J].push((0,g.observeControlValue)(o).pipe((0,p.h)(n=>n===S.PollVisibility.PUBLIC||n===S.PollVisibility.STAT_PUBLIC),(0,f.U)(e),(0,m.N)(this.summaryAfterVoteText=e(o.value))).subscribe(n=>{this.summaryAfterVoteText=n,this.cdr.markForCheck()}))}updateShowOpenDateErrors(){const o=this.form.controls.open_date;this.showOpenDateErrors=o.invalid&&o.dirty&&(o.touched||this.form.controls.close_date.touched)}initValue(){this[J].push(this.form.valueChanges.pipe((0,f.U)(()=>this.editSvc.getFormattedValue()),(0,Z.H)("[TgPollControl.value]")).subscribe((0,v.e)(o=>{this._onChangeFn(o)})))}}V.\u0275fac=function(o){return new(o||V)(t.Y36(w.cu),t.Y36(Ht.D),t.Y36(x))},V.\u0275cmp=t.Xpm({type:V,selectors:[["tg-poll-editor"]],viewQuery:function(o,e){if(1&o&&t.Gf(B,5),2&o){let n;t.iGM(n=t.CRH())&&(e.questionEditor=n.first)}},hostVars:2,hostBindings:function(o,e){2&o&&t.ekj("container-fluid",!0)},inputs:{disableQuestionEdits:"disableQuestionEdits",hideDescription:"hideDescription"},exportAs:["tg-poll-editor"],features:[t._Bn([{multi:!0,provide:d.JU,useExisting:(0,t.Gpc)(()=>V)},{provide:c.z,useValue:"pollAdmin"},x]),t.qOj],ngContentSelectors:["*"],decls:75,vars:92,consts:[[1,"form-horizontal","row",3,"formGroup"],[1,"form-group",3,"autoId"],["idTitle","id"],[1,"col-xs-12","col-sm-2",3,"for"],[1,"col-xs-12","col-sm-10"],[1,"form-control",3,"id","formControl","disableControl","blur.passive"],["class","form-group",4,"ngIf"],["idTimezone","id"],[3,"formControl","controlId","disableControl"],[1,"text-info"],[1,"fa","fa-info-circle"],[3,"translate"],[3,"helpBlockClass"],[3,"enum","formControl","disableControl","trPrefix","touched"],[3,"helpBlockClass","messages"],[3,"enum","formControl","disableControl","trPrefix","change","touched"],[3,"enum","formControl","disableControl","touched"],[1,"form-group"],[1,"col-sm-offset-2","col-xs-12","col-sm-10"],[1,"checkbox","no-margin"],[3,"click.passive"],["type","checkbox",3,"value","formControl","disableControl"],[1,"ml3",3,"translate","ngClass"],[3,"formControl","disableControl","translation","touched",4,"ngIf"],[3,"formControl","disableControl","translation","touched"],[1,"col-xs-12","col-sm-2"],[3,"formControl","disableControl","timezone","touched"],["idOpenDate","id"],[3,"formControl","disableControl","controlId","timezone","dateField","touched"],[3,"control","messages",4,"ngIf"],["idCloseDate","id"],[1,"inline-clearable",3,"disabled"],[3,"clearable-input-target","formControl","disableControl","controlId","timezone","dateField","touched"],[3,"formControl","disableControl","touched"],["class","radio-inline",3,"autoId",4,"ngFor","ngForOf"],[1,"radio-inline",3,"autoId"],["id","id"],["type","radio","name","starRating",3,"id","value","formControl","disableControl"],[3,"for"],[3,"formControl","errors","disableControl","touched"],[3,"control","messages"]],template:function(o,e){if(1&o&&(t.F$t(),t.TgZ(0,"form",0)(1,"div",1,2)(3,"label",3),t._uU(4),t.ALo(5,"tr"),t.qZA(),t.TgZ(6,"tg-help-block-container",4)(7,"input",5),t.NdJ("blur.passive",function(){return e.onTouch()}),t.qZA()()(),t.YNc(8,Ce,8,6,"div",6),t.TgZ(9,"div",1,7)(11,"label",3)(12,"tg-info-bubble"),t._uU(13),t.ALo(14,"tr"),t.qZA(),t.TgZ(15,"span"),t._uU(16),t.ALo(17,"tr"),t.qZA()(),t.TgZ(18,"div",4)(19,"tg-help-block-container"),t._UZ(20,"tg-timezone-select",8),t.qZA(),t.TgZ(21,"div",9),t._UZ(22,"i",10)(23,"span",11),t.qZA()()(),t.TgZ(24,"tg-help-block-container",12)(25,"tg-poll-plain-config-select",13),t.NdJ("touched",function(){return e.onTouch()}),t._uU(26),t.ALo(27,"tr"),t.qZA()(),t.YNc(28,ve,8,5,"div",6),t.YNc(29,Pe,8,7,"div",6),t.TgZ(30,"tg-help-block-container",14)(31,"tg-poll-plain-config-select",15),t.NdJ("change",function(){return e.onSubtypeManuallyChanged()})("touched",function(){return e.onTouch()}),t._uU(32),t.ALo(33,"tr"),t.qZA()(),t.TgZ(34,"tg-help-block-container",12)(35,"tg-poll-privacy-select",16),t.NdJ("touched",function(){return e.onTouch()}),t.qZA()(),t.TgZ(36,"div",17)(37,"div",18)(38,"tg-help-block-container",19)(39,"label",20),t.NdJ("click.passive",function(){return e.onTouch()}),t._UZ(40,"input",21)(41,"span",22),t.qZA()()()(),t.YNc(42,ye,1,3,"tg-poll-allow-amend-abstain",23),t.YNc(43,Ae,1,3,"tg-poll-allow-amend-abstain",23),t.TgZ(44,"tg-poll-allow-amend-abstain",24),t.NdJ("touched",function(){return e.onTouch()}),t.qZA(),t.TgZ(45,"div",17)(46,"strong",25),t._uU(47),t.ALo(48,"tr"),t.qZA(),t.TgZ(49,"tg-help-block-container",4)(50,"tg-poll-question-editor",26),t.NdJ("touched",function(){return e.onTouch()}),t.qZA()()(),t.TgZ(51,"div",1,27)(53,"label",3)(54,"tg-info-bubble"),t._uU(55),t.ALo(56,"tr"),t.qZA(),t.TgZ(57,"span"),t._uU(58),t.ALo(59,"tr"),t.qZA()(),t.TgZ(60,"div",4)(61,"tg-poll-date-editor",28),t.NdJ("touched",function(){return e.onDateTouch()}),t.qZA(),t.YNc(62,Oe,1,2,"tg-help-block",29),t.qZA()(),t.TgZ(63,"div",1,30)(65,"label",3)(66,"tg-info-bubble"),t._uU(67),t.ALo(68,"tr"),t.qZA(),t._UZ(69,"span",11),t.qZA(),t.TgZ(70,"div",4)(71,"tg-clearable-input",31)(72,"tg-poll-date-editor",32),t.NdJ("touched",function(){return e.onDateTouch()}),t.qZA()(),t.YNc(73,Ee,1,2,"tg-help-block",29),t.qZA()(),t.Hsn(74),t.qZA()),2&o){const n=t.MAs(2),r=t.MAs(10),a=t.MAs(52),u=t.MAs(64);t.Q6J("formGroup",e.form),t.xp6(1),t.Q6J("autoId",!1),t.xp6(2),t.Q6J("for",n.id),t.xp6(1),t.hij("",t.lcZ(5,70,"title")," *"),t.xp6(3),t.Q6J("id",n.id)("formControl",e.form.controls.title)("disableControl",e.shouldDisable("title")),t.xp6(1),t.Q6J("ngIf",!e.hideDescription),t.xp6(1),t.Q6J("autoId",!1),t.xp6(2),t.Q6J("for",r.id),t.xp6(2),t.Oqu(t.xi3(14,72,"timezoneTT","events.admin")),t.xp6(3),t.hij("",t.lcZ(17,75,"timezone")," *"),t.xp6(4),t.Q6J("formControl",e.form.controls.timezone)("controlId",r.id)("disableControl",e.shouldDisable("timezone")),t.xp6(3),t.Q6J("translate","timezoneDesc"),t.xp6(1),t.Q6J("helpBlockClass",t.DdM(89,$)),t.xp6(1),t.Q6J("enum",e.PollType)("formControl",e.form.controls.type)("disableControl",e.shouldDisable("type"))("trPrefix","POLL_TYPE_"),t.xp6(1),t.Oqu(t.lcZ(27,77,"type")),t.xp6(2),t.Q6J("ngIf",e.form.controls.type.value===e.PollType.RATING_SCALE),t.xp6(1),t.Q6J("ngIf",e.answersRequiredEnabled),t.xp6(1),t.Q6J("helpBlockClass",t.DdM(90,$))("messages",e.subtypeErrMessages),t.xp6(1),t.Q6J("enum",e.PollSubType)("formControl",e.form.controls.subtype)("disableControl",e.shouldDisable("subtype"))("trPrefix","POLL_SUBTYPE_"),t.xp6(1),t.Oqu(t.lcZ(33,79,"subtype")),t.xp6(2),t.Q6J("helpBlockClass",t.DdM(91,$)),t.xp6(1),t.Q6J("enum",e.PollVisibility)("formControl",e.form.controls.visibility)("disableControl",e.shouldDisable("visibility")),t.xp6(5),t.Q6J("value",!0)("formControl",e.form.controls.summary_after_vote)("disableControl",e.shouldDisable("summary_after_vote")),t.xp6(1),t.Q6J("translate",e.summaryAfterVoteText)("ngClass",e.disableAfterVoteCheckbox?"text-muted":"initial-colour"),t.xp6(1),t.Q6J("ngIf",e.answerAmendEnabled),t.xp6(1),t.Q6J("ngIf",e.answerAbstainEnabled),t.xp6(1),t.Q6J("formControl",e.form.controls.can_comment)("disableControl",e.shouldDisable("can_comment"))("translation","canComment"),t.xp6(3),t.hij("",t.lcZ(48,81,e.questionLabel)," *"),t.xp6(3),t.Q6J("formControl",e.form.controls.questions)("disableControl",e.shouldDisable("questions"))("timezone",e.timezone),t.xp6(1),t.Q6J("autoId",!1),t.xp6(2),t.Q6J("for",a.id),t.xp6(2),t.Oqu(t.lcZ(56,83,"openDateTT")),t.xp6(3),t.hij("",t.lcZ(59,85,"openDate")," *"),t.xp6(3),t.Q6J("formControl",e.form.controls.open_date)("disableControl",e.shouldDisable("open_date"))("controlId",a.id
1)("timezone",e.timezone)("dateField","open_date"),t.xp6(1),t.Q6J("ngIf",e.showOpenDateErrors),t.xp6(1),t.Q6J("autoId",!1),t.xp6(2),t.Q6J("for",u.id),t.xp6(2),t.Oqu(t.lcZ(68,87,"closeDateTT")),t.xp6(2),t.Q6J("translate","closeDate"),t.xp6(2),t.Q6J("disabled",e.shouldDisable("close_date")),t.xp6(1),t.Q6J("formControl",e.form.controls.close_date)("disableControl",e.shouldDisable("close_date"))("controlId",u.id)("timezone",e.timezone)("dateField","close_date"),t.xp6(1),t.Q6J("ngIf",e.form.controls.close_date.invalid&&(e.form.controls.open_date.touched||e.form.controls.close_date.touched))}},dependencies:[Kt.d,$t.W,Xt.e,U.mk,U.sg,U.O5,te.X,H.s,k.G,ct.d,N.P,ut.f,pt._,ee.z,_t.u0,_t.k6,K.y,d._Y,d.Fj,d.Wl,d._,d.JJ,d.JL,oe.Q,ne.c,d.oH,d.sg,le.Z,ie,ae,ce,B,pe,_e,fe.d,he.v,q.H],styles:["[_nghost-%COMP%]{display:block}.input-group.ib[_ngcontent-%COMP%]{display:inline-block}.input-group.ib[_ngcontent-%COMP%] > tg-poll-date-editor[_ngcontent-%COMP%]{float:left}.initial-colour[_ngcontent-%COMP%]{color:#000;color:initial}"],changeDetection:0}),(0,s.gn)([(0,E.a)()],V.prototype,"_ctrlDisableRules",null)},77700:(F,D,i)=>{i.d(D,{V0:()=>f,ib:()=>E,mW:()=>A});var s=i(94e3),v=i(15134),Z=i(92529),t=i(92350),d=i(45191);function E(p,h,O){const C=d.MinMaxValidator.forDates(p,h);return C.appendValidators("err_startAfterEnd","err_endBeforeStart"),C.getSynchroniser(O)}function Q(p){return Boolean(p.options?.length)}function R(p){return!p.label}function y(p){return!Q(p)||p.options.some(Z.isFalsy)||Boolean((0,t.isUnique)(p.options,"."))}function f(p,h){if(!p)return null;const O={};return(0,t.isUnique)(p,".","label")&&(O.poll_identical_labels=!0),p.some(R)&&(O[h===v.PollType.DROPDOWN?"poll_empty_question":"poll_empty_opt"]=!0),h===v.PollType.DROPDOWN?p.some(y)&&(O.poll_dropdown_invalid=!0):p.some(Q)&&(O.pollInvalid=!0),(0,s.Z)(O)?null:O}function A({value:p}){return p?(!p.close_date||p.close_date>p.open_date)&&p.subtype&&p.title&&p.type&&p.visibility&&!(0,s.Z)(p.questions)&&!f(p.questions,p.type)?null:{pollInvalid:!0}:null}},95877:(F,D,i)=>{i.d(D,{Q:()=>R});var s=i(52805),v=i(74831),Z=i(36818),t=i(55324),d=i(62598),E=i(39444),Q=i(14026);let R=(()=>{class y{}return y.\u0275fac=function(A){return new(A||y)},y.\u0275mod=Q.oAB({type:y}),y.\u0275inj=Q.cJS({imports:[t.GlobalModule,d.H,v.z8,Z.H3,E.r,s.UX]}),y})()},80733:(F,D,i)=>{i.d(D,{x:()=>p});var s=i(64177),v=i(52805),Z=i(71050),t=i(25462),d=i(21491),E=i(60057),Q=i(94246),y=(i(86366),i(36635)),f=i(14026),A=i(64966);let p=(()=>{class h{constructor(C){(0,Z.Z)(C)}}return h.\u0275fac=function(C){return new(C||h)(f.LFG(A.C))},h.\u0275mod=f.oAB({type:h}),h.\u0275inj=f.cJS({imports:[d.k,E.a,v.u5,t.c,s.ez,Q.Z,y.n]}),h})()}}]);

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.