1"use strict";(globalThis.webpackChunkverisure_owa=globalThis.webpackChunkverisure_owa||[]).push([[516],{41054(e,n,a){a.d(n,{As:()=>i,C:()=>l,EW:()=>o,MB:()=>p,QH:()=>u,Te:()=>c,V2:()=>r,zy:()=>s});var t=a(42477);const l={PHONE_ASAP:"PHONE_ASAP",PHONE_IN_DATE:"PHONE_IN_DATE"},o={HOMEMOVE:"HOMEMOVE",RETENTION:"RETENTION"},i={SOLICITED:"SOLICITED",UNSOLICITED:"UNSOLICITED"},r={CONDITIONS:"CONDITIONS",SUBMOTIVE:"SUBMOTIVE",CONFIRMCANCELLATION:"CONFIRMCANCELLATION"},s="https://forms.office.com/Pages/ResponsePage.aspx?id=f_pVMESpJ0mAHqYrYxGeQ91IUiyqWhhHmbObBRGV9RpUQkI0VThUMDUxV0VIRExMSUdUWE9XTU5XWi4u&embed=true",d=e=>e.includes("Lunes")?1:e.includes("Martes")?2:e.includes("Miercoles")?3:e.includes("Jueves")?4:e.includes("Viernes")?5:e.includes("Sabado")?6:e.includes("Domingo")?7:void 0,c=e=>{const n={1:[],2:[],3:[],4:[],5:[],6:[],7:[]};return e.forEach(e=>{const a=d(e.id),l=(0,t.vO)(e.value);l&&n[a].push(l)}),n},u=e=>{const n={1:[],2:[],3:[],4:[],5:[],6:[],7:[]};return e.forEach(e=>{const a=d(e.day),l=(0,t.vO)(e.hour);l&&n[a].push(l)}),n},m=(e,n)=>{const a=e=>{let[n,a]=e;return 60*n+a},t=e=>`${String(Math.floor(e/60)).padStart(2,"0")}${String(e%60).padStart(2,"0")}`,l=e=>e.split(":").map(Number),o=a(l(e)),i=a(l(n)),r=[];for(let s=o;s<i;s+=60){const e=Math.min(s+60,i);r.push(`${t(s)}-${t(e)}`)}return r},p=e=>{const n={monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6,sunday:7},a=Object.fromEntries(Object.values(n).map(e=>[e,[]]));if(!e)return a;for(const[l,o]of Object.entries(e)){const e=n[l.toLowerCase()];if(e&&Array.isArray(o))for(const{initTime:n,endTime:l}of o){if(!n||!l)continue;const o=m(n,l);for(const n of o){const l=(0,t.vO)(n);l&&a[e].push(l)}}}return a}},80516(e,n,a){a.r(n),a.d(n,{default:()=>B});var t=a(5247),l=a(43433),o=a(69884),i=a(24694),r=a.n(i),s=a(61884),d=a(47378),c=a(26223),u=a(847),m=a(97465),p=a(99547),h=a(79650),y=a(25922),C=a(96951),T=a(56432),S=a(61347),v=a(42477),E=a(41054),O=a(9177),N=a(83144),b=a(76901);const k=b.gql` 2 mutation mkCallMeBack( 3 $numinst: String! 4 $mainReason: String! 5 $subReason: String! 6 $action: CBWTypes! 7 $type: CMBTypes! 8 $date: Datetime 9 $phone: String 10 $name: String 11 $input: CallMeBackInput! 12 ) { 13 xSCallmeBack( 14 numinst: $numinst 15 mainReason: $mainReason 16 subReason: $subReason 17 action: $action 18 type: $type 19 date: $date 20 phone: $phone 21 name: $name 22 input: $input 23 ) { 24 res 25 msg 26 } 27 } 28`,M=b.gql` 29 query xSGetCallMeBackReasons($country: String!, $serviceType: String!) { 30 xSGetCallMeBackReasons(country: $country, serviceType: $serviceType) { 31 res 32 reasons { 33 label 34 key 35 category 36 } 37 } 38 } 39`,$=b.gql` 40 query xSGetCallMeBackSchedules($country: String!) { 41 xSGetCallMeBackSchedules(country: $country) { 42 res 43 dailySchedules { 44 monday { 45 initTime 46 endTime 47 } 48 tuesday { 49 initTime 50 endTime 51 } 52 wednesday { 53 initTime 54 endTime 55 } 56 thursday { 57 initTime 58 endTime 59 } 60 friday { 61 initTime 62 endTime 63 } 64 saturday { 65 initTime 66 endTime 67 } 68 sunday { 69 initTime 70 endTime 71 } 72 } 73 } 74 } 75`,g=b.gql` 76 query xSAllInOne($numinst: String!) { 77 xSAllInOne(numinst: $numinst) { 78 res 79 msg 80 strQueKey 81 reasons { 82 id 83 value 84 text 85 } 86 reasonsWcb { 87 id 88 value 89 text 90 } 91 times { 92 id 93 value 94 text 95 } 96 } 97 } 98`,A=b.gql` 99 mutation mkSetCallback( 100 $numinst: String! 101 $panel: String! 102 $reason: String! 103 $date: Datetime! 104 $name: String! 105 $phone: String! 106 ) { 107 xSSetCallback( 108 numinst: $numinst 109 input: { 110 panel: $panel 111 version: "X" 112 reason: $reason 113 date: $date 114 name: $name 115 phone: $phone 116 campaign: "N/A" 117 } 118 ) { 119 res 120 msg 121 } 122 } 123`,f="a1GZNh",I="VlLrMm";var H=a(51367);const x=()=>{const[e,n]=(0,t.useReducer)((e,n)=>({...e,...n}),{name:"",reason:"",when:"",date:"",time:"",phone:""}),a=(0,d.Iu)(),{app:{os:i}={}}=(0,d.E8)(),{country:b}=(0,d.Ym)(),x=(0,O.df)(N.RU),{installation:{numinst:B,panel:R}={}}=(0,d.eC)(),D=(0,o.Zp)(),P=(0,l.wA)(),{loading:_,error:w,data:L}=(0,C.Je)(g,{variables:{numinst:B}
123,fetchPolicy:C.bV.NETWORK_ONLY,skip:x,outputTransform:e=>({reasons:(null===e||void 0===e?void 0:e.reasonsWcb)||[],times:null!==e&&void 0!==e&&e.times?(0,E.Te)(e.times):[]})}),{loading:V,error:j,data:U}=(0,C.Je)(M,{variables:{country:b,serviceType:"call-me-back"},fetchPolicy:C.bV.NETWORK_ONLY,skip:!x,outputTransform:e=>({reasons:(null===e||void 0===e?void 0:e.reasons)||[]})}),{loading:W,error:q,data:J}=(0,C.Je)($,{variables:{country:b},fetchPolicy:C.bV.NETWORK_ONLY,skip:!x,outputTransform:e=>"OK"===(null===e||void 0===e?void 0:e.res)?{times:null!==e&&void 0!==e&&e.dailySchedules?(0,E.MB)(e.dailySchedules):[]}:null}),K=x?((null===U||void 0===U?void 0:U.reasons)||[]).map(e=>{let{key:n,label:a}=e;return{key:n,text:(0,s.t)(`Help.CallMeBack.Reason.${a}.dropdown.subtitle`)}}):((null===L||void 0===L?void 0:L.reasons)||[]).map(e=>{let{id:n,text:a}=e;return{key:n,text:a}}),Y=e=>{"OK"===(null===e||void 0===e?void 0:e.res)&&P((0,y.D)({type:"completed",title:e.msg}))},[G,{loading:F,error:Q}]=(0,C.i1)(A,{onCompleted:Y}),[X,{loading:Z,error:z}]=(0,C.i1)(k,{onCompleted:Y}),ee=x?null===J||void 0===J?void 0:J.times:null===L||void 0===L?void 0:L.times,ne=e.date?null===ee||void 0===ee?void 0:ee[(0,v.SJ)(e.date)]:void 0,{error:ae,hideSchedules:te}=((e,n,a)=>{if(!e)return null;const t=(0,v.SJ)(e),l=6===t||7===t;if(r()(e,v.y0).isBefore(r()(),"day"))return{error:(0,s.t)("Help.CallMeBack.timeInThePast.error"),hideSchedules:!0};if(l)return{error:(0,s.t)("Help.CallMeBack.operatorNotAvailable.error"),hideSchedules:!0};if(!a)return null;if(null===n||void 0===n||!n.length)return{error:(0,s.t)("Help.CallMeBack.operatorNotAvailable.error"),hideSchedules:!0};const o=r()(`${e} ${a}`,v.A0);return r()().diff(o)>0?{error:(0,s.t)("Help.CallMeBack.timeInThePast.error"),hideSchedules:!1}:null})(e.date,ne,e.time)||{};return _||V||W?(0,H.jsx)(p.Rh,{withSomeHeight:!0}):(0,H.jsxs)(p.U3,{title:(0,s.t)("Help.CallMeBack.phoneAttention.title"),contentArea:{type:p.U3.contentArea.SECONDARY,breadcrumbs:[{name:(0,s.t)("Help.Main.help.title"),path:"/help"}]},noOverflow:!0,children:[(0,H.jsxs)(p.lV,{"id-owa":"Callmeback.Query",title:(0,s.t)("Help.CallMeBack.phoneAttention.title"),okText:(0,s.t)("Help.CallMeBack.callMe.button"),okAction:()=>{const n=((e,n,a)=>e===E.C.PHONE_IN_DATE?`${n} ${a}`:r()().format(v.A0))(e.when,e.date,e.time);x?X({variables:{numinst:B,mainReason:"NON_DEFINED",subReason:"NON_DEFINED",action:E.EW.HOMEMOVE,type:E.As.SOLICITED,date:n,name:e.name,phone:e.phone,input:{phone:e.phone,preferredTime:n,reason:e.reason}}}):G({variables:{numinst:B,panel:R,reason:e.reason,date:n,name:e.name,phone:e.phone}})},okDisabled:!(n=>{const{name:a,reason:t,when:l,date:o,time:i,phone:r}=e;return!n&&!!a&&!!t&&!!r&&(0,S.ri)(r)&&(l===E.C.PHONE_ASAP||!!o&&!!i)})(ae),cancelText:(0,s.t)("common.cancel"),cancelAction:()=>D(T.J.HELP),loading:Z||F,children:[(0,H.jsx)("div",{className:f,children:(0,s.t)("Help.CallMeBack.phoneAttention.description")}),(0,H.jsx)(c.k,{value:e.name,onChange:e=>n({name:e}),placeholder:(0,s.t)("Help.CallMeBack.name.label")}),(0,H.jsx)(h.ms,{placeholder:(0,s.t)("Help.CallMeBack.reason.label"),options:K,onKeyChange:e=>n({reason:e})}),(0,H.jsx)(h.ms,{placeholder:(0,s.t)("Help.CallMeBack.when.label"),options:[{text:(0,s.t)("Help.CallMeBack.asSoonAsPossible.label"),key:E.C.PHONE_ASAP},{text:(0,s.t)("Help.CallMeBack.chooseDate.label"),key:E.C.PHONE_IN_DATE}],onKeyChange:e=>n({when:e,date:""})}),e.when===E.C.PHONE_IN_DATE&&(0,H.jsx)(u.l,{value:e.date,label:`${(0,s.t)("Help.CallMeBack.date.label")}: `,onChange:e=>n({date:e}),isMobile:a,os:i}),ne&&!te&&(0,H.jsx)(h.ms,{placeholder:(0,s.t)("Help.CallMeBack.time.label"),options:ne,onKeyChange:e=>n({time:e})}),ae&&(0,H.jsx)("div",{className:I,children:ae}),(0,H.jsx)(c.k,{value:e.phone,inputType:m.nl.PHONE,onChange:e=>n({phone:e}),placeholder:(0,s.t)("Help.CallMeBack.phone.label"),validate:S.FY})]}),(w||j||q||Q||z)&&(0,H.jsx)(h.AA,{"id-owa":"CallMeBackErrorModal",onCancel:()=>D(T.J.HELP),error:w||j||q||Q||z})]})},B=t.memo(x)}}]);
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.