1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[2543],{64163(w,T,s){s.d(T,{phonesPageRoutes:()=>Vt});var r=s(85802),A=s(17705),S=s(38601),p=s(22972),$=s(40953),F=s(56699),d=s(89417),e=s(35547);let G=(()=>{class i extends p.m{value="";static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-config-dialog"]],hostVars:2,hostBindings:function(o,n){2&o&&e.AVh("modal-lg",!0)},inputs:{value:"value"},features:[e.Vt3],decls:2,vars:4,consts:[["header","_i18n.Config","cancelText","_i18n.Close",3,"buttons","scrollable"],[3,"ngModel","readOnly"]],template:function(o,n){1&o&&(e.j41(0,"app-modal-dialog",0),e.nrm(1,"app-ace",1),e.k0s()),2&o&&(e.Y8G("buttons",n.buttons)("scrollable",!0),e.R7$(),e.Y8G("ngModel",n.value)("readOnly",!0))},dependencies:[$.p,F.x,d.X1,d.BC,d.YN,d.vS],encapsulation:2})}return i})();var k=s(59882),J=s(93049),h=s(97201),C=s(4499);let x=(()=>{class i extends C.d{listSipDevice(t,o="body"){const n=t?.$top,a=t?.$skip,l=t?.$search,c=t?.$filter,f=t?.$count,I=t?.$orderby,R=t?.$select,N=t?.$expand;let m=new h.rx(this.encoder);m=this.addToHttpParams(m,"$top",n,h.l2.Form,!1),m=this.addToHttpParams(m,"$skip",a,h.l2.Form,!1),m=this.addToHttpParams(m,"$search",l,h.l2.Form,!1),m=this.addToHttpParams(m,"$filter",c,h.l2.Form,!1),m=this.addToHttpParams(m,"$count",f,h.l2.Form,!1),m=this.addToHttpParams(m,"$orderby",I,h.l2.Form,!1),m=this.addToHttpParams(m,"$select",R,h.l2.Form,!1),m=this.addToHttpParams(m,"$expand",N,h.l2.Form,!1);let _=this.defaultHeaders;_=this.configuration.addCredentialToHeaders("Application","Authorization",_,"Bearer ");const g=this.configuration.selectHeaderAccept(["application/json"]);void 0!==g&&(_=_.set("Accept",g));let D="json";g&&(D=g.startsWith("text")?"text":this.configuration.isJsonMime(g)?"json":"blob");const{basePath:de,withCredentials:V}=this.configuration;return this.httpClient.request("get",`${de}/SipDevices`,{params:m.toHttpParams(),responseType:D,...V?{withCredentials:V}:{},headers:_,observe:o})}listSipDeviceQuery(t,o="body",n=!1,a){const l=t.$top,c=t.$skip,f=t.$search,I=t.$filter,R=t.$count,N=t.$orderby,m=t.$select,_=t.$expand;let g=new h.rx(this.encoder);return g=this.addToHttpParams(g,"$top",l,h.l2.Form,!1),g=this.addToHttpParams(g,"$skip",c,h.l2.Form,!1),g=this.addToHttpParams(g,"$search",f,h.l2.Form,!1),g=this.addToHttpParams(g,"$filter",I,h.l2.Form,!1),g=this.addToHttpParams(g,"$count",R,h.l2.Form,!1),g=this.addToHttpParams(g,"$orderby",N,h.l2.Form,!1),g=this.addToHttpParams(g,"$select",m,h.l2.Form,!1),g=this.addToHttpParams(g,"$expand",_,h.l2.Form,!1),"/SipDevices?"+g.toString()}pushFirmware(t,o="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling pushFirmware.");const a=t?.sipDevicesSipDevicePushFirmwareRequestBody;if(null==a)throw new Error("Required parameter sipDevicesSipDevicePushFirmwareRequestBody was null or undefined when calling pushFirmware.");let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const c=this.configuration.selectHeaderAccept(["application/json"]);void 0!==c&&(l=l.set("Accept",c));const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(l=l.set("Content-Type",I));let R="json";c&&(R=c.startsWith("text")?"text":this.configuration.isJsonMime(c)?"json":"blob");let N=`/SipDevices(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.PushFirmware`;const{basePath:m,withCredentials:_}=this.configuration;return this.httpClient.request("post",`${m}${N}`,{body:a,responseType:R,..._?{withCredentials:_}:{},headers:l,observe:o})}pushFirmwareQuery(t,o="body",n=!1,a){const l=t.id;if(null==l)throw new Error("Required parameter id was null or undefined when calling pushFirmware.");if(null==t.sipDevicesSipDevicePushFirmwareRequestBody)throw new Error("Required parameter sipDevicesSipDevicePushFirmwareRequestBody was null or undefined when calling pushFirmware.");return`/SipDevices(${this.configuration.encodeParam({name:"id",value:l,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.PushFirmware`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=r.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var b=s(96354),v=s(99437),P=s(19037),E=s(87019),z=s(38357);let me=(()=>{class i{phones=(0,r.WQX)(x);resolveData(t,o,n){return this.phones.listSipDevice({$expand:["DN"],$orderby:["DN/Number"],$filter:"DN/Type eq 'Extension'",$count:!0,$search:(0,z.Bj)(n),$skip:(t-1)*o,$top:o}).pipe((0,b.T)(a=>({value:a.value,totalItems:a["@odata.count"]})))}static \u0275fac=function(o){return new(o||i)};static \u0275prov=r.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var K=s(4801),Te=s(47467),W=s(91413),M=s(96106),U=s(54999),Ae=s(70299);let Ee=(()=>{class i extends p.m{dev={};buttons=U.P.Ok;static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-auth-information"]],features:[e.Vt3],decls:2,vars:3,consts:[["header","_i18n.ExtraPhoneInfo",3,"buttons"],["label","_i18n.WebConsolePassword","data-qa","desk-phone-password",1,"col-md-6",3,"data","conceal"]],template:function(o,n){1&o&&(e.j41(0,"app-modal-dialog",0),e.nrm(1,"app-input-copy-to-cl
1ipboard",1),e.k0s()),2&o&&(e.Y8G("buttons",n.buttons),e.R7$(),e.Y8G("data",n.dev.PhoneWebPassword)("conceal",!0))},dependencies:[$.p,Ae.Y],encapsulation:2})}return i})();var Z=s(62049),Se=s(83185),q=s(2275),he=s(60240),O=s(68018);function Fe(i,u){if(1&i&&(e.j41(0,"app-simple-copy",3),e.EFF(1),e.k0s()),2&i){const t=u;e.Y8G("source",t),e.R7$(),e.JRh(t)}}let Pe=(()=>{class i extends p.m{phoneCommand=(0,r.WQX)(x);firmware=new d.MJ("");checkBoxOptions=[];buttons=U.P.OkCancel;dev={fw:[]};ngOnInit(){this.checkBoxOptions=this.dev.fw.map(t=>({value:t.Id,description:t.Version||"_i18n.Custom",label:t.Filename})),this.checkBoxOptions.length&&this.firmware.setValue(this.checkBoxOptions[0].value)}submit$=()=>this.phoneCommand.pushFirmware({id:this.dev.Id,sipDevicesSipDevicePushFirmwareRequestBody:{firmwareId:this.firmware.value}}).pipe((0,M.Pr)("_i18n.PhoneOfflineErrorMessage"));static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-firmware-dialog"]],inputs:{dev:"dev"},features:[e.Vt3],decls:50,vars:35,consts:[["header","_i18n.PushFirmwareHeader",3,"buttons","submit$"],[1,"table-responsive","mb-3"],[1,"scrollable-table"],[3,"source"],["label","_i18n.Firmware","data-qa","firmware",3,"formControl","options"]],template:function(o,n){if(1&o&&(e.j41(0,"app-modal-dialog",0)(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",1)(5,"table",2)(6,"tbody")(7,"tr")(8,"td"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"td"),e.EFF(12),e.k0s()(),e.j41(13,"tr")(14,"td"),e.EFF(15),e.nI1(16,"translate"),e.k0s(),e.j41(17,"td"),e.EFF(18),e.k0s()(),e.j41(19,"tr")(20,"td"),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.j41(23,"td"),e.EFF(24),e.k0s()(),e.j41(25,"tr")(26,"td"),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"td"),e.EFF(30),e.k0s()(),e.j41(31,"tr")(32,"td"),e.EFF(33),e.nI1(34,"translate"),e.k0s(),e.j41(35,"td"),e.EFF(36),e.k0s()(),e.j41(37,"tr")(38,"td"),e.EFF(39),e.nI1(40,"translate"),e.k0s(),e.j41(41,"td"),e.nVh(42,Fe,2,2,"app-simple-copy",3),e.k0s()(),e.j41(43,"tr")(44,"td"),e.EFF(45),e.nI1(46,"translate"),e.k0s(),e.j41(47,"td"),e.EFF(48),e.k0s()()()()(),e.nrm(49,"field-radio-group",4),e.k0s()),2&o){let a;e.Y8G("buttons",n.buttons)("submit$",n.submit$),e.R7$(2),e.JRh(e.bMT(3,19,"_i18n.PushFirmwareText")),e.R7$(7),e.JRh(e.bMT(10,21,"_i18n.Ext")),e.R7$(3),e.JRh(null==n.dev.DN?null:n.dev.DN.Number),e.R7$(3),e.JRh(e.bMT(16,23,"_i18n.Vendor")),e.R7$(3),e.JRh(null==n.dev.Registrar?null:n.dev.Registrar.Vendor),e.R7$(3),e.JRh(e.bMT(22,25,"_i18n.Model")),e.R7$(3),e.JRh(null==n.dev.Registrar?null:n.dev.Registrar.Model),e.R7$(3),e.JRh(e.bMT(28,27,"_i18n.FwVersion")),e.R7$(3),e.JRh(null==n.dev.Registrar?null:n.dev.Registrar.FirmwareVersion),e.R7$(3),e.JRh(e.bMT(34,29,"_i18n.Name")),e.R7$(3),e.JRh(null==n.dev.DN?null:n.dev.DN.Name),e.R7$(3),e.JRh(e.bMT(40,31,"_i18n.MAC")),e.R7$(3),e.vxM((a=null==n.dev.Registrar?null:n.dev.Registrar.MAC)?42:-1,a),e.R7$(3),e.JRh(e.bMT(46,33,"_i18n.IP")),e.R7$(3),e.JRh(null==n.dev.Registrar?null:n.dev.Registrar.IpAddress),e.R7$(),e.Y8G("formControl",n.firmware)("options",n.checkBoxOptions)}},dependencies:[$.p,q.T,he.u,d.X1,d.BC,d.l_,O.D9],encapsulation:2})}return i})();var L=s(89079),ee=s(83188),$e=s(74536),ye=s(94263),ke=s(22963),Me=s(28768);let De=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-arrow-up-from-bracket-solid-icon"],["","app-arrow-up-from-bracket-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 448 512"],["d","M246.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 109.3V320c0 17.7 14.3 32 32 32s32-14.3 32-32V109.3l73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64c0 53 43 96 96 96H352c53 0 96-43 96-96V352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V352z"]],template:function(o,n){1&o&&(r.qSk(),e.rj2(0,"svg",0),e.Hgh(1,"path",1),e.eux())},encapsulation:2})}return i})();var te=s(68845),ne=s(7707),oe=s(29325),B=s(49769);const we=(i,u)=>u.Id;function Ge(i,u){if(1&i){const t=e.RV6();e.j41(0,"button",22),e.bIt("click",function(){const n=r.eBV(t),a=e.XpG();
1return r.Njj(a.rebootSelected(n))}),e.nrm(1,"app-rotate-regular-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&i){const t=u,o=e.XpG();e.Y8G("disabled",0===t.length),e.R7$(3),e.Lme("",e.bMT(4,3,"_i18n.Reboot"),"",o.formatLength(t.length))}}function Oe(i,u){if(1&i){const t=e.RV6();e.j41(0,"button",23),e.bIt("click",function(){const n=r.eBV(t),a=e.XpG();return r.Njj(a.reprovisionSelected(n))}),e.nrm(1,"app-share-solid-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&i){const t=u,o=e.XpG();e.Y8G("disabled",0===t.length),e.R7$(3),e.Lme("",e.bMT(4,3,"_i18n.ReProvision"),"",o.formatLength(t.length))}}function je(i,u){1&i&&(e.j41(0,"a",8),e.nrm(1,"app-phone-office-light-icon"),e.j41(2,"span",4),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,1,"_i18n.Firmwares")))}function xe(i,u){if(1&i){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){const n=r.eBV(t),a=e.XpG();return r.Njj(a.upgradeSelected(n))}),e.nrm(1,"app-arrow-up-from-bracket-solid-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&i){const t=u,o=e.XpG();e.Y8G("disabled",0===t.length),e.R7$(3),e.Lme("",e.bMT(4,3,"_i18n.Upgrade"),"",o.formatLength(t.length))}}function Le(i,u){if(1&i){const t=e.RV6();e.j41(0,"a",37),e.bIt("click",function(n){r.eBV(t);const a=e.XpG().$implicit,l=e.XpG();return n.stopPropagation(),r.Njj(l.firmware(a))}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&i&&(e.R7$(),e.SpI(" (",e.bMT(2,1,"_i18n.Upgrade"),")"))}function Xe(i,u){if(1&i){const t=e.RV6();e.j41(0,"a",37),e.bIt("click",function(n){r.eBV(t);const a=e.XpG().$implicit,l=e.XpG();return n.stopPropagation(),r.Njj(l.pushFirmware(a))}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&i&&(e.R7$(),e.SpI(" (",e.bMT(2,1,"_i18n.Upgrade"),")"))}function We(i,u){if(1&i&&(e.j41(0,"app-simple-copy",28),e.EFF(1),e.k0s()),2&i){const t=u;e.Y8G("source",t),e.R7$(),e.JRh(t)}}function Ue(i,u){if(1&i){const t=e.RV6();e.j41(0,"tr",25),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.selector.toggle(n))}),e.j41(1,"td",12)(2,"app-checker",26),e.bIt("ngModelChange",function(n){const a=r.eBV(t).$implicit,l=e.XpG();return r.Njj(l.selector.setSelected(a,n))})("checkerClick",function(n){const a=r.eBV(t).$implicit,l=e.XpG();return r.Njj(l.selector.handleCheckerClick(a,n))}),e.k0s()(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td",14),e.EFF(6),e.k0s(),e.j41(7,"td",15),e.EFF(8),e.k0s(),e.j41(9,"td",16)(10,"span"),e.EFF(11),e.k0s(),e.nVh(12,Le,3,3,"a",27),e.nVh(13,Xe,3,3,"a",27),e.k0s(),e.j41(14,"td",16),e.EFF(15),e.k0s(),e.j41(16,"td",16),e.nVh(17,We,2,2,"app-simple-copy",28),e.k0s(),e.j41(18,"td",17),e.EFF(19),e.k0s(),e.j41(20,"td",29)(21,"row-action-button")(22,"li",30)(23,"a",31),e.EFF(24),e.nI1(25,"translate"),e.k0s()(),e.j41(26,"li",30)(27,"button",32),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.reboot(n))}),e.EFF(28),e.nI1(29,"translate"),e.k0s()(),e.j41(30,"li",30)(31,"button",33),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.configModal(n))}),e.EFF(32),e.nI1(33,"translate"),e.k0s()(),e.j41(34,"li",30)(35,"button",34),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.routeToUserEditor(n))}),e.EFF(36),e.nI1(37,"translate"),e.k0s()(),e.j41(38,"li",30)(39,"button",35),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.reprovision(n))}),e.EFF(40),e.nI1(41,"translate"),e.k0s()(),e.j41(42,"li",30)(43,"button",36),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.extras(n))}),e.EFF(44),e.nI1(45,"translate"),e.k0s()()()()()}if(2&i){let t;const o=u.$implicit,n=e.XpG();e.R7$(2),e.Y8G("ngModel",n.selector.isRowSelected(o)),e.R7$(2),e.JRh(null==o.DN?null:o.DN.Number),e.R7$(2),e.JRh(null==o.Registrar?null:o.Registrar.Vendor),e.R7$(2),e.JRh(null==o.Registrar?null:o.Registrar.Model),e.R7$(3),e.JRh(null==o.Registrar?null:o.Registrar.FirmwareVersion),e.R7$(),e.vxM(!n.multiFirmwares&&null!=o.Registrar&&o.Registrar.FirmwareAvailable?12:-1),e.R7$(),e.vxM(n.multiFirmwares&&o.fw.length?13:-1),e.R7$(2),e.JRh(null==o.DN?null:o.DN.Name),e.R7$(2),e.vxM((t=null==o.Registrar?null:o.Registrar.MAC)?17:-1,t),e.R7$(2),e.JRh(null==o.Registrar?null:o.Registrar.IpAddress),e.R7$(3),e.AVh("disabled",!n.webLinkEnabled(o)),e.R7$(),e.AVh("disabled",!n.webLinkEnabled(o)),e.Y8G("href",null==o.Registrar?null:o.Registrar.InterfaceLink,e.B4B),e.R7$(),e.SpI(" ",e.bMT(25,33,"_i18n.DeviceWebConsoleHeader")," "),e.R7$(2),e.AVh("disabled",!n.rebootEnabled(o)),e.R7$(),e.Y8G("disabled",!n.rebootEnabled(o)),e.R7$(),e.SpI(" ",e.bMT(29,35,"_i18n.Reboot")," "),e.R7$(2),e.AVh("disabled",!n.configEnabled(o)),e.R7$(),e.Y8G("disabled",!n.configEnabled(o)),e.R7$(),e.SpI(" ",e.bMT(33,37,"_i18n.Config")," "),e.R7$(2),e.AVh("disabled",!n.editUserEnabled(o)),e.R7$(),e.Y8G("disabled",!n.editUserEnabled(o)),e.R7$(),e.SpI(" ",e.bMT(37,39,"_i18n.EditUser")," "),e.R7$(2),e.AVh("disabled",!n.reprovisionEnabled(o)),e.R7$(),e.Y8G("disabled",!n.reprovisionEnabled(o)),e.R7$(),e.SpI(" ",e.bMT(41,41,"_i18n.ReProvision")," "),e.R7$(4),e.SpI(" ",e.bMT(45,43,"_i18n.ExtraPhoneInfo")," ")}}let Be=(()=>{class i{modalService=(0,r.WQX)(S.B);cd=(0,r.WQX)(A.gRc);httpClient=(0,r.WQX)(W.Qq);phoneCommand=(0,r.WQX)(Te.l);router=(0,r.WQX)(k.Ix);destroy$=(0,r.WQX)(r.abz);selector;pager;devices=[];firmwares;multiFirmwares;constructor(){const t=this.modalService,o=(0,r.WQX)(me),n=(0,r.WQX)(k.nX),a=this.destroy$;this.selector=new Z.a({cd:this.cd,keySelector:c=>c.Id});const l=n.snapshot.data;this.setFirmwares(l.firmwares),this.multiFirmwares=!!l.settings?.PhoneAllowMultiFirmwares,this.pager=new K.f(a,o,l.phones,E.z9),this.pager.pagedItems$.pipe((0,L.pQ)(this.destroy$)).subscribe({next:c=>{this.updateItems(c)},error:c=>t.error(c)})}setFirmwares(t){this.firmwares=(0,Se.$z)(t,o=>o.Model)}webLinkEnabled(t){return t.Registrar&&t.Registrar.InterfaceLink&&16&t.Registrar.Capabilities}rebootEnabled(t){return t.Registrar&&t.DN&&2&t.Registrar.Capabilities}configEnabled(t){return t.ProvLink}editUserEnabled(t){return t.DN}reprovisionEnabled(t){return t.Registrar&&t.DN&&8&t.Registrar.Capabilities}firmware(t){void 0!==t.DN?.Id&&this.phoneCommand.upgrade(t.Registrar)}pushFirmware(t){void 0!==t.DN?.Id&&this.modalService.showComponent(Pe,{initialState:{dev:t}})}reboot(t){void 0!==t.DN?.Id&&this.phoneCommand.reboot(t.Registrar?.MAC)}routeToUserEditor(t){if(void 0!==t.DN?.Id){if(t.DN?.Number?.startsWith("HD"))return void this.router.navigate(["office","phones","hotdesking",t.DN?.Id]);this.router.navigate(["office","users","edit",t.DN?.Id])}}reprovision(t){void 0!==t.DN?.Id&&this.phoneCommand.reprovision(t.Registrar?.MAC)}extras(t){this.modalService.showComponent(Ee,{initialState:{dev:t}})}updateItems(t){this.cd.markForCheck(),this.devices=t.value.map(o=>({...o,fw:o.Registrar?.Model?this.firmwares[o.Registrar?.Model]??[]:[]})),this.selector.onDataChanged(this.devices)}rebootSelectedValues(){return this.selector.selectedValues.filter(t=>this.rebootEnabled(t))}reprovisionSelectedValues(){return this.selector.selectedValues.filter(t=>this.reprovisionEnabled(t))}firmwareSelectedValues(){return this.selector.selectedValues.filter(t=>t.Registrar?.FirmwareAvailable)}formatLength(t){return t>0?` (${t})`:""}rebootSelected(t){this.phoneCommand.batchReboot(t.map(o=>o.Registrar.MAC)).subscribe({complete:()=>{this.selector.resetAll()}})}upgradeSelected(t){this.phoneCommand.batchUpgrade(t.map(o=>o.Registrar)).subscribe({complete:()=>{this.selector.resetAll()}})}reprovisionSelected(t){this.phoneCommand.batchReprovision(t.map(o=>o.Registrar.MAC)).subscribe({complete:()=>{this.selector.resetAll()}})}configModal(t){const o=t.ProvLink;if(!o)return;const n=t.Registrar?.Vendor?.toLowerCase();n&&["grandstream","htek"].includes(n)?window.open(o,"_blank"):this.httpClient.get(o,{responseType:"text"}).pipe((0,M.Pr)("_i18n.UserNotFoundPhoneConfigErrorMessage"),(0,M.Tg)(this.modalService),(0,L.pQ)(this.destroy$)).subscribe(a=>{this.modalService.showComponent(G,{initialState:{value:a}})})}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-phones-list"]],decls:59,vars:47,consts:[["header","_i18n.Phones",3,"helpUrl"],["top-bar","",1,"button-group"],["id","btnOptions","data-qa","options","routerLink","options","type","button",1,"btn","btn-primary"],["id","btnPnp","data-qa","pnp","routerLink","pnp",1,"btn","btn-primary"],[1,"lh-1"],["id","btnHotdesking","data-qa","hotdesking","routerLink","hotdesking",1,"btn","btn-primary"],["id","btnReboot","data-qa","reboot","type","button",1,"btn","btn-primary",3,"disabled"],["id","btnReprovision","data-qa","reprovision","type","button",1,"btn","btn-primary",3,"disabled"],["id","btnFirmwares","data-qa","firmwares","routerLink","firmwares",1,"btn","btn-primary"],["id","btnUpgrade","data-qa","upgrade","type","button",1,"btn","btn-primary",3,"disabled"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],["data-qa","checkbox-all",3,"ngModelChange","ngModel"],[1,"md-visible"],[1,"lg-visible"],[1,"xxl-visible"],[1,"xl-visible"],[1,"actions"],[1,"clickable"],["colspan","9"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],["id","btnReboot","data-qa","reboot","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnReprovision","data-qa","reprovision","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnUpgrade","data-qa","upgrade","type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"clickable",3,"click"],[3,"ngModelChange","checkerClick","ngModel"],[1,"link","dashed"],[3,"source"],["data-qa","actions",1,"actions"],["role","menuitem"],["data-qa","phone-ui","rel","noopener","target","_blank",1,"dropdown-item",3,"href"],["type","button","data-qa","reboot",1,"dropdown-item",3,"click","disabled"],["type","button","data-qa","config",1,"dropdown-item",3,"click","disabled"],["type","button","data-qa","edit-user",1,"dropdown-item",3,"click","disabled"],["type","button","data-qa","reprovision",1,"dropdown-item",3,"click","disabled"],["type","button","data-qa","extras",1,"dropdown-item",3,"click"],[1,"link","dashed",3,"click"]],template:function(o,n){if(1&o&&(e.j41(0,"app-page",0)(1,"div",1)(2,"button",2),e.nrm(3,"app-cog-solid-icon"),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"a",3),e.nrm(8,"app-phone-office-light-icon"),e.j41(9,"span",4),e.EFF(10),e.nI1(11,"translate"),e.k0s()(),e.j41(12,"a",5),e.nrm(13,"app-phone-office-light-icon"),e.j41(14,"span",4),e.EFF(15),e.nI1(16,"translate"),e.k0s()(),e.nVh(17,Ge,5,5,"button",6),e.nVh(18,Oe,5,5,"button",7),e.nVh(19,je,5,3,"a",8),e.nVh(20,xe,5,5,"button",9),e.k0s(),e.nrm(21,"search-bar",10),e.j41(22,"table",11)(23,"thead")(24,"tr")(25,"th",12)(26,"app-checker",13),e.bIt("ngModelChange",function(l){return n.selector.setSelectAll(l)}),e.k0s()(),e.j41(27,"th"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"th",14),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.j41(33,"th",15),e.EFF(34),e.nI1(35,"translate"),e.k0s(),e.j41(36,"th",16),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"th",16),e.EFF(40),e.nI1(41,"translate"),e.k0s(),e.j41(42,"th",16),e.EFF(43),e.nI1(44,"translate"),e.k0s(),e.j41(45,"th",17),e.EFF(46),e.nI1(47,"translate"),e.k0s(),e.nrm(48,"th",18),e.k0s()(),e.j41(49,"tbody"),e.Z7z(50,Ue,46,45,"tr",19,we),e.k0s(),e.j41(52,"tfoot")(53,"tr")(54,"td",20)(55,"app-paging",21),e.nI1(56,"async"),e.nI1(57,"async"),e.nI1(58,"async"),e.bIt("pageChanged",function(l){return n.pager.pageChanged(l)}),e.k0s()()()()()()),2&o){let a,l,c;e.Y8G("helpUrl","_i18n.IPPhonesUri"),e.R7$(5),e.JRh(e.bMT(6,21,"_i18n.Options")),e.R7$(5),e.JRh(e.bMT(11,23,"_i18n.PNP")),e.R7$(5),e.JRh(e.bMT(16,25,"_i18n.HDPhones")),e.R7$(2),e.vxM((a=n.rebootSelectedValues())?17:-1,a),e.R7$(),e.vxM((l=n.reprovisionSelectedValues())?18:-1,l),e.R7$(),e.vxM(n.multiFirmwares?19:-1),e.R7$(),e.vxM((c=!n.multiFirmwares&&n.firmwareSelectedValues())?20:-1,c),e.R7$(),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(29,27,"_i18n.Ext")),e.R7$(3),e.JRh(e.bMT(32,29,"_i18n.Vendor")),e.R7$(3),e.JRh(e.bMT(35,31,"_i18n.Model")),e.R7$(3),e.JRh(e.bMT(38,33,"_i18n.FwVersion")),e.R7$(3),e.JRh(e.bMT(41,35,"_i18n.Name")),e.R7$(3),e.JRh(e.bMT(44,37,"_i18n.MAC")),e.R7$(3),e.JRh(e.bMT(47,39,"_i18n.IP")),e.R7$(4),e.Dyx(n.devices),e.R7$(5),e.Y8G("currentPage",e.bMT(56,41,n.pager.currentPage$))("itemsPerPage",e.bMT(57,43,n.pager.pageSize$))("totalItems",e.bMT(58,45,n.pager.totalCount$))("showBoundaryLinks",!0)}},dependencies:[ee.H,$e.Z,J.Wk,ye.D,ke.I,Me.f,De,te.L,d.X1,d.BC,d.l_,ne.$,d.YN,d.vS,q.T,oe.I,E.u4,B.Jj,O.D9],encapsulation:2,changeDetection:0})}return i})();var ie=s(983),y=s(25558),X=s(18810),Ve=s(27468),He=s(28793),H=s(7673),ue=s(85343),ae=s(70980),Ye=s(11860);let fe=(()=>{class i extends C.d{deleteDeviceInfo(t,o="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling deleteDeviceInfo.");const a=t?.ifMatch;let l=this.defaultHeaders;null!=a&&(l=l.set("If-Match",String(a))),l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const c=this.configuration.selectHeaderAccept(["application/json"]);void 0!==c&&(l=l.set("Accept",c));let f="json";c&&(f=c.startsWith("text")?"text":this.configuration.isJsonMime(c)?"json":"blob");let I=`/DeviceInfos(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:R,withCredentials:N}=this.configuration;return this.httpClient.request("delete",`${R}${I}`,{responseType:f,...N?{withCredentials:N}:{},headers:l,observe:o})}deleteDeviceInfoQuery(t,o="body",n=!1,a){const l=t.id;if(null==l)throw new Error("Required parameter id was null or undefined when calling deleteDeviceInfo.");return`/DeviceInfos(${this.configuration.encodeParam({name:"id",value:l,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}getDeviceInfo(t,o="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling getDeviceInfo.");const a=t?.$select,l=t?.$expand;let c=new h.rx(this.encoder);c=this.addToHttpParams(c,"$select",a,h.l2.Form,!1),c=this.addToHttpParams(c,"$expand",l,h.l2.Form,!1);let f=this.defaultHeaders;f=this.configuration.addCredentialToHeaders("Application","Authorization",f,"Bearer ");const I=this.configuration.selectHeaderAccept(["application/json"]);void 0!==I&&(f=f.set("Accept",I));let R="json";I&&(R=I.startsWith("text")?"text":this.configuration.isJsonMime(I)?"json":"blob");let N=`/DeviceInfos(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:m,withCredentials:_}=this.configuration;return this.httpClient.request("get",`${m}${N}`,{params:c.toHttpParams(),responseType:R,..._?{withCredentials:_}:{},headers:f,observe:o})}getDeviceInfoQuery(t,o="body",n=!1,a){const l=t.id;if(null==l)throw new Error("Required parameter id was null or undefined when calling getDeviceInfo.");const c=t.$select,f=t.$expand;let I=new h.rx(this.encoder);return I=this.addToHttpParams(I,"$select",c,h.l2.Form,!1),I=this.addToHttpParams(I,"$expand",f,h.l2.Form,!1),`/DeviceInfos(${this.configuration.encodeParam({name:"id",value:l,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+I.toString()}listDeviceInfo(t,o="body"){const n=t?.$top,a=t?.$skip,l=t?.$search,c=t?.$filter,f=t?.$count,I=t?.$orderby,R=t?.$select,N=t?.$expand;let m=new h.rx(this.encoder);m=this.addToHttpParams(m,"$top",n,h.l2.Form,!1),m=this.addToHttpParams(m,"$skip",a,h.l2.Form,!1),m=this.addToHttpParams(m,"$search",l,h.l2.Form,!1),m=this.addToHttpParams(m,"$filter",c,h.l2.Form,!1),m=this.addToHttpParams(m,"$count",f,h.l2.Form,!1),m=this.addToHttpParams(m,"$orderby",I,h.l2.Form,!1),m=this.addToHttpParams(m,"$select",R,h.l2.Form,!1),m=this.addToHttpParams(m,"$expand",N,h.l2.Form,!1);let _=this.defaultHeaders;_=this.configuration.addCredentialToHeaders("Application","Authorization",_,"Bearer ");const g=this.configuration.selectHeaderAccept(["application/json"]);void 0!==g&&(_=_.set("Accept",g));let D="json";g&&(D=g.startsWith("text")?"text":this.configuration.isJsonMime(g)?"json":"blob");const{basePath:de,withCredentials:V}=this.configuration;retu
1rn this.httpClient.request("get",`${de}/DeviceInfos`,{params:m.toHttpParams(),responseType:D,...V?{withCredentials:V}:{},headers:_,observe:o})}listDeviceInfoQuery(t,o="body",n=!1,a){const l=t.$top,c=t.$skip,f=t.$search,I=t.$filter,R=t.$count,N=t.$orderby,m=t.$select,_=t.$expand;let g=new h.rx(this.encoder);return g=this.addToHttpParams(g,"$top",l,h.l2.Form,!1),g=this.addToHttpParams(g,"$skip",c,h.l2.Form,!1),g=this.addToHttpParams(g,"$search",f,h.l2.Form,!1),g=this.addToHttpParams(g,"$filter",I,h.l2.Form,!1),g=this.addToHttpParams(g,"$count",R,h.l2.Form,!1),g=this.addToHttpParams(g,"$orderby",N,h.l2.Form,!1),g=this.addToHttpParams(g,"$select",m,h.l2.Form,!1),g=this.addToHttpParams(g,"$expand",_,h.l2.Form,!1),"/DeviceInfos?"+g.toString()}provision(t,o="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling provision.");const a=t?.deviceInfosDeviceInfoProvisionRequestBody;if(null==a)throw new Error("Required parameter deviceInfosDeviceInfoProvisionRequestBody was null or undefined when calling provision.");let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const c=this.configuration.selectHeaderAccept(["application/json"]);void 0!==c&&(l=l.set("Accept",c));const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(l=l.set("Content-Type",I));let R="json";c&&(R=c.startsWith("text")?"text":this.configuration.isJsonMime(c)?"json":"blob");let N=`/DeviceInfos(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.Provision`;const{basePath:m,withCredentials:_}=this.configuration;return this.httpClient.request("post",`${m}${N}`,{body:a,responseType:R,..._?{withCredentials:_}:{},headers:l,observe:o})}provisionQuery(t,o="body",n=!1,a){const l=t.id;if(null==l)throw new Error("Required parameter id was null or undefined when calling provision.");if(null==t.deviceInfosDeviceInfoProvisionRequestBody)throw new Error("Required parameter deviceInfosDeviceInfoProvisionRequestBody was null or undefined when calling provision.");return`/DeviceInfos(${this.configuration.encodeParam({name:"id",value:l,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})/Pbx.Provision`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=r.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ge=(()=>{class i{phones=(0,r.WQX)(fe);resolveData(t,o,n){return this.phones.listDeviceInfo({$count:!0,$orderby:["DetectedAt desc"],$search:(0,z.Bj)(n),$skip:(t-1)*o,$top:o}).pipe((0,b.T)(a=>({value:a.value,totalItems:a["@odata.count"]})))}static \u0275fac=function(o){return new(o||i)};static \u0275prov=r.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Je=s(95847),Ie=s(63674),ze=s(82971),Re=s(13961),re=s(95604),Ke=s(61851),Ze=s(66300),be=s(13220);const qe=(i,u,t,o)=>({vendor:i,model:u,fw:t,ip:o}),et=()=>["Extension"];function tt(i,u){if(1&i&&e.nrm(0,"field-select",2),2&i){const t=e.XpG();e.Y8G("options",t.networkInterfaces)}}let _e=(()=>{class i extends p.m{cd=(0,r.WQX)(A.gRc);fb=(0,r.WQX)(d.ok);usersApi=(0,r.WQX)(Je.u);isLoading=(0,r.vPA)(!1);networkInterfaces=[];
1sub=new Re.yU;template;is3CXPhone=!1;phoneModel;pbxDevice={};buttons=U.P.OkCancel;form=this.fb.group({localInterface:this.fb.nonNullable.control("",d.k0.required),ext:this.fb.control(null,d.k0.required)});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);getPayload(){return this.form.value.ext?.Id}assignPhone=()=>{const t=this.form.value,o=t.ext.Id;if(this.is3CXPhone)return(0,H.of)(!0);if(!this.phoneModel||!this.template)return(0,X.$)(()=>new Error("Model & template should be provided"));const n=this.pbxDevice.SbcName?Ie.Y.Sbc:Ie.Y.LocalLan,a=this.pbxDevice.MAC.toUpperCase(),l={Name:this.phoneModel.Name,TemplateName:this.template.Id,MacAddress:a,Interface:t.localInterface,Settings:{IsSBC:!1,Codecs:this.template.Codecs,TimeZone:"",RingTone:this.template.RingTones[0]??null,QueueRingTone:this.template.DefaultQueueRingTone??this.template.QueueRingTones[0],SbcName:this.pbxDevice.SbcName,TimeFormat:this.template.TimeFormats[0]??null,DateFormat:this.template.DateFormats[0]??null,PhoneLanguage:this.template.Languages[0]??null,ProvisionType:n}};return this.isLoading.set(!0),this.usersApi.installFirmware({usersInstallFirmwareRequestBody:{phone:{Model:this.phoneModel.Name,UserAgent:this.phoneModel.UserAgent}}}).pipe((0,v.W)(()=>(0,H.of)("Silently proceed for now")),(0,y.n)(()=>this.usersApi.getUser({id:o,$select:["Phones"],$expand:["Phones"]})),(0,y.n)(c=>this.usersApi.updateUser({id:o,pbxUser:{Phones:[...c.Phones.filter(f=>f.MacAddress!==l.MacAddress).map(f=>({Id:f.Id})),l]}})),(0,v.W)(c=>(0,X.$)(()=>c instanceof W.yz&&400===c.status&&c.error?.error?.message?.includes(ze.g.XapiDuplicate)?new Error("_i18n.PhoneDuplicate"):c)),(0,ae.j)(()=>this.isLoading.set(!1)))};get disableNetworkInterface(){return this.pbxDevice.ViaSBC||this.is3CXPhone}ngOnDestroy(){this.sub.unsubscribe()}ngOnInit(){this.networkInterfaces.length>0&&this.form.patchValue({localInterface:this.networkInterfaces[0]}),this.disableNetworkInterface&&this.form.controls.localInterface.disable()}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-assign-extension-dialog"]],features:[e.Vt3],decls:8,vars:18,consts:[["header","_i18n.AssignPhoneToExtension",3,"submitted","buttons","formGroup","submit$","autofocus","validateBeforeSubmit"],["placeholder","_i18n.ChooseExtension","formControlName","ext",3,"searchDnTypes"],["data-qa","interface","label","_i18n.PhoneNetworkInterface","formControlName","localInterface",3,"options"],[3,"show"]],template:function(o,n){1&o&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"field-wrapper"),e.nrm(5,"app-dn-select",1),e.k0s(),e.nVh(6,tt,1,1,"field-select",2),e.nrm(7,"ngx-loading",3),e.k0s()),2&o&&(e.Y8G("buttons",n.buttons)("formGroup",n.form)("submit$",n.assignPhone)("autofocus",!0)("validateBeforeSubmit",n.validateBeforeSubmit),e.R7$(2),e.SpI(" ",e.i5U(3,9,"_i18n.AssignPhoneDescription",e.ziG(12,qe,n.pbxDevice.Vendor,n.pbxDevice.Model,n.pbxDevice.FirmwareVersion,n.pbxDevice.NetworkPath))," "),e.R7$(3),e.Y8G("searchDnTypes",e.lJ4(17,et)),e.R7$(),e.vxM(n.disableNetworkInterface?-1:6),e.R7$(),e.Y8G("show",n.isLoading()))},dependencies:[$.p,d.X1,d.BC,d.cb,d.j4,d.JD,re.z,Ke.A,Ze.q,be.kq,be.bt,O.D9],encapsulation:2,changeDetection:0})}return i})();var nt=s(60967),ot=s(67374),it=s.n(ot),at=s(65756),rt=s(38969);function st(i,u){if(1&i){const t=e.RV6();e.j41(0,"tr",14),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.selector.toggle(n))}),e.j41(1,"td",6)(2,"app-checker",15),e.bIt("ngModelChange",function(n){const a=r.eBV(t).$implicit,l=e.XpG();return r.Njj(l.selector.setSelected(a,n))})("checkerClick",function(n){const a=r.eBV(t).$implicit,l=e.XpG();return r.Njj(l.selector.handleCheckerClick(a,n))}),e.k0s()(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td",8),e.EFF(6),e.k0s(),e.j41(7,"td",9),e.EFF(8),e.k0s(),e.j41(9,"td",9)(10,"app-simple-copy",16),e.EFF(11),e.k0s()(),e.j41(12,"td",9),e.EFF(13),e.k0s(),e.j41(14,"td"),e.EFF(15),e.k0s(),e.j41(16,"td",17)(17,"row-action-button")(18,"li",18)(19,"a",19),e.EFF(20),e.nI1(21,"translate"),e.k0s()(),e.j41(22,"li",18)(23,"button",20),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();
1return r.Njj(a.assignExtension(n))}),e.EFF(24),e.nI1(25,"translate"),e.k0s()(),e.j41(26,"li",18)(27,"button",21),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.reject(n))}),e.EFF(28),e.nI1(29,"translate"),e.k0s()()()()()}if(2&i){const t=u.$implicit,o=e.XpG();e.R7$(2),e.Y8G("ngModel",o.selector.isRowSelected(t)),e.R7$(2),e.JRh(t.Vendor),e.R7$(2),e.JRh(t.Model),e.R7$(2),e.SpI(" ",t.FirmwareVersion," "),e.R7$(2),e.Y8G("source",t.MAC),e.R7$(),e.SpI(" ",t.MAC," "),e.R7$(2),e.SpI(" ",o.fromNow(t.DetectedAt)," "),e.R7$(2),e.JRh(t.NetworkPath),e.R7$(3),e.AVh("disabled",!o.webLinkEnabled(t)),e.R7$(),e.AVh("disabled",!o.webLinkEnabled(t)),e.Y8G("href",t.InterfaceLink,e.B4B),e.R7$(),e.SpI(" ",e.bMT(21,19,"_i18n.DeviceWebConsoleHeader")," "),e.R7$(2),e.AVh("disabled",!o.assignEnabled(t)),e.R7$(),e.Y8G("disabled",!o.assignEnabled(t)),e.R7$(),e.SpI(" ",e.bMT(25,21,"_i18n.Assign")," "),e.R7$(4),e.SpI(" ",e.bMT(29,23,"_i18n.Delete")," ")}}let lt=(()=>{class i{modalService=(0,r.WQX)(S.B);phoneTemplateCache=(0,r.WQX)(nt.K);cd=(0,r.WQX)(A.gRc);networkInterfacesApiService=(0,r.WQX)(Ye.U);pnpService=(0,r.WQX)(fe);router=(0,r.WQX)(k.Ix);route=(0,r.WQX)(k.nX);destroy$=(0,r.WQX)(r.abz);pager;devices=[];deleteEnabled=!0;addEnabled=!0;selector;constructor(){const t=this.modalService,o=this.cd,n=(0,r.WQX)(ge),a=this.route,l=this.destroy$;this.selector=new Z.a({cd:o,keySelector:f=>f.Id,notKeepSelectedOnDataChange:!0}),this.pager=new K.f(l,n,a.snapshot.data.phones,E.z9),this.pager.pagedItems$.pipe((0,L.pQ)(this.destroy$)).subscribe({next:f=>{this.updateItems(f)},error:f=>t.error(f)})}assignEnabled(t){return t?.TemplateName||"3CX"===t?.Vendor}webLinkEnabled(t){return t.InterfaceLink&&!t.SbcName&&"3CX"!==t.Vendor}reprovisionAssignedDevice(t){return this.modalService.warning(t.AssignedUser?"_i18n.AlreadyAssignedUser":"_i18n.AlreadyAssignedFxsDect",{number:t.AssignedUser}),ie.w}provision(t,o){return this.pnpService.provision({id:t.Id,deviceInfosDeviceInfoProvisionRequestBody:{userId:o}}).pipe((0,y.n)(()=>ie.w))}assign3CXPhone(t){return t.ViaSBC&&!t.SbcName?(0,X.$)(()=>new Error("_i18n.MissingSBC")):this.modalService.showComponent(_e,{initialState:{is3CXPhone:!0,networkInterfaces:[],pbxDevice:t}}).pipe((0,M.Sf)(),(0,y.n)(o=>this.provision(t,o)))}assignDevice(t){return(0,Ve.p)([this.networkInterfacesApiService.listNetworkInterface({}),this.phoneTemplateCache.getPhoneTemplate(t.TemplateName)]).pipe((0,y.n)(([o,n])=>{const a=n.Models?.find(l=>l.UserAgent===t.Model);return a?a.AddAllowed?t.ViaSBC&&!t.SbcName?(0,X.$)(()=>new Error("_i18n.MissingSBC")):this.modalService.showComponent(_e,{initialState:{networkInterfaces:o.value?.map(l=>l.Id)??[],template:n,phoneModel:a,pbxDevice:t}}).pipe((0,M.Sf)(),(0,y.n)(l=>this.provision(t,l))):(0,X.$)(()=>new Error("_i18n.PhoneModelCantAdd")):(0,X.$)(()=>new Error("_i18n.PhoneModelNotFound"))}))}rejectSelectedExtensions(){const t=this.selector.selectedKeys,o=(0,He.x)(...t.map(n=>this.pnpService.deleteDeviceInfo({id:n}).pipe((0,M.Y$)(),(0,v.W)(a=>(0,H.of)({}))))).pipe((0,b.T)((n,a)=>a));this.modalService.progress("_i18n.DeleteAll",t.length,o).subscribe({complete:()=>{this.pager.refresh$.next()},error:n=>this.modalService.error(n)})}assignExtension(t){if(!t)return;const o="3CX"===t.Vendor;!t.TemplateName&&!o||!this.addEnabled||(this.addEnabled=!1,this.pnpService.getDeviceInfo({id:t.Id}).pipe((0,y.n)(n=>o?this.assign3CXPhone(n):n.Assigned?this.reprovisionAssignedDevice(n):this.assignDevice(n)),(0,M.Pr)("_i18n.PhoneNotFoundAssignErrorMessage",t.Model),(0,ae.j)(()=>{this.addEnabled=!0})).subscribe({error:n=>this.modalService.error(n)}))}fromNow(t){return it()(t).fromNow()}reject(t){t&&this.deleteEnabled&&(this.deleteEnabled=!1,this.pnpService.deleteDeviceInfo({id:t.Id}).pipe((0,M.Y$)(),(0,L.pQ)(this.destroy$)).subscribe({next:()=>{this.deleteEnabled=!0,this.pager.refresh$.next()},error:o=>{this.deleteEnabled=!0,this.modalService.error(o)}}))}identify(t,o){return o.Id}goBack(){this.router.navigate([".."],{relativeTo:this.route}).catch(ue.l)}updateItems(t){this.cd.markForCheck(),this.devices=t.value,this.selector.onDataChanged(this.devices)}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-pnp-list"]],decls:47,vars:40,consts:[["header","_i18n.PNP",3,"back","helpUrl"],["top-bar","",1,"button-group"],["id","btnAssignExt","data-qa","assign-ext","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnReject","data-qa","reject","type","button",1,"btn","btn-primary",3,"click","disabled"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],["data-qa","checkbox-all",3,"ngModelChange","ngModel"],[1,"lg-visible"],[1,"xl-visible"],[1,"actions"],[1,"clickable"],["colspan","6"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],[1,"clickable",3,"click"],[3,"ngModelChange","checkerClick","ngModel"],[3,"source"],["data-qa","actions",1,"actions"],["role","menuitem"],["data-qa","phone-ui","rel","noopener","target","_blank",1,"dropdown-item",3,"href"],["type","button","data-qa","assign",1,"dropdown-item",3,"click","disabled"],["type","button","data-qa","delete",1,"dropdown-item",3,"click"]],template:function(o,n){1&o&&(e.j41(0,"app-page",0),e.bIt("back",function(){return n.goBack()}),e.j41(1,"div",1)(2,"button",2),e.bIt("click",function(){return n.assignExtension(n.selector.firstSelected)}),e.nrm(3,"app-user-alt-solid-icon"),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"button",3),e.bIt("click",function(){return n.rejectSelectedExtensions()}),e.nrm(8,"app-trash-alt-solid-icon"),e.j41(9,"span"),e.EFF(10),e.nI1(11,"translate"),e.k0s()()(),e.nrm(12,"search-bar",4),e.j41(13,"table",5)(14,"thead")(15,"tr")(16,"th",6)(17,"app-checker",7),e.bIt("ngModelChange",function(l){return n.selector.setSelectAll(l)}),e.k0s()(),e.j41(18,"th"),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"th",8),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.j41(24,"th",9),e.EFF(25),e.nI1(26,"translate"),e.k0s(),e.j41(27,"th"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"th",9),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.j41(33,"th",9),e.EFF(34),e.nI1(35,"translate"),e.k0s(),e.nrm(36,"th",10),e.k0s()(),e.j41(37,"tbody"),e.Z7z(38,st,30,25,"tr",11,n.identify,!0),e.k0s(),e.j41(40,"tfoot")(41,"tr")(42,"td",12)(43,"app-paging",13),e.nI1(44,"async"),e.nI1(45,"async"),e.nI1(46,"async"),e.bIt("pageChanged",function(l){return n.pager.pageChanged(l)}),e.k0s()()()()()()),2&o&&(e.Y8G("helpUrl","_i18n.IPPhonesUri"),e.R7$(2),e.Y8G("disabled",!(n.selector.isOneSelected&&n.assignEnabled(n.selector.firstSelected))),e.R7$(3),e.JRh(e.bMT(6,18,"_i18n.Assign")),e.R7$(2),e.Y8G("disabled",!n.selector.isAnySelected),e.R7$(3),e.Lme("",e.bMT(11,20,"_i18n.Delete"),"",n.selector.selectedCountLabel),e.R7$(2),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(20,22,"_i18n.Vendor")),e.R7$(3),e.JRh(e.bMT(23,24,"_i18n.Model")),e.R7$(3),e.JRh(e.bMT(26,26,"_i18n.FwVersion")),e.R7$(3),e.JRh(e.bMT(29,28,"_i18n.MAC")),e.R7$(3),e.JRh(e.bMT(32,30,"_i18n.When")),e.R7$(3),e.JRh(e.bMT(35,32,"_i18n.IP")),e.R7$(4),e.Dyx(n.devices),e.R7$(5),e.Y8G("currentPage",e.bMT(44,34,n.pager.currentPage$))("itemsPerPage",e.bMT(45,36,n.pager.pageSize$))("totalItems",e.bMT(46,38,n.pager.totalCount$))("showBoundaryLinks",!0))},dependencies:[ee.H,at.i,rt.d,te.L,d.X1,d.BC,d.l_,ne.$,d.YN,d.vS,q.T,oe.I,E.u4,B.Jj,O.D9],encapsulation:2,changeDetection:0})}return i})();var le=s(47533),ct=s(13313);let Ce=(()=>{class i{phones=(0,r.WQX)(le.I);resolveData(t,o,n){return this.phones.listFirmware({$count:!0,$orderby:["Vendor","Model"],$search:(0,z.Bj)(n),$skip:(t-1)*o,$top:o}).pipe((0,b.T)(a=>({value:a.value,totalItems:a["@odata.count"]})))}static \u0275fac=function(o){return new(o||i)};static \u0275prov=r.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var dt=s(59030),mt=s(70274),ht=s(58571),ut=s(77498),ft=s(25843),Y=s(72510),Ne=s(24708),gt=s(43218),It=s(47820),Rt=s(14176);function bt(i,u){if(1&i&&(e.j41(0,"span",8),e.EFF(1),e.nI1(2,"appTemplateType"),e.nI1(3,"translate"),e.k0s()),2&i){const t=u.item;e.R7$(),e.JRh(e.bMT(3,3,e.bMT(2,1,t.templateType)))}}function _t(i,u){if(1&i&&(e.j41(0,"progressbar",7),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.Y8G("max",t.barInfo.max)("value",t.barInfo.current)("striped",!0),e.R7$(),e.JRh(t.barInfo.text)}}let Ct=(()=>{class i extends p.m{httpClient=(0,r.WQX)(W.Qq);cd=(0,r.WQX)(A.gRc);templates;isLoading=!1;barInfo={max:0,current:0,text:""};form=new d.gE({phoneModel:new d.MJ(null,d.k0.required),file:new d.MJ(null,d.k0.required)});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);get f(){return this.form.controls}ngOnInit(){this.f.phoneModel.setValue(this.templates[0]??null,{emitEvent:!1})}submit$=()=>(0,dt.v)(()=>{const t=this.f.phoneModel.value,o=this.f.file.value;return this.form.disable(),this.isLoading=!0,this.cd.markForCheck(),this.httpClient.post(`/xapi/v1/Firmwares/${encodeURIComponent(t.templateName)}/UploadFirmware?model=${encodeURIComponent(t.model)}`,(0,ht.$)(o),{reportProgress:!0,observe:"events"}).pipe((0,mt.H)(n=>{if(n.type===W.hv.UploadProgress)this.barInfo={max:n.total,current:n.loaded,text:Math.ceil(100*n.loaded/n.total)+"%"},this.cd.markForCheck();else if(n.type===W.hv.Response)return(0,H.of)("Ready").pipe((0,ut.c)(1e3));return ie.w}),(0,ae.j)(()=>{this.form.enable(),this.barInfo={max:0,current:0,text:""},this.isLoading=!1,this.cd.markForCheck()}))});ModalButtons=U.P;MaxFirmwareSize=ft.MG;static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-upload-firmware-dialog"]],inputs:{templates:"templates"},features:[e.Vt3],decls:11,vars:16,consts:[["header","_i18n.UploadAlternativeFirmware",3,"submitted","buttons","validateBeforeSubmit","submit$","showValidation"],[1,"text-keep-lines"],["label","_i18n.PhoneModels","data-qa","phone-model",3,"required"],["bindLabel","model","groupBy","templateType","data-qa","select",3,"items","formControl","clearable"],["ng-optgroup-tmp",""],[3,"control"],["label","_i18n.AlternativeFirmwareFile","accept","*.*",3,"formControl","maxSizeMb"],["type","info",2,"background-color","transparent",3,"max","value","striped"],[1,"ng-option"]],template:function(o,n){1&o&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"p",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"field-wrapper",2)(5,"ng-select",3),e.DNE(6,bt,4,5,"ng-template",4),e.k0s(),e.nrm(7,"val-errors",5),e.k0s(),e.j41(8,"field-input-file",6),e.nrm(9,"val-errors",5),e.k0s(),e.nVh(10,_t,2,4,"progressbar",7),e.k0s()),2&o&&(e.Y8G("buttons",n.ModalButtons.OkCancel)("validateBeforeSubmit",n.validateBeforeSubmit)("submit$",n.submit$)("showValidation",n.showValidation),e.R7$(2),e.JRh(e.bMT(3,14,"_i18n.UploadAlternativeFirmwareText")),e.R7$(2),e.Y8G("required",!0),e.R7$(),e.Y8G("items",n.templates)("formControl",n.f.phoneModel)("clearable",!1),e.R7$(2),e.Y8G("control",n.f.phoneModel),e.R7$(),e.Y8G("formControl",n.f.file)("maxSizeMb",n.MaxFirmwareSize),e.R7$(),e.Y8G("control",n.f.file),e.R7$(),e.vxM(n.isLoading?10:-1))},dependencies:[$.p,re.z,Y.vr,d.X1,d.BC,d.l_,Y.bh,Ne.IH,gt.y,It.eh,O.D9,Rt.n],encapsulation:2,changeDetection:0})}return i})();var Nt=s(81815),vt=s(6581),Tt=s(90776);function At(i,u){1&i&&(e.j41(0,"b",17),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,"_i18n.Custom")))}function Et(i,u){if(1&i){const t=e.RV6();e.j41(0,"tr",13),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();
1return r.Njj(a.selector.toggle(n))}),e.j41(1,"td",6)(2,"app-checker",14),e.bIt("ngModelChange",function(n){const a=r.eBV(t).$implicit,l=e.XpG();return r.Njj(l.selector.setSelected(a,n))})("checkerClick",function(n){const a=r.eBV(t).$implicit,l=e.XpG();return r.Njj(l.selector.handleCheckerClick(a,n))}),e.k0s()(),e.j41(3,"td",15),e.EFF(4),e.k0s(),e.j41(5,"td",16),e.nVh(6,At,3,3,"b",17),e.EFF(7),e.k0s(),e.j41(8,"td",18),e.EFF(9),e.k0s(),e.j41(10,"td",19),e.EFF(11),e.k0s(),e.j41(12,"td",20)(13,"row-action-button")(14,"li",21)(15,"button",22),e.bIt("click",function(){const n=r.eBV(t).$implicit,a=e.XpG();return r.Njj(a.deleteFirmware(n))}),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()()()}if(2&i){const t=u.$implicit,o=e.XpG();e.R7$(2),e.Y8G("ngModel",o.selector.isRowSelected(t)),e.R7$(2),e.JRh(t.Filename),e.R7$(2),e.vxM(t.Version?-1:6),e.R7$(),e.SpI(" ",t.Version," "),e.R7$(2),e.JRh(t.Vendor),e.R7$(2),e.SpI(" ",t.Model," "),e.R7$(3),e.AVh("disabled",t.Version),e.R7$(),e.Y8G("disabled",t.Version),e.R7$(),e.SpI(" ",e.bMT(17,10,"_i18n.Delete")," ")}}let St=(()=>{class i{modalService=(0,r.WQX)(S.B);cd=(0,r.WQX)(A.gRc);firmwaresApi=(0,r.WQX)(le.I);phoneTemplatesService=(0,r.WQX)(ct.X);langService=(0,r.WQX)(vt.m);destroy$=(0,r.WQX)(r.abz);pager;firmwares=[];deleteEnabled=!0;selector;constructor(){const t=this.cd,o=(0,r.WQX)(Ce),n=(0,r.WQX)(k.nX),a=this.destroy$,l=n.snapshot.data.firmwares;this.selector=new Z.a({cd:t,keySelector:c=>c.Id,notKeepSelectedOnDataChange:!0}),this.pager=new K.f(a,o,l,E.z9),this.pager.pagedItems$.pipe((0,L.pQ)(this.destroy$)).subscribe(c=>{this.firmwares=c.value??[],this.selector.onDataChanged(this.firmwares),this.cd.markForCheck()})}deleteFirmware(t){this.firmwaresApi.deleteFirmware({id:t.Id}).subscribe({next:()=>{this.pager.refresh$.next()},error:o=>this.modalService.error(o)})}push(){this.modalService.confirmation("_i18n.PushFirmwareForPhones").pipe((0,y.n)(()=>this.firmwaresApi.pushFirmwareForPhones({id:this.selector.firstSelected.Id}))).subscribe({error:t=>this.modalService.error(t)})}addFirmware(){this.phoneTemplatesService.listPhoneTemplate({$select:["Id","Models","TemplateType","AllowedNetConfigs","URL","RpsEnabled","IsCustom","HotdeskingAllowed"],$filter:"AddAllowed",$orderby:["IsCustom, TemplateType"]}).pipe((0,y.n)(({value:t})=>(0,Nt.f_)(t??[],this.langService)),(0,y.n)(t=>this.modalService.showComponent(Ct,{keyboard:!1,ignoreBackdropClick:!0,initialState:{templates:t}})),(0,L.pQ)(this.destroy$)).subscribe(t=>{t.decision===U.R.Ok&&this.pager.refresh$.next()})}identify(t,o){return o.Id}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-firmwares-list"]],decls:36,vars:28,consts:[["header","_i18n.Firmwares","backRouterLink",".."],["top-bar","",1,"button-group"],["data-qa","add-firmware",3,"click"],["data-qa","push-firmware","type","button",1,"btn","btn-primary",3,"click","disabled"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],["data-qa","checkbox-all",3,"ngModelChange","ngModel"],[1,"lg-visible"],[1,"actions"],["data-qa","firmware-item",1,"clickable"],["colspan","6"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],["data-qa","firmware-item",1,"clickable",3,"click"],[3,"ngModelChange","checkerClick","ngModel"],["data-qa","file-name"],["data-qa","version",1,"lg-visible"],[1,"badge","bg-brand","p-1"],["data-qa","vendor",1,"lg-visible"],["data-qa","model",1,"lg-visible"],["data-qa","actions",1,"actions"],["role","menuitem"],["type","button","data-qa","delete",1,"dropdown-item",3,"click","disabled"]],template:function(o,n){1&o&&(e.j41(0,"app-page",0)(1,"div",1)(2,"app-button-add",2),e.bIt("click",function(){return n.addFirmware()}),e.k0s(),e.j41(3,"button",3),e.bIt("click",function(){return n.push()}),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.nrm(7,"search-bar",4),e.j41(8,"table",5)(9,"thead")(10,"tr")(11,"th",6)(12,"app-checker",7),e.bIt("ngModelChange",function(l){return n.selector.setSelectAll(l)}),e.k0s()(),e.j41(13,"th"),e.EFF(14),e.nI1(15,"translate"),e.k0s(),e.j41(16,"th",8),e.EFF(17),e.nI1(18,"translate"),e.k0s(),e.j41(19,"th",8),e.EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"th",8),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.nrm(25,"th",9),e.k0s()(),e.j41(26,"tbody"),e.Z7z(27,Et,18,12,"tr",10,n.identify,!0),e.k0s(),e.j41(29,"tfoot")(30,"tr")(31,"td",11)(32,"app-paging",12),e.nI1(33,"async"),e.nI1(34,"async"),e.nI1(35,"async"),e.bIt("pageChanged",function(l){return n.pager.pageChanged(l)}),e.k0s()()()()()()),2&o&&(e.R7$(3),e.Y8G("disabled",!n.selector.isOneSelected),e.R7$(2),e.JRh(e.bMT(6,12,"_i18n.PushFirmware")),e.R7$(2),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(15,14,"_i18n.File")),e.R7$(3),e.JRh(e.bMT(18,16,"_i18n.Version")),e.R7$(3),e.JRh(e.bMT(21,18,"_i18n.Vendor")),e.R7$(3),e.JRh(e.bMT(24,20,"_i18n.Model")),e.R7$(4),e.Dyx(n.firmwares),e.R7$(5),e.Y8G("currentPage",e.bMT(33,22,n.pager.currentPage$))("itemsPerPage",e.bMT(34,24,n.pager.pageSize$))("totalItems",e.bMT(35,26,n.pager.totalCount$))("showBoundaryLinks",!0))},dependencies:[ee.H,Tt.j,te.L,d.X1,d.BC,d.l_,ne.$,d.YN,d.vS,oe.I,E.u4,B.Jj,O.D9],encapsulation:2,changeDetection:0})}return i})(),ce=(()=>{class i extends C.d{getPhonesSettings(t,o="body"){const n=t?.$select,a=t?.$expand;let l=new h.rx(this.encoder);l=this.addToHttpParams(l,"$select",n,h.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,h.l2.Form,!1);let c=this.defaultHeaders;c=this.configuration.addCredentialToHeaders("Application","Authorization",c,"Bearer ");const f=this.configuration.selectHeaderAccept(["application/json"]);void 0!==f&&(c=c.set("Accept",f));let I="json";f&&(I=f.startsWith("text")?"text":this.configuration.isJsonMime(f)?"json":"blob");const{basePath:N,withCredentials:m}=this.configuration;return this.httpClient.request("get",`${N}/PhonesSettings`,{params:l.toHttpParams(),responseType:I,...m?{withCredentials:m}:{},headers:c,observe:o})}getPhonesSettingsQuery(t,o="body",n=!1,a){const l=t.$select,c=t.$expand;let f=new h.rx(this.encoder);return f=this.addToHttpParams(f,"$select",l,h.l2.Form,!1),f=this.addToHttpParams(f,"$expand",c,h.l2.Form,!1),"/PhonesSettings?"+f.toString()}updatePhonesSettings(t,o="body"){const n=t?.pbxPhonesSettings;let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));const f=this.configuration.selectHeaderContentType(["application/json"]);void 0!==f&&(a=a.set("Content-Type",f));let I="json";l&&(I=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");const{basePath:N,withCredentials:m}=this.configuration;return this.httpClient.request("patch",`${N}/PhonesSettings`,{body:n,responseType:I,...m?{withCredentials:m}:{},headers:a,observe:o})}updatePhonesSettingsQuery(t,o="body",n=!1,a){return"/PhonesSettings"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=r.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var yt=s(84572),kt=s(88141),Mt=s(45054),j=s(56998),Dt=s(19781),wt=s(72788),Gt
1=s(65164),Ot=s(90073);function jt(i,u){if(1&i&&(e.j41(0,"ng-option",10),e.EFF(1),e.nI1(2,"profileNameConv"),e.nI1(3,"async"),e.k0s()),2&i){const t=u.$implicit;e.Y8G("value",t),e.R7$(),e.JRh(e.bMT(3,5,e.i5U(2,2,t,!1)))}}function xt(i,u){if(1&i&&(e.j41(0,"tr")(1,"td"),e.nrm(2,"app-text-with-hint",19),e.k0s(),e.j41(3,"td"),e.nrm(4,"field-input-number",20),e.k0s()(),e.j41(5,"tr")(6,"td"),e.nrm(7,"app-text-with-hint",21),e.k0s(),e.j41(8,"td"),e.nrm(9,"field-input-number",22),e.k0s()()),2&i){const t=e.XpG();e.R7$(4),e.Y8G("formControl",t.f.FanvilUpdateInterval)("min",0)("max",9999),e.R7$(5),e.Y8G("formControl",t.f.YealinkUpdateInterval)("min",0)("max",2592e3)}}function Lt(i,u){if(1&i&&(e.j41(0,"tr")(1,"td"),e.nrm(2,"app-text-with-hint",23),e.k0s(),e.j41(3,"td"),e.nrm(4,"field-input-number",22),e.k0s()(),e.j41(5,"tr")(6,"td"),e.nrm(7,"app-text-with-hint",24),e.k0s(),e.j41(8,"td"),e.nrm(9,"field-input-number",20),e.k0s()()),2&i){const t=e.XpG();e.R7$(4),e.Y8G("formControl",t.f.SnomUpdateInterval)("min",0)("max",2592e3),e.R7$(5),e.Y8G("formControl",t.f.GrandstreamUpdateInterval)("min",0)("max",720)}}function Xt(i,u){1&i&&e.eu8(0)}function Wt(i,u){1&i&&e.eu8(0)}function Ut(i,u){1&i&&e.eu8(0)}function Bt(i,u){1&i&&e.eu8(0)}const Q=(i,u)=>t=>0===t.value?null:d.k0.min(i)(t)??d.k0.max(u)(t),Vt=[{path:"",resolve:{firmwares:()=>{const i=(0,r.WQX)(le.I),u=(0,r.WQX)(P.s);return i.listFirmware({}).pipe(M.yh,(0,v.W)(t=>u.handleError(t)))},settings:()=>{const i=(0,r.WQX)(ce),u=(0,r.WQX)(P.s);return i.getPhonesSettings({}).pipe((0,v.W)(t=>u.handleError(t)))},phones:()=>{const i=(0,r.WQX)(me),u=(0,r.WQX)(P.s);return i.resolveData(1,E.z9,"").pipe((0,v.W)(t=>u.handleError(t)))}},component:Be},{path:"hotdesking",loadChildren:()=>Promise.all([s.e(1811),s.e(7273),s.e(4349),s.e(4360),s.e(7485),s.e(7220),s.e(6351)]).then(s.bind(s,83503)).then(i=>i.hotdeskingRoutes)},{path:"firmwares",resolve:{firmwares:()=>{const i=(0,r.WQX)(Ce),u=(0,r.WQX)(P.s);return i.resolveData(1,E.z9,"").pipe((0,v.W)(t=>u.handleError(t)))}},component:St},{path:"pnp",resolve:{phones:()=>{const i=(0,r.WQX)(ge),u=(0,r.WQX)(P.s);return i.resolveData(1,E.z9,"").pipe((0,v.W)(t=>u.handleError(t)))}},component:lt},{path:"options",resolve:{phoneSettings:()=>{const i=(0,r.WQX)(ce),u=(0,r.WQX)(P.s);return i.getPhonesSettings({}).pipe((0,v.W)(t=>u.handleError(t)))}},component:(()=>{class i{router=(0,r.WQX)(k.Ix);route=(0,r.WQX)(k.nX);fb=(0,r.WQX)(d.ok);phonesSettingsApiService=(0,r.WQX)(ce);phoneSettings=this.route.snapshot.data.phoneSettings||{};customProfiles=["Away","Custom 2"];checkboxOptionsList=[{label:"_i18n.ConfigureQueueRingtonesOption1",value:!1},{label:"_i18n.ConfigureQueueRingtonesOption2",value:!0}];firmwaresOptionsList=[{label:"_i18n.SupportedFirmwaresOnly",value:!1},{label:"_i18n.AllowUnsupportedFirmwares",value:!0}];
1sub=new Re.yU;form=this.createForm();constructor(){this.sub.add((0,j.XP)(this.form.controls.PhoneAllowMultiFirmwares).subscribe(t=>{(0,j.TZ)(this.form.controls.AutoUpdatePhonesOnAdd,!t),t&&this.form.patchValue({AutoUpdatePhonesOnAdd:!1})})),this.sub.add((0,yt.z)([(0,j.XP)(this.form.controls.PhoneAllowMultiFirmwares),(0,j.XP)(this.form.controls.AutoUpdatePhonesOnAdd)]).subscribe(([t,o])=>{(0,j.TZ)(this.form.controls.AutoCleanupFirmware,t||!o),o&&this.form.patchValue({AutoCleanupFirmware:!1})})),this.sub.add((0,j.jA)((0,j.XP)(this.form.controls.EnableCustomDND),[this.form.controls.CustomDNDProfile])),this.form.markAllAsTouched()}createForm(){return this.fb.group({EnableCustomDND:!!this.phoneSettings.CustomDNDProfile,CustomDNDProfile:this.phoneSettings.CustomDNDProfile||this.customProfiles[0],AutoUpdatePhonesOnAdd:!!this.phoneSettings.AutoUpdatePhonesOnAdd,AllowMultiQueueRingtones:!!this.phoneSettings.AllowMultiQueueRingtones,PhoneAllowMultiFirmwares:!!this.phoneSettings.PhoneAllowMultiFirmwares,UseRpcForLocalPhones:!!this.phoneSettings.UseRpcForLocalPhones,UseProvisioningSecret:!!this.phoneSettings.UseProvisioningSecret,AutoCleanupFirmware:!!this.phoneSettings.AutoCleanupFirmware,FanvilUpdateInterval:[this.phoneSettings.FanvilUpdateInterval??0,Q(5,9999)],YealinkUpdateInterval:[this.phoneSettings.YealinkUpdateInterval??0,Q(3600,2592e3)],SnomUpdateInterval:[this.phoneSettings.SnomUpdateInterval??0,Q(3600,2592e3)],GrandstreamUpdateInterval:[this.phoneSettings.GrandstreamUpdateInterval??0,Q(5,720)]})}get f(){return this.form.controls}ngOnDestroy(){this.sub.unsubscribe()}goBack(){this.router.navigate([".."],{relativeTo:this.route}).catch(ue.l)}save$=()=>{const{EnableCustomDND:t,...o}=this.form.value;return this.phonesSettingsApiService.updatePhonesSettings({pbxPhonesSettings:{...o,AutoCleanupFirmware:o.AutoCleanupFirmware??!1,AutoUpdatePhonesOnAdd:o.AutoUpdatePhonesOnAdd??!1,CustomDNDProfile:o.CustomDNDProfile||""}}).pipe((0,kt.M)(()=>this.goBack()))};static \u0275fac=function(o){return new(o||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:50,vars:28,consts:[["FanvilAndYealink",""],["SnomAndGrandstream",""],["header","_i18n.PhoneAppOptions","helpUrl","_i18n.IPPhonesUri",3,"back","formGroup","save$"],["formControlName","UseRpcForLocalPhones","label","_i18n.UseRpcForLocalPhones"],["formControlName","UseProvisioningSecret","label","_i18n.EnableProvisioningSecret"],["formControlName","PhoneAllowMultiFirmwares",3,"options"],["formControlName","AutoUpdatePhonesOnAdd","label","_i18n.UpdateNewPhonesFirmware",1,"mt-2"],["hint","_i18n.AutoCleanupTooltip","formControlName","AutoCleanupFirmware","label","_i18n.AutoCleanupFirmware",1,"mt-2"],["formControlName","EnableCustomDND","label","_i18n.ConfigureDNDText",1,"mt-2"],["formControlName","CustomDNDProfile",3,"clearable","searchable"],[3,"value"],["controlName","CustomDNDProfile"],[1,"phonebook-intervals","d-lg-none"],[4,"ngTemplateOutlet"],[1,"row","d-lg-down-none"],[1,"col-lg-6"],[1,"phonebook-intervals"],[1,"col-lg-6","d-lg-flex","justify-content-end"],["formControlName","AllowMultiQueueRingtones",3,"options"],["text","_i18n.FanvilUpdateInterval","hint","_i18n.FanvilUpdateIntervalHint"],["units","_i18n.UnitMinutes",3,"formControl","min","max"],["text","_i18n.YealinkUpdateInterval","hint","_i18n.YealinkUpdateIntervalHint"],["units","_i18n.ReportsSeconds",3,"formControl","min","max"],["text","_i18n.SnomUpdateInterval","hint","_i18n.SnomUpdateIntervalHint"],["text","_i18n.GrandstreamUpdateInterval","hint","_i18n.GrandstreamUpdateIntervalHint"]],template:function(o,n){if(1&o&&(e.j41(0,"edit-panel",2),e.bIt("back",function(){return n.goBack()}),e.j41(1,"fieldset")(2,"legend"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nrm(5,"field-checkbox",3)(6,"field-checkbox",4),e.k0s(),e.j41(7,"fieldset")(8,"legend"),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.nrm(11,"field-radio-group",5)(12,"field-checkbox",6)(13,"field-checkbox",7),e.k0s(),e.j41(14,"fieldset")(15,"legend"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.nrm(18,"field-checkbox",8),e.j41(19,"field-wrapper")(20,"ng-select",9),e.Z7z(21,jt,4,7,"ng-option",10,e.fX1),e.k0s(),e.nrm(23,"val-errors",11),e.k0s()(),e.j41(24,"fieldset")(25,"legend"),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.j41(28,"p"),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.DNE(31,xt,10,6,"ng-template",null,0,e.C5r)(33,Lt,10,6,"ng-template",null,1,e.C5r),e.j41(35,"table",12),e.DNE(36,Xt,1,0,"ng-container",13)(37,Wt,1,0,"ng-container",13),e.k0s(),e.j41(38,"div",14)(39,"div",15)(40,"table",16),e.DNE(41,Ut,1,0,"ng-container",13),e.k0s()(),e.j41(42,"div",17)(43,"table",16),e.DNE(44,Bt,1,0,"ng-container",13),e.k0s()()()(),e.j41(45,"fieldset")(46,"legend"),e.EFF(47),e.nI1(48,"translate"),e.k0s(),e.nrm(49,"field-radio-group",18),e.k0s()()),2&o){const a=e.sdS(32),l=e.sdS(34);e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(3),e.JRh(e.bMT(4,16,"_i18n.RPSHeader")),e.R7$(6),e.JRh(e.bMT(10,18,"_i18n.FirmwareManagement")),e.R7$(2),e.Y8G("options",n.firmwaresOptionsList),e.R7$(5),e.JRh(e.bMT(17,20,"_i18n.ConfigureDND")),e.R7$(4),e.Y8G("clearable",!1)("searchable",!1),e.R7$(),e.Dyx(n.customProfiles),e.R7$(5),e.JRh(e.bMT(27,22,"_i18n.PhonebookUpdateIntervalsHeader")),e.R7$(3),e.JRh(e.bMT(30,24,"_i18n.PhonebookUpdateIntervalsDescription")),e.R7$(7),e.Y8G("ngTemplateOutlet",a),e.R7$(),e.Y8G("ngTemplateOutlet",l),e.R7$(4),e.Y8G("ngTemplateOutlet",a),e.R7$(3),e.Y8G("ngTemplateOutlet",l),e.R7$(3),e.JRh(e.bMT(48,26,"_i18n.ConfigureQueueRingtones")),e.R7$(2),e.Y8G("options",n.checkboxOptionsList)}},dependencies:[Mt.Q,d.X1,d.BC,d.cb,d.l_,d.j4,d.JD,Dt.t,wt.B,he.u,re.z,Y.xt,Y.vr,B.T3,Ot.W,Ne.IH,B.Jj,Gt.F,O.D9],styles:["table.phonebook-intervals[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-bottom:8px}table.phonebook-intervals[_ngcontent-%COMP%] td[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:0}table.phonebook-intervals[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-right:8px}table.phonebook-intervals[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{width:135px}table.phonebook-intervals[_ngcontent-%COMP%] td[_ngcontent-%COMP%] input[type=number]{max-width:unset}"]})}return i})()}]},14176(w,T,s){s.d(T,{E:()=>p,n:()=>$});var r=s(59549),A=s(35547);const S={Custom:"_i18n.TemplateType_Custom",Preferred:"_i18n.TemplateType_Preferred",Supported:"_i18n.TemplateType_Supported",Dedicated:"_i18n.TemplateType_Dedicated",Deleted:"_i18n.TemplateType_Deleted",ThirdParty:"_i18n.TemplateType_Generic_Vendor",Unknown:"_i18n.TemplateType_Unknown"};
1function p(F){return F.IsCustom?"Custom":F.TemplateType??r.V.Unknown}let $=(()=>{class F{transform(e,G="vendor"){return"ThirdParty"===e&&"provider"===G?"_i18n.TemplateType_Generic_Provider":S[e]}static \u0275fac=function(G){return new(G||F)};static \u0275pipe=A.EJ8({name:"appTemplateType",type:F,pure:!0})}return F})()},2275(w,T,s){s.d(T,{T:()=>h});var r=s(534),A=s(68018),S=s(8516),p=s(35547),$=s(85802);const F=["pop"],d=["*"];function e(C,x){if(1&C&&p.nrm(0,"lucide-icon",3),2&C){const b=p.XpG(2);p.Y8G("img",b.Copy)}}function G(C,x){if(1&C&&p.nrm(0,"lucide-icon",3),2&C){const b=p.XpG(2);p.Y8G("img",b.Copy)}}function k(C,x){if(1&C&&(p.j41(0,"span",5),p.EFF(1),p.nI1(2,"translate"),p.k0s()),2&C){const b=p.XpG(2);p.R7$(),p.JRh(p.bMT(2,1,b.actionText))}}function J(C,x){if(1&C){const b=p.RV6();p.j41(0,"div",2,0),p.nI1(2,"translate"),p.nI1(3,"translate"),p.bIt("click",function(P){$.eBV(b);const E=p.XpG();return $.Njj(E.copy(P))}),p.nVh(4,e,1,1,"lucide-icon",3),p.j41(5,"div",4),p.SdG(6),p.k0s(),p.nVh(7,G,1,1,"lucide-icon",3),p.nVh(8,k,3,3,"span",5),p.k0s()}if(2&C){const b=p.XpG();p.Y8G("tooltip",p.bMT(2,6,"_i18n.Copied"))("container",b.tooltipContainer)("title",p.bMT(3,8,"_i18n.DisplayCopy")),p.R7$(4),p.vxM(b.showIcon&&b.iconFirst?4:-1),p.R7$(3),p.vxM(b.showIcon&&!b.iconFirst?7:-1),p.R7$(),p.vxM(b.showActionText?8:-1)}}let h=(()=>{class C{source;showIcon=!0;actionText="_i18n.DisplayCopy";showActionText;iconFirst;tooltipContainer;timeoutId;Copy=S.QRo;popComponent;copy(b){b.stopPropagation(),this.source&&navigator.clipboard&&navigator.clipboard.writeText(this.source).then(()=>{this.popComponent.show(),"number"==typeof this.timeoutId&&clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.close(),1e3)})}close(){this.popComponent.hide()}static \u0275fac=function(v){return new(v||C)};static \u0275cmp=p.VBU({type:C,selectors:[["app-simple-copy"]],viewQuery:function(v,P){if(1&v&&p.GBs(F,5),2&v){let E;p.mGM(E=p.lsd())&&(P.popComponent=E.first)}},hostAttrs:[1,"hide-empty"],inputs:{source:"source",showIcon:"showIcon",actionText:"actionText",showActionText:"showActionText",iconFirst:"iconFirst",tooltipContainer:"tooltipContainer"},ngContentSelectors:d,decls:1,vars:1,consts:[["pop","bs-tooltip"],["triggers","","role","button","data-qa","simple-copy",1,"d-inline-flex","align-items-center","gap-2","mw-0","maxw-100",3,"tooltip","container","title"],["triggers","","role","button","data-qa","simple-copy",1,"d-inline-flex","align-items-center","gap-2","mw-0","maxw-100",3,"click","tooltip","container","title"],[1,"fillIconBlue","svg-sm",3,"img"],[1,"line-clamp-1"],[1,"link","dashed","text-nowrap"]],template:function(v,P){1&v&&(p.NAR(),p.nVh(0,J,9,10,"div",1)),2&v&&p.vxM(P.source?0:-1)},dependencies:[r.dg,S.flO,S.WGl,A.D9],encapsulation:2,changeDetection:0})}return C})()},17873(w,T,s){s.d(T,{f:()=>S});var r=s(35547),A=s(85802);let S=(()=>{class p{static \u0275fac=function(d){return new(d||p)};static \u0275cmp=r.VBU({type:p,selectors:[["app-arrow-alt-circle-up-solid-icon"],["","app-arrow-alt-circle-up-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm292 116V256h70.9c10.7 0 16.1-13 8.5-20.5L264.5 121.2c-4.7-4.7-12.2-4.7-16.9 0l-115 114.3c-7.6 7.6-2.2 20.5 8.5 20.5H212v116c0 6.6 5.4 12 12 12h64c6.6 0 12-5.4 12-12z"]],template:function(d,e){1&d&&(A.qSk(),r.rj2(0,"svg",0),r.Hgh(1,"path",1),r.eux())},encapsulation:2})}return p})()},58571(w,T,s){function r(A,S="fileInput"){const p=new FormData;return p.append(S,A,A.name),p}s.d(T,{$:()=>r})},63674(w,T,s){s.d(T,{Y:()=>r});const r={LocalLan:"LocalLan",RemoteExt:"RemoteExt",RemoteExtSipProxyMgr:"RemoteExtSipProxyMgr",Sbc:"SBC"}},59549(w,T,s){s.d(T,{V:()=>r});const r={Preferred:"Preferred",Supported:"Supported",Dedicated:"Dedicated",ThirdParty:"ThirdParty",Deleted:"Deleted",Unknown:"Unknown"}},82971(w,T,s){s.d(T,{g:()=>r});const r={ContactsSpecifyNameSurnameCompany:"WARNINGS.CONTACTS_SPECIFY_NAME_SURNAME_COMPANY",ContactsSpecifyPhoneNumber:"WARNINGS.CONTACTS_SPECIFY_PHONE_NUMBER",ContactsSpecifyNameSurname:"WARNINGS.CONTACTS_SPECIFY_NAME_SURNAME",StringTooLong:"WARNINGS.STRING_TOO_LONG",LengthNotMore50Chars:"WARNINGS.LENGTH_NOT_MORE_50_CHARS",LengthNotMore255Chars:"WARNINGS.LENGTH_NOT_MORE_255_CHARS",InvalidHexCharacter:"WARNINGS.INVALID_HEX_CHARACTER",NoMoreNumbersAvailable:"WARNINGS.NO_MORE_NUMBERS_AVAILABLE",ErpServerError:"WARNINGS.ERP_SERVER_ERROR",LicenseNotFound:"WARNINGS.LICENSE_NOT_FOUND",LimitReached:"WARNINGS.LIMIT_REACHED",Invalid:"WARNINGS.INVALID",XapiCaptchaError:"WARNINGS.XAPI.CAPTCHA_ERROR",XapiInvalidPinNumber:"WARNINGS.XAPI.INVALID_PIN_NUMBER",XapiNotSupported:"WARNINGS.XAPI.NOT_SUPPORTED",XapiUserRoleDowngrade:"WARNINGS.XAPI.USER_ROLE_DOWNGRADE",GroupCannotBeDeleted:"WARNINGS.GROUP_CANNOT_BE_DELETED",CannotBeDeleted:"WARNINGS.CANNOT_BE_DELETED",GroupWithMembersCannotBeDeleted:"WARNINGS.GROUP_WITH_MEMBERS_CANNOT_BE_DELETED",XapiOtherUserRoleDowngrade:"WARNINGS.XAPI.OTHER_USER_ROLE_DOWNGRADE",XapiInvalidLicenseType:"WARNINGS.XAPI.INVALID_LICENSE_TYPE",InvalidPassword:"WARNINGS.INVALID_PASSWORD",XapiNotFound:"WARNINGS.XAPI.NOT_FOUND",XapiFileNotFound:"WARNINGS.XAPI.FILE_NOT_FOUND",XapiFileNotAccessible:"WARNINGS.XAPI.FILE_NOT_ACCESSIBLE",XapiRequired:"WARNINGS.XAPI.REQUIRED",XapiCanNotBeEmptyString:"WARNINGS.XAPI.CAN_NOT_BE_EMPTY_STRING",XapiDuplicate:"WARNINGS.XAPI.DUPLICATE",XapiMacUsedBy:"WARNINGS.XAPI.MAC_USED_BY",XapiAlreadyInUse:"WARNINGS.XAPI.ALREADY_IN_USE",MacAddressAlreadyInUse:"WARNINGS.MAC_ADDRESS_ALREADY_IN_USE",XapiPlaylistInUse:"WARNINGS.XAPI.PLAYLIST_IN_USE",XapiOutOfTheRange:"WARNINGS.XAPI.OUT_OF_THE_RANGE",XapiTooManyPhones:"WARNINGS.XAPI.TOO_MANY_PHONES",XapiTooManyTrunks:"WARNINGS.XAPI.TOO_MANY_TRUNKS",XapiTooManySbc:"WARNINGS.XAPI.TOO_MANY_SBC",XapiTooManyPrompts:"WARNINGS.XAPI.TOO_MANY_PROMPTS",XapiTooManyItemsInList:"WARNINGS.XAPI.TOO_MANY_ITEMS_IN_LIST",XapiAwsStorageUnderUsage:"WARNINGS.XAPI.AWS_STORAGE_UNDER_USAGE",XapiOutboundRulesLimitReached:"WARNINGS.XAPI.OUTBOUND_RULES_LIMIT_REACHED",XapiForbiddenChange:"WARNINGS.XAPI.FORBIDDEN_CHANGE",FaxServerCannotBeDeleted:"WARNINGS.FAX_SERVER_CANNOT_BE_DELETED",OperatorC
1annotBeDeleted:"WARNINGS.OPERATOR_CANNOT_BE_DELETED",UserExtensionCannotBeDeleted:"WARNINGS.USER_EXTENSION_CANNOT_BE_DELETED",XapiNumberIgnored:"WARNINGS.XAPI.NUMBER_IGNORED",XapiInvalidTimezone:"WARNINGS.XAPI.INVALID_TIMEZONE",XapiInvalidPath:"WARNINGS.XAPI.INVALID_PATH",XapiPathShouldNotContainSpaces:"WARNINGS.XAPI.PATH_SHOULD_NOT_CONTAIN_SPACES",XapiInvalidCredentials:"WARNINGS.XAPI.INVALID_CREDENTIALS",XapiCannotConnectFtp:"WARNINGS.XAPI.CANNOT_CONNECT_FTP",XapiCannotConnectSmb:"WARNINGS.XAPI.CANNOT_CONNECT_SMB",XapiCannotConnectSftp:"WARNINGS.XAPI.CANNOT_CONNECT_SFTP",XapiCannotConnectGoogleBucket:"WARNINGS.XAPI.CANNOT_CONNECT_GOOGLE_BUCKET",XapiCannotConnectAmazonS3Bucket:"WARNINGS.XAPI.CANNOT_CONNECT_AMAZON_S3_BUCKET",XapiPlaylistNoSource:"WARNINGS.XAPI.PLAYLIST_NO_SOURCE",XapiNoUsersInTeams:"WARNINGS.XAPI.NO_USERS_IN_TEAMS",XapiFileFormatIsIncorrect:"WARNINGS.XAPI.FILE_FORMAT_IS_INCORRECT",XapiInvalidFileName:"WARNINGS.XAPI.INVALID_FILE_NAME",CsvInvalidFileFormat:"WARNINGS.CSV_INVALID_FILE_FORMAT",CsvLineCorrupted:"WARNINGS.CSV_LINE_CORRUPTED",WrongCsvFileRequiredColumnsNotFound:"WARNINGS.WRONG_CSV_FILE_REQUIRED_COLUMNS_NOT_FOUND",CsvImportLimitReached:"WARNINGS.CSV_IMPORT_LIMIT_REACHED",WrongCsvFileRequiredHeaderNotFound:"WARNINGS.WRONG_CSV_FILE_REQUIRED_HEADER_NOT_FOUND",XapiFileIsTooLarge:"WARNINGS.XAPI.FILE_IS_TOO_LARGE",XapiSbcCertFqdnMismatch:"WARNINGS.XAPI.SBC_CERT_FQDN_MISMATCH",XapiSbcCertExpired:"WARNINGS.XAPI.SBC_CERT_EXPIRED",XapiSbcKeyCertMismatch:"WARNINGS.XAPI.SBC_KEY_CERT_MISMATCH",XapiCertificateExpired:"WARNINGS.XAPI.CERTIFICATE_EXPIRED",XapiNonExistentExtNumber:"WARNINGS.XAPI.NON_EXISTENT_EXT_NUMBER",XapiMcmModeRequired:"WARNINGS.XAPI.MCM_MODE_REQUIRED",InternationalprefixIsMissing:"WARNINGS.INTERNATIONALPREFIX_IS_MISSING",XapiChatLogIsDisabled:"WARNINGS.XAPI.CHAT_LOG_IS_DISABLED",WakeupIvrExists:"WARNINGS.WAKEUP_IVR_EXISTS",RingGroupEnablePaging:"WARNINGS.RING_GROUP_ENABLE_PAGING",XapiCreate1SipTruckEmergency:"WARNINGS.XAPI.CREATE_1_SIP_TRUCK_EMERGENCY",InvalidIpMask:"WARNINGS.INVALID_IP_MASK",TooManyBackups:"WARNINGS.TOO_MANY_BACKUPS",BackupLocationConfigError:"WARNINGS.BACKUP_LOCATION_CONFIG_ERROR",BackupNotFoundOrInvalid:"WARNINGS.BACKUP_NOT_FOUND_OR_INVALID",InvalidCallFlowFile:"WARNINGS.INVALID_CALL_FLOW_FILE",AlreadyExpired:"WARNINGS.ALREADY_EXPIRED",ExtractingOutsideTheDestinationDirectory:"WARNINGS.EXTRACTING_OUTSIDE_THE_DESTINATION_DIRECTORY",WiresharkNotFound:"WARNINGS.WIRESHARK_NOT_FOUND",CannotDeleteTrunksBindedErmergencyNumber:"WARNINGS.CANNOT_DELETE_TRUNKS_BINDED_ERMERGENCY_NUMBER",BlacklistNumberLimitExceeded:"WARNINGS.BLACKLIST_NUMBER_LIMIT_EXCEEDED",DoubleQuotesNotAllowed:"WARNINGS.DOUBLE_QUOTES_NOT_ALLOWED",McuRequestAlreadyInProgress:"WARNINGS.MCU_REQUEST_ALREADY_IN_PROGRESS",McuLimitReached:"WARNINGS.MCU_LIMIT_REACHED",McuWebmeetingBridgeNotFound:"WARNINGS.MCU_WEBMEETING_BRIDGE_NOT_FOUND",McuRequestNotFound:"WARNINGS.MCU_REQUEST_NOT_FOUND",McuRequestTimeout:"WARNINGS.MCU_REQUEST_TIMEOUT",ConverterRequestAlreadyInProgress:"WARNINGS.CONVERTER_REQUEST_ALREADY_IN_PROGRESS",ConverterLimitReached:"WARNINGS.CONVERTER_LIMIT_REACHED",ConverterWebmeetingBridgeNotFound:"WARNINGS.CONVERTER_WEBMEETING_BRIDGE_NOT_FOUND",ConverterRequestNotFound:"WARNINGS.CONVERTER_REQUEST_NOT_FOUND",ConverterRequestTimeout:"WARNINGS.CONVERTER_REQUEST_TIMEOUT",XapiOpenaiKeyIsMissing:"WARNINGS.XAPI.OPENAI_KEY_IS_MISSING",LengthNotMore2048Chars:"WARNINGS.LENGTH_NOT_MORE_2048_CHARS",InvalidSecurityCode:"WARNINGS.INVALID_SECURITY_CODE",SupportedMediaFormatWav:"WARNINGS.SUPPORTED_MEDIA_FORMAT_WAV",NoSecretDefined:"WARNINGS.NO_SECRET_DEFINED",UnableReachUpdatesServer:"WARNINGS.UNABLE_REACH_UPDATES_SERVER",ErrorDownloadingFromUpdatesServer:"WARNINGS.ERROR_DOWNLOADING_FROM_UPDATES_SERVER",CaptureLocalhostNotAllowed:"WARNINGS.CAPTURE_LOCALHOST_NOT_ALLOWED",CaptureOngoing:"WARNINGS.CAPTURE_ONGOING"}}}]);
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.