callix-dialer-widget 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WIDGET-README.md +22 -10
- package/dist-widget/callix-dialer.css +1 -1
- package/dist-widget/callix-dialer.es.js +693 -100
- package/dist-widget/callix-dialer.es.js.map +1 -1
- package/dist-widget/callix-dialer.umd.js +1 -1
- package/dist-widget/callix-dialer.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* Callix Client SDK React
|
|
23
23
|
* @version 1.1.0
|
|
24
24
|
* @license Proprietary
|
|
25
|
-
*/var ku=function(){if(Tu)return Nu;Tu=1;var e,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{CallOperatorStartupError:()=>d.CallOperatorStartupError,CallixClientParams:()=>d.CallixClientParams,CallixClientProvider:()=>g,CallixClientSdk:()=>d.CallixClientSdk,useCallOperator:()=>_,useCallOperatorAudioInputMuted:()=>M,useCallOperatorAudioOutputControls:()=>P,useCallOperatorAudioOutputMuted:()=>L,useCallOperatorAudioOutputVolume:()=>D,useCallOperatorBreaks:()=>U,useCallOperatorControls:()=>E,useCallOperatorCurrentBreak:()=>k,useCallOperatorCurrentCall:()=>N,useCallOperatorCurrentCallControls:()=>I,useCallOperatorCurrentCallInfo:()=>T,useCallOperatorDiscardQualifications:()=>O,useCallOperatorEventListener:()=>R,useCallOperatorStartupError:()=>j,useCallOperatorState:()=>C,useCallOperatorSuccessQualifications:()=>A,useCallixClient:()=>p}),e=a,Nu=((e,t,a,d)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))!o.call(e,s)&&s!==a&&n(e,s,{get:()=>t[s],enumerable:!(d=r(t,s))||d.enumerable});return e})(n({},"__esModule",{value:!0}),e);var d=vu(),s=vu(),l=Cu(),u=Iu(),c=m(),f=(0,l.createScope)(null),h=(0,l.molecule)((e,t)=>{let n=t(f);if(!n)throw new Error("Missing CallixClient parameters. You must wrap your component tree with CallixClientProvider.");return new s.CallixClientSdk(n)});function p(){return(0,u.useMolecule)(h)}function g({children:e,...t}){return(0,c.jsx)(u.ScopeProvider,{scope:f,value:t,children:e})}var $=Cu(),v=Iu(),y=t,b=t;function x(e){return(0,b.useSyncExternalStore)(e.subscribe.bind(e),e.get.bind(e),e.get.bind(e))}var w=(0,$.molecule)(e=>{let t=e(h).createCallOperator();return(0,$.onMount)(()=>{t.start();let e=()=>{t.stop()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),(0,$.onUnmount)(()=>{t.stop()}),t});function _(){return(0,v.useMolecule)(w)}function C(){let e=_(),t=x(e.currentStateKeys);for(let n of t){if("startup.error"===n)return{state:"startupError",error:e.startupError.get()};if("startup"===n)return{state:"starting"};if("offline"===n||"available.networkDown"===n||"onBreak.networkDown"===n)return{state:"offline"};if("onBreak"===n)return{state:"onBreak",break:e.currentBreak.get()};if("available.callRinging"===n)return{state:"callRinging",call:e.currentCall.get()};if("manualCall.callSetup"===n)return{state:"manualCallSetup",call:e.currentCall.get()};if("manualCall.callRinging"===n)return{state:"manualCallRinging",call:e.currentCall.get()};if("manualCall.callFailed"===n)return{state:"manualCallFailed",call:e.currentCall.get()};if("available"===n||"manualCall.idle"===n)return{state:"idle"};if("inCall"===n)return{state:"callInProgress",call:e.currentCall.get()};if("afterCall"===n)return{state:"afterCall"}}}function S(e,t,n){return Object.fromEntries(n.map(n=>[n,(0,y.useCallback)((...r)=>{if(t){if("function"==typeof t[n])return t[n].apply(t,r);console.warn(`Method ${String(n)} is not a function on obj ${e}.`)}else console.warn(`Obj ${e} is null or undefined, cannot call method ${String(n)}.`)},[t])]))}function E(){return S("callOperator",_(),["becomeAvailable","goOffline","enterOnBreak","makeManualCall","finishAfterCall"])}function N(){return x(_().currentCall)}function T(){return x(_().currentCallInfo)}function A(){return x(_().successQualifications)}function O(){return x(_().discardQualifications)}function I(){return S("currentCall",N(),["answer","reject","hangup","isOnHold","hold","unhold","isMuted","mute","unmute"])}function k(){return x(_().currentBreak)}function j(){let e=C();if("startupError"===(null==e?void 0:e.state))return e.error}function R(e,t){let n=_(),r=(0,y.useRef)(t);r.current=t,(0,y.useEffect)(()=>{if(n)return n.on(e,(...e)=>{r.current.apply(null,e)})},[e,n])}function P(){return S("audioOutput",_().audioOutput,["setVolume","setMute"])}function D(){let e=_(),{setVolume:t}=P();return[x(e.audioOutput.volume),t]}function L(){let e=_(),{setMute:t}=P();return[x(e.audioOutput.isMuted),t]}function M(){let e=N(),[t,n]=(0,y.useState)((null==e?void 0:e.isMuted())??!1);return[t,(0,y.useCallback)(t=>{e&&(t?e.mute():e.unmute(),n(t))},[e])]}function U(){return x(_().breaks)}return Nu}();class ju{constructor(e){this.value=e,this.listeners=new Set}get(){return this.value}set(e){if(JSON.stringify(e)!==JSON.stringify(this.value)){this.value=e;for(const t of this.listeners)t(e)}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}}const Ru={segments:[],status:null,insight:null,interims:0};class Pu{constructor(e){this.options=e,this.userSignal=new ju(void 0),this.listeners=new Set,this.sessionLostListeners=new Set,this.viewWaiters=[],this.ws=null,this.reconnectDelay=500,this.reconnectTimer=null,this.closed=!1,this.iceServers=[{urls:"stun:stun.l.google.com:19302"}],this.pc=null,this.connectionId=null,this.remoteSet=!1,this.pendingCandidates=[],this.micStream=null,this.audioSeq=0,this.unlockListener=null,this.agentId=e.agentId,this.session=e.session??null,this.log=e.log??(()=>{}),this.audio=void 0!==e.audioElement?e.audioElement:function(){if("undefined"==typeof document)return null;const e=document.createElement("audio");return e.autoplay=!0,e.setAttribute("playsinline","true"),e.style.display="none",e.dataset.callixEngineAudio="true",document.body.appendChild(e),e}(),this.state={wsState:"idle",tabId:null,view:null,engaged:!1,pcState:"idle",needsUnlock:!1,micError:null,lastError:null,inputMuted:!1,outputMuted:!1,outputVolume:100,transcript:Ru,sessionLost:null}}getState(){return this.state}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setState(e){this.state={...this.state,...e};for(const t of this.listeners)t()}get currentCall(){var e,t;return(null==(t=null==(e=this.state.view)?void 0:e.snapshot)?void 0:t.leg.call)??null}connect(){if(this.closed&&(this.closed=!1),this.ws&&(this.ws.readyState===WebSocket.OPEN||this.ws.readyState===WebSocket.CONNECTING))return;const e=this.options.WebSocketImpl??WebSocket;this.setState({wsState:"connecting"});const t=new e(function(e){const t=new URL(e,"undefined"!=typeof window?window.location.href:"http://localhost");return t.protocol="https:"===t.protocol?"wss:":"ws:",t.pathname=`${t.pathname.replace(/\/+$/,"")}/ws`,t.search="",t.hash="",t.toString()}(this.options.url));this.ws=t,t.onopen=()=>{if(this.ws!==t)return;this.reconnectDelay=500,this.setState({wsState:"open"});const e={type:"hello",role:"tab",agentId:this.agentId,token:this.options.token,label:this.options.label??"Discador",...this.session?{session:this.session}:{}};this.send(e),this.log("conectado ao host do motor")},t.onmessage=e=>{if(this.ws!==t)return;let n;try{n=JSON.parse(String(e.data))}catch{return}this.handle(n)},t.onclose=()=>{if(this.ws!==t)return;this.ws=null;const e=this.state.engaged;this.setState({wsState:"closed",tabId:null,engaged:!1}),e&&this.stopAudio(),this.closed||(this.log(`conexão com o motor caiu; nova tentativa em ${this.reconnectDelay} ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.reconnectDelay),this.reconnectDelay=Math.min(2*this.reconnectDelay,5e3))},t.onerror=()=>{}}close(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopAudio();const e=this.ws;this.ws=null,e&&(e.onclose=null,e.close());for(const t of this.viewWaiters.splice(0))clearTimeout(t.timer);this.setState({wsState:"closed",tabId:null,engaged:!1})}waitForView(e=15e3){return this.state.view&&this.state.tabId?Promise.resolve(this.state.view):new Promise((t,n)=>{const r=setTimeout(()=>{const e=this.viewWaiters.findIndex(e=>e.timer===r);e>=0&&this.viewWaiters.splice(e,1),n(new Error("o motor não respondeu"))},e);this.viewWaiters.push({resolve:t,timer:r})})}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}handle(e){switch(e.type){case"welcome":Array.isArray(e.iceServers)&&e.iceServers.length>0&&(this.iceServers=e.iceServers),this.setState({tabId:e.tabId}),this.applyView(e.view),this.log(`sou a aba ${e.tabId}`),!1!==this.options.autoEngage&&e.view.engagedTabId!==e.tabId&&this.engage();break;case"view":this.applyView(e.view);break;case"engage":this.setState({engaged:e.engaged}),e.engaged?this.startAudio():this.stopAudio();break;case"signal":this.onSignal(e.payload);break;case"error":this.setState({lastError:e.message}),this.log(`erro do host: ${e.message}`);break;case"transcript":this.pushSegment(e.segment);break;case"transcript-sync":this.setState({transcript:{segments:e.segments??[],status:e.status??null,insight:e.insight??null,interims:0}});break;case"insight":{const t=this.state.transcript.insight;(!t||e.insight.revision>=t.revision||e.insight.callId!==t.callId)&&this.setState({transcript:{...this.state.transcript,insight:e.insight}});break}case"transcript-status":this.onTranscriptStatus(e.status)}}applyView(e){var t,n;const r=this.state.view,i=e.sessionLost??null,o=Boolean(i)&&!(null==r?void 0:r.sessionLost);o&&(this.session=null,this.log(`o Callix derrubou a sessão: ${(null==i?void 0:i.message)??""}`));const a=null==(t=e.snapshot)?void 0:t.leg.user;this.userSignal.set(a?{...a,sessionId:0}:void 0);const d=null==(n=e.snapshot)?void 0:n.leg.call,s={view:e,sessionLost:i?{originator:i.originator,message:i.message}:null};d&&"boolean"==typeof d.muted&&d.muted!==this.state.inputMuted&&"ended"!==d.state&&(s.inputMuted=d.muted),this.setState(s);for(const l of this.viewWaiters.splice(0))clearTimeout(l.timer),l.resolve(e);if(o&&i)for(const l of this.sessionLostListeners)l(i)}onSessionLost(e){return this.sessionLostListeners.add(e),()=>{this.sessionLostListeners.delete(e)}}setSession(e){this.session=e,this.send({type:"session",session:e})}engage(){this.send({type:"engage"})}release(){this.send({type:"release"})}command(e){this.send({type:"command",command:e}),this.log(`comando: ${e.name}${e.phone?` ${e.phone}`:""}`)}setInputMuted(e){if(this.micStream)for(const t of this.micStream.getAudioTracks())t.enabled=!e;this.setState({inputMuted:e}),this.currentCall&&this.command({name:e?"mute":"unmute"})}setOutputMuted(e){this.audio&&(this.audio.muted=e),this.setState({outputMuted:e})}setOutputVolume(e){const t=Math.max(0,Math.min(100,Math.round(e)));this.audio&&(this.audio.volume=t/100),this.setState({outputVolume:t})}async setOutputDevice(e){const t=this.audio;if(!(null==t?void 0:t.setSinkId))throw new Error("este navegador não permite escolher a saída de som");await t.setSinkId(e)}async unlockAudio(){if(this.audio&&this.audio.srcObject)try{await this.audio.play(),this.setState({needsUnlock:!1})}catch{this.setState({needsUnlock:!0})}}async startAudio(){const e=++this.audioSeq;this.stopAudio();const t=void 0===this.options.mediaDevices?"undefined"!=typeof navigator?navigator.mediaDevices:null:this.options.mediaDevices;if(!(null==t?void 0:t.getUserMedia))return void this.setState({micError:"Este navegador não permite usar o microfone pela página."});let n;try{n=await t.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(a){const e=`Microfone indisponível: ${a.message}`;return this.setState({micError:e}),void this.log(e)}if(e!==this.audioSeq||!this.state.engaged){for(const e of n.getTracks())e.stop();return}this.micStream=n;for(const d of n.getAudioTracks())d.enabled=!this.state.inputMuted;this.setState({micError:null});const r=new(this.options.PeerConnectionImpl??RTCPeerConnection)({iceServers:this.iceServers});this.pc=r;const i=Math.random().toString(36).slice(2,10);this.connectionId=i,this.remoteSet=!1,this.pendingCandidates=[];for(const d of n.getAudioTracks())r.addTrack(d,n);r.onicecandidate=e=>{this.send({type:"signal",payload:{connectionId:i,candidate:e.candidate?e.candidate.toJSON():null}})},r.ontrack=e=>{const t=e.streams[0]??new MediaStream([e.track]);this.audio&&(this.audio.srcObject=t,this.audio.muted=this.state.outputMuted,this.audio.volume=this.state.outputVolume/100,this.audio.play().then(()=>this.setState({needsUnlock:!1})).catch(()=>{this.setState({needsUnlock:!0}),this.armUnlock()})),this.log("áudio do motor chegou")},r.onconnectionstatechange=()=>{this.pc===r&&(this.setState({pcState:r.connectionState}),this.log(`WebRTC: ${r.connectionState}`),"failed"===r.connectionState&&this.state.engaged&&(this.log("conexão de áudio com o motor falhou; renegociando"),this.startAudio()))};const o=await r.createOffer();this.pc===r&&(await r.setLocalDescription(o),this.send({type:"signal",payload:{connectionId:i,description:{type:o.type,sdp:o.sdp}}}),this.setState({pcState:r.connectionState}))}stopAudio(){if(this.pc&&(this.pc.onconnectionstatechange=null,this.pc.onicecandidate=null,this.pc.ontrack=null,this.pc.close(),this.pc=null),this.connectionId=null,this.micStream){for(const e of this.micStream.getTracks())e.stop();this.micStream=null}this.audio&&(this.audio.srcObject=null),"idle"!==this.state.pcState&&this.setState({pcState:"idle"})}async onSignal(e){const t=this.pc;if(t&&(!e.connectionId||e.connectionId===this.connectionId))try{if(e.description){await t.setRemoteDescription(e.description),this.remoteSet=!0;for(const e of this.pendingCandidates.splice(0))await t.addIceCandidate(e).catch(()=>{})}if(void 0!==e.candidate){const n=e.candidate??void 0;!this.remoteSet&&n?this.pendingCandidates.push(n):await t.addIceCandidate(n).catch(()=>{})}}catch(n){this.log(`sinalização: ${n.message}`)}}armUnlock(){if(this.unlockListener||"undefined"==typeof document)return;const e=()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",e,!0),this.unlockListener=null,this.unlockAudio()};this.unlockListener=e,document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",e,!0)}pushSegment(e){const t=this.state.transcript;let n=t.segments,r=t.insight,i=t.interims;n.length&&n[0].callId!==e.callId&&(n=[],r=null,i=0);const o=n.findIndex(t=>t.id===e.id),a=o>=0?n.map((t,n)=>n===o?e:t):[...n,e];a.length>300&&a.shift(),e.interim&&(i+=1),this.setState({transcript:{...t,segments:a,insight:r,interims:i}})}onTranscriptStatus(e){const t=this.state.transcript;if(!t.status||t.status.recordingId===e.recordingId||"running"===e.live){const n=t.status&&t.status.recordingId!==e.recordingId;this.setState({transcript:{...t,status:e,...n?{segments:[],insight:null,interims:0}:{}}})}}}const Du=t.createContext(null);function Lu({client:e,children:t}){return $.jsx(Du.Provider,{value:e,children:t})}function Mu(e){return t.useSyncExternalStore(e.subscribe.bind(e),e.getState.bind(e),e.getState.bind(e))}const Uu=[{id:0,name:"Pausa"}];function Fu(e){return{id:e.id,name:e.name,isSystemQualification:!1,systemQualificationType:0}}function Bu(e,t){var n;return((null==(n=null==e?void 0:e.snapshot)?void 0:n.leg.qualifications)??[]).filter(e=>e.kind===t).map(Fu)}class qu{constructor(e,t){this.client=e,this.listeners=new Map,this.snapshot=t}get id(){return this.snapshot.id}get direction(){return this.snapshot.direction}get data(){var e;return{destinationNumber:null==(e=this.snapshot.contact)?void 0:e.phone,campaignContactPhoneId:this.snapshot.campaignContactPhoneId,answeredAt:this.snapshot.answeredAt?new Date(this.snapshot.answeredAt):void 0}}get callerNumber(){var e;return null==(e=this.snapshot.contact)?void 0:e.phone}get peerDisplayName(){var e;return null==(e=this.snapshot.contact)?void 0:e.name}get isEstablished(){return"active"===this.snapshot.state}get isEnded(){return"ended"===this.snapshot.state}get currentDurationSeconds(){const e=this.snapshot.answeredAt??this.snapshot.startedAt;return Math.max(0,Math.floor((Date.now()-e)/1e3))}answer(){this.client.command({name:"answer"})}reject(){this.client.command({name:"reject"})}hangup(){this.client.command({name:"hangup"})}isOnHold(){return{local:!1,remote:!1}}async hold(){}async unhold(){}isMuted(){return this.client.getState().inputMuted}mute(){this.client.setInputMuted(!0)}unmute(){this.client.setInputMuted(!1)}sendDtmf(e){this.client.command({name:"dtmf",tones:e})}on(e,t){let n=this.listeners.get(e);return n||(n=new Set,this.listeners.set(e,n)),n.add(t),this}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){var n;return null==(n=this.listeners.get(e))||n.delete(t),this}toCallData(){var e;return{id:this.snapshot.id,direction:this.snapshot.direction,destinationNumber:(null==(e=this.snapshot.contact)?void 0:e.phone)??"",answeredAt:this.snapshot.answeredAt?new Date(this.snapshot.answeredAt).toISOString():void 0,campaignContactPhoneId:this.snapshot.campaignContactPhoneId,isMuted:this.snapshot.muted}}}function zu(e){var n,r;const i=(null==(r=null==(n=Mu(e).view)?void 0:n.snapshot)?void 0:r.leg.call)??null,o=t.useRef(null);return i&&"ended"!==i.state?o.current&&o.current.id===i.id?o.current.snapshot=i:o.current=new qu(e,i):o.current=null,o.current}function Hu(e){const n=Mu(e),r=zu(e);return t.useMemo(()=>function(e,t){var n,r,i;if(!e)return;if("anotherDevice"===(null==(n=e.sessionLost)?void 0:n.originator))return{state:"startupError",error:"userIsAlreadyConnectedOnAnotherDevice"};const o=null==(r=e.snapshot)?void 0:r.leg;if(!o)return"starting"===e.engine||"running"===e.engine?{state:"starting"}:{state:"offline"};const a=t??void 0;switch(o.status){case"starting":return{state:"starting"};case"available":return{state:"idle"};case"ringing":return{state:"callRinging",call:a};case"dialing":return"ringing"===(null==(i=o.call)?void 0:i.state)?{state:"manualCallRinging",call:a}:{state:"manualCallSetup",call:a};case"inCall":return{state:"callInProgress",call:a};case"afterCall":return{state:"afterCall"};case"onBreak":return{state:"onBreak",break:Uu[0]};case"offline":return{state:"offline"};case"error":return{state:"startupError",error:"unknownError"}}}(n.view,r),[n.view,r])}function Wu(e){var n,r,i,o,a;const d=Mu(e).view,s=JSON.stringify([null==(r=null==(n=null==d?void 0:d.snapshot)?void 0:n.leg.call)?void 0:r.id,null==(o=null==(i=null==d?void 0:d.snapshot)?void 0:i.leg.call)?void 0:o.contact,null==(a=null==d?void 0:d.snapshot)?void 0:a.leg.qualifications]);return t.useMemo(()=>function(e){var t;const n=null==(t=null==e?void 0:e.snapshot)?void 0:t.leg,r=null==n?void 0:n.call;if(!n||!r)return;const i=Bu(e,"success"),o=Bu(e,"discard"),a=r.contact;if(null==a?void 0:a.campaign)return{type:"campaign",info:{campaign:{id:0,name:a.campaign,type:0,requireCallComments:!1,enableTransfer:!1,enableScheduledCall:!1,successQualifications:i,discardQualifications:o,previewDuration:"",showCampaignModelOnService:!1,skipCallQualification:!1},campaignList:{id:0,name:""},campaignContact:{id:r.campaignContactPhoneId??0,label:a.name,phoneNumber:a.phone}}};return{type:"manual",info:{successQualifications:i,discardQualifications:o}}}(d),[s])}function Gu(e,n){var r,i;const o=Mu(e),a=(null==(i=null==(r=o.view)?void 0:r.snapshot)?void 0:i.leg.qualifications)??[],d=JSON.stringify(a);return t.useMemo(()=>Bu(o.view,n),[d,n])}const Vu=new WeakMap;function Ku(e){return t.useMemo(()=>function(e){let t=Vu.get(e);t||(t={breaks:new ju(Uu),user:e.userSignal,audioOutput:{setAudioOutputDevice:t=>{e.setOutputDevice(t).catch(()=>{})},setVolume:t=>e.setOutputVolume(t),setMute:t=>e.setOutputMuted(t)},stop:()=>{},goOffline:()=>{},becomeAvailable:()=>{var t,n;"onBreak"===(null==(n=null==(t=e.getState().view)?void 0:t.snapshot)?void 0:n.leg.status)&&e.command({name:"resume"})},enterOnBreak:()=>e.command({name:"pause"}),makeManualCall:t=>e.command({name:"dial",phone:t}),finishAfterCall:t=>{"number"==typeof t.qualificationId?e.command({name:"qualify",qualificationId:t.qualificationId,result:"failure"===t.result?"discard":"success"}):e.command({name:"finish"})}},Vu.set(e,t));return t}(e),[e])}function Yu(){const e=t.useContext(Du);return e?Ku(e):ku.useCallOperator()}function Xu(){const e=t.useContext(Du);return e?Hu(e):ku.useCallOperatorState()}function Ju(){const e=t.useContext(Du);return e?(n=e,t.useMemo(()=>({becomeAvailable:()=>{var e,t;"onBreak"===(null==(t=null==(e=n.getState().view)?void 0:e.snapshot)?void 0:t.leg.status)&&n.command({name:"resume"})},goOffline:()=>{},enterOnBreak:()=>n.command({name:"pause"}),makeManualCall:e=>n.command({name:"dial",phone:e}),finishAfterCall:e=>{"number"==typeof e.qualificationId?n.command({name:"qualify",qualificationId:e.qualificationId,result:"failure"===e.result?"discard":"success"}):n.command({name:"finish"})}}),[n])):ku.useCallOperatorControls();var n}function Zu(){const e=t.useContext(Du);return e?zu(e)??void 0:ku.useCallOperatorCurrentCall()}function Qu(){const e=t.useContext(Du);return e?Wu(e):ku.useCallOperatorCurrentCallInfo()}function ec(){const e=t.useContext(Du);return e?Gu(e,"success"):ku.useCallOperatorSuccessQualifications()}function tc(){const e=t.useContext(Du);return e?Gu(e,"discard"):ku.useCallOperatorDiscardQualifications()}function nc(){const e=t.useContext(Du);return e?(n=e,t.useMemo(()=>({answer:()=>n.command({name:"answer"}),reject:()=>n.command({name:"reject"}),hangup:()=>n.command({name:"hangup"}),isOnHold:()=>({local:!1,remote:!1}),hold:async()=>{},unhold:async()=>{},isMuted:()=>n.getState().inputMuted,mute:()=>n.setInputMuted(!0),unmute:()=>n.setInputMuted(!1)}),[n])):ku.useCallOperatorCurrentCallControls();var n}function rc(){const e=t.useContext(Du);return e?function(e){const n=Mu(e),r=t.useCallback(t=>e.setInputMuted(t),[e]);return[n.inputMuted,r]}(e):ku.useCallOperatorAudioInputMuted()}function ic(){const e=t.useContext(Du);return e?function(e){const n=Mu(e),r=t.useCallback(t=>e.setOutputMuted(t),[e]);return[n.outputMuted,r]}(e):ku.useCallOperatorAudioOutputMuted()}function oc(){const e=t.useContext(Du);return e?function(e){const n=Mu(e),r=t.useCallback(t=>e.setOutputVolume(t),[e]);return[n.outputVolume,r]}(e):ku.useCallOperatorAudioOutputVolume()}function ac(e,n){const r=t.useContext(Du);r?function(e,n,r){const i=t.useRef(r);i.current=r,t.useEffect(()=>e.onSessionLost(e=>{i.current({originator:e.originator})}),[e,n])}(r,e,n):ku.useCallOperatorEventListener(e,n)}var dc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},sc=t.createContext&&t.createContext(dc),lc=["attr","size","title"];function uc(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cc.apply(this,arguments)}function fc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fc(Object(n),!0).forEach(function(t){pc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pc(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mc(e){return e&&e.map((e,n)=>t.createElement(e.tag,hc({key:n},e.attr),mc(e.child)))}function gc(e){return n=>t.createElement($c,cc({attr:hc({},e.attr)},n),mc(e.child))}function $c(e){var n=n=>{var r,{attr:i,size:o,title:a}=e,d=uc(e,lc),s=o||n.size||"1em";return n.className&&(r=n.className),e.className&&(r=(r?r+" ":"")+e.className),t.createElement("svg",cc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,d,{className:r,style:hc(hc({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&t.createElement("title",null,a),e.children)};return void 0!==sc?t.createElement(sc.Consumer,null,e=>n(e)):n(dc)}function vc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"22 12 18 12 15 21 9 3 6 12 2 12"},child:[]}]})(e)}function yc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(e)}function bc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(e)}function xc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function wc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"2",y:"7",width:"20",height:"14",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"},child:[]}]})(e)}function _c(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function Cc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"polyline",attr:{points:"12 6 12 12 16 14"},child:[]}]})(e)}function Sc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"},child:[]},{tag:"line",attr:{x1:"18",y1:"9",x2:"12",y2:"15"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"18",y2:"15"},child:[]}]})(e)}function Ec(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"4",y1:"9",x2:"20",y2:"9"},child:[]},{tag:"line",attr:{x1:"4",y1:"15",x2:"20",y2:"15"},child:[]},{tag:"line",attr:{x1:"10",y1:"3",x2:"8",y2:"21"},child:[]},{tag:"line",attr:{x1:"16",y1:"3",x2:"14",y2:"21"},child:[]}]})(e)}function Nc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 18v-6a9 9 0 0 1 18 0v6"},child:[]},{tag:"path",attr:{d:"M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"},child:[]}]})(e)}function Tc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(e)}function Ac(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"1",y1:"1",x2:"23",y2:"23"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"},child:[]},{tag:"path",attr:{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"12",y2:"23"},child:[]},{tag:"line",attr:{x1:"8",y1:"23",x2:"16",y2:"23"},child:[]}]})(e)}function Oc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"12",y2:"23"},child:[]},{tag:"line",attr:{x1:"8",y1:"23",x2:"16",y2:"23"},child:[]}]})(e)}function Ic(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function kc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"10",y1:"15",x2:"10",y2:"9"},child:[]},{tag:"line",attr:{x1:"14",y1:"15",x2:"14",y2:"9"},child:[]}]})(e)}function jc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Rc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 2 16 8 22 8"},child:[]},{tag:"line",attr:{x1:"23",y1:"1",x2:"16",y2:"8"},child:[]},{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Pc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"23",y1:"1",x2:"1",y2:"23"},child:[]}]})(e)}function Dc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Lc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Mc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(e)}function Uc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12.01",y2:"18"},child:[]}]})(e)}function Fc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(e)}function Bc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function qc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function zc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"line",attr:{x1:"23",y1:"9",x2:"17",y2:"15"},child:[]},{tag:"line",attr:{x1:"17",y1:"9",x2:"23",y2:"15"},child:[]}]})(e)}function Hc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"15",y1:"9",x2:"9",y2:"15"},child:[]},{tag:"line",attr:{x1:"9",y1:"9",x2:"15",y2:"15"},child:[]}]})(e)}function Wc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}var Gc=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);var Vc,Kc,Yc,Xc,Jc,Zc,Qc,ef,tf=(e,t)=>!!~e.indexOf(t),nf=(e,t="-")=>e.join(t),rf=(e,t)=>nf(e.filter(Boolean),t),of=(e,t=1)=>e.slice(t),af=e=>e,df=()=>{},sf=e=>e[0].toUpperCase()+of(e),lf=e=>e.replace(/[A-Z]/g,"-$&").toLowerCase(),uf=(e,t)=>{for(;"function"==typeof e;)e=e(t);return e},cf=(e,t)=>{e.size>t&&e.delete(e.keys().next().value)},ff=(e,t)=>!tf("@:&",e[0])&&(tf("rg",(typeof t)[5])||Array.isArray(t)),hf=(e,t,n)=>t?Object.keys(t).reduce((e,r)=>{const i=uf(t[r],n);return ff(r,i)?e[lf(r)]=i:e[r]="@"==r[0]&&tf("figa",r[1])?(e[r]||[]).concat(i):hf(e[r]||{},i,n),e},e):e,pf="undefined"!=typeof CSS&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& ")),mf=e=>(Array.isArray(e)||(e=[e]),"@media "+nf(e.map(e=>("string"==typeof e&&(e={min:e}),e.raw||nf(Object.keys(e).map(t=>`(${t}-width:${e[t]})`)," and "))),",")),gf=e=>{for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"tw-"+((t^t>>>9)>>>0).toString(36)},$f=(e="")=>(Vc.push(e),""),vf=e=>{Vc.length=Math.max(Vc.lastIndexOf("")+~~e,0)},yf=e=>e&&!tf("!:",e[0]),bf=e=>":"==e[0],xf=(e,t)=>{Kc.push({v:Vc.filter(bf),d:e,n:t,i:tf(Vc,"!"),$:""})},wf=e=>{const t="-"==e[0];t&&(e=of(e));const n=nf(Vc.filter(yf));return xf("&"==e?n:(n&&n+"-")+e,t),""},_f=(e,t)=>{let n="";for(let r,i=!1,o=0;r=e[o++];)if(i||"["==r)n+=r,i="]"!=r;else switch(r){case":":n=n&&$f(":"+(e[o]==r?e[o++]:"")+n);break;case"(":n=n&&$f(n),$f();break;case"!":$f(r);break;case")":case" ":case"\t":case"\n":case"\r":n=n&&wf(n),vf(")"!==r);break;default:n+=r}n&&(t?$f(":"+n):"-"==n.slice(-1)?$f(n.slice(0,-1)):wf(n))},Cf=e=>{$f(),Sf(e),vf()},Sf=e=>{switch(typeof e){case"string":_f(e);break;case"function":xf(e);break;case"object":Array.isArray(e)?e.forEach(Cf):e&&Object.keys(e).forEach(t=>{((e,t)=>{if(t){$f();const n=tf("tbu",(typeof t)[1]);_f(e,n),n&&Cf(t),vf()}})(t,e[t])})}},Ef=new WeakMap,Nf=e=>(Vc=[],Kc=[],Array.isArray(e[0])&&Array.isArray(e[0].raw)?(e=>{let t=Ef.get(e);if(!t){let n=NaN,r="";t=e.map((t,i)=>{if(n==n||"["!=t.slice(-1)&&!tf(":-(",(e[i+1]||"")[0])||(n=i),i>=n)return o=>{i==n&&(r=""),r+=t,tf("rg",(typeof o)[5])?r+=o:o&&(_f(r),r="",Sf(o)),i==e.length-1&&_f(r)};const o=Kc=[];_f(t);const a=[...Vc];return Kc=[],e=>{Kc.push(...o),Vc=[...a],e&&Sf(e)}}),Ef.set(e,t)}return t})(e[0]).forEach((t,n)=>t(e[n+1])):Sf(e),Kc),Tf=(e,t)=>("function"==typeof t&&(Yc=!1),t),Af=new WeakMap,Of=(e,t)=>{const n=(e=>{Yc=!0;const t=JSON.stringify(e,Tf);return Yc&&t})(t);let r;if(n){var i=Af.get(e);i||Af.set(e,i=new Map),r=i.get(n)}return r||(r=Object.defineProperty((n,r)=>(r=Array.isArray(n)?r:n,uf(e(t,r),r)),"toJSON",{value:()=>n||t}),i&&(i.set(n,r),cf(i,1e4))),r},If=(e,{css:t})=>t(Nf(e)),kf=e=>(t,n,r,i)=>{if(t){const o=n&&e(n);if(o&&o.length>0)return o.reduce((e,n)=>(e[rf([r,n,i])]=t,e),{})}},jf=kf(e=>({t:["top-left","top-right"],r:["top-right","bottom-right"],b:["bottom-left","bottom-right"],l:["bottom-left","top-left"],tl:["top-left"],tr:["top-right"],bl:["bottom-left"],br:["bottom-right"]}[e])),Rf=e=>{const t=({x:"lr",y:"tb"}[e]||e||"").split("").sort();for(let n=t.length;n--;)if(!(t[n]={t:"top",r:"right",b:"bottom",l:"left"}[t[n]]))return;if(t.length)return t},Pf=kf(Rf),Df=(e,t)=>e+(":"==t[1]?of(t,2)+":":of(t))+":",Lf=(e,t=e.d)=>"function"==typeof t?"":e.v.reduce(Df,"")+(e.i?"!":"")+(e.n?"-":"")+t,Mf=e=>"cols"==e?"columns":"rows",Uf=e=>(t,n,r)=>({[e]:r+((Xc=nf(t))&&"-"+Xc)}),Ff=(e,t)=>(n,r,i)=>(Xc=nf(n,t))&&{[e||i]:Xc},Bf=e=>(t,{theme:n},r)=>(Xc=n(e||r,t))&&{[e||r]:Xc},qf=(e,t)=>(n,{theme:r},i)=>(Xc=r(e||i,n,nf(n,t)))&&{[e||i]:Xc},zf=(e,t)=>(n,r)=>e(n,r,t),Hf=Uf("display"),Wf=Uf("position"),Gf=Uf("textTransform"),Vf=Uf("textDecoration"),Kf=Uf("fontStyle"),Yf=e=>(t,n,r)=>({["--tw-"+e]:r,fontVariantNumeric:"var(--tw-ordinal,/*!*/ /*!*/) var(--tw-slashed-zero,/*!*/ /*!*/) var(--tw-numeric-figure,/*!*/ /*!*/) var(--tw-numeric-spacing,/*!*/ /*!*/) var(--tw-numeric-fraction,/*!*/ /*!*/)"}),Xf=(e,{theme:t},n)=>(Xc=t("inset",e))&&{[n]:Xc},Jf=(e,t,n,r=n)=>(Xc=t(r+"Opacity",of(e)))&&{[`--tw-${n}-opacity`]:Xc},Zf=(e,t)=>Math.round(parseInt(e,16)*t),Qf=(e,t,n)=>e&&"#"==e[0]&&(Xc=(e.length-1)/3)&&(Zc=[17,1,.062272][Xc-1])?`rgba(${Zf(e.substr(1,Xc),Zc)},${Zf(e.substr(1+Xc,Xc),Zc)},${Zf(e.substr(1+2*Xc,Xc),Zc)},${t?`var(--tw-${t}${n?","+n:""})`:n||1})`:e,eh=(e,t,n)=>n&&"string"==typeof n?(Xc=Qf(n,t+"-opacity"))&&Xc!==n?{[`--tw-${t}-opacity`]:"1",[e]:[n,Xc]}:{[e]:n}:void 0,th=e=>(Zc=Qf(e,"","0"))==Xc?"transparent":Zc,nh=(e,{theme:t},n,r,i,o)=>(Xc={x:["right","left"],y:["bottom","top"]}[e[0]])&&(Zc=`--tw-${n}-${e[0]}-reverse`)?"reverse"==e[1]?{[Zc]:"1"}:{[Zc]:"0",[rf([i,Xc[0],o])]:(Jc=t(r,of(e)))&&`calc(${Jc} * var(${Zc}))`,[rf([i,Xc[1],o])]:Jc&&[Jc,`calc(${Jc} * calc(1 - var(${Zc})))`]}:void 0,rh=(e,t)=>t[0]&&{[e]:(tf("wun",(t[0]||"")[3])?"space-":"")+t[0]},ih=e=>t=>tf(["start","end"],t[0])?{[e]:"flex-"+t[0]}:rh(e,t),oh=e=>(t,{theme:n})=>{if(Xc=n("grid"+sf(e),t,""))return{["grid-"+e]:Xc};switch(t[0]){case"span":return t[1]&&{["grid-"+e]:`span ${t[1]} / span ${t[1]}`};case"start":case"end":return(Xc=n("grid"+sf(e)+sf(t[0]),of(t),nf(of(t))))&&{[`grid-${e}-${t[0]}`]:Xc}}},ah=(e,{theme:t},n)=>{switch(e[0]){case"solid":case"dashed":case"dotted":case"double":case"none":return Ff("borderStyle")(e);case"collapse":case"separate":return Ff("borderCollapse")(e);case"opacity":return Jf(e,t,n)}return(Xc=t(n+"Width",e,""))?{borderWidth:Xc}:eh("borderColor",n,t(n+"Color",e))},dh=e=>(e?"translate3d(var(--tw-translate-x,0),var(--tw-translate-y,0),0)":"translateX(var(--tw-translate-x,0)) translateY(var(--tw-translate-y,0))")+" rotate(var(--tw-rotate,0)) skewX(var(--tw-skew-x,0)) skewY(var(--tw-skew-y,0)) scaleX(var(--tw-scale-x,1)) scaleY(var(--tw-scale-y,1))",sh=(e,t,n)=>e[0]&&(Xc=t.theme(n,e[1]||e[0]))&&{[`--tw-${n}-x`]:"y"!==e[0]&&Xc,[`--tw-${n}-y`]:"x"!==e[0]&&Xc,transform:[`${n}${e[1]?e[0].toUpperCase():""}(${Xc})`,dh()]},lh=e=>(t,n,r)=>r[1]?Pf(n.theme(e,t),r[1],e):Bf(e)(t,n,r),uh=lh("padding"),ch=lh("margin"),fh=(e,{theme:t},n)=>(Xc={w:"width",h:"height"}[e[0]])&&{[Xc=`${n}${sf(Xc)}`]:t(Xc,of(e))},hh=(e,{theme:t},n)=>{const r=n.split("-"),i="backdrop"==r[0]?r[0]+"-":"";if(i||e.unshift(...r),"filter"==e[0]){const t=["blur","brightness","contrast","grayscale","hue-rotate","invert",i&&"opacity","saturate","sepia",!i&&"drop-shadow"].filter(Boolean);return"none"==e[1]?{[i+"filter"]:"none"}:t.reduce((e,t)=>(e["--tw-"+i+t]="var(--tw-empty,/*!*/ /*!*/)",e),{[i+"filter"]:t.map(e=>`var(--tw-${i}${e})`).join(" ")})}return Zc=e.shift(),tf(["hue","drop"],Zc)&&(Zc+=sf(e.shift())),(Xc=t(i?"backdrop"+sf(Zc):Zc,e))&&{["--tw-"+i+Zc]:(Array.isArray(Xc)?Xc:[Xc]).map(e=>`${lf(Zc)}(${e})`).join(" ")}},ph={group:(e,{tag:t},n)=>t(nf([n,...e])),hidden:zf(Hf,"none"),inline:Hf,block:Hf,contents:Hf,flow:Hf,table:(e,t,n)=>tf(["auto","fixed"],e[0])?{tableLayout:e[0]}:Hf(e,t,n),flex(e,t,n){switch(e[0]){case"row":case"col":return{flexDirection:nf("col"==e[0]?["column",...of(e)]:e)};case"nowrap":case"wrap":return{flexWrap:nf(e)};case"grow":case"shrink":return null!=(Xc=t.theme("flex"+sf(e[0]),of(e),e[1]||1))&&{["flex-"+e[0]]:""+Xc}}return(Xc=t.theme("flex",e,""))?{flex:Xc}:Hf(e,t,n)},grid(e,t,n){switch(e[0]){case"cols":case"rows":return(Xc=t.theme("gridTemplate"+sf(Mf(e[0])),of(e),2==e.length&&Number(e[1])?`repeat(${e[1]},minmax(0,1fr))`:nf(of(e))))&&{["gridTemplate-"+Mf(e[0])]:Xc};case"flow":return e.length>1&&{gridAutoFlow:nf("col"==e[1]?["column",...of(e,2)]:of(e)," ")}}return Hf(e,t,n)},auto:(e,{theme:t})=>tf(["cols","rows"],e[0])&&(Xc=t("gridAuto"+sf(Mf(e[0])),of(e),nf(of(e))))&&{["gridAuto-"+Mf(e[0])]:Xc},static:Wf,fixed:Wf,absolute:Wf,relative:Wf,sticky:Wf,visible:{visibility:"visible"},invisible:{visibility:"hidden"},antialiased:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},"subpixel-antialiased":{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"},truncate:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"},"not-sr-only":{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"},resize:e=>({resize:{x:"horizontal",y:"vertical"}[e[0]]||e[0]||"both"}),box:e=>e[0]&&{boxSizing:e[0]+"-box"},appearance:Ff(),cursor:qf(),float:Ff(),clear:Ff(),decoration:Ff("boxDecorationBreak"),isolate:{isolation:"isolate"},isolation:Ff(),"mix-blend":Ff("mixBlendMode"),top:Xf,right:Xf,bottom:Xf,left:Xf,inset:(e,{theme:t})=>(Xc=Rf(e[0]))?Pf(t("inset",of(e)),e[0]):(Xc=t("inset",e))&&{top:Xc,right:Xc,bottom:Xc,left:Xc},underline:Vf,"line-through":Vf,"no-underline":zf(Vf,"none"),"text-underline":zf(Vf,"underline"),"text-no-underline":zf(Vf,"none"),"text-line-through":zf(Vf,"line-through"),uppercase:Gf,lowercase:Gf,capitalize:Gf,"normal-case":zf(Gf,"none"),"text-normal-case":zf(Gf,"none"),italic:Kf,"not-italic":zf(Kf,"normal"),"font-italic":zf(Kf,"italic"),"font-not-italic":zf(Kf,"normal"),font:(e,t,n)=>(Xc=t.theme("fontFamily",e,""))?{fontFamily:Xc}:Bf("fontWeight")(e,t,n),items:e=>e[0]&&{alignItems:tf(["start","end"],e[0])?"flex-"+e[0]:nf(e)},"justify-self":Ff(),"justify-items":Ff(),justify:ih("justifyContent"),content:ih("alignContent"),self:ih("alignSelf"),place:e=>e[0]&&rh("place-"+e[0],of(e)),overscroll:e=>e[0]&&{["overscrollBehavior"+(e[1]?"-"+e[0]:"")]:e[1]||e[0]},col:oh("column"),row:oh("row"),duration:Bf("transitionDuration"),delay:Bf("transitionDelay"),tracking:Bf("letterSpacing"),leading:Bf("lineHeight"),z:Bf("zIndex"),opacity:Bf(),ease:Bf("transitionTimingFunction"),p:uh,py:uh,px:uh,pt:uh,pr:uh,pb:uh,pl:uh,m:ch,my:ch,mx:ch,mt:ch,mr:ch,mb:ch,ml:ch,w:Bf("width"),h:Bf("height"),min:fh,max:fh,fill:Bf(),order:Bf(),origin:qf("transformOrigin"," "),select:Ff("userSelect"),"pointer-events":Ff(),align:Ff("verticalAlign"),whitespace:Ff("whiteSpace"),"normal-nums":{fontVariantNumeric:"normal"},ordinal:Yf("ordinal"),"slashed-zero":Yf("slashed-zero"),"lining-nums":Yf("numeric-figure"),"oldstyle-nums":Yf("numeric-figure"),"proportional-nums":Yf("numeric-spacing"),"tabular-nums":Yf("numeric-spacing"),"diagonal-fractions":Yf("numeric-fraction"),"stacked-fractions":Yf("numeric-fraction"),overflow:(e,t,n)=>tf(["ellipsis","clip"],e[0])?Ff("textOverflow")(e):e[1]?{["overflow-"+e[0]]:e[1]}:Ff()(e,t,n),transform:e=>"none"==e[0]?{transform:"none"}:{"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1",transform:dh("gpu"==e[0])},rotate:(e,{theme:t})=>(Xc=t("rotate",e))&&{"--tw-rotate":Xc,transform:[`rotate(${Xc})`,dh()]},scale:sh,translate:sh,skew:sh,gap:(e,t,n)=>(Xc={x:"column",y:"row"}[e[0]])?{[Xc+"Gap"]:t.theme("gap",of(e))}:Bf("gap")(e,t,n),stroke:(e,t,n)=>(Xc=t.theme("stroke",e,""))?{stroke:Xc}:Bf("strokeWidth")(e,t,n),outline:(e,{theme:t})=>(Xc=t("outline",e))&&{outline:Xc[0],outlineOffset:Xc[1]},"break-normal":{wordBreak:"normal",overflowWrap:"normal"},"break-words":{overflowWrap:"break-word"},"break-all":{wordBreak:"break-all"},text(e,{theme:t},n){switch(e[0]){case"left":case"center":case"right":case"justify":return{textAlign:e[0]};case"uppercase":case"lowercase":case"capitalize":return Gf([],Xc,e[0]);case"opacity":return Jf(e,t,n)}const r=t("fontSize",e,"");return r?"string"==typeof r?{fontSize:r}:{fontSize:r[0],..."string"==typeof r[1]?{lineHeight:r[1]}:r[1]}:eh("color","text",t("textColor",e))},bg(e,{theme:t},n){switch(e[0]){case"fixed":case"local":case"scroll":return Ff("backgroundAttachment",",")(e);case"bottom":case"center":case"left":case"right":case"top":return Ff("backgroundPosition"," ")(e);case"no":return"repeat"==e[1]&&Ff("backgroundRepeat")(e);case"repeat":return tf("xy",e[1])?Ff("backgroundRepeat")(e):{backgroundRepeat:e[1]||e[0]};case"opacity":return Jf(e,t,n,"background");case"clip":case"origin":return e[1]&&{["background-"+e[0]]:e[1]+("text"==e[1]?"":"-box")};case"blend":return Ff("background-blend-mode")(of(e));case"gradient":if("to"==e[1]&&(Xc=Rf(e[2])))return{backgroundImage:`linear-gradient(to ${nf(Xc," ")},var(--tw-gradient-stops))`}}return(Xc=t("backgroundPosition",e,""))?{backgroundPosition:Xc}:(Xc=t("backgroundSize",e,""))?{backgroundSize:Xc}:(Xc=t("backgroundImage",e,""))?{backgroundImage:Xc}:eh("backgroundColor","bg",t("backgroundColor",e))},from:(e,{theme:t})=>(Xc=t("gradientColorStops",e))&&{"--tw-gradient-from":Xc,"--tw-gradient-stops":`var(--tw-gradient-from),var(--tw-gradient-to,${th(Xc)})`},via:(e,{theme:t})=>(Xc=t("gradientColorStops",e))&&{"--tw-gradient-stops":`var(--tw-gradient-from),${Xc},var(--tw-gradient-to,${th(Xc)})`},to:(e,{theme:t})=>(Xc=t("gradientColorStops",e))&&{"--tw-gradient-to":Xc},border:(e,t,n)=>{var r;const i=null==(r=Rf(e[0]))?void 0:r.map(sf);i&&(e=of(e));let o=ah(e,t,n);return i&&o&&"object"==typeof o&&(o=Object.entries(o).reduce((e,[t,n])=>{if(t.startsWith("border"))for(const r of i)e[t.slice(0,6)+r+t.slice(6)]=n;else e[t]=n;return e},{})),o},divide:(e,t,n)=>(Xc=nh(e,t,n,"divideWidth","border","width")||ah(e,t,n))&&{"&>:not([hidden])~:not([hidden])":Xc},space:(e,t,n)=>(Xc=nh(e,t,n,"space","margin"))&&{"&>:not([hidden])~:not([hidden])":Xc},placeholder:(e,{theme:t},n)=>(Xc="opacity"==e[0]?Jf(e,t,n):eh("color","placeholder",t("placeholderColor",e)))&&{"&::placeholder":Xc},shadow:(e,{theme:t})=>(Xc=t("boxShadow",e))&&{":global":{"*":{"--tw-shadow":"0 0 transparent"}},"--tw-shadow":"none"==Xc?"0 0 transparent":Xc,boxShadow:[Xc,"var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)"]},animate:(e,{theme:t,tag:n})=>{if(Zc=t("animation",e)){const e=Zc.split(" ");return(Xc=t("keyframes",e[0],Jc={}))!==Jc?(Zc=n(e[0]))&&{animation:Zc+" "+nf(of(e)," "),["@keyframes "+Zc]:Xc}:{animation:Zc}}},ring(e,{theme:t},n){switch(e[0]){case"inset":return{"--tw-ring-inset":"inset"};case"opacity":return Jf(e,t,n);case"offset":return(Xc=t("ringOffsetWidth",of(e),""))?{"--tw-ring-offset-width":Xc}:{"--tw-ring-offset-color":t("ringOffsetColor",of(e))}}return(Xc=t("ringWidth",e,""))?{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${Xc} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)",":global":{"*":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":t("ringOffsetColor","","#fff"),"--tw-ring-color":Qf(t("ringColor","","#93c5fd"),"ring-opacity",t("ringOpacity","","0.5")),"--tw-ring-offset-shadow":"0 0 transparent","--tw-ring-shadow":"0 0 transparent"}}}:{"--tw-ring-opacity":"1","--tw-ring-color":Qf(t("ringColor",e),"ring-opacity")}},object:(e,t,n)=>tf(["contain","cover","fill","none","scale-down"],nf(e))?{objectFit:nf(e)}:qf("objectPosition"," ")(e,t,n),list:(e,t,n)=>"item"==nf(e)?Hf(e,t,n):tf(["inside","outside"],nf(e))?{listStylePosition:e[0]}:qf("listStyleType")(e,t,n),rounded:(e,t,n)=>jf(t.theme("borderRadius",of(e),""),e[0],"border","radius")||Bf("borderRadius")(e,t,n),"transition-none":{transitionProperty:"none"},transition:(e,{theme:t})=>({transitionProperty:t("transitionProperty",e),transitionTimingFunction:t("transitionTimingFunction",""),transitionDuration:t("transitionDuration","")}),container:(e,{theme:t})=>{const{screens:n=t("screens"),center:r,padding:i}=t("container"),o=e=>(Xc=i&&("string"==typeof i?i:i[e]||i.DEFAULT))?{paddingRight:Xc,paddingLeft:Xc}:{};return Object.keys(n).reduce((e,t)=>((Zc=n[t])&&"string"==typeof Zc&&(e[mf(Zc)]={"&":{"max-width":Zc,...o(t)}}),e),{width:"100%",...r?{marginRight:"auto",marginLeft:"auto"}:{},...o("xs")})},filter:hh,blur:hh,brightness:hh,contrast:hh,grayscale:hh,"hue-rotate":hh,invert:hh,saturate:hh,sepia:hh,"drop-shadow":hh,backdrop:hh},mh={dark:"@media (prefers-color-scheme:dark)",sticky:"@supports ((position: -webkit-sticky) or (position:sticky))","motion-reduce":"@media (prefers-reduced-motion:reduce)","motion-safe":"@media (prefers-reduced-motion:no-preference)",first:"&:first-child",last:"&:last-child",even:"&:nth-child(2n)",odd:"&:nth-child(odd)",children:"&>*",siblings:"&~*",sibling:"&+*",override:"&&"},gh="__twind",$h=e=>{let t=self[gh];return t||(t=document.head.appendChild(document.createElement("style")),t.id=gh,e&&(t.nonce=e),t.appendChild(document.createTextNode(""))),t},vh=e=>({unknown(e,t=[],n,r){n||this.report({id:"UNKNOWN_THEME_VALUE",key:e+"."+nf(t)},r)},report:({id:t,...n})=>e(`[${t}] ${JSON.stringify(n)}`)}),yh=vh(e=>console.warn(e)),bh=vh(e=>{throw new Error(e)}),xh=vh(df),wh=(e,t,n)=>`${e}:${t}${n?" !important":""}`,_h=(e,t,n)=>{let r="";const i=(o=e,Gc.get(o));var o;i&&(r+=`${wh(i,t,n)};`);let a=function(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}(e);return 1&a&&(r+=`-webkit-${wh(e,t,n)};`),2&a&&(r+=`-moz-${wh(e,t,n)};`),4&a&&(r+=`-ms-${wh(e,t,n)};`),a=function(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?"-"===t[3]?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}(e,t),1&a&&(r+=`${wh(e,`-webkit-${t}`,n)};`),2&a&&(r+=`${wh(e,`-moz-${t}`,n)};`),4&a&&(r+=`${wh(e,`-ms-${t}`,n)};`),r+=wh(e,t,n),r},Ch=(e,t)=>{const n={};do{for(let t=1;t<e;t++)n[`${t}/${e}`]=Number((t/e*100).toFixed(6))+"%"}while(++e<=t);return n},Sh=(e,t,n=0)=>{const r={};for(;n<=e;n=2*n||1)r[n]=n+t;return r},Eh=(e,t="",n=1,r=0,i=1,o={})=>{for(;r<=e;r+=i)o[r]=r/n+t;return o},Nh=e=>t=>t(e),Th={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},colors:{transparent:"transparent",current:"currentColor",black:"#000",white:"#fff",gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},yellow:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},green:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},purple:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"}},spacing:{px:"1px",0:"0px",...Eh(4,"rem",4,.5,.5),...Eh(12,"rem",4,5),14:"3.5rem",...Eh(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},backdropBlur:Nh("blur"),backdropBrightness:Nh("brightness"),backdropContrast:Nh("contrast"),backdropGrayscale:Nh("grayscale"),backdropHueRotate:Nh("hueRotate"),backdropInvert:Nh("invert"),backdropOpacity:Nh("opacity"),backdropSaturate:Nh("saturate"),backdropSepia:Nh("sepia"),backgroundColor:Nh("colors"),backgroundImage:{none:"none"},backgroundOpacity:Nh("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Eh(200,"",100,0,50),...Eh(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:e=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:Nh("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderWidth:{DEFAULT:"1px",...Sh(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none"},contrast:{...Eh(200,"",100,0,50),75:"0.75",125:"1.25"},divideColor:Nh("borderColor"),divideOpacity:Nh("borderOpacity"),divideWidth:Nh("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:{current:"currentColor"},grayscale:{0:"0",DEFAULT:"100%"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{0:"0",DEFAULT:"100%"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gridTemplateColumns:{},gridTemplateRows:{},gridAutoColumns:{min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gap:Nh("spacing"),gradientColorStops:Nh("colors"),height:e=>({auto:"auto",...e("spacing"),...Ch(2,6),full:"100%",screen:"100vh"}),inset:e=>({auto:"auto",...e("spacing"),...Ch(2,4),full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",...Eh(10,"rem",4,3)},margin:e=>({auto:"auto",...e("spacing")}),maxHeight:e=>({...e("spacing"),full:"100%",screen:"100vh"}),maxWidth:(e,{breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content"},opacity:{...Eh(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0",...Eh(12,"",1,1)},outline:{none:["2px solid transparent","2px"],white:["2px dotted white","2px"],black:["2px dotted black","2px"]},padding:Nh("spacing"),placeholderColor:Nh("colors"),placeholderOpacity:Nh("opacity"),ringColor:e=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:Nh("colors"),ringOffsetWidth:Sh(8,"px"),ringOpacity:e=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",...Sh(8,"px")},rotate:{...Sh(2,"deg"),...Sh(12,"deg",3),...Sh(180,"deg",45)},saturate:Eh(200,"",100,0,50),scale:{...Eh(150,"",100,0,50),...Eh(110,"",100,90,5),75:"0.75",125:"1.25"},sepia:{0:"0",DEFAULT:"100%"},skew:{...Sh(2,"deg"),...Sh(12,"deg",3)},space:Nh("spacing"),stroke:{current:"currentColor"},strokeWidth:Eh(2),textColor:Nh("colors"),textOpacity:Nh("opacity"),transitionDuration:e=>({DEFAULT:"150ms",...e("durations")}),transitionDelay:Nh("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"background-color,border-color,color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:e=>({...e("spacing"),...Ch(2,4),full:"100%"}),width:e=>({auto:"auto",...e("spacing"),...Ch(2,6),...Ch(12,12),screen:"100vw",full:"100%",min:"min-content",max:"max-content"}),zIndex:{auto:"auto",...Eh(50,"",1,0,10)}},Ah=(e,t={},n=[])=>(Object.keys(e).forEach(r=>{const i=e[r];"DEFAULT"==r&&(t[nf(n)]=i,t[nf(n,".")]=i);const o=[...n,r];t[nf(o)]=i,t[nf(o,".")]=i,i&&"object"==typeof i&&Ah(i,t,o)},t),t),Oh={negative:()=>({}),breakpoints:e=>Object.keys(e).filter(t=>"string"==typeof e[t]).reduce((t,n)=>(t["screen-"+n]=e[n],t),{})},Ih=e=>{const t=new Map,n={...Th,...e},r=(e,t)=>{const n=e&&e[t],r="function"==typeof n?n(i,Oh):n;return r&&"colors"==t?Ah(r):r},i=(e,i,o)=>{const a=e.split(".");e=a[0],a.length>1&&(o=i,i=nf(of(a),"."));let d=t.get(e);if(d||(t.set(e,d={...r(n,e)}),Object.assign(d,r(n.extend,e))),null!=i){const t=((e,t)=>(t="["==t[0]&&"]"==t.slice(-1)&&t.slice(1,-1))&&tf(e,"olor")==/^(#|(hsl|rgb)a?\(|[a-z]+$)/.test(t)&&(tf(t,"calc(")?t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "):t))(e,i=(Array.isArray(i)?nf(i):i)||"DEFAULT")||d[i];return null==t?o:Array.isArray(t)&&!tf(["fontSize","outline","dropShadow"],e)?nf(t,","):t}return d};return i},kh=/^:(group(?:(?!-focus).+?)*)-(.+)$/,jh=/^(:not)-(.+)/,Rh=e=>"["==e[1]?of(e):e,Ph=e=>(31&((ef=/(?:^|min-width: *)(\d+(?:.\d+)?)(p)?/.exec(e))?+ef[1]/(ef[2]?15:1)/10:0))<<22,Dh=e=>{ef=0;for(let t=e.length;t--;)ef+=tf("-:,",e[t]);return ef},Lh=e=>(15&Dh(e))<<18,Mh=["rst","st","en","d","nk","sited","pty","ecked","cus-w","ver","cus","cus-v","tive","sable","ad-on","tiona","quire"],Uh=(e,t)=>(n,r)=>{return n|((ef=e("screens",of(r),""))?1<<27|Ph(mf(ef)):":dark"==r?1<<30:"@"==(ef=t[r]||r.replace(jh,":$2"))[0]?Lh(ef):(i=r,1<<(~(ef=Mh.indexOf(i.replace(kh,":$2").slice(3,8)))?ef:17)));var i},Fh=(e,t)=>t+"{"+e+"}",Bh=(e,t,n)=>{const{theme:r,tag:i}=n,o=(e,t)=>"--"+i(t),a=e=>`${e}`.replace(/--(tw-[\w-]+)\b/g,o);let d;const s=(t,r,i,o,l)=>{if(Array.isArray(o))return void o.forEach(e=>e&&s(t,r,i,e,l));let u="",c=0,f=0;o["@apply"]&&(o=hf(uf(((...e)=>Of(If,e))(o["@apply"]),n),{...o,"@apply":void 0},n)),Object.keys(o).forEach(h=>{const p=uf(o[h],n);if(ff(h,p)){if(""!==p&&h.length>1){const t=lf(h);f+=1,c=Math.max(c,(e=>"-"==e[0]?0:Dh(e)+((ef=/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7}$)|([fl].{5}l|g.{8}$|pl))/.exec(e))?+!!ef[1]||-!!ef[2]:0)+1)(t)),u=(u&&u+";")+((t,n,r)=>(t=a(t),Array.isArray(n)?nf(n.filter(Boolean).map(n=>e(t,a(n),r)),";"):e(t,a(n),r)))(t,p,l)}}else if(p)if(":global"==h&&(h="@global"),"@"==h[0])if("g"==h[1])s([],"",0,p,l);else if("f"==h[1])s([],h,0,p,l);else if("k"==h[1]){const e=d.length;s([],"",0,p,l);const t=d.splice(e,d.length-e);d.push({r:Fh(nf(t.map(e=>e.r),""),h),p:t.reduce((e,t)=>e+t.p,0)})}else"i"==h[1]?(Array.isArray(p)?p:[p]).forEach(e=>e&&d.push({p:0,r:`${h} ${e};`})):("c"==h[2]&&(h=mf(n.theme("screens",of(h,8).trim()))),s([...t,h],r,i|Ph(h)|Lh(h),p,l));else s(t,r?r.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(e,t,n)=>h.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(e,n,r)=>(tf(n,"&")?n.replace(/&/g,t):(t&&t+" ")+n)+r)+n):h,i,p,l)}),f&&d.push({r:t.reduceRight(Fh,Fh(u,r)),p:256*i+((15&Math.max(0,15-f))<<4|15&(c||15))})},l=Uh(r,t);return(e,t,n,r=0)=>(r<<=28,d=[],s([],t?"."+pf(t):"",n?n.v.reduceRight(l,r):r,e,n&&n.i),d)},qh=(e,t,n,r=t)=>!1===e?n:!0===e?r:e||t,zh={_:{value:"",writable:!0}},Hh=(e={})=>{const t=Ih(e.theme),n=(e=>("string"==typeof e?{t:bh,a:yh,i:xh}[e[1]]:e)||yh)(e.mode),r=qh(e.hash,!1,!1,gf),i=e.important;let o={v:[]},a=0;const d=[],s={tw:(...e)=>b(e),theme:(e,r,i)=>{var a;const d=null!=(a=t(e,r,i))?a:n.unknown(e,null==r||Array.isArray(r)?r:r.split("."),null!=i,s);return o.n&&d&&tf("rg",(typeof d)[5])?`calc(${d} * -1)`:d},tag:e=>r?r(e):e,css:e=>{a++;const t=d.length;try{("string"==typeof e?Nf([e]):e).forEach(y);const n=Object.create(null,zh);for(let e=t;e<d.length;e++){const t=d[e];if(t)switch(typeof t){case"object":hf(n,t,s);break;case"string":n._+=(n._&&" ")+t}}return n}finally{d.length=t,a--}}},l=((e,t)=>(n,r)=>{if("function"==typeof n.d)return n.d(t);const i=n.d.split(/-(?![^[]*])/g);if(!r&&"tw"==i[0]&&n.$==n.d)return n.$;for(let o=i.length;o;o--){const n=nf(i.slice(0,o));if(Object.prototype.hasOwnProperty.call(e,n)){const a=e[n];return"function"==typeof a?a(of(i,o),t,n):"string"==typeof a?t[r?"css":"tw"](a):a}}})({...ph,...e.plugins},s),u={...mh,...e.variants},c=((e,t,{theme:n,tag:r})=>{const i=(i,o)=>(Qc=n("screens",of(o),""))?{[mf(Qc)]:i}:":dark"==o&&"class"==e?{".dark &":i}:(Qc=kh.exec(o))?{[`.${pf(r(Qc[1]))}:${Qc[2]} &`]:i}:{[t[of(o)]||"&"+o.replace(jh,(e,t,n)=>t+"("+Rh(":"+n)+")")]:i};return(e,t)=>t.v.reduceRight(i,e)})(e.darkMode||"media",u,s),f=Bh(qh(e.prefix,_h,wh),u,s),h=e.sheet||("undefined"==typeof window?{target:null,insert:df}:(({nonce:e,target:t=$h(e).sheet}={})=>{const n=t.cssRules.length;return{target:t,insert:(e,r)=>t.insertRule(e,n+r)}})(e)),{init:p=e=>e()}=h,m=((e,t,n,r)=>{let i,o;return n((e=[])=>i=e),n((e=new Set)=>o=e),({r:n,p:a})=>{if(!o.has(n)){o.add(n);const s=((e,t)=>{for(var n=0,r=e.length;n<r;){const i=r+n>>1;e[i]<=t?n=i+1:r=i}return r})(i,a);try{e.insert(n,s),i.splice(s,0,a)}catch(d){/:-[mwo]/.test(n)||t.report({id:"INJECT_CSS_ERROR",css:n,error:d},r)}}}})(h,n,p,s);let g;p((e=new Map)=>g=e);const $=new WeakMap,v=(e,t)=>"_"==e?void 0:"function"==typeof t?JSON.stringify(uf(t,s),v):t,y=e=>{!a&&o.v.length&&(e={...e,v:[...o.v,...e.v],$:""}),e.$||(e.$=Lf(e,$.get(e.d)));let t=a?null:g.get(e.$);if(null==t){let u=(e=>{const t=o;o=e;try{return uf(l(e),s)}finally{o=t}})(e);if(e.$||(e.$=gf(JSON.stringify(u,v)),$.set(e.d,e.$),e.$=Lf(e,e.$)),u&&"object"==typeof u)if(e.v=e.v.map(Rh),i&&(e.i=i),u=c(u,e),a)d.push(u);else{const n="function"==typeof e.d?"string"==typeof u._?1:3:2;t=r||"function"==typeof e.d?(r||gf)(n+e.$):e.$,f(u,t,e,n).forEach(m),u._&&(t+=" "+u._)}else"string"==typeof u?t=u:(t=e.$,n.report({id:"UNKNOWN_DIRECTIVE",rule:t},s)),a&&"function"!=typeof e.d&&d.push(t);a||(g.set(e.$,t),cf(g,3e4))}return t},b=e=>nf(Nf(e).map(y).filter(Boolean)," "),x=qh(e.preflight,af,!1);if(x){const e=(e=>({":root":{tabSize:4},"body,blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre,fieldset,ol,ul":{margin:"0"},button:{backgroundColor:"transparent",backgroundImage:"none"},'button,[type="button"],[type="reset"],[type="submit"]':{WebkitAppearance:"button"},"button:focus":{outline:["1px dotted","5px auto -webkit-focus-ring-color"]},"fieldset,ol,ul,legend":{padding:"0"},"ol,ul":{listStyle:"none"},html:{lineHeight:"1.5",WebkitTextSizeAdjust:"100%",fontFamily:e("fontFamily.sans","ui-sans-serif,system-ui,sans-serif")},body:{fontFamily:"inherit",lineHeight:"inherit"},"*,::before,::after":{boxSizing:"border-box",border:`0 solid ${e("borderColor.DEFAULT","currentColor")}`},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},img:{borderStyle:"solid"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:"1",color:e("placeholderColor.DEFAULT",e("colors.gray.400","#a1a1aa"))},'button,[role="button"]':{cursor:"pointer"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",margin:"0",padding:"0",lineHeight:"inherit",color:"inherit"},"button,select":{textTransform:"none"},"::-moz-focus-inner":{borderStyle:"none",padding:"0"},":-moz-focusring":{outline:"1px dotted ButtonText"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},'[type="search"]':{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"abbr[title]":{textDecoration:"underline dotted"},"b,strong":{fontWeight:"bolder"},"pre,code,kbd,samp":{fontFamily:e("fontFamily","mono","ui-monospace,monospace"),fontSize:"1em"},"sub,sup":{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"}}))(t),n=f("function"==typeof x?uf(x(e,s),s)||e:{...e,...x});p((e=(n.forEach(m),!0))=>e)}return{init:()=>n.report({id:"LATE_SETUP_CALL"},s),process:b}},Wh=e=>{let t,n=e=>(r(),n(e)),r=e=>{({process:n,init:r}=Hh(e))};return{tw:Object.defineProperties((...e)=>n(e),{theme:{get:(i="theme",()=>(t||n([e=>(t=e,"")]),t[i]))}}),setup:e=>r(e)};var i},{tw:Gh,setup:Vh}=Wh();let Kh={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Jh(4,"rem",4,.5,.5),...Jh(12,"rem",4,5),14:"3.5rem",...Jh(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Zh("blur"),backdropBrightness:Zh("brightness"),backdropContrast:Zh("contrast"),backdropGrayscale:Zh("grayscale"),backdropHueRotate:Zh("hueRotate"),backdropInvert:Zh("invert"),backdropOpacity:Zh("opacity"),backdropSaturate:Zh("saturate"),backdropSepia:Zh("sepia"),backgroundColor:Zh("colors"),backgroundImage:{none:"none"},backgroundOpacity:Zh("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Jh(200,"",100,0,50),...Jh(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Zh("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Zh("spacing"),borderWidth:{DEFAULT:"1px",...Xh(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Zh("colors"),caretColor:Zh("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Jh(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Zh("borderColor"),divideOpacity:Zh("borderOpacity"),divideWidth:Zh("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Yh(2,6),...Yh(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Zh("spacing"),gradientColorStops:Zh("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Yh(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Yh(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Jh(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Jh(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Zh("spacing"),placeholderColor:Zh("colors"),placeholderOpacity:Zh("opacity"),outlineColor:Zh("colors"),outlineOffset:Xh(8,"px"),outlineWidth:Xh(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Zh("colors"),ringOffsetWidth:Xh(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Xh(8,"px")},rotate:{...Xh(2,"deg"),...Xh(12,"deg",3),...Xh(180,"deg",45)},saturate:Jh(200,"",100,0,50),scale:{...Jh(150,"",100,0,50),...Jh(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Zh("spacing"),scrollPadding:Zh("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Xh(2,"deg"),...Xh(12,"deg",3)},space:Zh("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Jh(2),textColor:Zh("colors"),textDecorationColor:Zh("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Xh(8,"px")},textUnderlineOffset:{auto:"auto",...Xh(8,"px")},textIndent:Zh("spacing"),textOpacity:Zh("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Zh("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Yh(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Jh(50,"",1,0,10),auto:"auto"}};function Yh(e,t){let n={};do{for(var r=1;r<e;r++)n[`${r}/${e}`]=Number((r/e*100).toFixed(6))+"%"}while(++e<=t);return n}function Xh(e,t,n=0){let r={};for(;n<=e;n=2*n||1)r[n]=n+t;return r}function Jh(e,t="",n=1,r=0,i=1,o={}){for(;r<=e;r+=i)o[r]=r/n+t;return o}function Zh(e){return({theme:t})=>t(e)}let Qh={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Kh.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Kh.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};function ep(e,t="@media "){return t+tp(e).map(e=>("string"==typeof e&&(e={min:e}),e.raw||Object.keys(e).map(t=>`(${t}-width:${e[t]})`).join(" and "))).join(",")}function tp(e=[]){return Array.isArray(e)?e:null==e?[]:[e]}function np(e,t){return Math.round(parseInt(e,16)*t)}function rp(e,t={}){if("function"==typeof e)return e(t);let{opacityValue:n="1",opacityVariable:r}=t,i=r?`var(${r})`:n;if(e.includes("<alpha-value>"))return e.replace("<alpha-value>",i);if("#"==e[0]&&(4==e.length||7==e.length)){let t=(e.length-1)/3,n=[17,1,.062272][t-1];return`rgba(${[np(e.substr(1,t),n),np(e.substr(1+t,t),n),np(e.substr(1+2*t,t),n),i]})`}return"1"==i?e:"0"==i?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function ip(e,t,n){return[e,op(t,n)]}function op(e,t){return"function"==typeof e?e:"string"==typeof e&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):ap(n,1)}):t=>e||{[t[1]]:ap(t,2)}}function ap(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return"-"==e.input[0]?`calc(${n} * -1)`:n}function dp(e,t,n,r){return[e,sp(t,n,r)]}function sp(e,t,n){let r="string"==typeof t?(e,r)=>({[t]:n?n(e,r):e._}):t||(({1:e,_:t},n,r)=>({[e||r]:t}));return(t,n)=>{let i=hp(e||t[1]),o=n.theme(i,t.$$)??fp(t.$$,i,n);if(null!=o)return t._=ap(t,0,o),r(t,n,i)}}function lp(e,t={},n){return[e,up(t,n)]}function up(e={},t){return(n,r)=>{let{section:i=hp(n[0]).replace("-","")+"Color"}=e,[o,a]=(n.$$.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1);if(!o)return;let d=r.theme(i,o)||fp(o,i,r);if(!d||"object"==typeof d)return;let{opacityVariable:s=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=i.replace("Color","Opacity"),property:u=i,selector:c}=e,f=r.theme(l,a||"DEFAULT")||a&&fp(a,l,r),h=t||(({_:e})=>{let t=cp(u,e);return c?{[c]:t}:t});n._={value:rp(d,{opacityVariable:s||void 0,opacityValue:f||void 0}),color:e=>rp(d,e),opacityVariable:s||void 0,opacityValue:f||void 0};let p=h(n,r);if(!n.dark){let e=r.d(i,o,d);e&&e!==d&&(n._={value:rp(e,{opacityVariable:s||void 0,opacityValue:f||"1"}),color:t=>rp(e,t),opacityVariable:s||void 0,opacityValue:f||void 0},p={"&":p,[r.v("dark")]:h(n,r)})}return p}}function cp(e,t){let n={};return"string"==typeof t?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function fp(e,t,n){if("["==e[0]&&"]"==e.slice(-1)){if(e=pp(function(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(e,n,r,i,o="")=>{let a=t(r,o);return"function"==typeof a&&/color|fill|stroke/i.test(r)?rp(a):""+tp(a).filter(e=>Object(e)!==e)})}(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!/^color:/.test(e)&&!/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e)||/image/i.test(t)&&!/^image:/.test(e)&&!/^[a-z-]+\(/.test(e)||/weight/i.test(t)&&!/^(number|any):/.test(e)&&!/^\d+$/.test(e)||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function hp(e){return e.replace(/-./g,e=>e[1].toUpperCase())}function pp(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",n,r="")=>pp(t)+n+pp(r)):e.replace(/(^|[^\\])_+/g,(e,t)=>t+" ".repeat(e.length-t.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}let mp=[ip("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:fp(`[${t}]`,"",n)}}})),ip("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),dp("aspect-","aspectRatio"),ip("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:i}=t("container"),o={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...a("xs")};for(let d in n){let e=n[d];"string"==typeof e&&(o[ep(e)]={"&":{maxWidth:e,...a(d)}})}return o;function a(e){let t=i&&("string"==typeof i?i:i[e]||i.DEFAULT);if(t)return{paddingRight:t,paddingLeft:t}}}),dp("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),ip("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),ip("box-(border|content)","boxSizing",({1:e})=>e+"-box"),ip("hidden",{display:"none"}),ip("table-(auto|fixed)","tableLayout"),ip(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",ip("isolate","isolation"),ip("object-(contain|cover|fill|none|scale-down)","objectFit"),dp("object-","objectPosition"),ip("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",gp),ip("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),ip("(static|fixed|absolute|relative|sticky)","position"),dp("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:"-x"!=e&&t,right:"-y"!=e&&t,bottom:"-x"!=e&&t,left:"-y"!=e&&t})),dp("-?(top|bottom|left|right)(?:$|-)","inset"),ip("(visible|collapse)","visibility"),ip("invisible",{visibility:"hidden"}),dp("-?z-","zIndex"),ip("flex-((row|col)(-reverse)?)","flexDirection",$p),ip("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),dp("(flex-(?:grow|shrink))(?:$|-)"),dp("(flex)-"),dp("grow(?:$|-)","flexGrow"),dp("shrink(?:$|-)","flexShrink"),dp("basis-","flexBasis"),dp("-?(order)-"),"-?(order)-(\\d+)",dp("grid-cols-","gridTemplateColumns"),ip("grid-cols-(\\d+)","gridTemplateColumns",Np),dp("col-","gridColumn"),ip("col-(span)-(\\d+)","gridColumn",Ep),dp("col-start-","gridColumnStart"),ip("col-start-(auto|\\d+)","gridColumnStart"),dp("col-end-","gridColumnEnd"),ip("col-end-(auto|\\d+)","gridColumnEnd"),dp("grid-rows-","gridTemplateRows"),ip("grid-rows-(\\d+)","gridTemplateRows",Np),dp("row-","gridRow"),ip("row-(span)-(\\d+)","gridRow",Ep),dp("row-start-","gridRowStart"),ip("row-start-(auto|\\d+)","gridRowStart"),dp("row-end-","gridRowEnd"),ip("row-end-(auto|\\d+)","gridRowEnd"),ip("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>gp($p(e))),ip("grid-flow-(dense)","gridAutoFlow"),dp("auto-cols-","gridAutoColumns"),dp("auto-rows-","gridAutoRows"),dp("gap-x(?:$|-)","gap","columnGap"),dp("gap-y(?:$|-)","gap","rowGap"),dp("gap(?:$|-)","gap"),"(justify-(?:items|self))-",ip("justify-","justifyContent",bp),ip("(content|items|self)-",e=>({["align-"+e[1]]:bp(e)})),ip("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),dp("p([xytrbl])?(?:$|-)","padding",xp("padding")),dp("-?m([xytrbl])?(?:$|-)","margin",xp("margin")),dp("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),ip("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),dp("w-","width"),dp("min-w-","minWidth"),dp("max-w-","maxWidth"),dp("h-","height"),dp("min-h-","minHeight"),dp("max-h-","maxHeight"),dp("font-","fontWeight"),dp("font-","fontFamily",({_:e})=>"string"==typeof(e=tp(e))[1]?{fontFamily:yp(e)}:{fontFamily:yp(e[0]),...e[1]}),ip("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),ip("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),ip("italic","fontStyle"),ip("not-italic",{fontStyle:"normal"}),ip("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>"normal"==t?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Tp({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),dp("tracking-","letterSpacing"),dp("leading-","lineHeight"),ip("list-(inside|outside)","listStylePosition"),dp("list-","listStyleType"),ip("list-","listStyleType"),dp("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),lp("placeholder-",{property:"color",selector:"&::placeholder"}),ip("text-(left|center|right|justify|start|end)","textAlign"),ip("text-(ellipsis|clip)","textOverflow"),dp("text-opacity-","textOpacity","--tw-text-opacity"),lp("text-",{property:"color"}),dp("text-","fontSize",({_:e})=>"string"==typeof e?{fontSize:e}:{fontSize:e[0],..."string"==typeof e[1]?{lineHeight:e[1]}:e[1]}),dp("indent-","textIndent"),ip("(overline|underline|line-through)","textDecorationLine"),ip("no-underline",{textDecorationLine:"none"}),dp("underline-offset-","textUnderlineOffset"),lp("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),dp("decoration-","textDecorationThickness"),ip("decoration-","textDecorationStyle"),ip("(uppercase|lowercase|capitalize)","textTransform"),ip("normal-case",{textTransform:"none"}),ip("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),ip("align-","verticalAlign"),ip("whitespace-","whiteSpace"),ip("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),ip("break-words",{overflowWrap:"break-word"}),ip("break-all",{wordBreak:"break-all"}),ip("break-keep",{wordBreak:"keep-all"}),lp("caret-",{opacityVariable:!1,opacitySection:"opacity"}),lp("accent-",{opacityVariable:!1,opacitySection:"opacity"}),ip("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${vp(e," ")},var(--tw-gradient-stops))`),lp("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),lp("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),lp("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),ip("bg-(fixed|local|scroll)","backgroundAttachment"),ip("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),ip(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),ip("bg-blend-","backgroundBlendMode"),ip("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+("text"==e?"":"-box")),dp("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),lp("bg-",{section:"backgroundColor"}),dp("bg-","backgroundImage"),dp("bg-","backgroundPosition"),ip("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",gp),dp("bg-","backgroundSize"),dp("rounded(?:$|-)","borderRadius"),dp("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${vp(n[0])}-radius`]:t,[`border-${vp(n[1])}-radius`]:t}}),ip("border-(collapse|separate)","borderCollapse"),dp("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),ip("border-(solid|dashed|dotted|double|none)","borderStyle"),dp("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...Tp({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),lp("border-([xytrbl])-",{section:"borderColor"},xp("border","Color")),lp("border-"),dp("border-([xytrbl])(?:$|-)","borderWidth",xp("border","Width")),dp("border(?:$|-)","borderWidth"),dp("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),ip("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),ip("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),dp("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${vp(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${vp(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),lp("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),dp("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),lp("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),dp("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),ip("ring-inset",{"--tw-ring-inset":"inset"}),lp("ring-",{property:"--tw-ring-color"}),dp("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...Tp({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":rp(t("ringOffsetColor","","#fff")),"--tw-ring-color":rp(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),lp("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),dp("shadow(?:$|-)","boxShadow",({_:e})=>({...Tp({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":yp(e),"--tw-shadow-colored":yp(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),dp("(opacity)-"),ip("mix-blend-","mixBlendMode"),...wp(),...wp("backdrop-"),dp("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:yp(e),transitionTimingFunction:"none"==e._?void 0:yp(t("transitionTimingFunction","")),transitionDuration:"none"==e._?void 0:yp(t("transitionDuration",""))})),dp("duration(?:$|-)","transitionDuration","transitionDuration",yp),dp("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",yp),dp("delay(?:$|-)","transitionDelay","transitionDelay",yp),dp("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let i=yp(e),o=i.split(" "),a=t("keyframes",o[0]);return a?{["@keyframes "+(o[0]=r(n(o[0])))]:a,animation:o.join(" ")}:{animation:i}}),"(transform)-(none)",ip("transform",Cp),ip("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":Sp("gpu"==e)})),dp("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Cp()})),dp("-?(rotate)-","rotate",_p),dp("-?(translate-[xy])-","translate",_p),dp("-?(skew-[xy])-","skew",_p),ip("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",gp),"(appearance)-",dp("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",dp("(cursor)-"),"(cursor)-",ip("snap-(none)","scroll-snap-type"),ip("snap-(x|y|both)",({1:e})=>({...Tp({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),ip("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),ip("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),ip("snap-(normal|always)","scroll-snap-stop"),ip("scroll-(auto|smooth)","scroll-behavior"),dp("scroll-p([xytrbl])?(?:$|-)","padding",xp("scroll-padding")),dp("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",xp("scroll-margin")),ip("touch-(auto|none|manipulation)","touch-action"),ip("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...Tp({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),ip("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),ip("outline",{outlineStyle:"solid"}),ip("outline-(dashed|dotted|double)","outlineStyle"),dp("-?(outline-offset)-"),lp("outline-",{opacityVariable:!1,opacitySection:"opacity"}),dp("outline-","outlineWidth"),"(pointer-events)-",dp("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"}[e]||e||"both")],ip("select-(none|text|all|auto)","userSelect"),lp("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),lp("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),dp("stroke-","strokeWidth"),ip("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),ip("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function gp(e){return("string"==typeof e?e:e[1]).replace(/-/g," ").trim()}function $p(e){return("string"==typeof e?e:e[1]).replace("col","column")}function vp(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function yp(e){return e&&""+(e._||e)}function bp({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function xp(e,t=""){return({1:n,_:r})=>{let i={x:"lr",y:"tb"}[n]||n+n;return i?{...cp(e+"-"+vp(i[0])+t,r),...cp(e+"-"+vp(i[1])+t,r)}:cp(e+t,r)}}function wp(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Tp(n),[`${e}filter`]:t.map(t=>`var(--tw-${e}${t})`).join(" ")},[`(${e}filter)-(none)`,ip(`${e}filter`,n),...t.map(t=>dp(`${"h"==t[0]?"-?":""}(${e}${t})(?:$|-)`,t,({1:e,_:r})=>({[`--tw-${e}`]:tp(r).map(e=>`${t}(${e})`).join(" "),...n})))]}function _p({1:e,_:t}){return{["--tw-"+e]:t,...Cp()}}function Cp(){return{...Tp({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Sp()}),transform:"var(--tw-transform)"}}function Sp(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function Ep({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function Np({1:e}){return`repeat(${e},minmax(0,1fr))`}function Tp(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}let Ap=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||fp(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:i=t},{e:o,h:a,v:d})=>{let s=pp(r)||("["==n[0]?n:d(n.slice(1)));return`${(s.includes("&")?s:"&"+s).replace(/&/g,`:merge(.${o(a(e+i))})`)}${"p"==e[0]?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&(e=t.theme("supports",e)||fp(e,"",t)),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&(e=t.theme("screens",e)||fp(e,"",t)),"string"==typeof e)return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&(e=fp(e,"",t)),e&&`@media (min-width:${e})`)],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&pp(e).replace(/[}]+$/,"").split("{")]];let Op={__proto__:null,slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"}};const Ip=globalThis;if(!Ip.__twindInitialized){Vh({presets:[function({disablePreflight:e}={}){return function({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:Qh,theme:{...Kh,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:Ap,rules:mp,finalize:e=>e.n&&e.d&&e.r.some(e=>/^&::(before|after)$/.test(e))&&!/(^|;)content:/.test(e.d)?{...e,d:"content:var(--tw-content);"+e.d}:e}}({colors:Op,disablePreflight:e})}({disablePreflight:!0})],theme:{extend:{colors:{primary:"#1f7aed",primaryDark:"#1557a5",accent:"#1dd1a1"}}}}),Ip.__twindInitialized=!0}const kp={unsupported:{level:"error",title:"Navegador sem acesso ao microfone",detail:"Este navegador não permite usar o microfone pela página.",action:"Use Chrome, Edge ou Firefox atualizados."},"insecure-context":{level:"error",title:"Página sem HTTPS",detail:"O navegador só libera o microfone em páginas HTTPS (ou localhost).",action:"Abra o discador pelo endereço com https://."},"no-microphone":{level:"error",title:"Sem microfone",detail:"Nenhum microfone foi encontrado neste computador, por isso o discador não consegue conectar nem ligar.",action:"Conecte um fone ou headset e confira se o microfone está habilitado nas configurações de som do Windows; o discador reconhece sozinho quando aparecer."},"mic-permission-denied":{level:"error",title:"Microfone bloqueado pelo navegador",detail:"O navegador não permitiu que o discador use o microfone.",action:"Clique no cadeado ao lado do endereço, permita o microfone e recarregue a página."},"mic-unavailable":{level:"error",title:"Microfone em uso ou com falha",detail:"Outro programa pode estar usando o microfone, ou o dispositivo falhou ao iniciar.",action:"Feche outros aplicativos de áudio (Teams, Meet, gravadores) e tente de novo."},"no-speaker":{level:"warning",title:"Sem saída de som",detail:"Nenhum alto-falante ou fone foi encontrado: você não vai ouvir o cliente.",action:"Conecte um fone e confira o dispositivo de saída nas configurações de som."},"enumerate-failed":{level:"warning",title:"Não foi possível verificar os dispositivos de áudio",detail:"O navegador não listou os dispositivos de áudio.",action:"Confira as permissões da página e recarregue."}};function jp(e,t){const n=kp[e];return{...n,detail:t?`${n.detail} (${t})`:n.detail,kind:e,source:"device",code:`device:${e}`}}const Rp=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]),Pp=new Set(["NotAllowedError","PermissionDeniedError","PermissionDismissedError","SecurityError"]),Dp=new Set(["NotReadableError","TrackStartError","AbortError","SourceUnavailableError"]);async function Lp(e={}){const t=void 0===e.mediaDevices?"undefined"!=typeof navigator?navigator.mediaDevices:null:e.mediaDevices,n=e.isSecureContext??("undefined"==typeof window||!1!==window.isSecureContext);if(!t||"function"!=typeof t.getUserMedia)return jp(n?"unsupported":"insecure-context");try{const e=await t.getUserMedia({audio:!0});for(const t of e.getTracks())t.stop()}catch(i){const e=function(e){const t=(null==e?void 0:e.name)??"";return Rp.has(t)?"no-microphone":Pp.has(t)?"mic-permission-denied":(Dp.has(t),"mic-unavailable")}(i),t=null==i?void 0:i.name;return jp(e,"mic-unavailable"===e&&t?t:void 0)}if("function"!=typeof t.enumerateDevices)return null;let r;try{r=await t.enumerateDevices()}catch{return jp("enumerate-failed")}if(!r.some(e=>"audioinput"===e.kind))return jp("no-microphone");return(e.canListOutputs??("undefined"!=typeof HTMLMediaElement&&"setSinkId"in HTMLMediaElement.prototype))&&!r.some(e=>"audiooutput"===e.kind)?jp("no-speaker"):null}const Mp={missingAudioPermissions:{level:"error",title:"Discador sem acesso ao microfone",detail:"O Callix não conseguiu usar o microfone para iniciar o atendimento.",action:"Conecte ou habilite um microfone, permita o uso no navegador e recarregue a página."},maxUsersReached:{level:"error",title:"Limite de usuários do Callix atingido",detail:"O serviço já está com o número máximo de agentes conectados.",action:"Aguarde um colega sair ou fale com o supervisor."},userIsAlreadyConnectedOnAnotherDevice:{level:"error",title:"Usuário já conectado em outro lugar",detail:"Este login está ativo em outro computador, aba ou no Callix web.",action:"Saia de lá (ou feche a outra aba) e entre de novo aqui."},unknownError:{level:"error",title:"O discador não conseguiu iniciar",detail:"O Callix não respondeu como esperado ao iniciar o atendimento.",action:"Recarregue a página; se continuar, confira a internet e avise o suporte."}};const Up={exclusiveLogin:{level:"error",title:"Você entrou em outro lugar",detail:"Este login foi aberto em outro computador, aba ou no Callix web, e a sessão daqui foi encerrada.",action:"Feche o outro acesso e entre de novo aqui."},supervisor:{level:"error",title:"Sessão encerrada pelo supervisor",detail:"Um supervisor desconectou você do atendimento.",action:"Fale com o supervisor antes de entrar de novo."},userBlocked:{level:"error",title:"Usuário bloqueado",detail:"Seu usuário foi bloqueado no Callix.",action:"Fale com o supervisor ou o administrador."},breakTimeLimit:{level:"warning",title:"Tempo de pausa excedido",detail:"A pausa passou do limite e o Callix encerrou a sessão.",action:"Entre de novo para voltar ao atendimento."},manualCallTimeLimit:{level:"warning",title:"Tempo de chamada manual excedido",detail:"A chamada manual passou do limite configurado e a sessão foi encerrada.",action:"Entre de novo para continuar."},idle:{level:"warning",title:"Sessão encerrada por inatividade",detail:"Ficou muito tempo sem atividade e o Callix desconectou.",action:"Entre de novo para continuar."},user:{level:"warning",title:"Você saiu do atendimento",detail:"A sessão foi encerrada a seu pedido.",action:"Entre de novo quando quiser voltar."}};function Fp(e){const t=e&&e in Up?e:null;return t?{...Up[t],source:"session",code:`session:${t}`}:{level:"error",source:"session",code:"session:unknown",title:"Sessão encerrada",detail:`A sessão no Callix foi encerrada${e?` (${e})`:""}.`,action:"Entre de novo para continuar."}}const Bp={1:{title:"Número inválido",detail:"O Callix recusou o número discado.",action:"Confira o DDD e o número."},2:{title:"Usuário não encontrado",detail:"O Callix não reconheceu o usuário para esta chamada.",action:"Saia e entre de novo no discador."},3:{title:"Equipe bloqueada para ligar",detail:"Sua equipe está sem permissão de chamada manual neste momento.",action:"Fale com o supervisor."},4:{title:"Número na black list",detail:"Este número está na lista de bloqueio e não pode ser discado."},5:{title:"Sem rota para este número",detail:"A telefonia não tem rota de saída para este destino.",action:"Confira o número ou fale com o suporte."},6:{title:"Chamada recusada pelo Callix",detail:"O Callix não autorizou esta chamada."},7:{title:"Erro interno do Callix",detail:"O Callix falhou ao iniciar a chamada.",action:"Tente de novo em instantes."},8:{title:"Ligação internacional não autorizada",detail:"Chamadas internacionais estão desligadas para o seu usuário.",action:"Fale com o supervisor."},9:{title:"Saldo de telefonia insuficiente",detail:"A conta de telefonia do Callix está sem saldo.",action:"Avise o administrador."},10:{title:"Caixa postal ou silêncio",detail:"A chamada caiu em caixa postal ou ninguém falou do outro lado."}},qp={Busy:{title:"Número ocupado",detail:"O destino está em outra ligação.",action:"Tente de novo em alguns minutos."},Unavailable:{title:"Número indisponível",detail:"O destino não atendeu ou está fora de área."},"Not Found":{title:"Número não existe",detail:"A operadora respondeu que este número não existe.",action:"Confira o DDD e o número."},"Address Incomplete":{title:"Número incompleto",detail:"Faltam dígitos no número discado.",action:"Confira o DDD e o número."},"Blocked By Carrier":{title:"Bloqueado pela operadora",detail:"A operadora bloqueou a chamada para este destino."},Rejected:{title:"Chamada recusada",detail:"O destino ou a operadora recusou a chamada."},"SIP Failure Code":{title:"Falha na telefonia",detail:"A operadora devolveu um erro ao completar a chamada.",action:"Tente de novo; se repetir, avise o suporte."},"Bad Media Description":{title:"Falha de áudio na chamada",detail:"A negociação de áudio com a operadora falhou.",action:"Recarregue a página e tente de novo."},"Silence or Machine Detected":{title:"Caixa postal ou silêncio",detail:"A chamada caiu em caixa postal ou ninguém falou do outro lado."}};function zp(e){const t=null!=(null==e?void 0:e.rejectReason)?Bp[e.rejectReason]:void 0,n=(null==e?void 0:e.cause)?qp[e.cause]:void 0,r=t??n;if(r)return{level:"warning",source:"call",code:`call:${null!=(null==e?void 0:e.rejectReason)?`reject-${e.rejectReason}`:null==e?void 0:e.cause}`,...r};const i=(null==e?void 0:e.message)||(null==e?void 0:e.cause);return{level:"warning",source:"call",code:"call:unknown",title:"Chamada não concluída",detail:i?`O Callix informou: ${i}.`:"O Callix não informou o motivo.",action:"Tente de novo; se repetir, avise o suporte."}}function Hp(e){if(e.sessionDrop)return Fp(e.sessionDrop);if("startupError"===e.operatorState){if("missingAudioPermissions"===e.startupError&&e.deviceIssue){const t=e.deviceIssue.action??"";return{...e.deviceIssue,action:/recarregue a página/i.test(t)?t:`${t} Depois, recarregue a página para o discador iniciar.`.trim()}}return function(e){const t=e&&e in Mp?e:"unknownError";return{...Mp[t],source:"startup",code:`startup:${t}`}}(e.startupError)}return e.deviceIssue?e.deviceIssue:"manualCallFailed"===e.operatorState||e.callFailure?zp(e.callFailure):"offline"===e.operatorState?{level:"error",source:"offline",code:"offline",title:"Discador desconectado do Callix",detail:"O atendimento está offline: sem internet, sem microfone ou o Callix derrubou a conexão.",action:"Confira a internet e o microfone; o discador tenta reconectar sozinho. Se não voltar, recarregue a página."}:null}const Wp="https://callix-zeta.vercel.app";const Gp=function(){if("undefined"==typeof window)return Wp;const e=window.__CALLIX_API_BASE_URL__;return"string"==typeof e&&e.trim()?e.trim().replace(/\/+$/,""):Wp}();function Vp(){const e={"Content-Type":"application/json"},t=function(){if("undefined"==typeof window)return null;try{const e=localStorage.getItem("callix_dialer_last_username");if(e){const t=localStorage.getItem(`callix_dialer_${e}_session_token`);if(t)return t}for(let t=0;t<localStorage.length;t++){const e=localStorage.key(t);if(e&&/^callix_dialer_.*_session_token$/.test(e)){const t=localStorage.getItem(e);if(t)return t}}}catch{}return null}();return t&&(e["x-session-token"]=t,e.Authorization=`Bearer ${t}`),e}const Kp=new Map;function Yp(e){return`${e.source}:${e.id}`}function Xp(e,t){var n,r;const i=null==e?void 0:e.campaignContact;if(!(null==i?void 0:i.id))return null;const o=i.customer;return(null==o?void 0:o.id)&&(null==o?void 0:o.formId)?{source:"customer",id:o.id,formId:o.formId,campaignId:(null==(n=null==e?void 0:e.campaign)?void 0:n.id)??null,phoneId:t??null}:{source:"campaign",id:i.id,campaignId:(null==(r=null==e?void 0:e.campaign)?void 0:r.id)??null,phoneId:t??null}}async function Jp(e,t){const n=new AbortController,r=setTimeout(()=>n.abort(),15e3);try{const r=await fetch(e,{method:"GET",headers:t,credentials:"omit",signal:n.signal});if(!r.ok){const e=await r.json().catch(()=>({})),t=new Error(function(e,t){if(401===e)return"Sessão expirada. Entre novamente no discador.";const n=t.message||t.error;return n||(404===e?"Rota do formulário não encontrada no servidor do discador. Atualize o back-end (deploy) para esta versão do widget.":`Erro ${e}`)}(r.status,e));throw t.status=r.status,t}const i=await r.json();if(!function(e){if(!e||"object"!=typeof e)return!1;const t=e;return"number"==typeof t.id&&!!t.values&&"object"==typeof t.values&&Array.isArray(t.fields)}(i))throw new Error("Resposta inesperada do servidor");return i}catch(i){if(i instanceof Error&&"AbortError"===i.name)throw new Error("Tempo esgotado ao buscar o formulário");if(i instanceof TypeError){const e=new Error("Não foi possível conectar ao servidor do discador. Verifique a conexão ou se o back-end está atualizado.");throw e.cause=i,e}throw i}finally{clearTimeout(r)}}function Zp(e){const t=null==e?void 0:e.status;return void 0===t||(t>=500||408===t||429===t)}function Qp(e,t={}){const n=Yp(e),r=Date.now(),i=Kp.get(n);if(i&&i.until>r&&!t.force)return i.promise;const o=function(e,t){const n=new URLSearchParams;"customer"===t.source&&n.set("source","customer"),t.campaignId&&n.set("campaignId",String(t.campaignId)),t.formId&&n.set("formId",String(t.formId)),t.phoneId&&n.set("phoneId",String(t.phoneId)),t.signature&&t.expiresAt&&(n.set("sig",t.signature),n.set("exp",String(t.expiresAt)));const r=n.toString();return`${e}/api/campaign-form/${encodeURIComponent(String(t.id))}${r?`?${r}`:""}`}(t.apiBaseUrl??Gp,e),a=t.headers??Vp(),d=Math.max(0,t.retries??2),s=(async()=>{let e;for(let n=0;n<=d;n++)try{return await Jp(o,a)}catch(t){if(e=t,n===d||!Zp(t))break;await new Promise(e=>setTimeout(e,800*2**n))}throw e instanceof Error?e:new Error("Erro ao buscar o formulário")})();return Kp.set(n,{promise:s,until:r+3e5}),s.then(e=>{var t;e.partial&&(null==(t=Kp.get(n))?void 0:t.promise)===s&&Kp.delete(n)}).catch(()=>{var e;(null==(e=Kp.get(n))?void 0:e.promise)===s&&Kp.delete(n)}),s}function em(e){return String(e??"").normalize("NFC").trim().toLowerCase().replace(/\s+/g," ")}function tm(e,t){if(!(null==e?void 0:e.values))return;const n=new Map;for(const[r,i]of Object.entries(e.values)){const e=nm(em(r));n.has(e)||null==i||""===String(i).trim()||n.set(e,String(i))}for(const r of t){const e=n.get(nm(em(r)));if(void 0!==e)return e}}function nm(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"")}function rm(){var e;const t=Qu(),n=Zu(),r=(null==(e=null==n?void 0:n.data)?void 0:e.campaignContactPhoneId)??null;return"campaign"===(null==t?void 0:t.type)?$.jsx(im,{campaignCallInfo:t.info,campaignContactPhoneId:r}):t?$.jsx("div",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2",children:$.jsx("p",{className:"text-xs font-semibold text-amber-700",children:"Chamada manual (sem informações de campanha)"})}):null}function im(e){const{campaign:n,campaignContact:r}=e.campaignCallInfo,[i,o]=t.useState({form:null,isLoading:!1,error:null}),[a,d]=t.useState({key:null,n:0}),s=t.useMemo(()=>Xp(e.campaignCallInfo,e.campaignContactPhoneId),[e.campaignCallInfo,e.campaignContactPhoneId]),l=s?Yp(s):null,u=t.useRef(s);u.current=s;const c=t.useRef(null);t.useEffect(()=>{const e=u.current;if(!e||!l)return void o({form:null,isLoading:!1,error:null});let t=!1,n=null;return o({form:null,isLoading:!0,error:null}),Qp(e,{force:a.key===l&&a.n>0}).then(e=>{t||(o({form:e,isLoading:!1,error:null}),e.partial&&c.current!==l&&(c.current=l,n=setTimeout(()=>d(e=>({key:l,n:e.n+1})),3e3)))}).catch(e=>{t||(console.error("[CampaignCallInfoDisplay] Erro ao buscar dados:",e),o({form:null,isLoading:!1,error:e instanceof Error?e.message:"Erro ao buscar dados do contato"}))}),()=>{t=!0,n&&clearTimeout(n)}},[l,a]);const f=t.useMemo(()=>[{label:"Decisor",keys:["DECISOR","CONTATO","NOME"],icon:$.jsx(Fc,{className:"text-sm"})},{label:"Empresa",keys:["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","CLIENTE"],icon:$.jsx(wc,{className:"text-sm"})},{label:"Dívida ativa",keys:["DIVIDA ATIVA","DÍVIDA ATIVA","VALOR TOTAL DEVIDO"],icon:$.jsx(Ec,{className:"text-sm"})},{label:"Telefone",keys:["TELEFONE","CELULAR","WHATSAPP"],icon:$.jsx(Uc,{className:"text-sm"})}],[]),h=t.useMemo(()=>f.map(e=>{const t=("Telefone"===e.label?tm(i.form,e.keys)??(null==r?void 0:r.phoneNumber):tm(i.form,e.keys))||"",n="Telefone"===e.label?function(e){if(!e)return"-";const t=e.replace(/\D/g,"");if(t.length>=10){const e=t.slice(0,2),n=t.slice(2,t.length-4),r=t.slice(-4);return`(${e}) ${n.length>5?`${n.slice(0,n.length-4)} ${n.slice(n.length-4)}`:n}-${r}`.replace(/\s+/g," ").trim()}return e.trim()}(t):(t||"-").toString().trim()||"-";return{...e,value:n,isEmpty:!t}}),[null==r?void 0:r.phoneNumber,i.form,f]),p=h.some(e=>!e.isEmpty);return $.jsxs("div",{className:"mb-4 rounded-2xl border border-slate-200 bg-white/90 p-3 shadow-sm",children:[$.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[$.jsxs("div",{className:"flex items-center gap-3",children:[$.jsx("span",{className:"inline-flex h-9 w-9 items-center justify-center rounded-2xl bg-emerald-500 text-white shadow-inner",children:$.jsx(jc,{className:"text-base"})}),$.jsxs("div",{className:"min-w-0",children:[$.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-slate-500",children:"Campanha"}),$.jsx("p",{className:"truncate text-sm font-bold text-slate-900",children:(null==n?void 0:n.name)||"Chamada de campanha"})]})]}),$.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-1 text-[10px] font-bold uppercase text-emerald-700",children:[$.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500"}),"Em chamada"]})]}),i.isLoading&&$.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4 text-center",role:"status",children:[$.jsx("div",{className:"mx-auto mb-2 inline-block h-7 w-7 animate-spin rounded-full border-2 border-emerald-500 border-t-transparent"}),$.jsx("p",{className:"text-xs font-medium text-slate-600",children:"Carregando dados do contato..."})]}),i.error&&$.jsxs("div",{className:"rounded-xl border border-rose-200 bg-rose-50 p-3",children:[$.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[$.jsx(bc,{className:"text-sm text-rose-600"}),$.jsx("p",{className:"text-xs font-semibold text-rose-700",children:"Erro ao carregar dados"})]}),$.jsx("p",{className:"ml-6 text-[11px] text-rose-600",children:i.error}),$.jsx("button",{type:"button",onClick:()=>d(e=>({key:l,n:e.n+1})),className:"mt-2 ml-6 text-[11px] font-semibold text-rose-700 underline hover:text-rose-800",children:"Tentar novamente"})]}),!i.isLoading&&!i.error&&$.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:h.map(e=>$.jsxs("div",{className:"flex flex-col gap-1 rounded-xl border border-slate-200 bg-slate-50 p-2.5 shadow-[inset_0_1px_0_rgba(255,255,255,0.6)]",children:[$.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wider text-slate-500",children:[e.icon,$.jsx("span",{className:"truncate",children:e.label})]}),$.jsx("p",{className:"break-words text-sm font-bold leading-tight text-slate-900",children:e.value||"-"})]},e.label))}),!i.isLoading&&!i.error&&!p&&$.jsx("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-3 text-xs font-medium text-slate-600",children:"Nenhuma informação de campanha disponível para este contato."})]})}function om(e){const[n,r]=t.useState(null==e?void 0:e.get());return t.useEffect(()=>{if(!e)return void r(void 0);r(e.get());return e.subscribe(e=>{r(e)})},[e]),n}function am(){const{enterOnBreak:e,becomeAvailable:t}=Ju();return{goOnBreak:e,goOffBreak:t}}const dm={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6],0,0,0,0,0,0,0,[["6[2-467]\\d{3}",[5]],["4\\d{4}",[5]],0,0,0,0,["(?:0[1-9]|[1589]\\d)\\d{4}",[6]]]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[["[78]\\d{5}",[6]],["690\\d{6}|[356]\\d{5}",[6,9]],["180[02]\\d{4}",[8]],["[19]\\d{5}",[6]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0",0,0,0,0,0,[["[2-4679][2-8]\\d{6}",[8]],["5[024-68]\\d{7}",[9]],["400\\d{6}|800\\d{2,9}"],["900[02]\\d{5}",[9]],0,0,["600[25]\\d{5}",[9]],0,0,["700[05]\\d{5}",[9]]]],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0",0,0,0,0,0,[["(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}"],["7\\d{8}"]]],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268",[["268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}"],["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,["26840[69]\\d{4}"],["26848[01]\\d{4}"]]],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264",[["264(?:292|4(?:6[12]|9[78]))\\d{4}"],["264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,["264724\\d{4}"]]],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0",0,0,0,0,0,[["4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}",[8]],["6(?:[78][2-9]|9\\d)\\d{6}",[9]],["800\\d{4}",[7]],["900[1-9]\\d\\d",[6]],["700[2-9]\\d{4}",[8]],0,0,0,0,["808[1-9]\\d\\d",[6]]]],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}"],["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"],["800\\d{5}"],["90[016]\\d{5}"],0,0,0,0,["60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}"],["80[1-4]\\d{5}"]]],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]],0,0,0,0,0,0,[["2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}"],["9[1-79]\\d{7}"]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1",0,0,[["3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68])))\\d{6}|(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",[10]],["93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|9(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68]))))\\d{6}|9(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}"],["800\\d{7,8}"],["60[04579]\\d{7}",[10]],0,0,["810\\d{7}",[10]]]],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684",[["6846(?:22|33|44|55|77|88|9[19])\\d{4}"],["684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0",0,0,0,0,0,[["1(?:11\\d|[2-9]\\d{3,11})|(?:316|463)\\d{3,10}|648[34]\\d{3,9}|(?:51|66|73)2\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-7]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}"],["6(?:485|(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d)\\d{3,9}",[7,8,9,10,11,12,13]],["800\\d{6,10}",[9,10,11,12,13]],["(?:8[69][2-68]|9(?:0[01]|3[019]))\\d{6,10}",[9,10,11,12,13]],0,0,0,0,["5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}",[5,6,7,8,9,10,11,12,13]],["8(?:10|2[018])\\d{6,10}|828\\d{5}",[8,9,10,11,12,13]]]],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]],0,0,0,0,0,0,[["5(?:2\\d|8[1-9])\\d{4}"],["(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"],["800\\d{4}"],["900\\d{4}"],0,0,0,0,["(?:28\\d|501)\\d{4}"]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",[["18[1-8]\\d{3,6}",[6,7,8,9]],["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",[6,7,8,9,10]],["800\\d{4,6}",[7,8,9]],["[67]00\\d{5,6}",[8,9]],0,0,["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]],"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:2[12]428|3655[02])\\d{4}|(?:2(?:22[0-79]|63[0-28])|3654)\\d{5}|(?:(?:1[28]|46)\\d|2(?:[014-6]2|[23]3))\\d{6}"],["36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}"],["88\\d{7}"],["900200\\d{3}"]]],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0",0,0,0,0,0,[["(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}",[8]],["6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"],["8[08]\\d{6}",[8]],["9[0246]\\d{6}",[8]],0,0,["703[235]0\\d{3}|70(?:2[0-5]|3[0146]|[56]0)\\d{4}",[8]],0,0,["8[12]\\d{6}",[8]]]],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246",[["246521[0369]\\d{3}|246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}"],["246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["(?:246976|900[2-9]\\d\\d)\\d{4}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,["246(?:292|367|4(?:1[7-9]|3[01]|4[47-9]|67)|7(?:1[2-9]|2\\d|3[016]|53))\\d{4}"],0,["24631\\d{5}"]]],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0",0,0,0,0,0,[["(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2(?:[23]\\d|[45])\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}"],["(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}",[10]],["80[03]\\d{7}",[10]],0,0,0,0,0,["96(?:0[469]|1[0-47]|3[389]|43|6[69]|7[78])\\d{6}",[10]]]],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0",0,0,0,0,0,[["80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}",[8]],["4[5-9]\\d{7}",[9]],["800[1-9]\\d{4}",[8]],["(?:70(?:2[0-57]|3[04-7]|44|6[04-69]|7[0579])|90\\d\\d)\\d{4}",[8]],0,0,["78(?:0[578]|1[014-8]|2[25]|3[15-8]|48|5[05]|60|7[06-8]|9\\d)\\d{4}",[8]],0,0,["7879\\d{4}",[8]]]],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]],0,0,0,0,0,0,[["2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}"],["(?:0[1-7]|44|5[0-8]|[67]\\d)\\d{6}"]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0",0,0,0,0,0,[["2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}",[6,7,8]],["(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}",[8,9]],["(?:00800\\d\\d|800)\\d{5}",[8,12]],["90\\d{6}",[8]],0,0,0,0,0,["700\\d{5}",[8]]]],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]],0,0,0,0,0,0,[["(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}"],["(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}"],["8[02369]\\d{6}"],["(?:87|9[0-8])\\d{6}"],0,0,0,0,0,["84\\d{6}"]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]],0,0,0,0,0,0,[["(?:22|31)\\d{6}"],["(?:29|6[124-9]|7[125-9])\\d{6}"]]],BJ:["229","00","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]],0,0,0,0,0,0,[["2090\\d{4}|(?:012\\d\\d|2(?:02|1[037]|2[45]|3[68]|4\\d))\\d{5}"],["(?:01(?:2[5-9]|[4-69]\\d)|4[0-8]|[56]\\d|9[013-9])\\d{6}"],0,0,0,0,["81\\d{6}",[8]],0,["857[58]\\d{4}",[8]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441",[["441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}"],["441(?:[2378]\\d|5[0-39]|9[02])\\d{5}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]],0,0,0,0,0,0,[["22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}"],["(?:22[89]|[78]\\d\\d)\\d{4}"],0,0,0,0,0,0,["5[34]\\d{5}"]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?",0,0,0,[["(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}",[8]],["[67]\\d{7}",[8]],["8001[07]\\d{4}",[9]],0,0,0,0,0,["50\\d{6}",[8]]]],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]",[["(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}"],["(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]]],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",0,0,[["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",[10]],["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}",[10,11]],["800\\d{6,7}",[9,10]],["[59]00\\d{6,7}",[9,10]],0,0,0,0,0,["(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|370|864))\\d{4}|300\\d{5}",[8,10]]]],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242",[["242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-5]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}"],["242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}"],["242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,["242225\\d{4}"]]],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]],0,0,0,0,0,0,[["(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",[7]],["(?:1[67]|[78]7)\\d{6}",[8]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}",[7]],["(?:321|7[1-8]\\d)\\d{5}",[8]],["(?:0800|800\\d)\\d{6}",[10]],["90\\d{5}",[7]],0,0,0,0,["79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}",[8]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,[["(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",[9]],["(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}",[9]],["800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}"],["(?:810|902)\\d{7}",[10]],0,0,0,0,["249\\d{6}",[9]]],"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]],0,0,0,0,0,0,[["(?:2(?:[02]\\d|36|[68]0)|[3-58](?:[02]\\d|[68]0)|7(?:[02]\\d|32|[68]0))\\d{4}",[7]],["6[0-35-7]\\d{5}",[7]],["0800\\d{7}",[11]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}"],["88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}",[7,9]]]],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]],0,0,0,0,0,0,[["2[12]\\d{6}"],["7[024-7]\\d{6}"],0,["8776\\d{4}"]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]],0,0,0,0,0,0,[["222[1-589]\\d{5}"],["026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}"],0,["80[0-2]\\d{6}"]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",[9]],["(?:6[89]|7[235-9])\\d{7}",[9]],["800\\d{6}",[9]],["90[016]\\d{6}",[9]],["878\\d{6}",[9]],["860\\d{9}",[12]],["5[18]\\d{7}",[9]],["74[0248]\\d{6}",[9]],0,["84[0248]\\d{6}",[9]]]],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]],0,0,0,0,0,0,[["2(?:[15]\\d{3}|7(?:2(?:0[23]|1[2357]|2[245]|3[45]|4[3-5])|3(?:06|1[69]|[2-6]7)))\\d{5}"],["0[157]\\d{8}"]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]],0,0,0,0,0,0,[["(?:2\\d|3[13-7]|4[1-5])\\d{3}"],["[578]\\d{4}"]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]],0,0,0,0,0,0,[["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|2\\d{3}|3(?:(?:2\\d|50)\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389]|9[0-8])|600)|646[59])|(?:(?:3[2-5]|[47][1-35]|5[1-3578])\\d|6(?:00|[13-57]\\d)|8(?:0[1-9]|[1-9]\\d))\\d\\d|9(?:(?:10[01]|(?:[2458]\\d|7[1-9])\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}",[9]],["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|2\\d{3}|3(?:(?:2\\d|50)\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389]|9[0-8])|600)|646[59])|(?:(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57])\\d|8(?:0[1-8]|[1-9]\\d))\\d\\d|9(?:(?:10[01]|(?:[2458]\\d|7[1-9])\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}",[9]],["(?:123|8)00\\d{6}",[9,11]],0,0,0,0,0,["44\\d{7}",[9]],["600\\d{7,8}",[10,11]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]],0,0,0,0,0,0,[["2(?:22|33)\\d{6}",[9]],["(?:24[23]|6(?:[25-9]\\d|40))\\d{6}",[9]],["88\\d{6,7}"]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,[["(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|2(?:[02-57-9]\\d{3}|1(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))|(?:41[03]|8078|9(?:78|94))\\d\\d)\\d{5}|(?:10|2[0-57-9])(?:1(?:00|23)\\d\\d|95\\d{3,4})|(?:41[03]|9(?:78|94))(?:100\\d\\d|95\\d{3,4})|8078123|(?:43[35]|754|851)\\d{7,8}|(?:43[35]|754|851)(?:1(?:00\\d|23)\\d|95\\d{3,4})|(?:3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[13-9]\\d{6}|2(?:[0-24-9]\\d{5}|3\\d(?:\\d{4})?))|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[24-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[13-9]\\d{5}|2(?:[0-24-9]\\d{4}|3\\d(?:\\d{3})?))|9(?:[0-46-9]\\d{5}|5\\d{3,5}))",[7,8,9,10,11]],["1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}",[11]],["(?:(?:10|21)8|8)00\\d{7}",[10,12]],["16[08]\\d{5}",[8]],0,0,0,0,0,["10(?:10\\d{4}|96\\d{3,4})|400\\d{7}|950\\d{7,8}|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",[7,8,9,10,11]]],"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?",0,0,0,[["601055(?:[0-4]\\d|50)\\d\\d|6010(?:[0-4]\\d|5[0-4])\\d{4}|(?:46|60(?:[18][1-9]|[24-7][2-9]))\\d{6}",[8,10]],["333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:(?:0[0-5]|1\\d|5[01]|70)\\d|2(?:[0-3]\\d|4[1-9])|3(?:00|3[0-24-9]))|9(?:101|408))\\d{6}",[10]],["1800\\d{7}",[11]],["(?:19(?:0[01]|4[78])|901)\\d{7}",[10,11]]]],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))",0,0,0,[["210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}",[8]],["(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}",[8]],["800\\d{7}",[10]],["90[059]\\d{7}",[10]],0,0,0,0,["(?:210[0-6]|4\\d{3}|5100)\\d{4}",[8]]]],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:3[23]|4[89])\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}"],["(?:5\\d|6[2-4])\\d{6}",[8]],["800\\d{7}",[10]],0,0,0,0,0,0,["807\\d{7}",[10]]]],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]],0,0,0,0,0,0,[["2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}"],["(?:36|5[1-389]|9\\d)\\d{5}"],["800\\d{4}"],0,0,0,0,0,["(?:3[3-5]|4[356])\\d{5}"]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]",[["9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}"],["953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}"],0,0,0,0,0,["955\\d{5}",[8]],0,["60[0-2]\\d{4}",[7]]]],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]],0,0,0,0,0,0,[["2[2-6]\\d{6}"],["9(?:10|[4-79]\\d)\\d{5}"],["800\\d{5}"],["90[09]\\d{5}"],["700\\d{5}"],0,["(?:50|77)\\d{6}"],0,0,["80[1-9]\\d{5}"]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,[["(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}",[9]],["7(?:060\\d|19(?:[0-4]\\d|50))\\d{4}|(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}",[9]],["800\\d{6}",[9]],["9(?:0[05689]|76)\\d{6}",[9]],["70[01]\\d{6}",[9]],["9(?:3\\d{9}|6\\d{7,10})"],["9(?:5\\d|7[2-4])\\d{6}",[9]],0,["9[17]0\\d{6}",[9]],["8[134]\\d{7}",[9]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0",0,0,0,0,0,[["32\\d{9,11}|49[1-6]\\d{10}|322\\d{6}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}",[5,6,7,8,9,10,11,12,13,14,15]],["1(?:(?:5(?:[0-25-9]\\d\\d|3(?:10|33))|7[26-9]\\d\\d)\\d{6}|6[023]\\d{7,8})|17\\d{8}",[10,11]],["800\\d{7,12}",[10,11,12,13,14,15]],["(?:137[7-9]|900(?:[135]|9\\d))\\d{6}",[10,11]],["700\\d{8}",[11]],["1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",[12,13]],["18(?:1\\d{5,11}|[2-9]\\d{8})",[8,9,10,11,12,13,14]],["16(?:4\\d{1,10}|[89]\\d{1,11})",[4,5,6,7,8,9,10,11,12,13,14]],0,["180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}",[7,8,9,10,11,12,13,14]]]],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]],0,0,0,0,0,0,[["2(?:1[2-5]|7[45])\\d{5}"],["77\\d{6}"]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:[0-59][1-9]|[6-8]\\d)|3(?:[0-3][1-9]|4[13]|5[1-58]|6[1347-9]|7\\d|8[1-8]|9[1-79])|4(?:[0-25][1-9]|[34][2-9]|6[13-579]|7[13579]|8[1-47]|9[127])|5(?:[0-36][1-9]|4[146-9]|5[3-57-9]|7[568]|8[1-358]|9[1-69])|6(?:[0135][1-9]|2[1-68]|4[2-8]|6[1689]|[78]\\d|9[15689])|7(?:[0-69][1-9]|7[3-9]|8[147])|8(?:[16-9][1-9]|2[1-58])|9(?:[1-47-9][1-9]|6\\d))\\d{5}"],["(?:2[6-8]|37|6[78]|96)\\d{6}|(?:2[0-59]|3[0-689]|[457]\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\d{5}"],["80\\d{6}"],["90\\d{6}"]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767",[["767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}"],["767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9",[["8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}"],["8[024]9[2-9]\\d{6}"],["800(?:14|[2-9]\\d)\\d{5}|8[024]9[01]\\d{6}|8(?:33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0",0,0,0,0,0,[["9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[013-689])\\d{6}"],["(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}",[9]],["800\\d{6}",[9]],["80[3-689]1\\d{5}",[9]],0,0,0,0,["98[23]\\d{6}",[9]],["80[12]1\\d{5}",[9]]]],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["[2-7][2-7]\\d{6}",[8]],["964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}",[9]],["1800\\d{7}|1[78]00\\d{6}",[10,11]],0,0,0,0,0,["[2-7]890\\d{4}",[8]]]],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",[7]],["(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|(?:2[0-59]|[3-79]\\d)\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[13-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}",[7,8]],["800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}"],["(?:40\\d\\d|900)\\d{4}",[7,8]],["70[0-2]\\d{5}",[8]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0",0,0,0,0,0,[["13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2\\d|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}",[8,9]],["1[0-25]\\d{8}",[10]],["800\\d{7}",[10]],["900\\d{7}",[10]]]],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]",[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}"],["(?:17[1-3]|7\\d\\d)\\d{4}"]]],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]],0,0,0,0,0,0,[["96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}"],["(?:590[16]00\\d|9(?:6906(?:09|10)|7390\\d\\d))\\d\\d|(?:6\\d|7[1-48])\\d{7}"],["[89]00\\d{6}"],["80[367]\\d{6}"],["70\\d{7}"],0,["51\\d{7}"],0,0,["90[12]\\d{6}"]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0",0,0,0,0,0,[["11667[01]\\d{3}|(?:11(?:1(?:1[1-468]|2[2-7]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8]|7\\d)|5(?:1[578]|44|5[0-4])|6(?:1[578]|2[69]|39|4[5-7]|5[0-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}"],["700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\d\\d)\\d{6}"]]],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",[["1[3-7][1-8]\\d{3,6}|(?:19[1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}",[5,6,7,8,9]],["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",[6,7,8,9,10]],["800\\d{4,6}",[7,8,9]],["[67]00\\d{5,6}",[8,9]],0,0,["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]],"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,[["603\\d{4}|(?:3[0-5]|6[25-7]|8[58])\\d{5}",[7]],["(?:[279]\\d|45|5[01568]|8[034679])\\d{5}",[7]],["0800\\d{7}",[11]]],"00"],FK:["500","00","[2-7]\\d{4}",[5],0,0,0,0,0,0,0,[["[2-47]\\d{4}"],["[56]\\d{4}"]]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]],0,0,0,0,0,0,[["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}"],["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}"]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))",0,0,0,[["(?:20|[34]\\d|8[19])\\d{4}"],["(?:[27][1-9]|5\\d|9[16])\\d{4}"],["80[257-9]\\d{3}"],["90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d"],0,0,0,0,["(?:6[0-36]|88)\\d{4}"]]],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0",0,0,0,0,0,[["(?:26[013-9]|59[1-35-9])\\d{6}|(?:[13]\\d|2[0-57-9]|4[1-9]|5[0-8])\\d{7}"],["(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"],["80[0-5]\\d{6}"],["836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}"],0,0,["80[6-9]\\d{6}"],0,["9\\d{8}"],["8(?:1[01]|2[0156]|4[024]|84)\\d{6}"]]],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1",0,0,[["[01]1\\d{6}",[8]],["(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}"]]],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473",[["473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-4]|5[59]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}"],["473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[6-8])|5(?:2[01]|3[3-8])|901)\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0",0,0,0,0,0,[["(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}"],["5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|(?:[14]\\d|77)\\d|22[02])|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-4])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200|333|444)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"],["800\\d{6}"],0,0,0,0,0,["70[67]\\d{6}"]]],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0",0,0,0,0,0,[["594(?:[02-49]\\d|1[0-5]|5[6-9]|6[0-3]|80)\\d{4}"],["(?:694(?:[0-249]\\d|3[0-8])|7093[0-3])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:396|76\\d)\\d|476[0-6])\\d{4}"]]],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0",0,0,0,0,0,[["3082[0-5]\\d{4}|3(?:0(?:[237]\\d|8[01])|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}",[9]],["(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}",[9]],["800\\d{5}",[8]]]],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]],0,0,0,0,0,0,[["2190[0-2]\\d{3}|2(?:0(?:[02]\\d|3[01])|16[24-9]|2[2-5]\\d)\\d{4}"],["5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}"]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]],0,0,0,0,0,0,[["(?:19|3[1-7]|[68][1-9]|70|9\\d)\\d{4}"],["[245]\\d{5}"],["80\\d{4}"],0,0,0,0,0,["3[89]\\d{4}"]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8[0-589]\\d\\d)\\d{3}"],["556\\d{4}|(?:[23679]\\d|4[015]|5[0-489]|8[67])\\d{5}"]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]],0,0,0,0,0,0,[["3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}",[8]],["6[0-356]\\d{7}",[9]],0,0,0,0,0,0,["722\\d{6}",[9]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]],0,0,0,0,0,0,[["33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}"],["(?:222|55\\d)\\d{6}"],["80\\d[1-9]\\d{5}"],["90\\d[1-9]\\d{5}"]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}",[10]],["68[57-9]\\d{7}|(?:69|94)\\d{8}",[10]],["800\\d{7,9}"],["90[19]\\d{7}",[10]],["70\\d{8}",[10]],0,["5005000\\d{3}",[10]],0,0,["8(?:0[16]|12|[27]5|50)\\d{7}",[10]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[["[267][2-9]\\d{6}",[8]],["(?:[3-5]\\d\\d|80[0-4])\\d{5}",[8]],["18[01]\\d{8}",[11]],["19\\d{9}",[11]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671",[["671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]],0,0,0,0,0,0,[["443\\d{6}",[9]],["9(?:5\\d|6[569]|77)\\d{6}",[9]],0,0,0,0,0,0,["40\\d{5}",[7]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}"],["(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[0-39]|70))\\d{4}"],["(?:289|8(?:00|6[28]|88|99))\\d{4}"],["9008\\d{3}"],0,0,0,0,["515\\d{4}"]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,[["(?:2(?:[13-9]\\d|2[013-9])\\d|3(?:(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69])\\d|8(?:4[0-8]|[579]\\d|6[0-5]))|58(?:0[1-9]|1[2-9]))\\d{4}",[8]],["(?:4(?:44[0-35-9]|6(?:4[0-57-9]|6[0-4])|7(?:3[0-4]|4[0-48]|6[0-5]))|5(?:35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-25])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",[8]],["800\\d{6}",[9]],["900(?:[0-24-9]\\d{7}|3\\d{1,4})",[5,6,7,8,11]],["8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}",[8]],0,["30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",[8]],["7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}",[8]]],"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]],0,0,0,0,0,0,[["2(?:2(?:0[0-59]|1[1-9]|[23]\\d|4[02-7]|5[57]|6[245]|7[0135689]|8[01346-9]|9[0-2])|4(?:0[578]|2[3-59]|3[13-9]|4[0-68]|5[1-3589])|5(?:0[2357-9]|1[1-356]|4[03-5]|5\\d|6[014-69]|7[04]|80)|6(?:[056]\\d|17|2[067]|3[047]|4[0-378]|[78][0-8]|9[01])|7(?:0[5-79]|6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}",[8]],["[37-9]\\d{7}",[8]],["8002\\d{7}",[11]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0",0,0,0,0,0,[["1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",[8,9]],["9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-79])))\\d{4}|98\\d{6}",[8,9]],["80\\d{5,7}"],["6[01459]\\d{6}|6[01]\\d{5}",[7,8]],["7[45]\\d{6}",[8]],0,["62\\d{6,7}|72\\d{6}",[8,9]]]],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]],0,0,0,0,0,0,[["2(?:2\\d|5[1-5]|81|9[149])\\d{5}"],["(?:[34]\\d|5[56])\\d{6}"],["8\\d{7}"],0,0,0,0,0,["9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}"]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06",0,0,0,0,0,[["(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}",[8]],["(?:[257]0|3[01])\\d{7}",[9]],["(?:[48]0\\d|680[29])\\d{5}"],["9[01]\\d{6}",[8]],0,0,["38\\d{7}",[9]],0,["21\\d{7}",[9]]]],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0",0,0,0,0,0,[["2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",[7,8,9,10,11]],["8[1-35-9]\\d{7,10}",[9,10,11,12]],["00(?:1803\\d{5,11}|7803\\d{7})|(?:177\\d|800)\\d{5,7}",[8,9,10,11,12,13,14,15,16,17]],["809\\d{7}",[10]],0,0,["(?:1500|8071\\d{3})\\d{3}",[7,10]],0,0,["804\\d{7}",[10]]]],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}"],["8(?:22|[35-9]\\d)\\d{6}",[9]],["1800\\d{6}",[10]],["15(?:1[2-8]|[2-8]0|9[089])\\d{6}",[10]],["700\\d{6}",[9]],["88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}",[10]],["818\\d{6}",[9]],0,["76\\d{7}",[9]],["18[59]0\\d{6}",[10]]]],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0",0,0,0,0,0,[["153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}",[8,11,12]],["55(?:4(?:0[01]|10|5[0-7])|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}",[9]],["1(?:255|80[019]\\d{3})\\d{3}",[7,10]],["1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}",[8,10]],0,["151\\d{8,9}",[11,12]],["1599\\d{6}",[10]],0,["7(?:38(?:[05]\\d|8[018])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",[9]],["1700\\d{6}",[10]]]],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24",[["1624(?:230|[5-8]\\d\\d)\\d{3}"],["76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"],["808162\\d{4}"],["8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}"],["70\\d{8}"],0,["3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}"],0,["56\\d{8}"]]],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0",0,0,0,0,0,[["2717(?:[2-7]\\d|95)\\d{4}|(?:271[0-689]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683|79[1-7])\\d|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}",[10]],["(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}",[10]],["000800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))"],["186[12]\\d{9}",[13]],0,0,["140\\d{7}",[10]],0,0,["1860\\d{7}",[11]]]],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]],0,0,0,0,0,0,[["37\\d{5}"],["38\\d{5}"]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",[8,9]],["7[3-9]\\d{8}",[10]]]],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0",0,0,0,0,0,[["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|(?:12\\d|30[0-2])\\d|2(?:121|[2689]0\\d)|4(?:111|40\\d))\\d{4}",[6,7,10]],["9(?:(?:0[0-5]|[13]\\d|2[0-3])\\d\\d|9(?:[0-46]\\d\\d|5(?:10|5\\d)|8(?:[12]\\d|88)|9(?:0[0-3]|[19]\\d|21|69|77|8[7-9])))\\d{5}",[10]],0,0,0,0,["96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])",[4,5]]]],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-24589]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}",[7]],["(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"],["80[0-8]\\d{4}",[7]],["90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}",[7]],0,["(?:689|8(?:7[18]|80)|95[48])\\d{4}",[7]],["809\\d{4}",[7]],0,["49[0-24-79]\\d{4}",[7]]],"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876",[["8766060\\d{3}|(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[0235-9]|[23]\\d|40|5[06]|6[2-589]|7[0-25-9]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}"],["(?:658295|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}",[8]],["7(?:[78][0-25-9]|9\\d)\\d{6}",[9]],["80\\d{6}",[8]],["9\\d{7}",[8]],["70\\d{7}",[9]],0,["8(?:10|8\\d)\\d{5}",[8]],["74(?:66|77)\\d{5}",[9]],0,["85\\d{6}",[8]]]],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1",0,0,[["(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}",[9]],["(?:601[0-4]0|[7-9]0[1-9]\\d\\d)\\d{5}",[10]],["00777(?:[01]|5\\d)\\d\\d|(?:00(?:7778|882[1245])|(?:120|800\\d)\\d\\d)\\d{4}|00(?:37|66|78)\\d{6,13}"],["990\\d{6}",[9]],["60\\d{7}",[9]],0,["570\\d{6}",[9]],["20\\d{8}",[10]],["50[1-9]\\d{7}",[10]]]],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,[["(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}",[7,8,9]],["(?:1(?:0[0-8]|1\\d|2[014]|[34]0)|7\\d\\d)\\d{6}",[9]],["800[02-8]\\d{5,6}",[9,10]],["900[02-9]\\d{5}",[9]]]],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",[9]],["312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}",[9]],["800\\d{6,7}"]]],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})",[8,9]],["(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}",[8,9]],["1800(?:1\\d|2[019])\\d{4}",[10]],["1900(?:1\\d|2[09])\\d{4}",[10]]]],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0",0,0,0,0,0,[["(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}"],["(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}",[8]],0,0,0,0,0,0,["30(?:0[01]\\d\\d|12(?:11|20))\\d\\d",[8]]]],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]],0,0,0,0,0,0,[["7[4-7]\\d{5}"],["[34]\\d{6}"],0,["8\\d{6}"]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869",[["869(?:2(?:29|36)|302|4(?:6[015-9]|70)|56[5-7])\\d{4}"],["869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}"],["19[1-3]\\d{7}",[10]]]],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?",0,0,0,[["(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}",[5,6,8,9,10]],["1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}",[9,10]],["00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|[38]0)\\d{7}",[9,11,12,13,14]],["60[2-9]\\d{6}",[9]],["50\\d{8,9}",[10,11]],0,["1(?:5(?:22|33|44|66|77|88|99)|6(?:[07]0|44|6[0168]|88)|8(?:00|33|55|77|99))\\d{4}",[8]],["15\\d{7,8}",[9,10]],["70\\d{8}",[10]]]],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]],0,0,0,0,0,0,[["2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}",[8]],["(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:00|1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}",[8]],["18\\d{5}",[7]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345",[["345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|4[89]|88)|9(?:14|4[035-9]))\\d{4}"],["345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["(?:345976|900[2-9]\\d\\d)\\d{4}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",[["(?:33622|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9]|97)|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]|59))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59))))\\d{5}",[10]],["7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}",[10]],["8(?:00|108\\d{3})\\d{7}"],["809\\d{7}",[10]],["808\\d{7}",[10]],0,0,0,["751\\d{7}",[10]]],"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,0,0,0,0,[["(?:2[13]|[35-7][14]|41|8[1468])\\d{6}",[8]],["(?:20(?:[23579]\\d|8[78])|30[24]\\d)\\d{6}|30\\d{7}",[9,10]]]],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0",0,0,0,0,0,[["7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}"],["(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[1-3]))\\d{5}"],0,["9[01]\\d{6}",[8]],0,0,0,0,0,["80\\d{6}",[8]]]],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758",[["758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}"],["758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0",0,0,0,[["(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}",[7]],["(?:6(?:(?:4[5-9]|5\\d)\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}"],["8002[28]\\d\\d|80(?:05\\d|9)\\d{4}"],["90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",[7]],0,["697(?:42|56|[78]\\d)\\d{4}",[9]],["870(?:28|87)\\d\\d",[7]]]],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0",0,0,0,0,0,[["(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}"],["7(?:[0-25-8]\\d|4[0-4])\\d{6}"],0,0,0,0,["1973\\d{5}"]]],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0",0,0,0,0,0,[["2\\d{7}",[8]],["(?:(?:(?:22|33)0|555|7(?:6[01]|7\\d)|88\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}",[7,9]],0,["332(?:02|[34]\\d)\\d{4}",[9]]]],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]],0,0,0,0,0,0,[["2\\d{7}"],["[56]\\d{7}"],["800[1256]\\d{4}"]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]",0,0,0,[["(?:3[1478]|4[124-6]|52)\\d{6}"],["6\\d{7}"],["80[02]\\d{5}"],["9(?:0[0239]|10)\\d{5}"],["70[05]\\d{5}"],0,["70[67]\\d{5}"],0,["[89]01\\d{5}"],["808\\d{5}"]]],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)",0,0,0,[["(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}"],["6(?:[269][18]|5[1568]|7[189]|81)\\d{6}",[9]],["800\\d{5}",[8]],["90[015]\\d{5}",[8]],0,0,0,0,["20(?:1\\d{5}|[2-689]\\d{1,7})",[4,5,6,7,8,9,10]],["801\\d{5}",[8]]]],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]],0,0,0,0,0,0,[["6\\d{7}"],["2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}"],["80\\d{6}"],["90\\d{6}"],0,0,0,0,0,["81\\d{6}"]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}"],["9[1-6]\\d{7}"]]],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0",0,0,0,0,0,[["(?:870|9[2-47-9]\\d)\\d{5}",[8]],["4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}"],["(?:800|90\\d)\\d{5}",[8]]]],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}"],["562\\d{5}|(?:6\\d|7[16-9])\\d{6}"],["800\\d{5}"],["90[056]\\d{5}"],0,0,["803\\d{5}"],0,["3[08]\\d{6}"],["808\\d{5}"]]],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}",[8]],["6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}",[8]],["80(?:[0-2578]|9\\d)\\d{5}"],["9(?:4[1568]|5[178])\\d{5}",[8]],0,0,["77[1-9]\\d{5}",[8]],0,["78[1-49]\\d{5}",[8]]]],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1",0,0,[["2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}"],["3[2-47-9]\\d{7}"],0,0,0,0,0,0,["22\\d{7}"]]],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1",0,0,0,0,0,[["(?:247|528|625)\\d{4}"],["(?:(?:23|54)5|329|45[35-8])\\d{4}"],0,0,0,0,0,0,["635\\d{4}"]]],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:2(?:62|77)0|3444)\\d|4[56]440)\\d{3}|(?:34|4[357])700\\d{3}|(?:2(?:[0-3]\\d|5[0-578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}"],["7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"],["800\\d{5}"],["5\\d{7}"],0,0,0,0,0,["8(?:0[1-9]|[1-9]\\d)\\d{5}"]]],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]],0,0,0,0,0,0,[["2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-59]))\\d{5}"],["2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[0-3]|[679]\\d|8[2-59])\\d{6}"],["80\\d{6}"]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:(?:12|[28]\\d|3[56]|7[3-6]|9[0-6])\\d|4(?:2[29]|7[0-2]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|22|7[0-2]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[013])|3(?:20\\d|4(?:70|83)|56)|420\\d|5(?:2\\d|470))|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|2472|3(?:20\\d|470)|4(?:2[04]\\d|472)|7(?:3\\d\\d|4[67]0|8(?:[01459]\\d|8))))\\d{4}|5(?:2(?:2\\d{5,6}|47[02]\\d{4})|(?:3472|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[01])|8(?:20\\d|47[02])|9(?:20\\d|470))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:(?:2\\d|51)\\d|4(?:[1-35-9]\\d|4[0-57-9]))|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|(?:[35]2|64)\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}",[6,7,8,9]],["(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}",[7,8,9,10]],["80080(?:0[1-9]|2\\d)\\d{3}",[10]],0,0,0,0,0,["1333\\d{4}",[8]]]],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0",0,0,0,0,0,[["[12]2[1-3]\\d{5,6}|(?:(?:[12](?:1|27)|5[368])\\d\\d|7(?:0(?:[0-5]\\d|7[078]|80)|128))\\d{4}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}"],["92[0139]\\d{5}|(?:5[05]|6[069]|7[28]|8[0135689]|9[013-9])\\d{6}",[8]],0,0,0,0,0,0,["712[0-79]\\d{4}|7(?:1[013-9]|[5-79]\\d)\\d{5}",[8]]]],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]],0,0,0,0,0,0,[["(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}",[8]],["6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}",[8]],["0800\\d{3}",[7]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670",[["670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:596(?:[03-7]\\d|1[05]|2[7-9]|8[0-39]|9[04-9])|80[6-9]\\d\\d|9(?:477[6-9]|767[4589]))\\d{4}"],["(?:69[67]\\d\\d|7091[0-3])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:397[0-3]|477[0-5]|76(?:6\\d|7[0-367]))\\d{4}"]]],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]],0,0,0,0,0,0,[["(?:25[08]|35\\d|45[1-7])\\d{5}"],["[2-4][0-46-9]\\d{6}"],["800\\d{5}"]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664",[["6644(?:1[0-3]|91)\\d{4}"],["664(?:3(?:49|9[1-6])|49[2-6])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]],0,0,0,0,0,0,[["20(?:3[1-4]|6[059])\\d{4}|2(?:0[19]|[1-357]\\d|60)\\d{5}"],["(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"],["800(?:02|[3467]\\d)\\d{3}"],["5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}"],0,0,["501\\d{5}"],["7117\\d{4}"],["3550\\d{4}"]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,[["(?:2(?:[0346-8]\\d|1[0-8])|4(?:[013568]\\d|2[4-8]|71|90)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",[7,8]],["5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-6]|3[013]))\\d{5}",[8]],["802\\d{7}|80[0-2]\\d{4}",[7,10]],["30\\d{5}",[7]],0,0,0,["219\\d{4}",[7]],["3(?:20|9\\d)\\d{4}",[7]]],"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,[["(?:3(?:0[0-4]|3[0-59])|6(?:[58][024689]|6[024-68]|7[02468]))\\d{4}",[7]],["(?:46[46]|[79]\\d\\d)\\d{4}",[7]],["800\\d{7}",[10]],["900\\d{7}",[10]],0,0,["4(?:0[01]|50)\\d{4}",[7]]],"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:1[2-9]|2[12]\\d\\d)\\d{5}"],["111\\d{6}|(?:31|77|[89][89])\\d{7}",[9]]]],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"],["(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"],["8(?:00|88)\\d{7}"],["900\\d{7}"],["500\\d{7}"],0,0,0,0,["300\\d{7}"]],"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0",0,0,0,0,0,[["427[01]\\d{4}|(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}",[8,9]],["1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-7]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}",[9,10]],["1[378]00\\d{6}",[10]],["1600\\d{6}",[10]],0,0,0,0,["15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}",[10]]]],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",[8]],["8[2-79]\\d{7}",[9]],["800\\d{6}",[9]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0",0,0,0,0,0,[["64426\\d{3}|6(?:1(?:2[2-7]|3[01378]|4[0-4])|254|32[0237]|4(?:27|41|5[25])|52[236-8]|626|7(?:2[2-4]|30))\\d{4,5}|6(?:1(?:(?:0\\d|2[0189]|3[24-69]|4[5-9])\\d|17|69|7[014])|2(?:17|5[0-36-8]|69|70)|3(?:17|2[14-689]|34|6[289]|7[01]|81)|4(?:17|2[0-2]|4[06]|5[0137]|69|7[01])|5(?:17|2[0459]|69|7[01])|6(?:17|25|38|42|69|7[01])|7(?:17|2[569]|3[13]|6[89]|7[01]))\\d{4}"],["(?:60|8[1245])\\d{7}",[9]],["80\\d{7}",[9]],["8701\\d{5}",[9]],0,0,0,0,["8(?:3\\d\\d|86)\\d{5}"]]],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]],0,0,0,0,0,0,[["(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}"],["(?:[579]\\d|8[0-79])\\d{4}"],["050\\d{3}"],["36\\d{4}"]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]],0,0,0,0,0,0,[["2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}"],["(?:23|7[0467]|[89]\\d)\\d{6}"],["08\\d{6}"],["09\\d{6}"]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1",0,0,[["(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}"],["(?:14|3[58])\\d{4}"]]],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0",0,0,0,0,0,[["20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}",[10]],["(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}",[10]],["800\\d{7,11}"],0,0,0,["700\\d{7,11}"]]],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]],0,0,0,0,0,0,[["2\\d{7}"],["(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"],["1800\\d{4}"]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}",[9]],["(?:6[1-58]|970\\d)\\d{7}",[9,11]],["800\\d{4,7}",[7,8,9,10]],["90[069]\\d{4,7}",[7,8,9,10]],0,0,["140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d",[5,6,9]],["66\\d{7}",[9]],["(?:85|91)\\d{7}",[9]]]],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]",[["(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",[8]],["(?:4[015-8]|9\\d)\\d{6}",[8]],["80[01]\\d{5}",[8]],["82[09]\\d{5}",[8]],["880\\d{5}",[8]],["81[23]\\d{5}",[8]],["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"],0,["85[0-5]\\d{5}",[8]],["810(?:0[0-6]|[2-8]\\d)\\d{3}",[8]]]],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0",0,0,0,0,0,[["(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}",[8]],["9(?:00|6[0-3]|7[0-24-6]|8[0-24-68])\\d{7}",[10]],["1(?:66001|800\\d\\d)\\d{5}",[11]]]],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]],0,0,0,0,0,0,[["444\\d{4}"],["(?:222|55[3-9]|666|777|8\\d\\d|999)\\d{4}"]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]],0,0,0,0,0,0,[["[47]\\d{3}",[4]],["(?:[56]|888[1-9])\\d{3}"]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,[["240\\d{5}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}",[8]],["2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}",[8,9,10]],["508\\d{6,7}|80\\d{6,8}",[8,9,10]],["(?:1[13-57-9]\\d{5}|50(?:0[08]|30|66|77|88))\\d{3}|90\\d{6,8}",[7,8,9,10]],["70\\d{7}",[9]],0,["8(?:1[16-9]|22|3\\d|4[045]|5[459]|6[235-9]|7[0-3579]|90)\\d{2,7}"]],"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]],0,0,0,0,0,0,[["2[1-6]\\d{6}",[8]],["1505\\d{4}|(?:7(?:[125-9]\\d|41)|9(?:0[1-9]|[1-9]\\d))\\d{5}",[8]],["8007\\d{4,5}|(?:500|800[05])\\d{4}"],["900\\d{5}",[8]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["(?:1(?:0\\d|1[0479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[047-9]\\d|1[0-8]|2[0-5]|33|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",[7]],["(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}",[7,8]],["800\\d{4,5}|(?:00800|800\\d)\\d{6}"],["(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}",[7]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,[["(?:(?:(?:4[34]|5[14])[0-8]|687)\\d|7(?:173|(?:3[0-8]|55)\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[0569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}",[8]],["9\\d{8}",[9]],["800\\d{5}",[8]],["805\\d{5}",[8]],["80[24]\\d{5}",[8]],0,0,0,0,["801\\d{5}",[8]]],"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],0,0,0,0,0,0,[["4(?:0[4-689]|9[4-68])\\d{5}",[8]],["8[7-9]\\d{6}",[8]],["80[0-5]\\d{6}",[9]],0,0,0,["44\\d{4}",[6]],0,["499\\d{5}",[8]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,[["(?:(?:3[0-2]|4[257]|5[34]|9[78])\\d|64[1-9]|85[02-46-9])\\d{4}",[7]],["(?:7\\d|8[1-48])\\d{6}",[8]],["180\\d{4}",[7]],0,0,0,0,["27[01]\\d{4}",[7]],["2(?:0[0-57]|7[568])\\d{4}",[7]]],"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0",0,0,0,0,0,[["(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|(?:2|8[2-8]\\d\\d)\\d{5}",[6,8,9,10]],["(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}",[10]],["1800\\d{7,9}",[11,12,13]]]],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0",0,0,0,0,0,[["(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}",[9,10]],["3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}",[10]],["800\\d{5}(?:\\d{3})?",[8,11]],["900\\d{5}",[8]],["122\\d{6}",[9]],0,["(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",[11,12]]]],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["47\\d{7}|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))",[7,9]],["2131[89]\\d{4}|21(?:1[013-5]|2\\d|3[2-9])\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",[9]],["800\\d{6,7}",[9,10]],["70[01346-8]\\d{6}",[9]],0,0,["804\\d{6}",[9]],["64\\d{4,7}",[6,7,8,9]],["39\\d{7}",[9]],["801\\d{6}",[9]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:4[1-35-9]|5[0-47-9]|80[6-9]\\d\\d)\\d{4}"],["(?:4[02-489]|5[02-9]|708(?:4[0-5]|5[0-6]))\\d{4}"],["80[0-5]\\d{6}",[9]],["8[129]\\d{7}",[9]]]],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939",[["(?:787|939)[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}",[8]],["5[69]\\d{7}",[9]],["1800\\d{6}",[10]],0,0,0,0,0,0,["1700\\d{6}",[10]]]],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]],0,0,0,0,0,0,[["2(?:[12]\\d|3[1-689]|4[1-59]|[57][1-9]|6[1-35689]|8[1-69]|9[1256])\\d{6}"],["6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"],["80[02]\\d{6}"],["(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}"],["884[0-4689]\\d{5}"],["600\\d{6}|6[06]92(?:0\\d|3[349]|49)\\d{3}"],["70(?:38[01]|596|(?:7\\d|8[17])\\d)\\d{4}"],["6(?:222\\d|89(?:00|88|99))\\d{4}"],["30\\d{7}"],["80(?:8\\d|9[1579])\\d{5}"]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}"],["(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\d{4}|(?:45|77|88)\\d{5}"]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,[["(?:[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:2[4-68]|[4-68]\\d|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}",[7,8,9]],["9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}",[9]],["9800\\d{5,7}",[9,10,11]],0,0,0,["[2-9]0\\d{4,7}",[6,7,8,9]],0,["8700[0-4]\\d{4}",[9]]]],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]],0,0,0,0,0,0,[["4(?:1111|2022)\\d{3}|4(?:[04]\\d\\d|14[0-6]|999)\\d{4}",[8]],["[35-7]\\d{7}",[8]],["800\\d{4}|(?:0080[01]|800)\\d{6}",[7,9,11]],0,0,0,0,["2[136]\\d{5}",[7]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,[["[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d"],["(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}",[9]],["800\\d{6}",[9]],["90[0136]\\d{6}",[9]],0,0,["(?:37\\d|80[578])\\d{6}",[9]],0,0,["801\\d{6}",[9]]],0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0",0,0,0,0,0,[["(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}",[7,8,9,10,11,12]],["6(?:[0-689]|7\\d)\\d{6,7}",[8,9,10]],["800\\d{3,9}"],["(?:78\\d|90[0169])\\d{3,7}",[6,7,8,9,10]],0,0,["7[06]\\d{4,10}"]]],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:06|2[23568]\\d)\\d{6}"],["7[237-9]\\d{7}",[9]],["800\\d{6}",[9]],["900\\d{6}",[9]]]],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0",0,0,0,0,0,[["1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",[9]],["579[01]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}",[9]],["800\\d{7}",[10]],["925\\d{6}",[9]],0,0,0,0,0,["920\\d{6}",[9]]]],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]],0,0,0,0,0,0,[["(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}",[5]],["48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}"],["1[38]\\d{3}",[5]],0,0,0,0,0,["5[12]\\d{3}",[5]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,[["4[2-46]\\d{5}"],["2[125-8]\\d{5}"],["800[08]\\d{3}"],["85\\d{5}"],0,0,0,0,["971\\d{4}|(?:64|95)\\d{5}"]],"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0",0,0,0,0,0,[["1(?:5\\d|8[35-7])\\d{6}"],["(?:1[0-2]|9[0-3569])\\d{7}"]]],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0",0,0,0,0,0,[["(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}",[7,8,9]],["7[02369]\\d{7}",[9]],["20\\d{4,7}",[6,7,8,9]],["649\\d{6}|99[1-59]\\d{4}(?:\\d{3})?|9(?:00|39|44)[1-8]\\d{3,6}",[7,8,9,10]],["75[1-8]\\d{6}",[9]],["(?:25[245]|67[3-68])\\d{9}",[12]],["10[1-8]\\d{6}",[9]],["74[02-9]\\d{6}",[9]],0,["77[0-7]\\d{6}",[9]]]],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[["662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}",[8]],["898[02-8]\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}",[8]],["(?:18|8)00\\d{7}",[10,11]],["1900\\d{7}",[11]],0,0,["7000\\d{7}",[11]],0,["(?:3[12]\\d|666)\\d{5}",[8]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]",[["2(?:[0-57-9]\\d|6[4-9])\\d\\d"],["[56]\\d{4}",[5]],0,0,0,0,0,0,["262\\d\\d",[5]]]],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,[["(?:[1-357][2-8]|4[24-8])\\d{6}",[8]],["65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}",[8]],["80\\d{4,6}",[6,7,8]],["89[1-3]\\d{2,5}|90\\d{4,6}"],0,0,0,0,["(?:59\\d\\d|8(?:1(?:[67]\\d|8[0-589])|2(?:0\\d|2[0-37-9]|8[0-2489])|3[389]\\d))\\d{4}",[8]]],"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79",[["79\\d{6}",[8]],["(?:4[015-8]|9\\d)\\d{6}",[8]],["80[01]\\d{5}",[8]],["82[09]\\d{5}",[8]],["880\\d{5}",[8]],["81[23]\\d{5}",[8]],["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"],0,["85[0-5]\\d{5}",[8]],["810(?:0[0-6]|[2-8]\\d)\\d{3}",[8]]]],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d"],["909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}",[9]],["800\\d{6}",[9]],["9(?:00|[78]\\d)\\d{6}",[9]],0,0,["96\\d{7}",[9]],["9090\\d{3}",[7]],["6(?:02|5[0-4]|9[0-6])\\d{6}",[9]],["8[5-9]\\d{7}",[9]]]],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0",0,0,0,0,0,[["22[2-4][2-9]\\d{4}"],["(?:25|3[0-5]|66|7[1-9]|8[08]|9[09])\\d{6}"]]],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1",0,0,[["0549(?:8[0157-9]|9\\d)\\d{4}",[10]],["6[16]\\d{6}",[8]],0,["7[178]\\d{6}",[8]],0,0,0,0,["5[158]\\d{6}",[8]]]],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]],0,0,0,0,0,0,[["3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}"],["7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|3[356]|[4-7]\\d|8[35]))\\d{5}"],["800\\d{6}"],["88[4689]\\d{6}"],0,0,0,0,["(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}"],["81[02468]\\d{6}"]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0",0,0,0,0,0,[["(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}",[6,7]],["(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}",[7,8,9]]]],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]],0,0,0,0,0,0,[["(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}",[6]],["(?:6[08]|7[124-7]|8[1-9])\\d{5}",[7]],["80\\d{5}",[7]],["90\\d{5}",[7]],0,0,0,0,["56\\d{4}",[6]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0",0,0,0,0,0,[["1[89]\\d{7}"],["(?:12|9[1257-9])\\d{7}"]]],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]],0,0,0,0,0,0,[["22\\d{5}"],["900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}"]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,[["2(?:79(?:0[0347-9]|[1-9]\\d)|89(?:0[024589]|[1-9]\\d))\\d{3}|2(?:[1-69]\\d|[78][0-8])\\d{5}",[8]],["[67]\\d{7}",[8]],["800\\d{8}|80[01]\\d{4}",[7,11]],["900\\d{4}(?:\\d{4})?",[7,11]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721",[["7215(?:4[2-8]|8[239]|9[056])\\d{4}"],["7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0",0,0,0,0,0,[["21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}"],["(?:50|9[1-9])\\d{7}",[9]]]],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]],0,0,0,0,0,0,[["[23][2-5]\\d{6}",[8]],["7[5-9]\\d{6}",[8]],["0800\\d{4}",[8]],["900\\d{6}",[9]],0,0,0,0,["70\\d{6}",[8]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8",[["8\\d{3}"]]],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649",[["649(?:266|712|9(?:4\\d|50))\\d{4}"],["649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["649(?:71[01]|966)\\d{4}"]]],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,[["22(?:[37-9]0|5[0-5]|6[89])\\d{4}"],["(?:30|[69]\\d|77|8[56])\\d{6}"]],"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]],0,0,0,0,0,0,[["2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}"],["(?:7[0-29]|9[0-36-9])\\d{6}"]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["(?:1[0689]|2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}",[8]],["67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}",[9]],["(?:001800\\d|1800)\\d{6}",[10,13]],["1900\\d{6}",[10]],0,0,0,0,["6[08]\\d{7}",[9]]]],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,[["(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}"],["(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0-27-9]|2[0-27]|[34]0|5[05]|7[01578]|8[078])\\d{7}"]],"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7],0,0,0,0,0,0,0,[["(?:2[2-4]|[34]\\d)\\d{2,5}"],["7[2-4]\\d{2,5}"]]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]],0,0,0,0,0,0,[["(?:2[1-5]|3[1-9]|4[1-4])\\d{5}",[7]],["7[2-8]\\d{6}",[8]],["80\\d{5}",[7]],["90\\d{5}",[7]],["70\\d{5}",[7]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,[["(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}"],["(?:6\\d|71)\\d{6}"]],"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]],0,0,0,0,0,0,[["81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}"],["3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}"],["8010\\d{4}"],["88\\d{6}"],0,0,0,0,0,["8[12]10\\d{4}"]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]],0,0,0,0,0,0,[["(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}",[5]],["(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}",[7]],["0800\\d{3}",[7]],0,0,0,0,0,["55[0-37-9]\\d{4}",[7]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0",0,0,0,0,0,[["(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",[10]],["561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}",[10]],["8(?:00\\d{7}(?:\\d{2,3})?|11\\d{7})",[10,12,13]],["(?:8[89]8|900)\\d{7}",[10]],["592(?:21[12]|461)\\d{4}",[10]],0,["444\\d{4}",[7]],["512\\d{7}",[10]],["850\\d{7}",[10]]]],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868",[["868(?:2(?:01|1[5-9]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}"],["868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],["868619\\d{4}"]]],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]],0,0,0,0,0,0,[["2[02-9]\\d{3}",[5]],["(?:7[01]\\d|90)\\d{4}",[6,7]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}",[8,9]],["(?:40001[0-2]|9[0-8]\\d{4})\\d{3}",[9]],["80[0-79]\\d{6}|800\\d{5}",[8,9]],["20(?:[013-9]\\d\\d|2)\\d{4}",[7,9]],["99\\d{7}",[9]],0,["50[0-46-9]\\d{6}",[9]],0,["7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}",[10,11]]],0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0",0,0,0,0,0,[["2[2-8]\\d{7}"],["(?:6[125-9]|7[13-9])\\d{7}"],["80[08]\\d{6}"],["90\\d{7}"],0,0,0,0,["41\\d{7}"],["8(?:40|6[01])\\d{6}"]]],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,[["(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",[9]],["790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}",[9]],["800[1-8]\\d{5,6}"],["900[239]\\d{5,6}"],0,0,0,0,["89[1-579]\\d{6}",[9]]],"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0",0,0,0,0,0,[["20(?:(?:240|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[017]\\d|2[5-9]|3[1-4]|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}"],["72[48]0\\d{5}|7(?:[014-8]\\d|2[067]|36|9[0-289])\\d{6}"],["800[1-3]\\d{5}"],["90[1-3]\\d{6}"]]],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,[["(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}",[8]],["9[1-9]\\d{6}",[8]],["0004\\d{2,9}|(?:405|80[05])\\d{4}",[6,7,8,9,10,11,12,13]],["90[0-8]\\d{4}",[7]],0,0,["21\\d{2,3}",[4,5]]],"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]],0,0,0,0,0,0,[["(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}"],["(?:(?:[25]0|33|8[78]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}"]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698",[["06698\\d{1,6}",[6,7,8,9,10,11]],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784",[["784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}"],["784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["78451[0-2]\\d{4}"]]],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}"],["4(?:1[24-8]|2[246])\\d{7}"],["800\\d{7}"],["90[01]\\d{7}"],0,0,["501\\d{7}"]]],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284",[["284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}"],["284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340",[["340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0",0,0,0,0,0,[["2(?:0[3-9]|1[0-689]|2[0-25-9]|[38][2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|9[0-4679])\\d{7}",[10]],["(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}",[9]],["1800\\d{4,6}|12(?:0[13]|28)\\d{4}",[8,9,10]],["1900\\d{4,6}",[8,9,10]],0,0,["(?:[17]99|80\\d)\\d{4}|69\\d{5,6}",[7,8]],0,["672\\d{6}",[9]]]],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]],0,0,0,0,0,0,[["(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}",[5]],["(?:[58]\\d|7[013-7])\\d{5}",[7]],["81[18]\\d\\d",[5]],0,0,0,["(?:3[03]|900\\d)\\d{3}"],0,["9(?:0[1-9]|1[01])\\d{4}",[7]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],0,0,0,0,0,0,[["72\\d{4}",[6]],["(?:72|8[23])\\d{4}",[6]],["80[0-5]\\d{6}",[9]],0,0,["[48]0\\d{4}",[6]],0,0,["9[23]\\d{4}",[6]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]],0,0,0,0,0,0,[["6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}",[5,6]],["(?:7[1-35-8]|8(?:[3-7]|9\\d{3}))\\d{5}",[7,10]],["800\\d{3}",[6]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0",0,0,0,0,0,[["38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})"],["4[3-9]\\d{6}",[8]],["800\\d{5}",[8]],["900\\d{5}",[8]]]],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}",[7,8]],["7[01378]\\d{7}",[9]]]],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:0330|4302)|52087)0\\d{3}|(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",[9]],["(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:50[0-2]|6\\d\\d|7(?:[0-46-9]\\d|5[0-4]))\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}",[5,6,7,8,9]],["80\\d{7}",[9]],["(?:86[2-9]|9[0-2]\\d)\\d{6}",[9]],0,0,["861\\d{6,7}",[9,10]],0,["87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}",[9]],["860\\d{6}",[9]]]],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0",0,0,0,0,0,[["21[1-8]\\d{6}"],["(?:[59][5-8]|7[5-9])\\d{7}"],["800\\d{6}"],0,0,0,0,0,["63\\d{7}"]]],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}"],["7(?:[1278]\\d|3[1-9])\\d{6}",[9]],["80(?:[01]\\d|20|8[0-8])\\d{3}",[7]],0,0,0,0,0,["86(?:1[12]|22|30|44|55|77|8[368])\\d{6}",[10]]]]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function sm(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var lm={}.constructor;function um(e){return null!=e&&e.constructor===lm}function cm(e){return(cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hm(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pm(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pm(e){var t=function(e,t){if("object"!=cm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=cm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==cm(t)?t:t+""}var mm=" ext. ",gm=/^\d+$/,$m=function(){return hm(function e(t){fm(this,e),_m(t),this.metadata=t,Em.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&gm.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new vm(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new vm(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),vm=function(){return hm(function e(t,n){fm(this,e),this.globalMetadataObject=n,this.metadata=t,Em.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(t){return new ym(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&wm(this.types(),e))return new xm(wm(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?mm:this.metadata[13]||mm}}])}(),ym=function(){return hm(function e(t,n){fm(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||bm.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),bm=/^\(?\$1\)?$/,xm=function(){return hm(function e(t,n){fm(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function wm(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function _m(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!um(e)||!um(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(um(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Cm(e)+": "+e,"."))}var Cm=function(e){return cm(e)};function Sm(e,t){if((t=new $m(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Em(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===sm(t,"1.2.0")?this.v2=!0:-1===sm(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Nm(e,t,n){return function(e,t,n,r){t&&(r=new $m(r.metadata)).selectNumberingPlan(t);var i=r.type(n),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,d=o[0];if(d===a)return"IS_POSSIBLE";if(d>a)return"TOO_SHORT";if(o[o.length-1]<a)return"TOO_LONG";return o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Tm(e,t,n){return"IS_POSSIBLE"===Nm(e,t,n)}function Am(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Om(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Im(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Im(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Im(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var km=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function jm(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new $m(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Am(r,n.nationalNumberPattern())){if(Rm(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Rm(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=Om(km);!(i=o()).done;){var a=i.value;if(Rm(r,a,n))return a}}}}function Rm(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Am(e,t.pattern()))}function Pm(e,t,n){var r=new $m(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new $m(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Dm="0-90-9٠-٩۰-۹",Lm="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),Mm=new RegExp("(["+Dm+"])");function Um(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Fm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fm(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bm(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,t){var n=t.countries,r=t.metadata;r=new $m(r);for(var i,o=Um(n);!(i=o()).done;){var a=i.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(jm({phone:e,country:a},void 0,r.metadata))return a}}(n,{countries:i,metadata:r.metadata})}function qm(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,d=r.length-1,s=d>0&&r[d];if(t.nationalPrefixTransformRule()&&s)i=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(o=r[1]);else{var l=r[0];i=e.slice(l.length),s&&(o=r[1])}if(s){var u=e.indexOf(r[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,n),i=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(Am(e,n.nationalNumberPattern())&&!Am(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Bm(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(Nm(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function zm(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var i=new $m(r);i.selectNumberingPlan(t,n);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(Mm);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,n,r,i);if(!a||a===e){if(n||r){var d=function(e,t,n,r,i){var o=n?Sm(n,i):r;if(0===e.indexOf(o)){(i=new $m(i)).selectNumberingPlan(n,o);var a=e.slice(o.length),d=qm(a,t,i).nationalNumber,s=qm(e,t,i).nationalNumber;if(!Am(s,i.nationalNumberPattern())&&Am(d,i.nationalNumberPattern())||"TOO_LONG"===Nm(s,t,i))return{countryCallingCode:o,number:a}}return{number:e}}(e,t,n,r,i),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new $m(i);for(var u=2;u-1<=3&&u<=e.length;){var c=e.slice(1,u);if(i.hasCallingCode(c))return i.selectNumberingPlan(c),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:e.slice(u)};u++}return{}}var Hm=/(\$\d)/;function Wm(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix,o=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(Hm,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Lm,"]+"),"g")," ").trim()}(o):o}var Gm=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var Vm=function(e){return"([".concat(Dm,"]{1,").concat(e,"})")};function Km(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",i="[ \\t]*";return";ext="+Vm("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+Vm("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+Vm("9")+r)+"|"+("[- ]+"+Vm("6")+"#")+"|"+(i+"(?:,{2}|;)"+n+Vm("15")+r)+"|"+(i+"(?:,)+"+n+Vm("9")+r)}var Ym="["+Dm+"]{2}",Xm="[++]{0,1}(?:["+Lm+"]*["+Dm+"]){3,}["+Lm+Dm+"]*",Jm=new RegExp("^[++]{0,1}(?:["+Lm+"]*["+Dm+"]){1,2}$","i"),Zm=Xm+"(?:"+Km()+")?",Qm=new RegExp("^"+Ym+"$|^"+Zm+"$","i");var eg={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function tg(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},eg,n):eg,r=new $m(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,o=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?rg(i=ng(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(i=ng(a,null,"INTERNATIONAL",r,n),rg(i="+".concat(o," ").concat(i),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,r,i){var o=Sm(r,i.metadata);if(o===n){var a=ng(e,t,"NATIONAL",i);return"1"===n?n+" "+a:a}var d=function(e,t,n){var r=new $m(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Gm.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(d)return"".concat(d," ").concat(n," ").concat(ng(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,n.fromCountry,r);return rg(d,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function ng(e,t,n,r,i){var o,a,d=(o=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return Am(a,e.pattern())}));return d?Wm(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix}):e}function rg(e,t,n,r){return t?r(e,t,n):e}function ig(e){return(ig="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ag(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?og(Object(n),!0).forEach(function(t){dg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):og(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dg(e,t,n){return(t=lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sg(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lg(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lg(e){var t=function(e,t){if("object"!=ig(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ig(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ig(t)?t:t+""}var ug=function(){return sg(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(um(n)&&um(n.countries)){r=n;var i=t;if(!fg.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=zm(i,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");_m(r);var a=function(e,t){var n,r,i=new $m(t);cg(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=a.country,s=a.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Pm(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new $m(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Tm(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return e=this,t={v2:!0},n=this.getMetadata(),t=t||{},(n=new $m(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==jm(e,t,n.metadata):Am(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new $m(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return jm(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return tg(this,e,t?ag(ag({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),cg=function(e){return/^[A-Z]{2}$/.test(e)};var fg=/^\+\d+$/;function hg(e){return(hg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pg(e,t,n){return t=vg(t),function(e,t){if(t&&("object"==hg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gg()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}function mg(e){var t="function"==typeof Map?new Map:void 0;return mg=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(gg())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&$g(i,n.prototype),i}(e,arguments,vg(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),$g(n,e)},mg(e)}function gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gg=function(){return!!e})()}function $g(e,t){return($g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vg(e){return(vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yg=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=pg(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$g(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(mg(Error)),bg=new RegExp("(?:"+Km()+")$","i");var xg={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function wg(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_g(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cg(e){for(var t,n="",r=wg(e.split(""));!(t=r()).done;){n+=Sg(t.value,n)||""}return n}function Sg(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return xg[e]}(e)}var Eg="(["+Dm+"]|[\\-\\.\\(\\)]?)",Ng=new RegExp("^\\+"+Eg+"*["+Dm+"]"+Eg+"*$","g"),Tg=new RegExp("^("+("["+Dm+"]+((\\-)*["+Dm+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Dm+"])*")+"\\.?$","g"),Ag="tel:",Og=";phone-context=";function Ig(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(Og);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Ng.test(e)||Tg.test(e))}(i))throw new yg("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o,a=e.indexOf(Ag);o=a>=0?a+4:0;var d=e.indexOf(Og);n+=e.substring(o,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var kg=new RegExp("[++"+Dm+"]"),jg=new RegExp("[^"+Dm+"#]+$");function Rg(e,t,n){if(t=t||{},n=new $m(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new yg("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=Ig(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new yg("TOO_LONG");return}if(!1===t)return e;var r=e.search(kg);if(r<0)return;return e.slice(r).replace(jg,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&Qm.test(e)}(r))return function(e){return Jm.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(bg);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(bg),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,t.v2,t.extract),i=r.number,o=r.ext,a=r.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new yg("TOO_SHORT");throw new yg("NOT_A_NUMBER")}return{}}var d=function(e,t,n,r){var i,o=zm(Cg(e),void 0,t,n,r.metadata),a=o.countryCallingCodeSource,d=o.countryCallingCode,s=o.number;if(d)r.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),d=n||Sm(t,r.metadata)}if(!s)return{countryCallingCodeSource:a,countryCallingCode:d};var l=qm(Cg(s),i,r),u=l.nationalNumber,c=l.carrierCode,f=Bm(d,{nationalNumber:u,metadata:r});f&&(i=f,"001"===f||r.selectNumberingPlan(i));return{country:i,countryCallingCode:d,countryCallingCodeSource:a,nationalNumber:u,carrierCode:c}}(i,t.defaultCountry,t.defaultCallingCode,n),s=d.country,l=d.nationalNumber,u=d.countryCallingCode,c=d.countryCallingCodeSource,f=d.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new yg("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new yg("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new yg("TOO_LONG");return{}}if(t.v2){var h=new ug(u,l,n.metadata);return s&&(h.country=s),f&&(h.carrierCode=f),o&&(h.ext=o),h.__countryCallingCodeSource=c,h}var p=!!(t.extended?n.hasSelectedNumberingPlan():s)&&Am(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:u,carrierCode:f,valid:p,possible:!!p||!(!0!==t.extended||!n.possibleLengths()||!Tm(l,s,n)),phone:l,ext:o}:p?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,o):{}}function Pg(e){return(Pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(n),!0).forEach(function(t){Mg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Pg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Pg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ug(e){return(Ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Ug(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Ug(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ug(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,d=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(u){l=!0,i=u}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zg(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hg(e){var t,n,r,i=qg(Array.prototype.slice.call(e),4),o=i[0],a=i[1],d=i[2],s=i[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!um(a))throw new Error("Invalid second argument: ".concat(a));d?(n=a,r=d):r=a}else s?(n=d,r=s):(n=void 0,r=d),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fg(Object(n),!0).forEach(function(t){Bg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}function Wg(e){return(Wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gg(Object(n),!0).forEach(function(t){Kg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Wg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Wg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yg(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=Vg(Vg({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Rg(e,Lg(Lg({},t),{},{v2:!0}),n)}(e,t,n)}catch(r){if(!(r instanceof yg))throw r}}function Xg(e){return(Xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Zg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jg(Object(n),!0).forEach(function(t){Qg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Xg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Xg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e$(){var e=Hg(arguments),t=e.text,n=e.options,r=e.metadata,i=Yg(t,n=Zg(Zg({},n),{},{extract:!1}),r);return i&&i.isValid()||!1}function t$(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(dm),e.apply(this,n)}(e$,arguments)}const n$="55";function r$(e){return null==e?"":String(e).replace(/\D/g,"")}const i$=/^0?((?:800|300|500|900)\d{6,7})$/;function o$(e){const t=r$(e).match(i$);return t?t[1]:null}function a$(e){const t=r$(e);return 8===t.length?/^[2-5]/.test(t)?"landline":/^[6-9]/.test(t)?"mobile":"unknown":9===t.length&&t.startsWith("9")?"mobile":"unknown"}function d$(e){let t=r$(e);for(;t.startsWith("0")&&t.length>10;)t=t.slice(1);return!t.startsWith(n$)||12!==t.length&&13!==t.length||(t=t.slice(2)),t}const s$=["12","14","15","17","21","23","25","31","41","43"];function l$(e,t={}){const n=void 0===t.defaultDDD?"48":t.defaultDDD,r=t.legacyMobile??"all",i=r$(e),o=i.startsWith("0"),a=o$(i);if(a)return a;let d=d$(i);if(!d)return"";const s=o$(d);if(s)return s;if(d.length>13)return d;if(12===d.length||13===d.length){const e=d.slice(0,2);if(!o||!s$.includes(e))return d;d=d.slice(2)}const l=e=>"mobile"===a$(e)&&("all"===r||!e.startsWith("9"));if(11===d.length)return d;if(10===d.length){const e=d.slice(0,2),t=d.slice(2);return l(t)?`${e}9${t}`:d}if(9===d.length)return d.startsWith("9")&&n?`${n}${d}`:d;if(8===d.length){const e=a$(d);return n&&"unknown"!==e?l(d)?`${n}9${d}`:`${n}${d}`:d}return d}function u$(e){return l$(e)}function c$(e){if(!e)return"";const t=String(e);if(/[*#]/.test(t))return t;let n=r$(t);if(!n)return t;let r="";const i=t.trim().startsWith("+");if(n.startsWith(n$)&&(i||n.length>=12)&&n.length<=13&&(r="+55 ",n=n.slice(2)),n.length<=2)return`${r}${n}`;const o=n.match(/^(0?)((?:800|300|500|900))(\d{0,7})$/);if(o){const e=o[3],t=e.length<=3?e:`${e.slice(0,3)} ${e.slice(3)}`;return`${r}${o[1]}${o[2]}${t?` ${t}`:""}`}const a=n.slice(0,2),d=n.slice(2);return d.length<=4?`${r}(${a}) ${d}`:d.length<=8?`${r}(${a}) ${d.slice(0,4)}-${d.slice(4)}`:9===d.length?`${r}(${a}) ${d.slice(0,5)}-${d.slice(5)}`:`${r}${n}`}function f$(e){const t=(e??"").trim();if(t.startsWith("+")){const e=r$(t);return e?`+${e}`:null}const n=d$(t),r=o$(n);return r?`+${n$}${r}`:10!==n.length&&11!==n.length?null:`+${n$}${n}`}function h$(e){if(!e)return!1;try{return t$(e)}catch{return!1}}function p$(e){const t=f$(e);return!!t&&(t.startsWith(`+${n$}`)&&h$(t))}const m$="+55";function g$(e){if(!e)return"";const t=e.normalize("NFKC");let n="";for(const r of t)(/^[0-9*#]$/.test(r)||"+"===r&&0===n.length)&&(n+=r);return n}function $$(e,t=m$){const n=g$(e);if(!n)return"";const r=n.startsWith("+"),i=n.replace(/[^0-9]/g,""),o=t.replace(/[^0-9]/g,""),a=o.length||2,d=r?i.slice(0,Math.min(a,i.length)):o||i.slice(0,a);let s=r?i.slice(d.length):i;const l=r?`+${d}`:t,u="55"===d?s.match(/^(0?)((?:800|300|500|900))(\d{0,7})$/):null;if(u){const e=u[3],t=e.length<=3?e:`${e.slice(0,3)} ${e.slice(3)}`;return`${l} ${u[1]}${u[2]}${t?` ${t}`:""}`}if("55"===d&&s.length>=8){return`${l} (${s.slice(0,2)}) ${s.slice(2,Math.max(s.length-4,2))}-${s.slice(-4)}`.replace(/\s+/g," ").trim()}if(!s)return l.trim();const c=[];for(;s.length>4;)c.push(s.slice(0,3)),s=s.slice(3);s&&c.push(s);return`${l} ${c.join(" ")}`.replace(/\s+/g," ").trim()}function v$(e,t=m$){const n=g$(e).slice(0,32),r=$$(n,t),i=function(e,t=m$){const n=g$(e);if(!n)return null;if(n.startsWith("+")){const e=n.replace(/[^0-9]/g,"");return e?`+${e}`:null}const r=r$(n);if(!r)return null;const i=t.replace(/[^0-9]/g,"");if("55"!==i)return i?`+${i}${r}`:`+${r}`;const o=l$(r,{defaultDDD:null,legacyMobile:"unambiguous"});return o.length<10&&!o$(o)?null:`+55${o}`}(n,t),o=h$(i),a=i?$$(i,t):null,d=n.startsWith("+")?r$(n):`${t.replace(/[^0-9]/g,"")}${r$(n)}`;return{raw:n,display:r,e164:i,dialDisplay:a,isValid:o,differs:Boolean(i)&&r$(i??"")!==d}}const y$={fine:"(pointer: fine)",coarse:"(pointer: coarse)",hover:"(hover: hover)"};function b$(e){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(e).matches}catch{return null}}function x$(){const e=b$(y$.fine),t=b$(y$.coarse),n=b$(y$.hover),r=t?"coarse":e?"fine":"unknown";return{pointer:r,hover:!0===n,touchLike:"coarse"===r||"fine"!==r&&!1===n}}function w$(){const[e,n]=t.useState(()=>x$());return t.useEffect(()=>{if("undefined"==typeof window||"function"!=typeof window.matchMedia)return;const e=()=>n(x$()),t=[];for(const n of Object.values(y$))try{const r=window.matchMedia(n);"function"==typeof r.addEventListener?r.addEventListener("change",e):"function"==typeof r.addListener&&r.addListener(e),t.push(r)}catch{}return e(),()=>{for(const n of t)"function"==typeof n.removeEventListener?n.removeEventListener("change",e):"function"==typeof n.removeListener&&n.removeListener(e)}},[]),e}const _$="callix:click-to-call";function C$(e){if(!e)return"unknown";switch(e){case"idle":return"available";case"onBreak":return"on_break";case"afterCall":case"manualCallFailed":return"after_call";case"offline":case"stopped":case"startupError":case"startup.error":case"networkDown":return"offline";case"starting":return"unknown";case"callRinging":case"manualCallSetup":case"manualCallRinging":case"callInProgress":return"in_call";default:return/call|ringing|dial/i.test(e)?"in_call":"unknown"}}function S$(e){return"available"===e||"on_break"===e}function E$(e){const t=new AbortController,n=setTimeout(()=>t.abort(),1e4);return e&&(e.aborted?t.abort():e.addEventListener("abort",()=>t.abort(),{once:!0})),{signal:t.signal,clear:()=>clearTimeout(n)}}async function N$(e){const{signal:t,clear:n}=E$();try{const n=await fetch(`${e.apiBaseUrl}/api/click-to-call/${encodeURIComponent(e.taskId)}`,{method:"PATCH",headers:e.headers,body:JSON.stringify({status:e.status,error:e.error,retry:!0===e.retry}),credentials:"omit",keepalive:!0,signal:t});if(!n.ok){let e=null;try{const t=await n.json();e="string"==typeof(null==t?void 0:t.error)?t.error:null}catch{}return{ok:!1,status:n.status,code:e}}return{ok:!0,task:(await n.json()).task??null}}finally{n()}}function T$(e){const t=(e??"").replace(/\D/g,"");return!t.startsWith("55")||12!==t.length&&13!==t.length?e.startsWith("+")?`+${t}`:t:t.slice(2)}const A$={width:448,height:640},O$=280,I$=420,k$=1024,j$=[{value:"1",detail:""},{value:"2",detail:"ABC"},{value:"3",detail:"DEF"},{value:"4",detail:"GHI"},{value:"5",detail:"JKL"},{value:"6",detail:"MNO"},{value:"7",detail:"PQRS"},{value:"8",detail:"TUV"},{value:"9",detail:"WXYZ"},{value:"*",detail:""},{value:"0",detail:"+"},{value:"#",detail:""}],R$={rttMs:null,bitrateKbps:null,packetLossRatio:null},P$={jitterMs:null,packetLossRatio:null,audioLevel:null},D$="candidate-pair",L$="inbound-rtp";function M$({isAuthenticated:e,username:n,onLogin:r,onLogout:i,isLoadingSession:o,sessionError:a,sessionStatus:d=null,loginConfirmation:s=null,onCancelLoginConfirmation:l,variant:u="default",portalTarget:c=null}){const f=t.useRef(null),h=t.useRef(null),p=t.useRef({pointerId:null,offsetX:0,offsetY:0}),m=t.useRef({pointerId:null,originX:0,originY:0,startWidth:A$.width,startHeight:A$.height,edge:"corner"}),g=t.useRef(!1),[v,y]=t.useState({x:24,y:24}),[b,x]=t.useState(!1),[w,_]=t.useState(!1),[C,S]=t.useState(!1),[E,N]=t.useState(""),[T,A]=t.useState(null),[O,I]=t.useState({width:A$.width,height:A$.height}),k=t.useRef(e),j=t.useMemo(()=>g$(E),[E]),R="min"===u,P=t.useMemo(()=>{const e=O.width/A$.width,t=O.height/A$.height;return G$(Math.min(e,t),.55,2.5)},[O]),D=t.useCallback(e=>{if("undefined"==typeof window)return{width:G$(e.width,O$,k$),height:G$(e.height,I$,960)};const t=window.innerWidth,n=window.innerHeight,r=t<640?12:16,i=Math.min(k$,t-2*r),o=Math.min(960,n-2*r);return{width:G$(e.width,O$,Math.max(O$,i)),height:G$(e.height,I$,Math.max(I$,o))}},[]),L=t.useCallback(e=>{if("undefined"==typeof window)return e;const t=window.innerWidth,n=window.innerHeight,r=f.current,i=(null==r?void 0:r.offsetWidth)??0,o=(null==r?void 0:r.offsetHeight)??0,a=T??O??A$,d=C?a.width:80,s=C?a.height:80,l=i>0?i:d,u=o>0?o:s,c=t<640?12:16,h=c,p=c,m=Math.max(h,t-l-c),g=Math.max(p,n-u-c);let $=e.x,v=e.y;return t<640&&C&&($=Math.round((t-l)/2),v=c),n<u+2*c&&(v=c),{x:G$($,h,m),y:G$(v,p,g)}},[C,T,O]),M=t.useCallback(e=>{N(t=>g$("function"==typeof e?e(t):e))},[]);t.useEffect(()=>{var e,t;if("undefined"==typeof window)return;const n=(null==(e=f.current)?void 0:e.offsetWidth)??96,r=(null==(t=f.current)?void 0:t.offsetHeight)??96,i=window.innerWidth-n-24,o=window.innerHeight-r-24;y(L({x:i,y:o}))},[L]),t.useEffect(()=>{y(e=>L(e))},[C,L]),t.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{y(e=>L(e)),A(e=>e?D(e):e)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[L,D]),t.useEffect(()=>{if(!C)return;const e=h.current;if(!e)return;const t=(e,t)=>{I({width:e,height:t})};if("undefined"!=typeof ResizeObserver){const n=new ResizeObserver(e=>{const n=e[0];if(n){const{width:e,height:r}=n.contentRect;t(e,r)}});return n.observe(e),()=>n.disconnect()}const n=e.getBoundingClientRect();t(n.width,n.height)},[C,T]),t.useEffect(()=>{e&&!k.current&&S(!0),k.current=e},[e]),t.useEffect(()=>{const e=e=>{const t=e.detail;S(!0),(null==t?void 0:t.phone)&&M(T$(t.phone).slice(0,32))};return window.addEventListener(_$,e),()=>window.removeEventListener(_$,e)},[M]);const U=t.useRef(!1);t.useEffect(()=>{const t=!e&&Boolean(s||a);t&&!U.current&&S(!0),U.current=t},[e,s,a]),t.useEffect(()=>{if(!b)return;const e=e=>{var t,n;if(p.current.pointerId!==e.pointerId)return;g.current=!0;const r=(null==(t=f.current)?void 0:t.offsetWidth)??0,i=(null==(n=f.current)?void 0:n.offsetHeight)??0,o=e.clientX-p.current.offsetX,a=e.clientY-p.current.offsetY,d="undefined"!=typeof window?window.innerWidth:0,s=d<640?12:16,l=d-r-s,u=("undefined"!=typeof window?window.innerHeight:0)-i-s,c=Math.max(s,l),h=Math.max(s,u);y({x:G$(o,s,c),y:G$(a,s,h)})},t=e=>{p.current.pointerId===e.pointerId&&(x(!1),p.current={pointerId:null,offsetX:0,offsetY:0})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[b]),t.useEffect(()=>{if(!w)return;const e=e=>{if(m.current.pointerId!==e.pointerId)return;e.preventDefault();const{edge:t,startWidth:n,startHeight:r,originX:i,originY:o}=m.current;let a=n,d=r;"right"!==t&&"corner"!==t||(a=n+(e.clientX-i)),"bottom"!==t&&"corner"!==t||(d=r+(e.clientY-o));const s=D({width:a,height:d});A(e=>e&&e.width===s.width&&e.height===s.height?e:s)},t=e=>{var t,n;if(m.current.pointerId===e.pointerId){try{null==(n=null==(t=e.target)?void 0:t.releasePointerCapture)||n.call(t,e.pointerId)}catch{}_(!1),m.current={...m.current,pointerId:null}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[w,D]),t.useEffect(()=>{C||(g.current=!1)},[C]),t.useEffect(()=>{y(e=>L(e))},[T,O,L]);const F=t.useCallback(e=>t=>{var n,r;if(0!==t.button&&"touch"!==t.pointerType)return;t.preventDefault(),t.stopPropagation();const i=h.current,o=null==i?void 0:i.getBoundingClientRect(),a=(null==o?void 0:o.width)??(null==T?void 0:T.width)??A$.width,d=(null==o?void 0:o.height)??(null==T?void 0:T.height)??A$.height;m.current={pointerId:t.pointerId,originX:t.clientX,originY:t.clientY,startWidth:a,startHeight:d,edge:e};try{null==(r=(n=t.currentTarget).setPointerCapture)||r.call(n,t.pointerId)}catch{}_(!0)},[T]),B=t.useCallback(e=>{var t;if(0!==e.button)return;const n=null==(t=f.current)?void 0:t.getBoundingClientRect();p.current={pointerId:e.pointerId,offsetX:e.clientX-((null==n?void 0:n.left)??0),offsetY:e.clientY-((null==n?void 0:n.top)??0)},g.current=!1,x(!0)},[]),q=t.useCallback(()=>{g.current?g.current=!1:S(e=>!e)},[]),z=t.useCallback(async e=>{const t=e.trim();t&&await r(t)},[r]),H=e?$.jsx(F$,{username:n??"",dialValue:j,setDialValue:M,onLogout:i,variant:u,onRequestClose:()=>S(!1),portalTarget:c}):$.jsx(U$,{defaultValue:n??"",onSubmit:z,isLoading:o,error:a,statusMessage:d,confirmation:s,onCancelConfirmation:l});if(R)return H;const W=Number.isFinite(P)&&P>0?P:1,G=A$.width/W,V=A$.height/W,K={width:T?`${T.width}px`:void 0,height:T?`${T.height}px`:void 0,minWidth:"280px",minHeight:"420px",maxWidth:"min(1024px, calc(100vw - 1.5rem))",maxHeight:"calc(100vh - 3rem)"},Y={flex:1,display:"flex",flexDirection:"column",transform:`scale(${W})`,transformOrigin:"top left",width:`${G}px`,minHeight:`${V}px`},X={flex:1,display:"flex",flexDirection:"column",width:`${A$.width}px`,minHeight:`${A$.height}px`};return $.jsx("div",{ref:f,className:["callix","mode","full",Gh`fixed z-50 select-none`].join(" "),"data-callix-variant":"default",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0)`,top:0,left:0},children:C?$.jsxs("div",{ref:h,"data-floating-dialer-card":"true",className:Gh`relative flex flex-col items-start overflow-hidden rounded-3xl border border-slate-200/60 bg-gradient-to-br from-white/95 via-slate-50/95 to-white/90 shadow-2xl backdrop-blur-lg transition-all duration-300 w-[min(32rem,calc(100vw-1.5rem))] max-w-[calc(100vw-1.5rem)] sm:w-[28rem] md:w-[30rem] max-h-[calc(100vh-3rem)] sm:max-h-none`,style:K,children:[$.jsx("div",{className:Gh`flex flex-1 flex-col overflow-hidden`,style:Y,children:$.jsxs("div",{"data-floating-dialer-content":!0,className:Gh`flex flex-1 flex-col rounded-3xl overflow-hidden`,style:X,children:[$.jsxs("div",{className:Gh`cursor-grab touch-none active:cursor-grabbing flex items-center justify-between bg-gradient-to-r from-primary to-primaryDark px-4 py-3 text-white shadow-sm`,onPointerDown:B,children:[$.jsxs("div",{className:Gh`flex items-center gap-3`,children:[$.jsx("span",{className:Gh`inline-flex h-10 w-10 items-center justify-center rounded-2xl bg-white/15 shadow-inner`,children:$.jsx(jc,{className:Gh`text-xl`})}),$.jsxs("div",{className:Gh`space-y-0.5`,children:[$.jsx("p",{className:Gh`text-[11px] uppercase tracking-[0.2em] text-white/70`,children:"Discadora"}),$.jsx("p",{className:Gh`text-base font-semibold`,children:n??"Visitante"})]})]}),$.jsx("button",{type:"button",className:Gh`rounded-full p-2 text-white/80 transition hover:bg-white/15 hover:text-white`,onClick:()=>S(!1),"aria-label":"Fechar discadora",children:$.jsx(Wc,{className:Gh`text-lg`})})]}),$.jsx("div",{className:Gh`flex-1 overflow-y-auto p-3`,children:H})]})}),$.jsx("div",{role:"presentation","data-floating-dialer-resize":"right","aria-hidden":"true",className:Gh`absolute right-0 top-16 bottom-12 w-3 cursor-ew-resize touch-none rounded-md border border-transparent transition-colors duration-150 hover:border-primary/30 hover:bg-primary/10`,onPointerDown:F("right")}),$.jsx("div",{role:"presentation","data-floating-dialer-resize":"bottom","aria-hidden":"true",className:Gh`absolute left-16 right-12 bottom-0 h-3 cursor-ns-resize touch-none rounded-md border border-transparent transition-colors duration-150 hover:border-primary/30 hover:bg-primary/10`,onPointerDown:F("bottom")}),$.jsx("div",{role:"presentation","data-floating-dialer-resize":"corner",className:Gh`absolute bottom-1 right-1 flex h-6 w-6 items-center justify-center cursor-nwse-resize touch-none`,onPointerDown:F("corner"),"aria-label":"Redimensionar discadora",children:$.jsx("span",{className:Gh`h-3 w-3 rotate-45 rounded-sm border border-slate-300 bg-white/80 shadow`})})]}):$.jsx("button",{type:"button",onPointerDown:B,onClick:q,className:Gh`flex h-16 w-16 items-center justify-center rounded-full bg-primary text-white shadow-xl transition-transform hover:scale-105 hover:bg-primaryDark focus:outline-none focus:ring-4 focus:ring-primary/30`,"aria-label":"Abrir discadora",children:$.jsx(Dc,{className:Gh`text-2xl`})})})}function U$({defaultValue:e,onSubmit:n,isLoading:r,error:i,statusMessage:o,confirmation:a,onCancelConfirmation:d}){const[s,l]=t.useState(e),[u,c]=t.useState(!1);t.useEffect(()=>{l(e)},[e]);const f=u&&!s.trim();if(r){const e=((null==a?void 0:a.username)||s||"").trim();return $.jsxs("div",{className:Gh`flex flex-col items-center justify-center gap-3 rounded-2xl border border-slate-200 bg-white px-4 py-8 text-center`,role:"status","aria-live":"polite",children:[$.jsx("span",{className:Gh`inline-flex h-10 w-10 animate-spin rounded-full border-4 border-primary/20 border-t-primary`}),e&&$.jsx("p",{className:Gh`text-sm font-semibold text-slate-800`,children:e}),$.jsx("p",{className:Gh`text-xs text-slate-500`,children:o||"Conectando..."})]})}return a?$.jsxs("div",{className:Gh`space-y-4`,children:[$.jsxs("div",{className:Gh`space-y-2 text-center`,children:[$.jsx("p",{className:Gh`text-[11px] font-semibold uppercase tracking-wide text-slate-500`,children:"Entrar como"}),$.jsxs("p",{className:Gh`inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-sm font-semibold text-slate-800`,children:[$.jsx(Fc,{className:Gh`text-primary`}),a.username]})]}),i&&$.jsx("p",{className:Gh`text-center text-xs text-red-500`,children:i}),$.jsx("button",{type:"button",onClick:()=>{n(a.username)},className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-white shadow-lg transition hover:bg-primaryDark`,children:"Entrar"}),!a.locked&&d&&$.jsx("button",{type:"button",onClick:d,className:Gh`w-full text-center text-xs font-semibold text-slate-500 transition hover:text-primary`,children:"Usar outro usuário"}),$.jsx("p",{className:Gh`text-center text-[11px] text-slate-400`,children:"Se você já estiver conectado em outra aba, continue usando o discador por lá."})]}):$.jsxs("form",{className:Gh`space-y-4`,onSubmit:async e=>{e.preventDefault(),c(!0),s.trim()&&await n(s)},children:[$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsxs("label",{className:Gh`flex items-center gap-2 text-sm font-medium text-slate-700`,htmlFor:"dialer-username",children:[$.jsx(Fc,{className:Gh`text-base text-primary`}),"Usuario"]}),$.jsx("input",{id:"dialer-username",type:"text",placeholder:"Digite seu usuario Callix",className:Gh`w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-base shadow-inner focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40`,value:s,onChange:e=>l(e.target.value),onBlur:()=>c(!0),autoCapitalize:"none",autoCorrect:"off",spellCheck:!1}),f&&$.jsx("p",{className:Gh`text-xs text-red-500`,children:"Informe um usuario para continuar."}),i&&$.jsx("p",{className:Gh`text-xs text-red-500`,children:i})]}),$.jsx("button",{type:"submit",className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-white shadow-lg transition hover:bg-primaryDark`,children:"Entrar"})]})}function F$({username:e,dialValue:r,setDialValue:i,onLogout:o,variant:a,onRequestClose:d,portalTarget:s=null}){var l,u;const c="min"===a,{skipManualQualification:f}=Iy();console.log("[FloatingDialer/AuthenticatedDialer] 🔧 skipManualQualification:",f);const h=Yu(),p=Xu(),m=Zu(),g=Qu(),v=ec(),y=tc(),b=t.useMemo(()=>v??[],[v]),x=t.useMemo(()=>y??[],[y]),{makeManualCall:w,becomeAvailable:_,finishAfterCall:C}=Ju(),{hangup:S,answer:E,reject:N}=nc(),[T,A]=rc(),[O,I]=ic(),[k,j]=oc();t.useEffect(()=>{console.log("[FloatingDialer] Estado do operador mudou:",{state:null==p?void 0:p.state,operatorState:p,hasCall:!!m,currentCall:m})},[p,m]),t.useEffect(()=>{console.log("[FloatingDialer] Qualificações:",{success:b,discard:x,callState:null==p?void 0:p.state})},[b,x,null==p?void 0:p.state]),t.useEffect(()=>{"incoming"===(null==m?void 0:m.direction)&&console.log("[FloatingDialer] 📞 CHAMADA RECEBIDA:",{call:m,direction:m.direction,state:null==p?void 0:p.state,counterpart:z$(m)})},[m,null==p?void 0:p.state]);const[R,P]=t.useState(!1),D=t.useRef(null),L=t.useRef(null),M=t.useRef(null),U=t.useRef(null),[F,B]=t.useState(null),[q,z]=t.useState(null);ac("userSessionDropped",e=>{const t=Fp(null==e?void 0:e.originator);z(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`)});const[H,W]=t.useState(null),[G,V]=t.useState(!1),[K,Y]=t.useState("success"),[X,J]=t.useState(null),[Z,Q]=t.useState(0),[ee,te]=t.useState(0),[ne,re]=t.useState(R$),[ie,oe]=t.useState(P$),ae=t.useRef(null),de=t.useRef(!1),[se,le]=t.useState({inputs:[],outputs:[]}),[ue,ce]=t.useState(null),[fe,he]=t.useState(null),[pe,me]=t.useState(null),[ge,$e]=t.useState(!1),ve=t.useRef(null),[ye,be]=t.useState(null),[xe,we]=t.useState(!1),[_e,Ce]=t.useState(null),[Se,Ee]=t.useState("undefined"!=typeof window&&window.innerWidth<=640),Ne="mobile"===a,Te=w$(),Ae=Ne||Se&&Te.touchLike,Oe=om(null==h?void 0:h.breaks)||[],{goOnBreak:Ie,goOffBreak:ke}=am(),je=t.useMemo(()=>r.slice(0,32),[r]),Re=t.useMemo(()=>v$(je,m$),[je]),Pe=Re.e164,De=Re.display,Le=Re.differs?Re.dialDisplay:null,Me=null==p?void 0:p.state,Ue="idle"===Me,Fe="onBreak"===Me,Be="incoming"===(null==m?void 0:m.direction),qe="callInProgress"===Me,ze="manualCallRinging"===Me||"callRinging"===Me,He="manualCallSetup"===Me||ze,We=!Me||"starting"===Me||"idle"===Me||"manualCallSetup"===Me||"onBreak"===Me,Ge=We||qe||ze,Ve=Re.isValid,Ke=t.useCallback(async e=>{if("function"==typeof _)try{await Promise.resolve(_())}catch(t){console.error(e,t),z(e)}else z(e)},[_]);t.useEffect(()=>{if(de.current)return;de.current=!0;Me&&["onBreak","manualCallSetup","manualCallRinging","manualCallFailed","callRinging","callInProgress","afterCall"].includes(Me)||Ke("Nao foi possivel ficar disponivel automaticamente.")},[Ke,Me]),t.useEffect(()=>{"idle"===Me&&(z(null),B(null))},[Me]),t.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>Ee(window.innerWidth<=640);return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[]),t.useEffect(()=>{"offline"===Me&&(z("Conexao perdida. Tentando reconectar..."),Ke("Conexao perdida. Tentando reconectar..."))},[Me,Ke]),t.useEffect(()=>{if("afterCall"===Me){if("campaign"===(null==g?void 0:g.type)&&!0===g.info.campaign.skipCallQualification)return console.log("[FloatingDialer] 🚀 skipCallQualification ativado - finalizando automaticamente"),void("function"==typeof C&&Promise.resolve(C({result:"success",qualificationId:void 0})));if("manual"===(null==g?void 0:g.type))return console.log("[FloatingDialer] 🚀 Chamada MANUAL detectada - finalizando automaticamente (chamadas manuais NUNCA exibem qualificação)"),void("function"==typeof C&&Promise.resolve(C({result:"success",qualificationId:void 0})));if(0===b.length&&0===x.length)return console.log("[FloatingDialer] 🚀 Sem qualificações configuradas - finalizando automaticamente"),void("function"==typeof C&&Promise.resolve(C({result:"success",qualificationId:void 0})));const e=b.length>0;Y(e?"success":"failure"),J(null),W(null)}},[Me,b.length,x.length,g,C,f]),t.useEffect(()=>{if("undefined"==typeof window)return;if("starting"!==Me)return;const e=window.setTimeout(()=>{z(e=>e??"Conexao demorando mais que o esperado. Verifique rede ou credenciais.")},8e3);return()=>window.clearTimeout(e)},[Me]);const Ye=t.useRef(Pe);Ye.current=Pe,t.useEffect(()=>{if("manualCallRinging"===Me||"callInProgress"===Me){const e=Ye.current;e&&be(t=>t??e),i("")}"idle"===Me&&be(null)},[Me,i]),t.useEffect(()=>{var e;if("undefined"==typeof navigator||!(null==(e=navigator.mediaDevices)?void 0:e.enumerateDevices))return;let t=!1;const n=async()=>{try{navigator.mediaDevices.getUserMedia&&await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){console.warn("Permissao de microfone nao concedida ainda",e)}try{const e=await navigator.mediaDevices.enumerateDevices();if(t)return;const n=e.filter(e=>"audioinput"===e.kind),r=e.filter(e=>"audiooutput"===e.kind);le({inputs:n,outputs:r});const i=await Lp();if(t)return;me(i?`${i.title}: ${i.detail}${i.action?` ${i.action}`:""}`:null),ce(e=>{var t;return e??(null==(t=n[0])?void 0:t.deviceId)??null}),he(e=>{var t;return e??(null==(t=r[0])?void 0:t.deviceId)??null})}catch(e){t||(console.error("Listagem de dispositivos falhou",e),me("Nao foi possivel listar dispositivos de audio. Verifique as permissoes."))}};n();const r=()=>{n()},i=navigator.mediaDevices;return"addEventListener"in i?i.addEventListener("devicechange",r):"ondevicechange"in i&&(i.ondevicechange=r),()=>{t=!0,"removeEventListener"in i?i.removeEventListener("devicechange",r):"ondevicechange"in i&&(i.ondevicechange=null)}},[]),t.useEffect(()=>{if(!m||"callInProgress"!==Me)return Q(0),re(R$),void oe(P$);const e=Math.floor(m.currentDurationSeconds??0);Q(e),console.log("[FloatingDialer] ?? Timer iniciado:",{initialDuration:e,currentDurationSeconds:m.currentDurationSeconds,callState:Me});const t=window.setInterval(()=>{const e=Math.floor(m.currentDurationSeconds??0);Q(e),e%5==0&&e>0&&console.log("[FloatingDialer] ?? Timer atualizado:",e,"segundos")},1e3);return()=>{console.log("[FloatingDialer] ?? Timer parado"),window.clearInterval(t)}},[m,Me]),t.useEffect(()=>{if(!m||"callInProgress"!==Me)return;const e=e=>{const t=B$(e,"stat")??{},n="string"==typeof t.type?t.type:void 0;if(n===D$){const e=H$(t,"currentRoundTripTime"),n=H$(t,"availableOutgoingBitrate");re(t=>({rttMs:null!=e?1e3*e:t.rttMs,bitrateKbps:null!=n?n/1e3:t.bitrateKbps,packetLossRatio:t.packetLossRatio}))}if(n===L$){const e=H$(t,"packetsReceived")??0,n=H$(t,"packetsLost")??0,r=e+n,i=r>0?n/r:null,o=H$(t,"jitter"),a=H$(t,"audioLevel");oe(e=>({jitterMs:null!=o?1e3*o:e.jitterMs,packetLossRatio:i??e.packetLossRatio,audioLevel:a??e.audioLevel})),re(e=>({rttMs:e.rttMs,bitrateKbps:e.bitrateKbps,packetLossRatio:i??e.packetLossRatio}))}};return m.on("webRTCStat",e),()=>{m.off("webRTCStat",e)}},[m,Me]),t.useEffect(()=>{var e;if(!ue)return;if("undefined"==typeof navigator||!(null==(e=navigator.mediaDevices)?void 0:e.getUserMedia))return;let t=!1;return(async()=>{var e,n,r,i;const o=null==(n=null==(e=ve.current)?void 0:e.getAudioTracks)?void 0:n.call(e)[0],a=null==(r=null==o?void 0:o.getSettings)?void 0:r.call(o).deviceId;let d=ve.current;if(!d||a!==ue)try{const e=await navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:ue}}});if(t)return void e.getTracks().forEach(e=>e.stop());ve.current&&ve.current!==e&&ve.current.getTracks().forEach(e=>e.stop()),ve.current=e,d=e}catch(l){return void(t||(console.error("Falha ao acessar microfone selecionado",l),me("Nao foi possivel acessar o microfone selecionado.")))}if(!d)return;const s=d.getAudioTracks()[0];if(s)try{const e=q$(h,"setAudioInputDevice");if(e)return await Promise.resolve(e(ue)),void me(null);const t=function(e){const t=B$(e,"rtcSession")??B$(e,"_session")??B$(e,"session"),n=B$(t,"_connection")??B$(t,"connection");if(n)return n;return B$(e,"pc")??void 0}(m),n=null==(i=null==t?void 0:t.getSenders)?void 0:i.call(t).find(e=>{var t;return"audio"===(null==(t=e.track)?void 0:t.kind)});if(null==n?void 0:n.replaceTrack)return await n.replaceTrack(s),void me(null);const r=q$(m,"setInputTrack");if(r)return await Promise.resolve(r(s)),void me(null);const o=q$(m,"replaceTrack");if(o)return await Promise.resolve(o(s)),void me(null);console.warn("Nao foi possivel aplicar o microfone via API conhecida"),me(null)}catch(l){t||(console.error("Erro ao aplicar microfone",l),me("Nao foi possivel aplicar o microfone selecionado."))}})(),()=>{t=!0}},[ue,h,m]),t.useEffect(()=>{if(!fe||!h)return;(async()=>{try{const e=q$(B$(h,"audioOutput"),"setAudioOutputDevice");if(!e)return void console.warn("Nao foi possivel localizar API para alterar dispositivo de saida.");await Promise.resolve(e(fe)),me(null)}catch(e){console.error("Erro ao aplicar dispositivo de saida",e),me("Nao foi possivel aplicar a saida de audio selecionada.")}})()},[fe,h]),t.useEffect(()=>{if(!m)return;const e=e=>{const t=zp(null==e?void 0:e.failure);B(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`)};return m.on("failed",e),()=>{m.off("failed",e)}},[m]),t.useEffect(()=>()=>{const e=ae.current;e&&e.close().catch(()=>{})},[]),t.useEffect(()=>()=>{var e;null==(e=ve.current)||e.getTracks().forEach(e=>e.stop()),ve.current=null},[]);const Xe=t.useCallback(async()=>{if("undefined"==typeof window)return null;const e=window.AudioContext||window.webkitAudioContext;if(!e)return null;if(ae.current||(ae.current=new e),"suspended"===ae.current.state)try{await ae.current.resume()}catch(t){console.error("Falha ao retomar audio",t)}return ae.current},[]),Je=t.useCallback(async e=>{const t=W$[e];if(!t)return;const n=await Xe();if(!n)return;const r=n.createGain(),[i,o]=t,a=n.createOscillator(),d=n.createOscillator();a.type="sine",d.type="sine",a.frequency.setValueAtTime(i,n.currentTime),d.frequency.setValueAtTime(o,n.currentTime),r.gain.setValueAtTime(0,n.currentTime),r.gain.linearRampToValueAtTime(.22,n.currentTime+.01),r.gain.linearRampToValueAtTime(0,n.currentTime+.18),a.connect(r),d.connect(r),r.connect(n.destination);const s=n.currentTime,l=s+.2;a.start(s),d.start(s),a.stop(l),d.stop(l);const u=()=>{try{a.disconnect(),d.disconnect(),r.disconnect()}catch(e){console.error("Erro ao limpar tons DTMF",e)}};a.onended=u,d.onended=u},[Xe]),Ze=t.useCallback(e=>{if(Je(e),m&&(qe||ze)){try{m.sendDtmf(e)}catch(n){console.error("Falha ao enviar DTMF",n),B("Nao foi possivel enviar o tom DTMF.")}return}if(!We)return;if(B(null),!/^[0-9*#]$/.test(e))return void console.warn("[handleDial] Dígito inválido ignorado:",e);const t=ee;i(n=>{const r=n,i=(r.slice(0,t)+e+r.slice(t)).slice(0,32),o=Math.min(t+1,i.length);return te(o),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(o,o))},0),i})},[Je,m,qe,ze,We,ee,i]),Qe=t.useCallback(()=>{B(null),i(""),te(0),setTimeout(()=>{U.current&&U.current.focus()},0)},[i]),et=t.useCallback(()=>{B(null);const e=ee;0!==e&&i(t=>{const n=t.slice(0,e-1)+t.slice(e),r=e-1;return te(r),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(r,r))},0),n})},[i,ee]);t.useEffect(()=>{const e=e=>{const t=e.detail;(null==t?void 0:t.phone)&&(B(null),be(t.phone))};return window.addEventListener(_$,e),()=>window.removeEventListener(_$,e)},[]);const tt=t.useCallback(async()=>{if(!Ue&&!Fe)return;if(!je)return void B("Informe um numero para ligar.");const e=Pe;if(console.log("[handleCall] sanitizedDialValue:",je,"-> E.164:",e),e)if(h$(e)){console.log("[handleCall] 🚀 Ligando para:",e);try{B(null),be(e),w&&w(e)}catch(t){console.error("Erro ao iniciar chamada",t),B("Nao foi possivel iniciar a ligacao.")}}else B("Numero invalido. Informe o DDD e o numero (fixo com 8 ou celular com 9 digitos).");else B("Informe um numero para ligar.")},[Ue,Fe,je,Pe,w]),nt=t.useCallback(async e=>{if(Ie)try{Ce(null),await Ie(e),we(!1),console.log("[FloatingDialer] Entrou em pausa com sucesso:",e)}catch(t){console.error("[FloatingDialer] Erro ao entrar em pausa:",t),Ce(t instanceof Error?t.message:"N�o foi poss�vel entrar em pausa.")}},[Ie]),rt=t.useCallback(async()=>{if(ke)try{await ke(),console.log("[FloatingDialer] Saiu da pausa com sucesso")}catch(e){console.error("[FloatingDialer] Erro ao sair da pausa:",e),z("N�o foi poss�vel sair da pausa.")}},[ke]);t.useEffect(()=>{if(U.current&&je.length<ee){const e=je.length;te(e),U.current.setSelectionRange(e,e)}},[je,ee]),t.useEffect(()=>{if(c)return;if(!R)return;const e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;const t=e.key;if("Backspace"===t)return e.preventDefault(),void et();if("Delete"===t)return e.preventDefault(),void Qe();if("Enter"===t)return void(Ue&&(e.preventDefault(),tt()));const n="NumpadEnter"===t?null:t;if(n&&["0","1","2","3","4","5","6","7","8","9","#","*","+"].includes(n))return e.preventDefault(),void Ze(n);if(t.startsWith("Numpad")){const n=t.replace("Numpad","");if("Add"===n)return e.preventDefault(),void Ze("+");if("Multiply"===n)return e.preventDefault(),void Ze("*");/^[0-9]$/.test(n)&&(e.preventDefault(),Ze(n))}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[c,R,et,Qe,Ze,tt,Ue]);const it=t.useCallback(async()=>{if(S)try{await S()}catch(e){console.error("Erro ao encerrar chamada",e),B("Falha ao encerrar chamada.")}},[S]),ot=t.useCallback(async()=>{if(E)try{await E()}catch(e){console.error("Erro ao atender chamada",e),B("Nao foi possivel atender.")}},[E]),at=t.useCallback(async()=>{if(N)try{await N()}catch(e){console.error("Erro ao rejeitar chamada",e),B("Nao foi possivel rejeitar.")}},[N]),dt=t.useCallback(async()=>{if(("success"===K?b:x).length)if(X)if("function"==typeof C)try{V(!0),W(null),await Promise.resolve(C({result:K,qualificationId:X}))}catch(e){console.error("Erro ao finalizar pos-chamada",e),W("Falha ao finalizar atendimento. Tente novamente.")}finally{V(!1)}else W("Nao foi possivel enviar a qualificacao.");else W("Selecione uma qualificacao para finalizar.");else W("Nenhuma qualificacao configurada para este resultado.")},[K,x,C,X,b]),st=t.useCallback(()=>{P(!0)},[]),lt=t.useCallback(e=>{const t=e.relatedTarget;D.current&&t&&D.current.contains(t)||P(!1)},[]),ut=t.useCallback(e=>{e.preventDefault();const t=e.clipboardData.getData("text");if(!t)return;const n=u$(t);i(n),te(n.length),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(n.length,n.length))},0)},[i]),ct=t.useCallback(e=>{const t=e.target,n=g$(t.value).slice(0,32);B(null),i(n),te(Math.min(t.selectionStart??n.length,n.length))},[i]),ft=t.useCallback((e,t)=>{if(!t)return void e.preventDefault();const n=e.key;return"Enter"===n?(e.preventDefault(),void tt()):/^[0-9*#]$/.test(n)&&m&&(qe||ze)?(e.preventDefault(),void Ze(n)):void(/^[0-9*#+]$/.test(n)?Je(n):1!==n.length||e.ctrlKey||e.metaKey||e.altKey||e.preventDefault())},[tt,Ze,m,qe,ze,Je]),ht=t.useCallback(e=>{const t=e.target.value;ce(t||null)},[]),pt=t.useCallback(e=>{const t=e.target.value;he(t||null)},[]),mt=t.useCallback(e=>{const t=Number.isFinite(e)?e:0,n=Math.min(Math.max(t,0),1);j(Number((n*(("number"==typeof k?k:0)>1?100:1)).toFixed(2)))},[k,j]),gt=p&&"call"in p?p.call:void 0,$t=z$(m)??z$(gt),vt=Pe||ye,yt=(null==$t?void 0:$t.displayName)??(null==$t?void 0:$t.phoneNumber)??("campaign"===(null==g?void 0:g.type)?g.info.campaignContact.phoneNumber:void 0)??((qe||He)&&vt?vt:void 0),bt=function(e){switch(e){case"starting":return"Conectando";case"idle":return"Disponivel";case"manualCallSetup":return"Preparando";case"manualCallRinging":return"Chamando";case"callRinging":return"Recebida";case"callInProgress":return"Em chamada";case"afterCall":return"Finalizando";case"onBreak":return"Em pausa";case"offline":return"Offline";case"error":return"Erro";default:return"Aguardando"}}(Me),xt=De||je,wt=(null==(l=se.inputs.find(e=>e.deviceId===ue))?void 0:l.label)||"Microfone padrao",_t=(null==(u=se.outputs.find(e=>e.deviceId===fe))?void 0:u.label)||"Saida padrao",Ct="number"==typeof k?k:0,St=Ct>1?100:1,Et=Math.min(Math.max(Ct/St,0),1),Nt=Math.round(100*Et),Tt=O?zc:Et>.65?qc:Bc,At=T?Ac:Oc,Ot=function(e){switch(e){case"idle":return{Icon:_c,badgeClass:Gh`border-green-200 bg-green-50 text-green-700`,dotClass:Gh`bg-green-500`};case"callInProgress":case"manualCallSetup":case"manualCallRinging":case"callRinging":return{Icon:vc,badgeClass:Gh`border-primary/30 bg-primary/10 text-primary`,dotClass:Gh`bg-primary`};case"onBreak":return{Icon:kc,badgeClass:Gh`border-amber-200 bg-amber-50 text-amber-700`,dotClass:Gh`bg-amber-500`};case"offline":case"error":return{Icon:bc,badgeClass:Gh`border-rose-200 bg-rose-50 text-rose-700`,dotClass:Gh`bg-rose-500`};default:return{Icon:jc,badgeClass:Gh`border-slate-200 bg-slate-50 text-slate-600`,dotClass:Gh`bg-slate-500`}}}(Me);if("afterCall"===Me&&!c)return $.jsx(K$,{username:e,result:K,onChangeResult:Y,successQualifications:b,discardQualifications:x,selectedQualificationId:X,onSelectQualification:J,onSubmit:dt,isSubmitting:G,errorMessage:H,onLogout:o,isMobile:Ae,onClose:d});const It=s?Gh`absolute inset-0 z-50 flex items-center justify-center bg-black/50 p-4`:Gh`fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4`,kt=$.jsx("div",{className:It,children:$.jsxs("div",{className:Gh`bg-white rounded-2xl shadow-2xl max-w-md w-full p-6 space-y-4`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between`,children:[$.jsx("h3",{className:Gh`text-lg font-bold text-slate-800`,children:"Selecione uma Pausa"}),$.jsx("button",{type:"button",onClick:()=>{we(!1),Ce(null)},className:Gh`text-slate-400 hover:text-slate-600 transition`,children:$.jsx(Wc,{className:Gh`text-xl`})})]}),_e&&$.jsxs("div",{className:Gh`rounded-lg bg-red-50 border border-red-200 px-3 py-2 flex items-start gap-2`,children:[$.jsx(bc,{className:Gh`text-red-500 shrink-0 mt-0.5`}),$.jsx("p",{className:Gh`text-sm text-red-700`,children:_e})]}),Oe&&0!==Oe.length?$.jsx("div",{className:Gh`space-y-2 max-h-96 overflow-y-auto`,children:Oe.map(e=>$.jsxs("button",{type:"button",onClick:()=>nt(e.id),className:Gh`w-full flex items-center gap-3 rounded-lg border border-slate-200 bg-white px-4 py-3 text-left transition-all hover:border-amber-300 hover:bg-amber-50 hover:shadow-md`,children:[$.jsx(kc,{className:Gh`text-xl text-amber-600 shrink-0`}),$.jsxs("div",{className:Gh`flex-1 min-w-0`,children:[$.jsx("p",{className:Gh`font-semibold text-slate-800 truncate`,children:e.name}),$.jsxs("p",{className:Gh`text-xs text-slate-500`,children:["ID: ",e.id]})]})]},e.id))}):$.jsx("div",{className:Gh`text-center py-8`,children:$.jsx("p",{className:Gh`text-slate-500`,children:"Nenhuma pausa disponivel"})}),$.jsx("button",{type:"button",onClick:()=>{we(!1),Ce(null)},className:Gh`w-full rounded-lg border border-slate-200 bg-slate-50 px-4 py-2 text-sm font-semibold text-slate-600 transition hover:bg-slate-100`,children:"Cancelar"})]})}),jt=xe?s?n.createPortal(kt,s):kt:null,Rt=qe||He;if(Ae&&!c){const e=!q&&(Ge||Ue||Fe),t=xt||je||"Digite ou cole um numero";return $.jsxs("div",{ref:D,tabIndex:0,role:"application","aria-label":"Discador mobile",onFocusCapture:st,onBlurCapture:lt,className:Gh`callix mobile flex min-h-[calc(100vh-3rem)] w-full max-w-full flex-col gap-4 rounded-3xl border border-slate-200 bg-gradient-to-b from-white via-slate-50 to-white p-4 shadow-xl outline-none`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between gap-2`,children:[$.jsxs("button",{type:"button",onClick:()=>{d?d():Qe()},className:Gh`inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-3 py-2 text-sm font-semibold text-slate-700 shadow-sm transition hover:border-slate-300 hover:shadow-md`,children:[$.jsx(xc,{className:Gh`text-base`}),"Voltar"]}),$.jsxs("div",{className:Gh`${Ot.badgeClass} inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[11px] font-bold`,children:[$.jsx(Ot.Icon,{className:Gh`text-xs`}),$.jsx("span",{children:bt})]}),$.jsxs("button",{type:"button",onClick:Fe?rt:()=>we(!0),className:Gh`inline-flex items-center gap-1.5 rounded-full border ${Fe?"border-green-200 bg-green-50 text-green-700":"border-amber-200 bg-amber-50 text-amber-700"} px-3 py-2 text-sm font-semibold transition hover:shadow-md`,children:[Fe?$.jsx(_c,{className:Gh`text-sm`}):$.jsx(kc,{className:Gh`text-sm`}),Fe?"Voltar":"Pausa"]})]}),Rt?$.jsxs("div",{className:Gh`space-y-3`,children:[$.jsx(Y$,{statusLabel:bt,callTarget:yt,durationSeconds:Z}),$.jsx(rm,{})]}):$.jsxs("div",{className:Gh`space-y-2 rounded-2xl border border-slate-200 bg-white px-3 py-3 shadow-inner`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between`,children:[$.jsx("span",{className:Gh`text-[11px] font-semibold uppercase tracking-wide text-slate-500`,children:"Número"}),De&&$.jsx("span",{className:Gh`text-[11px] font-semibold text-primary`,children:De})]}),$.jsxs("div",{className:Gh`flex items-center gap-3`,children:[$.jsx("input",{ref:U,type:"text",inputMode:"tel",value:je,onChange:ct,onClick:e=>te(e.target.selectionStart||0),onKeyUp:e=>te(e.target.selectionStart||0),onSelect:e=>te(e.target.selectionStart||0),onKeyDown:t=>ft(t,e),onPaste:ut,disabled:!e,placeholder:"Digite ou cole um numero",className:Gh`flex-1 bg-transparent text-3xl font-bold text-slate-900 outline-none placeholder:text-slate-300 disabled:opacity-60`}),$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("button",{type:"button",onClick:et,disabled:!e,className:Gh`inline-flex h-10 w-10 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-700 shadow-sm transition hover:border-slate-300 hover:shadow-md disabled:opacity-40`,"aria-label":"Apagar último digito",children:$.jsx(Sc,{className:Gh`text-lg`})}),$.jsx("button",{type:"button",onClick:Qe,disabled:!e,className:Gh`inline-flex h-10 w-10 items-center justify-center rounded-full border border-rose-300 bg-rose-50 text-rose-600 shadow-sm transition hover:border-rose-400 hover:bg-rose-100 hover:shadow-md disabled:opacity-40`,"aria-label":"Limpar número",children:$.jsx(Wc,{className:Gh`text-lg`})})]})]}),$.jsx("p",{className:Gh`text-[11px] font-medium ${Le?"text-primary":"text-slate-500"}`,children:Le?`Será discado: ${Le}`:`Formatação automática: ${t}`})]}),$.jsx("div",{className:Gh`grid grid-cols-3 gap-2`,children:j$.map(t=>$.jsxs("button",{type:"button",onClick:()=>Ze(t.value),disabled:!e,className:Gh`flex h-14 flex-col items-center justify-center rounded-xl border border-slate-200 bg-white text-xl font-bold text-slate-900 shadow-sm transition active:scale-95 hover:border-slate-300 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-40`,children:[$.jsx("span",{children:t.value}),t.detail&&$.jsx("span",{className:Gh`text-[9px] font-semibold uppercase tracking-widest text-slate-400`,children:t.detail})]},t.value))}),$.jsxs("div",{className:Gh`grid grid-cols-3 gap-2`,children:[$.jsxs("button",{type:"button",onClick:()=>A(!T),className:Gh`${T?"border-rose-300 bg-rose-50 text-rose-700":"border-slate-200 bg-white text-slate-700"} flex items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm font-semibold shadow-sm transition hover:border-slate-300 hover:shadow-md`,children:[$.jsx(At,{className:Gh`text-base`}),T?"Mudo":"Áudio"]}),$.jsxs("button",{type:"button",onClick:()=>I(!O),className:Gh`${O?"border-amber-300 bg-amber-50 text-amber-700":"border-slate-200 bg-white text-slate-700"} flex items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm font-semibold shadow-sm transition hover:border-slate-300 hover:shadow-md`,children:[$.jsx(Tt,{className:Gh`text-base`}),O?"Saída off":`${Nt}%`]}),$.jsxs("button",{type:"button",onClick:Fe?rt:()=>we(!0),className:Gh`${Fe?"border-green-300 bg-green-50 text-green-700":"border-amber-300 bg-amber-50 text-amber-700"} flex items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm font-semibold shadow-sm transition hover:shadow-md`,children:[Fe?$.jsx(_c,{className:Gh`text-base`}):$.jsx(kc,{className:Gh`text-base`}),Fe?"Voltar":"Pausa"]})]}),$.jsxs("div",{className:Gh`flex flex-wrap items-center gap-2`,children:[Ue||Fe?$.jsxs("button",{type:"button",onClick:tt,disabled:!Ve,className:Gh`flex flex-1 min-w-[8rem] items-center justify-center gap-2 rounded-xl bg-green-500 px-4 py-3 text-base font-bold text-white shadow-lg transition hover:bg-green-600 hover:shadow-xl disabled:cursor-not-allowed disabled:opacity-60`,children:[$.jsx(Dc,{className:Gh`text-lg`}),"Ligar"]}):Be?$.jsxs($.Fragment,{children:[$.jsxs("button",{type:"button",onClick:at,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-xl bg-rose-500 px-4 py-3 text-sm font-bold text-white shadow-lg transition hover:bg-rose-600`,children:[$.jsx(Pc,{className:Gh`text-base`}),"Recusar"]}),$.jsxs("button",{type:"button",onClick:ot,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-xl bg-green-500 px-4 py-3 text-sm font-bold text-white shadow-lg transition hover:bg-green-600`,children:[$.jsx(Rc,{className:Gh`text-base`}),"Atender"]})]}):$.jsxs("button",{type:"button",onClick:it,className:Gh`flex flex-1 min-w-[8rem] items-center justify-center gap-2 rounded-xl bg-rose-500 px-4 py-3 text-base font-bold text-white shadow-lg transition hover:bg-rose-600 hover:shadow-xl`,children:[$.jsx(Pc,{className:Gh`text-lg`}),"Encerrar"]}),$.jsxs("button",{type:"button",onClick:o,className:Gh`inline-flex items-center justify-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-700 shadow-sm transition hover:border-red-400 hover:text-red-500`,children:[$.jsx(Tc,{className:Gh`text-base`}),"Sair"]})]}),(F||q||pe)&&$.jsxs("div",{className:Gh`space-y-1.5`,children:[F&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-rose-200 bg-rose-50 px-2.5 py-2 text-[11px] text-rose-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:F})]}),q&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-2.5 py-2 text-[11px] text-amber-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:q})]}),pe&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-sky-200 bg-sky-50 px-2.5 py-2 text-[11px] text-sky-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:pe})]})]}),jt]})}if(c){const e=qe||He,t=je.length>0,n=!e&&!t,r=!q&&(Ge||Ue||Fe);if(console.log("[FloatingDialer Mini] Estado:",{miniCanUseKeypad:r,callButtonDisabled:n,hasNumber:t,dialValue:je,isNumberValid:Ve,availabilityError:q,callState:Me,operatorState:null==p?void 0:p.state}),"afterCall"===Me){const e="success"===K?b:x,t=e.length>0;return console.log("[FloatingDialer Mini] ?? TELA DE QUALIFICA��O:",{callState:Me,afterCallResult:K,successQualifications:b.length,discardQualifications:x.length,hasOptions:t,selectedQualificationId:X}),$.jsx("div",{className:["callix","mode","min",Gh`flex w-full max-w-full flex-col gap-1 rounded-xl border border-slate-200 bg-white/95 p-1.5 shadow-sm text-slate-800 overflow-hidden`].join(" "),"data-callix-variant":"min",children:$.jsxs("div",{className:Gh`space-y-1 rounded-lg border border-slate-200 bg-slate-50 px-1.5 py-1 overflow-hidden`,children:[$.jsx("div",{className:Gh`text-center`,children:$.jsx("p",{className:Gh`text-[9px] font-semibold text-slate-700`,children:"Qualifique a chamada"})}),$.jsxs("div",{className:Gh`grid grid-cols-2 gap-0.5`,children:[$.jsx("button",{type:"button",onClick:()=>Y("success"),className:Gh`${"success"===K?"bg-green-500 text-white":"bg-white text-slate-600"} rounded border border-slate-200 px-1 py-0.5 text-[7px] font-semibold transition`,children:"✓ Concluído"}),$.jsx("button",{type:"button",onClick:()=>Y("failure"),className:Gh`${"failure"===K?"bg-rose-500 text-white":"bg-white text-slate-600"} rounded border border-slate-200 px-1 py-0.5 text-[7px] font-semibold transition`,children:"✗ Descartado"})]}),$.jsxs("div",{className:Gh`space-y-0.5`,children:[$.jsx("p",{className:Gh`text-[7px] font-medium text-slate-700 text-center`,children:"Selecione qualificação"}),t?$.jsx("div",{className:Gh`max-h-16 space-y-0.5 overflow-y-auto`,children:e.map(e=>{const t=X===e.id;return $.jsx("button",{type:"button",onClick:()=>J(e.id),className:Gh`${t?"bg-blue-100 border-blue-300 text-blue-800":"border-slate-200 bg-white text-slate-700"} w-full rounded border px-1 py-0.5 text-left transition`,children:$.jsx("p",{className:Gh`text-[7px] font-medium leading-tight truncate`,children:e.name})},e.id)})}):$.jsx("div",{className:Gh`rounded border border-amber-200 bg-amber-50 px-1 py-0.5 text-[7px] text-amber-700 text-center`,children:"Nenhuma qualificação"})]}),H&&$.jsx("p",{className:Gh`text-[7px] text-red-500 text-center`,children:H}),$.jsxs("button",{type:"button",onClick:dt,disabled:!t||!X||G,className:Gh`flex w-full items-center justify-center gap-1 rounded bg-blue-500 px-1.5 py-1 text-[7px] font-bold text-white transition hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-60`,children:[G&&$.jsx("span",{className:Gh`inline-flex h-2 w-2 animate-spin rounded-full border border-white/50 border-t-white`}),"Finalizar"]})]})})}return console.log("[FloatingDialer Mini] ?? Estado da Chamada:",{isCallActive:e,callState:Me,statusLabel:bt,isInCall:qe,isConnecting:He,isRinging:ze,callDurationSeconds:Z,callTarget:yt,statusVisualUsed:e?"GREEN (green)":"statusVisual",timerVisible:e&&Z>0}),$.jsxs("div",{className:["callix","mode","min",Gh`flex w-full max-w-full flex-col gap-3 rounded-2xl border border-slate-200 bg-white/95 p-3 shadow-sm text-slate-800`].join(" "),"data-callix-variant":"min",children:[$.jsx("input",{ref:M,type:"tel",inputMode:"tel",value:je,onChange:e=>i(e.target.value),onPaste:ut,className:Gh`sr-only`,tabIndex:-1,"aria-hidden":"true"}),$.jsxs("div",{className:Gh`flex items-center justify-between gap-2`,children:[$.jsxs("div",{className:Gh`${e?"border-green-200 bg-green-50 text-green-700":Ot.badgeClass} flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase leading-tight`,children:[$.jsx(Ot.Icon,{className:Gh`text-xs`}),$.jsx("span",{children:bt})]}),Fe?$.jsxs("button",{type:"button",onClick:()=>rt(),className:Gh`inline-flex items-center gap-1 rounded-full border border-green-400 bg-green-50 px-2.5 py-1 text-[10px] font-semibold text-green-700 transition hover:bg-green-100`,children:[$.jsx(_c,{className:Gh`text-xs`}),"Voltar"]}):$.jsxs("button",{type:"button",onClick:()=>we(!0),className:Gh`inline-flex items-center gap-1 rounded-full border border-amber-300 bg-amber-50 px-2.5 py-1 text-[10px] font-semibold text-amber-700 transition hover:bg-amber-100`,children:[$.jsx(kc,{className:Gh`text-xs`}),"Pausa"]})]}),e?$.jsx("div",{className:Gh`rounded-xl border border-green-200 bg-gradient-to-br from-green-50 to-white px-3 py-2`,children:$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("div",{className:Gh`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-green-500 ${Z>0?"animate-pulse":""}`,children:$.jsx(jc,{className:Gh`text-xs text-white`})}),$.jsxs("div",{className:Gh`flex min-w-0 flex-1 flex-col gap-0.5`,children:[$.jsx("span",{className:Gh`truncate font-mono text-sm font-bold text-slate-800`,children:(null==yt?void 0:yt.replace(/^\+55/,""))||"Conectando..."}),$.jsx("span",{className:Gh`text-[9px] font-medium uppercase tracking-wider text-green-600`,children:bt})]}),Z>0&&$.jsxs("div",{className:Gh`flex shrink-0 items-center gap-1 rounded-lg bg-green-500 px-2 py-1`,children:[$.jsx(Cc,{className:Gh`text-[10px] text-white`}),$.jsx("span",{className:Gh`tabular-nums text-xs font-bold text-white`,children:V$(Z)})]})]})}):$.jsxs("div",{className:Gh`space-y-1 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2`,children:[$.jsx("span",{className:Gh`text-[10px] font-semibold uppercase tracking-wide text-slate-500`,children:"Numero"}),$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("input",{ref:U,type:"text",inputMode:"tel",value:je,onChange:ct,onClick:e=>{te(e.target.selectionStart||0)},onKeyUp:e=>{te(e.target.selectionStart||0)},onSelect:e=>{te(e.target.selectionStart||0)},onKeyDown:e=>ft(e,r),onPaste:ut,disabled:!r,placeholder:"Digite ou cole um numero",className:Gh`flex-1 bg-transparent text-sm font-semibold text-slate-800 outline-none placeholder:text-slate-400 placeholder:text-xs placeholder:font-normal disabled:opacity-60 disabled:cursor-not-allowed`}),$.jsx("button",{type:"button",onClick:et,disabled:!r,className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-lg border border-slate-300 bg-white text-slate-600 transition hover:border-slate-400 hover:text-slate-800 disabled:opacity-40 disabled:cursor-not-allowed`,"aria-label":"Apagar ultimo digito",children:$.jsx(Sc,{className:Gh`text-base`})}),$.jsx("button",{type:"button",onClick:Qe,disabled:!r,className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-lg border border-rose-300 bg-rose-50 text-rose-600 transition hover:border-rose-400 hover:bg-rose-100 disabled:opacity-40 disabled:cursor-not-allowed`,"aria-label":"Limpar numero",children:$.jsx(Wc,{className:Gh`text-sm`})})]}),Le&&$.jsxs("p",{className:Gh`text-[10px] font-medium text-primary`,children:["Será discado: ",Le]})]}),$.jsx("div",{className:Gh`grid grid-cols-3 gap-2`,children:j$.map(e=>$.jsxs("button",{type:"button",onClick:()=>Ze(e.value),disabled:!r,className:Gh`flex h-12 flex-col items-center justify-center rounded-lg border border-slate-200 bg-white text-base font-semibold text-slate-800 shadow-sm transition active:scale-95 hover:border-slate-300 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-40`,children:[$.jsx("span",{children:e.value}),e.detail&&$.jsx("span",{className:Gh`text-[8px] font-semibold uppercase tracking-widest text-slate-400`,children:e.detail})]},e.value))}),$.jsxs("button",{type:"button",onClick:()=>{e?it():tt()},disabled:n,className:Gh`${e?"bg-rose-500 hover:bg-rose-600":"bg-green-500 hover:bg-green-600"} flex h-11 w-full items-center justify-center gap-2 rounded-xl text-sm font-bold text-white shadow-md transition disabled:cursor-not-allowed disabled:opacity-60`,children:[$.jsx(Dc,{className:Gh`text-base`}),e?"Encerrar":"Ligar"]}),(F||q||pe)&&$.jsxs("div",{className:Gh`rounded-lg border border-rose-200 bg-rose-50 px-2.5 py-2 text-[11px] text-rose-700`,children:[$.jsx(bc,{className:Gh`mr-1 inline text-xs`}),F||q||pe]}),jt]})}return $.jsxs("div",{ref:D,tabIndex:0,role:"application","aria-label":"Discador manual",onFocusCapture:st,onBlurCapture:lt,className:Gh`space-y-3 rounded-2xl outline-none`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between gap-2`,children:[$.jsxs("div",{className:Gh`flex items-center gap-2 min-w-0 flex-1`,children:[$.jsx("span",{className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10 text-primary shrink-0`,children:$.jsx(Fc,{className:Gh`text-sm`})}),$.jsxs("div",{className:Gh`min-w-0 flex-1`,children:[$.jsx("p",{className:Gh`text-sm font-bold text-slate-800 truncate`,children:e}),$.jsx("p",{className:Gh`text-[9px] uppercase tracking-wide text-slate-500 font-medium`,children:"Operador"})]})]}),$.jsxs("div",{className:Gh`flex items-center gap-2 shrink-0`,children:[Ue&&$.jsxs("button",{type:"button",onClick:()=>we(!0),className:Gh`inline-flex items-center gap-1 rounded-lg border border-amber-300 bg-amber-50 px-2 py-1 text-[10px] font-bold text-amber-700 transition-all hover:bg-amber-100 hover:shadow-sm`,"aria-label":"Entrar em pausa",children:[$.jsx(kc,{className:Gh`text-xs`}),$.jsx("span",{children:"Pausa"})]}),Fe&&$.jsxs("button",{type:"button",onClick:rt,className:Gh`inline-flex items-center gap-1 rounded-lg border border-green-300 bg-green-50 px-2 py-1 text-[10px] font-bold text-green-700 transition-all hover:bg-green-100 hover:shadow-sm`,"aria-label":"Sair da pausa",children:[$.jsx(_c,{className:Gh`text-xs`}),$.jsx("span",{children:"Voltar"})]}),$.jsxs("div",{className:Gh`${Ot.badgeClass} inline-flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[10px] font-bold ${qe?"animate-pulse":""}`,children:[$.jsx(Ot.Icon,{className:Gh`text-xs`}),$.jsx("span",{children:bt}),$.jsx("span",{className:Gh`${Ot.dotClass} inline-flex h-1.5 w-1.5 rounded-full`,"aria-hidden":!0})]})]})]}),Rt&&$.jsxs($.Fragment,{children:[$.jsx(Y$,{statusLabel:bt,callTarget:yt,durationSeconds:Z}),$.jsx(rm,{})]}),!Rt&&$.jsxs("div",{ref:L,className:Gh`${R?"ring-2 ring-primary/50 shadow-lg":"shadow-sm"} relative overflow-hidden rounded-xl border border-slate-200 bg-gradient-to-br from-white to-slate-50 px-4 py-3 transition-all hover:shadow-md`,onClick:()=>{var e;return null==(e=D.current)?void 0:e.focus()},children:[$.jsx("input",{ref:M,id:"dialer-number",type:"tel",inputMode:"tel",value:je,onChange:e=>i(e.target.value),onPaste:ut,className:Gh`sr-only`,tabIndex:-1,"aria-hidden":"true"}),$.jsxs("div",{className:Gh`flex items-center justify-between mb-2`,children:[$.jsxs("div",{className:Gh`flex items-center gap-1.5`,children:[$.jsx(Dc,{className:Gh`text-sm text-primary`}),$.jsx("span",{className:Gh`text-[10px] uppercase tracking-wider text-slate-500 font-semibold`,children:"N�mero"})]}),R&&$.jsxs("span",{className:Gh`inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[9px] font-semibold text-primary`,children:[$.jsx("span",{className:Gh`inline-block h-1.5 w-1.5 rounded-full bg-primary animate-pulse`}),"Ativo"]})]}),$.jsx("div",{className:Gh`min-h-[2.5rem] flex items-center`,children:$.jsx("p",{className:Gh`text-2xl font-semibold tabular-nums tracking-tight text-slate-800 flex-1 truncate`,children:xt||$.jsx("span",{className:Gh`text-slate-400 text-lg font-normal`,children:"Digite um n�mero"})})}),Le&&$.jsxs("p",{className:Gh`mt-1 text-[11px] font-medium text-primary`,children:["Será discado: ",Le]})]}),$.jsx("div",{className:Gh`grid grid-cols-3 gap-2`,children:j$.map(e=>$.jsxs("button",{type:"button",onClick:()=>Ze(e.value),disabled:!Ge,className:Gh`relative flex h-14 flex-col items-center justify-center rounded-lg border border-slate-200 bg-gradient-to-b from-white to-slate-50 text-lg font-bold text-slate-800 shadow-sm transition-all active:scale-95 hover:border-slate-300 hover:shadow-md outline-none disabled:cursor-not-allowed disabled:opacity-40`,children:[$.jsx("span",{children:e.value}),e.detail&&$.jsx("span",{className:Gh`text-[8px] font-semibold tracking-widest text-slate-400 uppercase`,children:e.detail})]},e.value))}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsxs("div",{className:Gh`flex flex-wrap items-center gap-2`,children:[Ue||Fe?$.jsxs("button",{type:"button",onClick:tt,disabled:!Ve,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-green-500 px-4 py-2.5 text-sm font-bold text-white shadow-lg transition-all hover:bg-green-600 hover:shadow-xl disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:shadow-lg`,children:[$.jsx(Dc,{className:Gh`text-base`}),"Ligar"]}):Be?$.jsxs($.Fragment,{children:[$.jsxs("button",{type:"button",onClick:at,className:Gh`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-rose-500 px-3 py-2 text-xs font-bold text-white shadow-md transition-all hover:bg-rose-600 hover:shadow-lg`,children:[$.jsx(Pc,{className:Gh`text-sm`}),"Recusar"]}),$.jsxs("button",{type:"button",onClick:ot,className:Gh`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-green-500 px-3 py-2 text-xs font-bold text-white shadow-md transition-all hover:bg-green-600 hover:shadow-lg`,children:[$.jsx(Rc,{className:Gh`text-sm`}),"Atender"]})]}):$.jsxs("button",{type:"button",onClick:it,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-rose-500 px-4 py-2.5 text-sm font-bold text-white shadow-lg transition-all hover:bg-rose-600 hover:shadow-xl`,children:[$.jsx(Pc,{className:Gh`text-base`}),"Encerrar"]}),$.jsxs("button",{type:"button",onClick:()=>A(!T),className:Gh`${T?"border-rose-300 bg-rose-50 text-rose-600":"border-slate-300 bg-white text-slate-700"} flex h-9 min-w-[4.5rem] flex-1 items-center justify-center gap-1 rounded-lg border px-2 py-1.5 text-[10px] font-bold transition-all hover:border-slate-400 hover:shadow-md disabled:cursor-not-allowed`,children:[$.jsx(At,{className:Gh`text-xs`}),T?"Mudo":"Mic"]}),$.jsxs("button",{type:"button",onClick:()=>I(!O),className:Gh`${O?"border-amber-300 bg-amber-50 text-amber-700":"border-slate-300 bg-white text-slate-700"} flex h-9 min-w-[4.5rem] flex-1 items-center justify-center gap-1 rounded-lg border px-2 py-1.5 text-[10px] font-bold transition-all hover:border-slate-400 hover:shadow-md`,children:[$.jsx(Tt,{className:Gh`text-xs`}),O?"Mudo":`${Nt}%`]}),$.jsx("button",{type:"button",onClick:et,className:Gh`flex h-9 w-9 items-center justify-center rounded-lg border border-slate-300 bg-white text-slate-700 transition-all hover:border-slate-400 hover:shadow-md`,"aria-label":"Apagar ultimo digito",children:$.jsx(Sc,{className:Gh`text-base`})}),$.jsx("button",{type:"button",onClick:Qe,className:Gh`flex h-9 w-9 items-center justify-center rounded-lg border border-rose-300 bg-rose-50 text-rose-700 font-bold text-xs transition-all hover:border-rose-400 hover:bg-rose-100 hover:shadow-md active:bg-rose-200`,"aria-label":"Limpar numero",children:"C"})]}),$.jsxs("div",{className:Gh`rounded-xl border border-slate-200 bg-white/80 p-3 shadow-sm`,children:[$.jsxs("div",{className:Gh`flex flex-wrap items-center justify-between gap-2`,children:[$.jsxs("div",{children:[$.jsx("p",{className:Gh`text-[10px] uppercase tracking-wide text-slate-500`,children:"Volume"}),$.jsxs("p",{className:Gh`text-sm font-semibold text-slate-800`,children:["Sa�da ",Nt,"%"]})]}),$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("button",{type:"button",onClick:()=>mt((k??0)-.05),className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 transition hover:border-primary/60 hover:text-primary`,"aria-label":"Diminuir volume",children:$.jsx(Ic,{className:Gh`text-sm`})}),$.jsx("input",{type:"range",min:0,max:1,step:.01,value:Number.isFinite(k)?k:0,onChange:e=>mt(parseFloat(e.target.value)),className:Gh`h-1 w-full max-w-full cursor-pointer appearance-none rounded-full bg-slate-200 accent-primary`,"aria-label":"Volume de saida"}),$.jsx("button",{type:"button",onClick:()=>mt((k??0)+.05),className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 transition hover:border-primary/60 hover:text-primary`,"aria-label":"Aumentar volume",children:$.jsx(Lc,{className:Gh`text-sm`})})]})]}),$.jsxs("div",{className:Gh`mt-2 flex flex-wrap items-center gap-2 text-xs text-slate-600`,children:[$.jsxs("div",{className:Gh`flex items-center gap-1.5`,children:[$.jsx(Oc,{className:Gh`text-sm text-primary`}),$.jsx("span",{className:Gh`truncate max-w-full`,children:wt})]}),$.jsxs("div",{className:Gh`flex items-center gap-1.5`,children:[$.jsx(Nc,{className:Gh`text-sm text-primary`}),$.jsx("span",{className:Gh`truncate max-w-full`,children:_t})]}),(se.inputs.length>0||se.outputs.length>0)&&$.jsxs("button",{type:"button",onClick:()=>$e(e=>!e),className:Gh`inline-flex items-center gap-1 rounded-md border border-slate-300 bg-white px-2 py-0.5 text-[9px] font-bold text-slate-700 transition-all hover:border-slate-400 hover:shadow-sm`,children:[$.jsx(Mc,{className:Gh`text-[10px]`}),ge?"Ocultar":"Config"]})]}),ge&&$.jsxs("div",{className:Gh`mt-3 grid gap-2`,children:[$.jsxs("label",{className:Gh`space-y-1 text-xs text-slate-700`,children:[$.jsxs("span",{className:Gh`flex items-center gap-1.5 font-semibold`,children:[$.jsx(Oc,{className:Gh`text-sm text-primary`}),"Entrada"]}),$.jsxs("select",{className:Gh`w-full rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs shadow-inner focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40`,value:ue??"",onChange:ht,children:[0===se.inputs.length&&$.jsx("option",{value:"",children:"Padr�o"}),se.inputs.map(e=>$.jsx("option",{value:e.deviceId,children:e.label||"Padr�o"},e.deviceId||e.label))]})]}),$.jsxs("label",{className:Gh`space-y-1 text-xs text-slate-700`,children:[$.jsxs("span",{className:Gh`flex items-center gap-1.5 font-semibold`,children:[$.jsx(Nc,{className:Gh`text-sm text-primary`}),"Sa�da"]}),$.jsxs("select",{className:Gh`w-full rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs shadow-inner focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40`,value:fe??"",onChange:pt,children:[0===se.outputs.length&&$.jsx("option",{value:"",children:"Padr�o"}),se.outputs.map(e=>$.jsx("option",{value:e.deviceId,children:e.label||"Padr�o"},e.deviceId||e.label))]})]})]})]})]}),(F||q||pe)&&$.jsxs("div",{className:Gh`space-y-1.5`,children:[F&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-rose-200 bg-rose-50 px-2.5 py-2 text-[11px] text-rose-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:F})]}),q&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-2.5 py-2 text-[11px] text-amber-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:q})]}),pe&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-sky-200 bg-sky-50 px-2.5 py-2 text-[11px] text-sky-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:pe})]})]}),jt,$.jsxs("button",{type:"button",onClick:o,className:Gh`flex w-full items-center justify-center gap-2 rounded-2xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-600 transition hover:border-red-400 hover:text-red-500`,children:[$.jsx(Tc,{className:Gh`text-base`}),"Sair"]})]})}function B$(e,t){const n=function(e){return e&&"object"==typeof e?e:null}(e);if(n&&t in n)return n[t]}function q$(e,t){const n=B$(e,t);return"function"==typeof n?n:void 0}function z$(e){const t=B$(e,"counterpart");return function(e){if(!e||"object"!=typeof e)return!1;const t=e,n=t.displayName,r=t.phoneNumber;return!(null!=n&&"string"!=typeof n||null!=r&&"string"!=typeof r)}(t)?t:null}function H$(e,t){const n=e[t];if("number"==typeof n&&Number.isFinite(n))return n;if("string"==typeof n){const e=Number(n);if(Number.isFinite(e))return e}return null}const W$={1:[1209,697],2:[1336,697],3:[1477,697],4:[1209,770],5:[1336,770],6:[1477,770],7:[1209,852],8:[1336,852],9:[1477,852],"*":[1209,941],0:[1336,941],"#":[1477,941]};function G$(e,t,n){return Number.isFinite(e)?n<t?t:Math.min(Math.max(e,t),n):t}function V$(e){const t=Math.max(0,Math.floor(e));return`${Math.floor(t/60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`}function K$({username:e,result:t,onChangeResult:n,successQualifications:r,discardQualifications:i,selectedQualificationId:o,onSelectQualification:a,onSubmit:d,isSubmitting:s,errorMessage:l,onLogout:u,isMobile:c=!1,onClose:f}){const h="success"===t?r:i,p=h.length>0;return $.jsxs("div",{className:Gh`${c?"min-h-[70vh] rounded-3xl border border-slate-200 bg-white p-4 shadow-xl":"space-y-5"}`,children:[$.jsxs("div",{className:Gh`mb-3 flex items-center justify-between`,children:[$.jsx("p",{className:Gh`text-xs uppercase tracking-wide text-slate-500`,children:"Logado como"}),f&&$.jsxs("button",{type:"button",onClick:f,className:Gh`inline-flex items-center gap-1 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-semibold text-slate-600 transition hover:border-slate-300`,children:[$.jsx(xc,{className:Gh`text-xs`}),"Voltar"]})]}),$.jsx("div",{className:Gh`${c?"space-y-3":"space-y-1"}`,children:$.jsx("p",{className:Gh`text-sm font-semibold text-slate-800`,children:e})}),$.jsxs("div",{className:Gh`space-y-4 rounded-2xl border border-slate-200 bg-slate-50 px-4 py-5 ${c?"shadow-inner":""}`,children:[$.jsxs("div",{children:[$.jsx("p",{className:Gh`text-sm font-semibold text-slate-700`,children:"Qualifique a chamada"}),$.jsx("p",{className:Gh`text-xs text-slate-500`,children:"Esta etapa e obrigatoria para registrar o desfecho do atendimento."})]}),$.jsxs("div",{className:Gh`${c?"grid grid-cols-1 gap-2":"grid grid-cols-2 gap-2"}`,children:[$.jsx("button",{type:"button",onClick:()=>n("success"),className:Gh`${"success"===t?"bg-green-500 text-white shadow-lg":"bg-white text-slate-600"} rounded-xl border border-slate-200 px-3 py-3 text-sm font-semibold transition hover:border-green-400`,children:"Atendimento concluido"}),$.jsx("button",{type:"button",onClick:()=>n("failure"),className:Gh`${"failure"===t?"bg-rose-500 text-white shadow-lg":"bg-white text-slate-600"} rounded-xl border border-slate-200 px-3 py-3 text-sm font-semibold transition hover:border-rose-400`,children:"Atendimento descartado"})]}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsx("p",{className:Gh`text-sm font-medium text-slate-700`,children:"Selecione uma qualificacao"}),p?$.jsx("div",{className:Gh`${c?"max-h-64":"max-h-52"} space-y-2 overflow-y-auto pr-1`,children:h.map(e=>{const t=o===e.id;return $.jsx("button",{type:"button",onClick:()=>a(e.id),className:Gh`${t?"ring-2 ring-primary bg-primary/5 border-primary":"border-slate-200 bg-white"} w-full rounded-xl border px-3 py-3 text-left text-sm font-semibold transition hover:border-primary`,children:$.jsx("p",{className:Gh`text-sm font-semibold text-slate-800`,children:e.name})},e.id)})}):$.jsx("div",{className:Gh`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700`,children:"Nenhuma qualificacao disponivel para este tipo de resultado."})]}),l&&$.jsx("p",{className:Gh`text-xs text-red-500`,children:l}),$.jsxs("button",{type:"button",onClick:d,disabled:!p||!o||s,className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-lg transition hover:bg-primaryDark disabled:cursor-not-allowed disabled:opacity-60`,children:[s&&$.jsx("span",{className:Gh`inline-flex h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white`}),"Finalizar atendimento"]})]}),$.jsxs("button",{type:"button",onClick:u,className:Gh`flex w-full items-center justify-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-semibold text-slate-600 transition hover:border-red-400 hover:text-red-500`,children:[$.jsx(Tc,{className:Gh`text-base`}),"Sair"]})]})}function Y$({statusLabel:e,callTarget:t,durationSeconds:n}){const r=n>0?V$(n):"00:00",i=(null==t?void 0:t.replace(/^\+55/,""))||"Conectando...";return $.jsx("div",{className:Gh`rounded-lg border border-green-200 bg-gradient-to-br from-green-50 to-white px-3 py-2`,children:$.jsxs("div",{className:Gh`flex items-center justify-between gap-3`,children:[$.jsxs("div",{className:Gh`flex items-center gap-2.5 min-w-0 flex-1`,children:[$.jsx("div",{className:Gh`flex items-center justify-center w-8 h-8 rounded-full bg-green-500 shrink-0 ${n>0?"animate-pulse":""}`,children:$.jsx(jc,{className:Gh`text-sm text-white`})}),$.jsxs("div",{className:Gh`flex flex-col gap-0.5 min-w-0 flex-1`,children:[$.jsx("span",{className:Gh`text-base font-bold text-slate-800 truncate font-mono`,children:i}),$.jsx("span",{className:Gh`text-[9px] font-medium text-green-600 uppercase tracking-wider`,children:e})]})]}),n>0&&$.jsxs("div",{className:Gh`flex items-center gap-1.5 bg-green-500 rounded-lg px-2.5 py-1.5 shrink-0`,children:[$.jsx(Cc,{className:Gh`text-xs text-white`}),$.jsx("span",{className:Gh`text-sm font-bold tabular-nums text-white`,children:r})]})]})})}const X$=/[0-9*#]/;function J$(e){return(e??"").replace(/[^0-9*#]/g,"")}function Z$(e,t){if(t<=0){const t=e.search(X$);return t<0?e.length:t}let n=0;for(let r=0;r<e.length;r++)if(X$.test(e[r])&&(n++,n===t))return r+1;return e.length}const Q$=t.forwardRef(function({value:e,onChange:n,onSubmit:r,onKeyDown:i,inputMode:o="tel",autoComplete:a="off",...d},s){const l=t.useRef(null),u=t.useRef(null),c=c$(e),f=t.useRef(c),h=t.useCallback(e=>{l.current=e,"function"==typeof s?s(e):s&&(s.current=e)},[s]);t.useLayoutEffect(()=>{f.current=c;const e=l.current,t=u.current;if(!e||null===t)return;if(u.current=null,"undefined"!=typeof document&&document.activeElement!==e)return;const n=Z$(c,t);try{e.setSelectionRange(n,n)}catch{}},[c]);const p=t.useCallback(e=>{var t;const r=e.target,i=r.value,o=r.selectionStart??i.length,a=f.current,d=J$(a),s=(null==(t=e.nativeEvent)?void 0:t.inputType)??"";let l=function(e){let t=0;for(const n of e)X$.test(n)&&t++;return t}(i.slice(0,o)),c=J$(i);if(c===d&&i.length<a.length&&("deleteContentForward"===s?l<c.length&&(c=c.slice(0,l)+c.slice(l+1)):l>0&&(c=c.slice(0,l-1)+c.slice(l),l-=1)),c===d){r.value=a;const e=Z$(a,l);try{r.setSelectionRange(e,e)}catch{}return}u.current=l,n(c)},[n]),m=t.useCallback(e=>{var t;const r=(null==(t=e.clipboardData)?void 0:t.getData("text"))??"";if(!r)return;e.preventDefault();const i=u$(r);i&&(u.current=i.length,n(i))},[n]),g=t.useCallback(e=>{null==i||i(e),e.defaultPrevented||"Enter"===e.key&&r&&(e.preventDefault(),r())},[i,r]);return $.jsx("input",{ref:h,type:"tel",inputMode:o,autoComplete:a,value:c,onChange:p,onPaste:m,onKeyDown:g,...d})});function ev(e,t="America/Sao_Paulo"){const n=function(e,t){const n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}),r={};for(const o of n.formatToParts(e))"literal"!==o.type&&(r[o.type]=o.value);const i="24"===r.hour?"00":r.hour;return{year:r.year,month:r.month,day:r.day,hour:i,minute:r.minute,second:r.second}}(e,t);return`${n.year}-${n.month}-${n.day}`}function tv(e,t,n=new Date){if(e===ev(n))return"Hoje";return e===ev(new Date(n.getTime()-864e5))?"Ontem":t}function nv(e){const t=r$(e.phoneNumber);return!t.startsWith("55")||12!==t.length&&13!==t.length?t:t.slice(2)}function rv(e){return(e??"").toString().normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function iv(e){const t=(e??"").trim();if(!t)return{kind:"empty",digits:"",text:""};const n=r$(t),r=t.replace(/[\d\s()+\-.]/g,"");return n.length>=3&&0===r.length?{kind:"phone",digits:n,text:rv(t)}:{kind:"text",digits:n,text:rv(t)}}function ov(e,t){if("empty"===t.kind)return!0;if("phone"===t.kind)return nv(e).includes(t.digits)||r$(e.phoneNumber).includes(t.digits)||void 0!==e.protocol&&String(e.protocol).includes(t.digits);const n=function(e){const t=[e.formattedPhone,nv(e),e.callTypeLabel,e.campaignName,e.contactLabel,e.qualificationName,e.failureCauseLabel,e.hangupCauseLabel,e.formattedDate,e.note,void 0!==e.protocol?String(e.protocol):void 0];if(e.fields)for(const n of Object.values(e.fields))null!=n&&t.push(String(n));return rv(t.filter(Boolean).join(" | "))}(e);return t.text.split(" ").filter(Boolean).every(e=>n.includes(e))}const av=1,dv=2,sv=3,lv={manual:"Chamadas manuais",campaign:"Chamadas de campanha"},uv={audio:"Áudios (zip)",data:"Dados (planilha)"},cv=e=>new Intl.DateTimeFormat("en-CA",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).format(e);function fv(e){const t=`${e.kind?lv[e.kind]:"Exportação"} · ${e.content?uv[e.content].toLowerCase():""}`.replace(/ · $/,"");return e.status===sv?`${t}: pronta${e.fileSize?` (${n=e.fileSize,!n||n<=0?"":n<1048576?`${Math.max(1,Math.round(n/1024))} KB`:`${(n/1024/1024).toFixed(1)} MB`})`:""}`:e.status===dv?`${t}: processando${e.progress?` ${e.progress}%`:""}`:e.status===av?`${t}: na fila do Callix`:`${t}: ${e.statusLabel}`;var n}async function hv(e,t){const n=await e.json().catch(()=>null);return"string"==typeof(null==n?void 0:n.error)&&n.error?n.error:t}async function pv(e,t,n){const r=await fetch(`${e}/api/call-exports/${encodeURIComponent(n)}/download`,{method:"GET",headers:t,credentials:"omit"}),i=await r.json().catch(()=>null);return r.ok&&(null==i?void 0:i.url)&&i.export?{state:"ready",url:i.url,filename:i.filename??null,fileSize:i.fileSize??null,export:i.export}:409===r.status&&(null==i?void 0:i.export)?i.export.status<=sv?{state:"pending",export:i.export}:{state:"failed",message:i.error??`Exportação ${i.export.statusLabel}`,export:i.export}:{state:"failed",message:(null==i?void 0:i.error)??`Não foi possível consultar a exportação (${r.status})`,export:null==i?void 0:i.export}}function mv({apiBaseUrl:e,getAuthHeaders:n,onClose:r,pollIntervalMs:i=5e3}){const[o]=t.useState(()=>function(e=new Date){return{from:cv(new Date(e.getTime()-2592e6)),to:cv(e)}}()),[a,d]=t.useState("manual"),[s,l]=t.useState("audio"),[u,c]=t.useState(o.from),[f,h]=t.useState(o.to),[p,m]=t.useState(!1),[g,v]=t.useState(null),[y,b]=t.useState(null),[x,w]=t.useState(null),[_,C]=t.useState([]),[S,E]=t.useState(null),N=t.useRef(!0);t.useEffect(()=>(N.current=!0,()=>{N.current=!1}),[]),t.useEffect(()=>{let t=!0;return async function(e,t){const n=await fetch(`${e}/api/call-exports`,{method:"GET",headers:t,credentials:"omit"});if(!n.ok)throw new Error(await hv(n,`Não foi possível listar as exportações (${n.status})`));return(await n.json()).items??[]}(e,n()).then(e=>{t&&C(e.slice(0,3))}).catch(()=>{}),()=>{t=!1}},[e,n]),t.useEffect(()=>{if(!y||"ready"===(null==x?void 0:x.state)||"failed"===(null==x?void 0:x.state))return;let t=null,r=!0;const o=async()=>{const a=await pv(e,n(),y.id);r&&(w(a),"pending"===a.state?(b(a.export),t=setTimeout(o,i)):"ready"===a.state&&(b(a.export),C(e=>[a.export,...e.filter(e=>e.id!==a.export.id)].slice(0,3))))};return o(),()=>{r=!1,t&&clearTimeout(t)}},[null==y?void 0:y.id,e,n,i]);const T=t.useCallback(async()=>{if(v(null),u&&f)if(f<u)v("O fim do período vem antes do início.");else{m(!0),w(null);try{const t=await async function(e,t,n){const r=await fetch(`${e}/api/call-exports`,{method:"POST",headers:{"Content-Type":"application/json",...t},credentials:"omit",body:JSON.stringify(n)});if(!r.ok)throw new Error(await hv(r,`Não foi possível pedir a exportação (${r.status})`));return(await r.json()).export}(e,n(),{kind:a,content:s,from:u,to:f});if(!N.current)return;b(t),C(e=>[t,...e.filter(e=>e.id!==t.id)].slice(0,3))}catch(t){N.current&&v(t instanceof Error?t.message:"Não foi possível pedir a exportação.")}finally{N.current&&m(!1)}}else v("Informe o período.")},[e,n,a,s,u,f]),A=t.useCallback(async t=>{E(t.id),v(null);try{const r=await pv(e,n(),t.id);if(!N.current)return;"ready"===r.state?window.open(r.url,"_blank","noopener,noreferrer"):v("pending"===r.state?fv(r.export):r.message)}finally{N.current&&E(null)}},[e,n]);return $.jsxs("div",{className:"export-panel",role:"region","aria-label":"Exportar histórico",children:[$.jsxs("div",{className:"export-panel-header",children:[$.jsx("span",{className:"export-panel-title",children:"Exportar histórico"}),$.jsx("button",{type:"button",className:"export-panel-close",onClick:r,"aria-label":"Fechar exportação",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})})]}),$.jsxs("div",{className:"export-panel-form",children:[$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"Tipo"}),$.jsx("select",{value:a,onChange:e=>d(e.target.value),"aria-label":"Tipo de chamada",children:Object.keys(lv).map(e=>$.jsx("option",{value:e,children:lv[e]},e))})]}),$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"Conteúdo"}),$.jsx("select",{value:s,onChange:e=>l(e.target.value),"aria-label":"Conteúdo",children:Object.keys(uv).map(e=>$.jsx("option",{value:e,children:uv[e]},e))})]}),$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"De"}),$.jsx("input",{type:"date",value:u,max:f,onChange:e=>c(e.target.value),"aria-label":"Início do período"})]}),$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"Até"}),$.jsx("input",{type:"date",value:f,min:u,onChange:e=>h(e.target.value),"aria-label":"Fim do período"})]}),$.jsx("button",{type:"button",className:"retry-btn export-panel-submit",onClick:()=>{T()},disabled:p,children:p?"Pedindo...":"Exportar"})]}),g&&$.jsx("div",{className:"export-panel-error",role:"alert",children:g}),y&&$.jsxs("div",{className:"export-panel-job",role:"status",children:[$.jsx("span",{children:"failed"===(null==x?void 0:x.state)?x.message:fv(y)}),"ready"===(null==x?void 0:x.state)&&$.jsxs("a",{className:"export-panel-link",href:x.url,target:"_blank",rel:"noopener noreferrer",children:[$.jsx("i",{className:"fas fa-download","aria-hidden":"true"})," Baixar ",x.filename??"arquivo"]})]}),_.length>0&&$.jsx("ul",{className:"export-panel-recent","aria-label":"Exportações recentes",children:_.map(e=>$.jsxs("li",{children:[$.jsx("span",{children:fv(e)}),e.status===sv&&$.jsx("button",{type:"button",className:"export-panel-recent-btn",onClick:()=>{A(e)},disabled:S===e.id,children:S===e.id?"...":"Baixar"})]},e.id))}),$.jsx("p",{className:"export-panel-hint",children:"O Callix prepara o arquivo em alguns minutos; o link de download vale por cerca de uma hora."})]})}function gv(){return $.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[$.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),$.jsx("polyline",{points:"7 7 17 7 17 17"})]})}function $v(){return $.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[$.jsx("line",{x1:"17",y1:"7",x2:"7",y2:"17"}),$.jsx("polyline",{points:"17 17 7 17 7 7"})]})}function vv({state:e,onRetry:n,autoPlay:r}){const i=t.useRef(null),o="ready"===(null==e?void 0:e.status)?e.url:void 0;return t.useEffect(()=>{const e=i.current;if(r&&o&&e&&"function"==typeof e.play)try{const t=e.play();t&&"function"==typeof t.catch&&t.catch(()=>{})}catch{}},[r,o]),e&&"loading"!==e.status?"error"===e.status?$.jsxs("div",{className:"history-player error",role:"alert",children:[$.jsx("i",{className:"fas fa-circle-exclamation","aria-hidden":"true"}),$.jsx("span",{children:e.error||"Erro ao carregar gravação"}),$.jsx("button",{type:"button",className:"retry-link",onClick:n,children:"Tentar novamente"})]}):$.jsx("div",{className:"history-player",children:$.jsx("audio",{ref:i,controls:!0,preload:"metadata",src:e.url,"aria-label":"Gravação da chamada"})}):$.jsxs("div",{className:"history-player loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando gravação..."})]})}function yv({item:e,dayLabel:t,isPlayerOpen:n,recording:r,onTogglePlayer:i,onRetryRecording:o,onOpenDetails:a,onCall:d,onWhatsApp:s}){const l=e.wasAnswered?"":"missed",u=e=>e.stopPropagation(),c=!(!(f=e.qualificationName)||"chamada sem qualificação"===f.trim().toLowerCase());var f;let h=null;return e.wasAnswered?"campaign"===e.callType?h=$.jsxs("span",{className:"history-item-sub campaign "+(c?"with-qualification":""),children:[$.jsx("span",{className:"history-campaign-name",title:e.campaignName,children:e.campaignName||"Campanha"}),c&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"history-meta-dot",children:"•"}),$.jsx("span",{className:"history-qualification",title:e.qualificationName,children:e.qualificationName})]})]}):c&&(h=$.jsx("span",{className:"history-item-sub",children:$.jsx("span",{className:"history-qualification",title:e.qualificationName,children:e.qualificationName})})):h=$.jsxs("span",{className:"history-item-sub failure",children:[$.jsx("i",{className:"fas fa-circle-exclamation","aria-hidden":"true"}),$.jsx("span",{children:e.failureCauseLabel||"Não completada"})]}),$.jsxs("div",{className:`history-item ${l} ${n?"expanded":""}`,"data-call-id":e.id,children:[$.jsxs("div",{className:"history-item-row",children:[$.jsx("div",{className:"history-arrow "+(e.wasAnswered?"answered":"missed"),children:"incoming"===e.callDirection?$.jsx($v,{}):$.jsx(gv,{})}),$.jsxs("button",{type:"button",className:"history-item-info",onClick:()=>a(e),title:"Ver detalhes da chamada",children:[$.jsx("span",{className:`history-item-number ${l} ${"campaign"===e.callType?"linked":""}`,children:e.formattedPhone}),$.jsxs("span",{className:"history-item-meta",children:[$.jsx("span",{className:`history-type-badge ${e.callType}`,children:e.callTypeLabel}),$.jsxs("span",{className:"history-item-datetime",children:[t," ",e.formattedTime]}),e.wasAnswered&&void 0!==e.duration&&$.jsx("span",{className:"history-item-duration",children:e.formattedDuration})]}),h]}),$.jsxs("div",{className:"history-actions",children:[e.hasAudio&&$.jsx("button",{type:"button",className:"history-action-btn play-btn "+(n?"active":""),onClick:t=>{u(t),i(e)},title:n?"Fechar gravação":"Ouvir gravação","aria-label":n?"Fechar gravação":"Ouvir gravação",children:$.jsx("i",{className:"fas "+(n?"fa-xmark":"fa-play"),"aria-hidden":"true"})}),$.jsx("button",{type:"button",className:"history-action-btn call-btn",onClick:t=>{u(t),d(e)},title:"Ligar","aria-label":"Ligar",children:$.jsx("i",{className:"fas fa-phone","aria-hidden":"true"})}),$.jsx("button",{type:"button",className:"history-action-btn whatsapp-btn",onClick:t=>{u(t),s(e)},title:"WhatsApp","aria-label":"WhatsApp",children:$.jsx("i",{className:"fab fa-whatsapp","aria-hidden":"true"})})]})]}),n&&e.hasAudio&&$.jsx(vv,{state:r,onRetry:()=>o(e),autoPlay:!0})]})}function bv({label:e,value:t,tone:n,wide:r}){return t?$.jsxs("div",{className:"details-row "+(r?"wide":""),children:[$.jsx("div",{className:"details-label",children:e}),$.jsx("div",{className:`details-value ${n??""}`,children:t})]}):null}function xv({item:e,dayLabel:n,apiBaseUrl:r,getAuthHeaders:i,recording:o,onLoadRecording:a,onClose:d,onCall:s,onWhatsApp:l}){const[u,c]=t.useState({status:"idle",form:null}),f=t.useRef(null),h="campaign"===e.callType;t.useEffect(()=>{var e;if("undefined"==typeof document)return;const t=document.activeElement;null==(e=f.current)||e.focus();const n=e=>{"Escape"===e.key&&(e.stopPropagation(),d())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n),t&&"function"==typeof t.focus&&document.contains(t)&&t.focus()}},[d]),t.useEffect(()=>{if(!h||!e.campaignContactId)return void c({status:"idle",form:null});let t=!1;return c({status:"loading",form:null}),Qp({source:"campaign",id:e.campaignContactId,campaignId:e.campaignId??null,signature:e.formSignature??null,expiresAt:e.formExpiresAt??null},{apiBaseUrl:r,headers:i(),retries:0}).then(e=>{t||c({status:"ready",form:e})}).catch(e=>{t||(console.warn("[CallHistoryList] Formulário da campanha indisponível, usando campos do histórico:",e),c({status:"error",form:null,error:e instanceof Error?e.message:"Erro ao carregar formulário"}))}),()=>{t=!0}},[r,i,h,e.campaignContactId,e.campaignId,e.id]);const p=t.useMemo(()=>Object.entries(e.fields??{}).filter(([e,t])=>null!=t&&""!==String(t).trim()&&!function(e){const t=e.trim().toLowerCase();return/(^|[\s_-])id$/.test(t)}(e)),[e.fields]),m=t.useMemo(()=>{const t=new Map;for(const[n,r]of Object.entries(e.fields??{}))null!=r&&""!==String(r).trim()&&t.set(nm(em(n)),String(r));return t},[e.fields]),g=e=>{if(e.value&&""!==e.value.trim())return e.value;return m.get(nm(em(e.label)))??m.get(nm(em(e.key)))??"-"},v="ready"===u.status&&u.form?u.form.rows&&u.form.rows.length>0?u.form.rows:u.form.fields.length>0?[u.form.fields]:[]:[],y=v.length>0;let b;b="loading"===u.status&&0===p.length?$.jsxs("div",{className:"details-loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando formulário..."})]}):y?v.map((e,t)=>$.jsx("div",{className:"details-form-row",children:e.map((e,n)=>$.jsxs("div",{className:"details-field",children:[$.jsx("div",{className:"details-field-label",title:e.label,children:e.label}),$.jsx("div",{className:"details-field-value",children:g(e)})]},`${t}-${n}-${e.key}`))},t)):p.length>0?$.jsxs($.Fragment,{children:["loading"===u.status&&$.jsxs("div",{className:"details-loading details-loading-inline",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Atualizando formulário..."})]}),$.jsx("div",{className:"details-form-row",children:p.map(([e,t])=>$.jsxs("div",{className:"details-field",children:[$.jsx("div",{className:"details-field-label",title:e,children:e}),$.jsx("div",{className:"details-field-value",children:t})]},e))})]}):$.jsxs("div",{className:"details-empty",children:[$.jsx("i",{className:"fas fa-user","aria-hidden":"true"}),$.jsx("span",{children:"error"===u.status?u.error||"Formulário indisponível":"Nenhum dado do cliente disponível"})]});let x=null;return e.hasAudio&&(x="ready"===(null==o?void 0:o.status)?$.jsx("audio",{controls:!0,preload:"metadata",src:o.url,"aria-label":"Gravação da chamada"}):"loading"===(null==o?void 0:o.status)?$.jsxs("div",{className:"details-loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando gravação..."})]}):"error"===(null==o?void 0:o.status)?$.jsxs("div",{className:"details-error",role:"alert",children:[$.jsx("i",{className:"fas fa-circle-exclamation","aria-hidden":"true"}),$.jsx("span",{children:o.error}),$.jsx("button",{type:"button",className:"retry-link",onClick:()=>a(e,!0),children:"Tentar novamente"})]}):$.jsxs("button",{type:"button",className:"details-play-btn",onClick:()=>a(e),children:[$.jsx("i",{className:"fas fa-play","aria-hidden":"true"}),$.jsx("span",{children:"Ouvir gravação"})]})),$.jsx("div",{className:"modal-overlay history-details-overlay active",onClick:d,role:"presentation",children:$.jsxs("div",{className:"modal-content history-details-sheet",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":`Detalhes da chamada para ${e.formattedPhone}`,children:[$.jsxs("div",{className:"modal-header",children:[$.jsxs("div",{className:"history-details-heading",children:[$.jsx("h2",{className:"modal-title",children:e.formattedPhone}),$.jsxs("div",{className:"history-details-subtitle",children:[$.jsx("span",{className:`history-type-badge ${e.callType}`,children:e.callTypeLabel}),$.jsxs("span",{children:[n," ",e.formattedTimeWithSeconds]})]})]}),$.jsx("button",{ref:f,type:"button",className:"modal-close",onClick:d,"aria-label":"Fechar",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})})]}),$.jsxs("div",{className:"history-details-body",children:[h&&$.jsxs("section",{className:"details-section",children:[$.jsx("div",{className:"details-section-title",children:"Campanha"}),$.jsx("div",{className:"details-campaign-name",children:e.campaignName||"-"}),e.contactLabel&&$.jsxs("div",{className:"details-contact-label",children:["Cliente: ",e.contactLabel]})]}),$.jsxs("section",{className:"details-section details-grid",children:[$.jsx(bv,{label:"Status",value:e.wasAnswered?"Completada":"Não completada",tone:e.wasAnswered?"success":"failure"}),$.jsx(bv,{label:"Duração",value:e.formattedDuration}),!e.wasAnswered&&$.jsx(bv,{label:"Motivo",value:e.failureCauseLabel||"Não informado",tone:"failure"}),e.wasAnswered&&$.jsx(bv,{label:"Quem desligou",value:e.hangupCauseLabel}),$.jsx(bv,{label:"Qualificação",value:e.qualificationName,wide:!0}),$.jsx(bv,{label:"Protocolo",value:e.protocol?String(e.protocol):void 0}),$.jsx(bv,{label:"Data",value:e.formattedDate}),$.jsx(bv,{label:"Observação",value:e.note,wide:!0})]}),e.hasAudio&&$.jsxs("section",{className:"details-section",children:[$.jsx("div",{className:"details-section-title",children:"Gravação"}),x]}),h&&$.jsxs("section",{className:"details-section",children:[$.jsx("div",{className:"details-section-title",children:"Formulário da campanha"}),b]})]}),$.jsxs("div",{className:"history-details-actions",children:[$.jsxs("button",{type:"button",className:"details-action-btn call",onClick:()=>s(e),children:[$.jsx("i",{className:"fas fa-phone","aria-hidden":"true"}),$.jsx("span",{children:"Ligar"})]}),$.jsxs("button",{type:"button",className:"details-action-btn whatsapp",onClick:()=>l(e),children:[$.jsx("i",{className:"fab fa-whatsapp","aria-hidden":"true"}),$.jsx("span",{children:"WhatsApp"})]})]})]})})}function wv({items:e,isLoading:n,error:r,onRefresh:i,onCall:o,onWhatsApp:a,apiBaseUrl:d,getAuthHeaders:s,query:l,onQueryChange:u,isSearching:c=!1,searchHint:f=null}){const[h,p]=t.useState(null),[m,g]=t.useState(null),[v,y]=t.useState(!1),b=function(e,n){const[i,o]=t.useState({}),a=t.useRef(i),d=t.useRef(new Map),s=t.useRef(new Set);t.useEffect(()=>{a.current=i},[i]);const l=t.useCallback(e=>{const t=d.current.get(e);t&&(URL.revokeObjectURL(t),d.current.delete(e))},[]);t.useEffect(()=>{const e=d.current;return()=>{e.forEach(e=>URL.revokeObjectURL(e)),e.clear()}},[]);const u=t.useCallback(e=>{s.current=e;const t=Object.keys(a.current).filter(t=>!e.has(t));0!==t.length&&(t.forEach(l),o(e=>{const n={...e};return t.forEach(e=>{delete n[e]}),n}))},[l]),c=t.useCallback(async(t,i=!1)=>{if(!t.audioPath)return;const u=a.current[t.id];if(i||!u||"loading"!==u.status&&"ready"!==u.status){s.current=new Set([...s.current,t.id]),l(t.id),o(e=>({...e,[t.id]:{status:"loading"}}));try{if(!t.audioSignature||!t.audioExpiresAt)throw new Error("Gravação indisponível. Atualize o histórico.");const r=new URLSearchParams({path:t.audioPath,exp:String(t.audioExpiresAt),sig:t.audioSignature}),i=`${e}/api/call-audio?${r.toString()}`,a=await fetch(i,{method:"GET",headers:n(),credentials:"omit"});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||`Erro ${a.status}`)}const u=await a.blob();if(!s.current.has(t.id))return void o(e=>{const n={...e};return delete n[t.id],n});l(t.id);const c=URL.createObjectURL(u);d.current.set(t.id,c),o(e=>({...e,[t.id]:{status:"ready",url:c}}))}catch(r){const n=r instanceof Error?r.message:"Erro ao carregar gravação";console.error("[CallHistoryList] Erro ao carregar gravação:",r),o(e=>({...e,[t.id]:{status:"error",error:n}}))}}},[e,n,l]);return t.useMemo(()=>({states:i,load:c,retain:u}),[i,c,u])}(d,s),{retain:x}=b,[w,_]=t.useState(l??""),C=t.useRef(l??""),S=t.useRef(null);t.useEffect(()=>{const e=l??"";e!==C.current&&(C.current=e,_(e))},[l]),t.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const E=t.useCallback(e=>{_(e),u&&(S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{C.current=e,u(e)},350))},[u]),N=t.useCallback(()=>{_(""),S.current&&clearTimeout(S.current),C.current="",null==u||u("")},[u]),T=t.useMemo(()=>iv(w),[w]),A=t.useMemo(()=>function(e,t){const n="string"==typeof t?iv(t):t;return"empty"===n.kind?e:e.filter(e=>ov(e,n))}(e,T),[e,T]),O="empty"!==T.kind,I=t.useMemo(()=>{const t=new Date,n={};for(const r of e)n[r.id]=tv(r.dateKey,r.formattedDate,t);return n},[e]),k=t.useMemo(()=>e.find(e=>e.id===m)??null,[e,m]);t.useEffect(()=>{const t=new Set(e.map(e=>e.id)),n=new Set;h&&t.has(h)&&n.add(h),m&&t.has(m)&&n.add(m),x(n)},[h,m,e,x]);const j=t.useCallback(e=>{h!==e.id?(p(e.id),b.load(e)):p(null)},[h,b]),R=t.useCallback(e=>{b.load(e,!0)},[b]),P=t.useCallback((e,t=!1)=>{b.load(e,t)},[b]),D=t.useCallback(e=>{p(null),g(e.id)},[]),L=t.useCallback(()=>g(null),[]);return $.jsxs($.Fragment,{children:[$.jsxs("div",{className:"history-header",children:[$.jsx("h1",{className:"header-title",children:"Recentes"}),$.jsxs("div",{className:"history-header-actions",children:[$.jsx("button",{type:"button",className:"history-refresh-btn history-export-btn "+(v?"active":""),onClick:()=>y(e=>!e),"aria-label":"Exportar histórico","aria-pressed":v,title:"Exportar áudios ou dados do período",children:$.jsx("i",{className:"fas fa-file-export","aria-hidden":"true"})}),$.jsx("button",{type:"button",className:"history-refresh-btn",onClick:i,disabled:n,"aria-label":"Atualizar histórico",children:$.jsx("i",{className:"fas fa-arrows-rotate "+(n?"fa-spin":""),"aria-hidden":"true"})})]})]}),v&&$.jsx(mv,{apiBaseUrl:d,getAuthHeaders:s,onClose:()=>y(!1)}),$.jsxs("div",{className:"history-search-bar",children:[$.jsxs("label",{className:"history-search",children:[$.jsx("i",{className:"fas fa-magnifying-glass history-search-icon","aria-hidden":"true"}),$.jsx("input",{type:"search",className:"history-search-input",placeholder:"Buscar número, campanha, cliente...","aria-label":"Buscar no histórico",autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:w,onChange:e=>E(e.target.value)}),c?$.jsx("i",{className:"fas fa-spinner fa-spin history-search-spinner","aria-hidden":"true",title:"Buscando..."}):w?$.jsx("button",{type:"button",className:"history-search-clear",onClick:N,"aria-label":"Limpar busca",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})}):null]}),O&&f&&$.jsx("div",{className:"history-search-hint",children:f})]}),$.jsx("div",{className:"call-history-list",id:"callHistoryList",children:n&&0===e.length?$.jsxs("div",{className:"history-loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando..."})]}):r?$.jsxs("div",{className:"history-error",role:"alert",children:[$.jsx("i",{className:"fas fa-exclamation-circle","aria-hidden":"true"}),$.jsx("span",{children:r}),$.jsx("button",{type:"button",className:"retry-btn",onClick:i,children:"Tentar novamente"})]}):0===e.length?$.jsxs("div",{className:"history-empty",children:[$.jsx("i",{className:"fas fa-phone-slash","aria-hidden":"true"}),$.jsx("span",{children:"Nenhuma ligação recente"})]}):0===A.length?$.jsxs("div",{className:"history-empty history-empty-search",children:[$.jsx("i",{className:"fas fa-magnifying-glass","aria-hidden":"true"}),$.jsxs("span",{children:["Nenhuma chamada encontrada para ",$.jsxs("strong",{children:["“",w.trim(),"”"]})]}),c&&$.jsx("span",{className:"history-search-status",children:"Buscando no servidor..."})]}):A.map(e=>$.jsx(yv,{item:e,dayLabel:I[e.id]??e.formattedDate,isPlayerOpen:h===e.id,recording:b.states[e.id],onTogglePlayer:j,onRetryRecording:R,onOpenDetails:D,onCall:o,onWhatsApp:a},e.id))}),k&&$.jsx(xv,{item:k,dayLabel:I[k.id]??k.formattedDate,apiBaseUrl:d,getAuthHeaders:s,recording:b.states[k.id],onLoadRecording:P,onClose:L,onCall:e=>{g(null),o(e)},onWhatsApp:a})]})}const _v={light:10,medium:20,heavy:30,selection:10,success:[10,30,10],warning:[20,30,20],error:[30,50,30,50,30]};const Cv={1:[697,1209],2:[697,1336],3:[697,1477],4:[770,1209],5:[770,1336],6:[770,1477],7:[852,1209],8:[852,1336],9:[852,1477],"*":[941,1209],0:[941,1336],"#":[941,1477]},Sv=120,Ev=.08,Nv=.01;let Tv=0,Av=0;const Ov=[],Iv=[],kv=new Set,jv={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console)};let Rv=!1;function Pv(e,t,n,r,i){const o={id:++Tv,timestamp:new Date,level:e,category:t,message:n,data:r,stack:i};for(Ov.push(o);Ov.length>1e3;)Ov.shift();return kv.forEach(e=>e()),o}function Dv(e){const t={id:++Av,timestamp:new Date,...e};for(Iv.push(t);Iv.length>200;)Iv.shift();return kv.forEach(e=>e()),t}function Lv(){if(Rv)return;Rv=!0;const e=(e,t)=>(...n)=>{var r;t(...n);const{category:i,isSIP:o}=function(e){const t=e[0];if("string"==typeof t){if(t.includes("[Callix Dialer]"))return{category:"Callix",isSIP:!1};if(t.includes("[MobileDialer]"))return{category:"MobileDialer",isSIP:!1};if(t.includes("[FloatingDialer]"))return{category:"FloatingDialer",isSIP:!1};if(t.includes("[InlineDialer]"))return{category:"InlineDialer",isSIP:!1};if(t.includes("[DraggableClientInfoModal]"))return{category:"ClientInfo",isSIP:!1};if(t.includes("[WhatsApp"))return{category:"WhatsApp",isSIP:!1};if(t.includes("[API"))return{category:"API",isSIP:!1};if(t.includes("SIP")||t.includes("sip:"))return{category:"SIP",isSIP:!0};if(t.includes("WebSocket"))return{category:"WebSocket",isSIP:!0};if(t.includes("WebRTC")||t.includes("RTC"))return{category:"WebRTC",isSIP:!0};if(t.includes("ICE"))return{category:"ICE",isSIP:!0};if(t.includes("SRTP")||t.includes("DTLS"))return{category:"Media",isSIP:!0};if(t.includes("SDK")||t.includes("sdk"))return{category:"SDK",isSIP:!1};if(t.includes("CallOperator"))return{category:"CallOperator",isSIP:!1};if(t.includes("useEffect")||t.includes("useState"))return{category:"React",isSIP:!1};if(t.includes("render")||t.includes("Render"))return{category:"React",isSIP:!1}}return{category:"General",isSIP:!1}}(n),{message:a,data:d}=function(e){if(0===e.length)return{message:""};const t=[];let n;for(let r=0;r<e.length;r++){const i=e[r];"string"==typeof i?t.push(i):"number"==typeof i||"boolean"==typeof i?t.push(String(i)):i instanceof Error?(t.push(`${i.name}: ${i.message}`),n={errorStack:i.stack}):void 0!==i&&(void 0===n?n=i:Array.isArray(n)?n.push(i):n=[n,i],t.push("object"==typeof i?"[Object]":String(i)))}return{message:t.join(" "),data:n}}(n);let s;"error"===e&&(s=null==(r=(new Error).stack)?void 0:r.split("\n").slice(2).join("\n")),Pv(o?"sip":e,i,a,d,s)};console.log=e("log",jv.log),console.info=e("info",jv.info),console.warn=e("warn",jv.warn),console.error=e("error",jv.error),console.debug=e("debug",jv.debug)}async function Mv(){const e={userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,onLine:navigator.onLine,screenWidth:screen.width,screenHeight:screen.height,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,touchSupport:"ontouchstart"in window||navigator.maxTouchPoints>0,mediaDevices:{audioInputs:0,audioOutputs:0,videoInputs:0},permissions:{}};try{const t=await navigator.mediaDevices.enumerateDevices();e.mediaDevices={audioInputs:t.filter(e=>"audioinput"===e.kind).length,audioOutputs:t.filter(e=>"audiooutput"===e.kind).length,videoInputs:t.filter(e=>"videoinput"===e.kind).length}}catch(r){Pv("warn","DeviceInfo","Failed to enumerate media devices",r)}try{if("permissions"in navigator){const t=await navigator.permissions.query({name:"microphone"});e.permissions.microphone=t.state;const n=await navigator.permissions.query({name:"notifications"});e.permissions.notifications=n.state}}catch(r){}const t=navigator.connection;t&&(e.connection={type:t.type,effectiveType:t.effectiveType,downlink:t.downlink,rtt:t.rtt});const n=performance;return n.memory&&(e.memory={jsHeapSizeLimit:n.memory.jsHeapSizeLimit,totalJSHeapSize:n.memory.totalJSHeapSize,usedJSHeapSize:n.memory.usedJSHeapSize}),e}async function Uv(){const e=await Mv(),t=[];if(t.push("═══════════════════════════════════════════════════════════════"),t.push(" CALLIX DIALER DEBUG LOG "),t.push("═══════════════════════════════════════════════════════════════"),t.push(`Exported: ${(new Date).toISOString()}`),t.push(""),t.push("┌─────────────────────────────────────────────────────────────┐"),t.push("│ DEVICE INFO │"),t.push("├─────────────────────────────────────────────────────────────┤"),t.push(`│ User Agent: ${e.userAgent.substring(0,50)}...`),t.push(`│ Platform: ${e.platform}`),t.push(`│ Language: ${e.language}`),t.push(`│ Online: ${e.onLine}`),t.push(`│ Screen: ${e.screenWidth}x${e.screenHeight}`),t.push(`│ Viewport: ${e.viewportWidth}x${e.viewportHeight}`),t.push(`│ Pixel Ratio: ${e.devicePixelRatio}`),t.push(`│ Touch Support: ${e.touchSupport}`),t.push(`│ Audio Inputs: ${e.mediaDevices.audioInputs}`),t.push(`│ Audio Outputs: ${e.mediaDevices.audioOutputs}`),t.push(`│ Microphone Permission: ${e.permissions.microphone||"unknown"}`),e.connection&&(t.push(`│ Connection Type: ${e.connection.effectiveType||e.connection.type||"unknown"}`),t.push(`│ RTT: ${e.connection.rtt??"unknown"}ms`)),e.memory){const n=Math.round((e.memory.usedJSHeapSize||0)/1024/1024),r=Math.round((e.memory.totalJSHeapSize||0)/1024/1024);t.push(`│ Memory: ${n}MB / ${r}MB`)}if(t.push("└─────────────────────────────────────────────────────────────┘"),t.push(""),t.push("┌─────────────────────────────────────────────────────────────┐"),t.push("│ NETWORK REQUESTS │"),t.push("├─────────────────────────────────────────────────────────────┤"),0===Iv.length)t.push("│ No network requests logged");else for(const r of Iv){const e=r.timestamp.toISOString().split("T")[1].split(".")[0],n=r.status?`${r.status}`:"FAIL",i=r.duration?`${r.duration}ms`:"-";t.push(`│ [${e}] ${r.method} ${n} (${i})`),t.push(`│ URL: ${r.url.substring(0,60)}${r.url.length>60?"...":""}`),r.error&&t.push(`│ ERROR: ${r.error}`)}t.push("└─────────────────────────────────────────────────────────────┘"),t.push(""),t.push("┌─────────────────────────────────────────────────────────────┐"),t.push("│ APPLICATION LOGS │"),t.push("├─────────────────────────────────────────────────────────────┤");const n={log:"📝",info:"ℹ️",warn:"⚠️",error:"❌",debug:"🔍",network:"🌐",event:"⚡",state:"📊",sip:"📞"};for(const r of Ov){const e=r.timestamp.toISOString().split("T")[1].split(".")[0],i=n[r.level]||"•",o=r.level.toUpperCase().padEnd(7),a=`[${r.category}]`.padEnd(20);if(t.push(`│ ${e} ${i} ${o} ${a}`),t.push(`│ ${r.message.substring(0,70)}${r.message.length>70?"...":""}`),r.data)try{const e=JSON.stringify(r.data,null,2).split("\n");for(const n of e.slice(0,10))t.push(`│ ${n}`);e.length>10&&t.push(`│ ... (${e.length-10} more lines)`)}catch{t.push("│ [Data could not be serialized]")}if(r.stack){const e=r.stack.split("\n").slice(0,5);for(const n of e)t.push(`│ ${n.trim()}`)}t.push("│")}return t.push("└─────────────────────────────────────────────────────────────┘"),t.push(""),t.push(`Total Logs: ${Ov.length}`),t.push(`Total Network Requests: ${Iv.length}`),t.push("═══════════════════════════════════════════════════════════════"),t.join("\n")}function Fv(){const[e,n]=t.useState([]),[r,i]=t.useState([]),[o,a]=t.useState(0),d=t.useRef(!1);t.useEffect(()=>{if(d.current)return;d.current=!0,Lv(),function(){if("undefined"==typeof window)return;const e=window.fetch;window.fetch=async(t,n)=>{const r=Date.now(),i="string"==typeof t?t:t instanceof URL?t.toString():t.url,o=(null==n?void 0:n.method)||"GET",a={};let d;(null==n?void 0:n.headers)&&new Headers(n.headers).forEach((e,t)=>{t.toLowerCase().includes("auth")||t.toLowerCase().includes("token")?a[t]=e.substring(0,20)+"...":a[t]=e}),(null==n?void 0:n.body)&&(d="string"==typeof n.body?n.body.substring(0,500):n.body instanceof FormData?"[FormData]":"[Binary/Stream]");try{const s=await e(t,n),l=Date.now()-r,u=s.clone();let c;try{const e=s.headers.get("content-type")||"";if(e.includes("application/json")){const e=await u.json();c=JSON.stringify(e).substring(0,1e3)}else c=e.includes("text")?(await u.text()).substring(0,500):`[${e||"unknown content-type"}]`}catch{c="[Could not read response body]"}const f={};return s.headers.forEach((e,t)=>{f[t]=e}),Dv({method:o,url:i,status:s.status,duration:l,requestHeaders:a,responseHeaders:f,requestBody:d,responseBody:c}),Pv("network","Network",`${s.ok?"✅":"❌"} ${o} ${i} - ${s.status} (${l}ms)`,{status:s.status,duration:l}),s}catch(s){const e=Date.now()-r,t=s instanceof Error?s.message:String(s);throw Dv({method:o,url:i,duration:e,requestHeaders:a,requestBody:d,error:t}),Pv("network","Network",`❌ ${o} ${i} - FAILED: ${t}`,{error:t,duration:e}),s}}}();const e=function(){if("undefined"==typeof window)return()=>{};const e=e=>{var t;Pv("error","GlobalError",`Uncaught: ${e.message}`,{filename:e.filename,lineno:e.lineno,colno:e.colno},null==(t=e.error)?void 0:t.stack)},t=e=>{const t=e.reason;Pv("error","UnhandledRejection",`Unhandled Promise Rejection: ${t instanceof Error?t.message:String(t)}`,{reason:t instanceof Error?{name:t.name,message:t.message}:t},t instanceof Error?t.stack:void 0)};return window.addEventListener("error",e),window.addEventListener("unhandledrejection",t),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",t)}}();return Pv("info","DebugLogger","🚀 Debug Logger initialized",{timestamp:(new Date).toISOString(),version:"1.0.0"}),()=>{e()}},[]),t.useEffect(()=>{const e=()=>{a(e=>e+1)};return kv.add(e),()=>{kv.delete(e)}},[]),t.useEffect(()=>{n([...Ov]),i([...Iv])},[o]);return{logs:e,networkLogs:r,clear:t.useCallback(()=>{Ov.length=0,Iv.length=0,kv.forEach(e=>e())},[]),exportText:t.useCallback(async()=>Uv(),[]),copyToClipboard:t.useCallback(async()=>{const e=await Uv();try{return await navigator.clipboard.writeText(e),Pv("info","DebugLogger","📋 Logs copied to clipboard"),!0}catch(t){return Pv("error","DebugLogger","Failed to copy logs to clipboard",t),!1}},[]),addLog:t.useCallback((e,t,n,r)=>{Pv(e,t,n,r)},[]),collectDeviceInfo:Mv}}const Bv={container:{position:"fixed",inset:0,zIndex:99999,display:"flex",flexDirection:"column",backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:"12px",overflow:"hidden"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",backgroundColor:"#1e293b",borderBottom:"1px solid #334155",flexShrink:0},headerTitle:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:700},headerActions:{display:"flex",alignItems:"center",gap:"8px"},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"8px 12px",borderRadius:"6px",border:"none",fontSize:"11px",fontWeight:600,cursor:"pointer",transition:"all 0.2s"},primaryButton:{backgroundColor:"#3b82f6",color:"#fff"},dangerButton:{backgroundColor:"#dc2626",color:"#fff"},successButton:{backgroundColor:"#16a34a",color:"#fff"},tabs:{display:"flex",backgroundColor:"#1e293b",borderBottom:"1px solid #334155",padding:"0 16px",flexShrink:0,overflowX:"auto"},tab:{padding:"10px 16px",fontSize:"11px",fontWeight:600,cursor:"pointer",borderBottom:"2px solid transparent",color:"#94a3b8",whiteSpace:"nowrap",transition:"all 0.2s"},tabActive:{color:"#3b82f6",borderBottomColor:"#3b82f6"},filters:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",backgroundColor:"#1e293b",borderBottom:"1px solid #334155",flexWrap:"wrap",flexShrink:0},filterChip:{padding:"4px 10px",borderRadius:"12px",fontSize:"10px",fontWeight:600,cursor:"pointer",transition:"all 0.2s"},content:{flex:1,overflow:"auto",padding:"8px"},logEntry:{display:"flex",alignItems:"flex-start",padding:"6px 8px",borderRadius:"4px",marginBottom:"2px",fontSize:"11px",lineHeight:1.4},logTime:{flexShrink:0,width:"75px",color:"#64748b",fontSize:"10px"},logLevel:{flexShrink:0,width:"55px",fontWeight:700,fontSize:"9px",textTransform:"uppercase"},logCategory:{flexShrink:0,width:"100px",color:"#8b5cf6",fontSize:"10px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},logMessage:{flex:1,wordBreak:"break-word",whiteSpace:"pre-wrap"},logData:{marginTop:"4px",padding:"6px",backgroundColor:"#0f172a",borderRadius:"4px",fontSize:"10px",whiteSpace:"pre-wrap",overflow:"auto",maxHeight:"200px"},deviceInfoGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"12px",padding:"16px"},deviceInfoCard:{backgroundColor:"#1e293b",borderRadius:"8px",padding:"12px",border:"1px solid #334155"},deviceInfoTitle:{fontSize:"11px",fontWeight:700,color:"#3b82f6",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},deviceInfoRow:{display:"flex",justifyContent:"space-between",padding:"4px 0",borderBottom:"1px solid #334155",fontSize:"11px"},deviceInfoLabel:{color:"#94a3b8"},deviceInfoValue:{color:"#e2e8f0",fontWeight:600},networkEntry:{backgroundColor:"#1e293b",borderRadius:"6px",marginBottom:"8px",overflow:"hidden"},networkHeader:{display:"flex",alignItems:"center",gap:"12px",padding:"10px 12px",cursor:"pointer",transition:"background-color 0.2s"},networkMethod:{padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:700},networkUrl:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"11px"},networkStatus:{fontWeight:700,fontSize:"11px"},networkDetails:{padding:"12px",backgroundColor:"#0f172a",borderTop:"1px solid #334155",fontSize:"10px"},stats:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))",gap:"12px",padding:"16px"},statCard:{backgroundColor:"#1e293b",borderRadius:"8px",padding:"16px",textAlign:"center"},statValue:{fontSize:"28px",fontWeight:700,color:"#3b82f6"},statLabel:{fontSize:"10px",color:"#94a3b8",marginTop:"4px",textTransform:"uppercase"},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px",color:"#64748b"},copySuccess:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:"#16a34a",color:"#fff",padding:"16px 32px",borderRadius:"12px",fontSize:"16px",fontWeight:700,zIndex:1e5,animation:"fadeInOut 2s ease-in-out"}},qv={log:{bg:"#374151",text:"#9ca3af"},info:{bg:"#1e3a5f",text:"#60a5fa"},warn:{bg:"#713f12",text:"#fbbf24"},error:{bg:"#7f1d1d",text:"#f87171"},debug:{bg:"#3f3f46",text:"#a1a1aa"},network:{bg:"#164e63",text:"#22d3ee"},event:{bg:"#4c1d95",text:"#a78bfa"},state:{bg:"#14532d",text:"#4ade80"},sip:{bg:"#581c87",text:"#c084fc"}},zv={log:"📝",info:"ℹ️",warn:"⚠️",error:"❌",debug:"🔍",network:"🌐",event:"⚡",state:"📊",sip:"📞"};function Hv({onClose:e}){const{logs:n,networkLogs:r,clear:i,copyToClipboard:o}=Fv(),[a,d]=t.useState("logs"),[s,l]=t.useState(new Set),[u,c]=t.useState(""),[f,h]=t.useState(""),[p,m]=t.useState(new Set),[g,v]=t.useState(null),[y,b]=t.useState(!1),[x,w]=t.useState(new Set);t.useEffect(()=>{Mv().then(v)},[]);const _=t.useMemo(()=>n.filter(e=>{if(s.size>0&&!s.has(e.level))return!1;if(u&&!e.category.toLowerCase().includes(u.toLowerCase()))return!1;if(f){const t=f.toLowerCase();return e.message.toLowerCase().includes(t)||e.category.toLowerCase().includes(t)||e.data&&JSON.stringify(e.data).toLowerCase().includes(t)}return!0}),[n,s,u,f]),C=t.useMemo(()=>{const e=new Set(n.map(e=>e.category));return Array.from(e).sort()},[n]),S=t.useMemo(()=>{const e={},t={};for(const r of n)e[r.level]=(e[r.level]||0)+1,t[r.category]=(t[r.category]||0)+1;return{byLevel:e,byCategory:t,networkSuccess:r.filter(e=>e.status&&e.status>=200&&e.status<400).length,networkError:r.filter(e=>!e.status||e.status>=400).length,avgDuration:r.length>0?Math.round(r.reduce((e,t)=>e+(t.duration||0),0)/r.length):0}},[n,r]),E=t.useCallback(e=>{l(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),N=t.useCallback(e=>{m(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),T=t.useCallback(e=>{w(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),A=t.useCallback(async()=>{await o()&&(b(!0),setTimeout(()=>b(!1),2e3))},[o]),O=e=>e.toTimeString().split(" ")[0]+"."+e.getMilliseconds().toString().padStart(3,"0");return $.jsxs("div",{style:Bv.container,children:[$.jsxs("div",{style:Bv.header,children:[$.jsxs("div",{style:Bv.headerTitle,children:[$.jsx("span",{children:"🔧"}),$.jsx("span",{children:"Debug Console"}),$.jsxs("span",{style:{fontSize:"10px",backgroundColor:"#374151",padding:"2px 8px",borderRadius:"10px"},children:[n.length," logs"]})]}),$.jsxs("div",{style:Bv.headerActions,children:[$.jsx("button",{style:{...Bv.button,...Bv.successButton},onClick:A,children:"📋 Copiar Todos"}),$.jsx("button",{style:{...Bv.button,...Bv.dangerButton},onClick:i,children:"🗑️ Limpar"}),$.jsx("button",{style:{...Bv.button,...Bv.primaryButton},onClick:e,children:"← Voltar"})]})]}),$.jsxs("div",{style:Bv.tabs,children:[$.jsxs("div",{style:{...Bv.tab,..."logs"===a?Bv.tabActive:{}},onClick:()=>d("logs"),children:["📝 Logs (",n.length,")"]}),$.jsxs("div",{style:{...Bv.tab,..."network"===a?Bv.tabActive:{}},onClick:()=>d("network"),children:["🌐 Network (",r.length,")"]}),$.jsx("div",{style:{...Bv.tab,..."device"===a?Bv.tabActive:{}},onClick:()=>d("device"),children:"📱 Device"}),$.jsx("div",{style:{...Bv.tab,..."stats"===a?Bv.tabActive:{}},onClick:()=>d("stats"),children:"📊 Stats"})]}),"logs"===a&&$.jsxs("div",{style:Bv.filters,children:[$.jsx("input",{type:"text",placeholder:"🔍 Buscar...",value:f,onChange:e=>h(e.target.value),style:{padding:"6px 12px",borderRadius:"6px",border:"1px solid #374151",backgroundColor:"#0f172a",color:"#e2e8f0",fontSize:"11px",width:"150px"}}),$.jsxs("select",{value:u,onChange:e=>c(e.target.value),style:{padding:"6px 12px",borderRadius:"6px",border:"1px solid #374151",backgroundColor:"#0f172a",color:"#e2e8f0",fontSize:"11px"},children:[$.jsx("option",{value:"",children:"Todas categorias"}),C.map(e=>$.jsx("option",{value:e,children:e},e))]}),$.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:Object.keys(qv).map(e=>{const t=s.has(e),n=qv[e];return $.jsxs("span",{style:{...Bv.filterChip,backgroundColor:t?n.text:"#374151",color:t?"#000":"#94a3b8"},onClick:()=>E(e),children:[zv[e]," ",e]},e)})})]}),$.jsxs("div",{style:Bv.content,children:["logs"===a&&$.jsx($.Fragment,{children:0===_.length?$.jsxs("div",{style:Bv.emptyState,children:[$.jsx("span",{style:{fontSize:"48px",marginBottom:"16px"},children:"📭"}),$.jsx("span",{children:"Nenhum log encontrado"})]}):_.slice(-200).reverse().map(e=>{const t=qv[e.level],n=x.has(e.id),r=void 0!==e.data||e.stack;return $.jsxs("div",{style:{...Bv.logEntry,backgroundColor:t.bg+"40",cursor:r?"pointer":"default"},onClick:()=>r&&T(e.id),children:[$.jsx("span",{style:Bv.logTime,children:O(e.timestamp)}),$.jsxs("span",{style:{...Bv.logLevel,color:t.text},children:[zv[e.level]," ",e.level]}),$.jsxs("span",{style:Bv.logCategory,children:["[",e.category,"]"]}),$.jsxs("div",{style:{flex:1},children:[$.jsx("span",{style:Bv.logMessage,children:e.message}),r&&$.jsxs("span",{style:{color:"#64748b",fontSize:"10px",marginLeft:"8px"},children:[n?"▼":"▶"," ",r?"data":""]}),n&&$.jsxs("div",{style:Bv.logData,children:[void 0!==e.data&&$.jsx("pre",{children:(()=>{try{return JSON.stringify(e.data,null,2)}catch{return"[Não serializável]"}})()}),e.stack&&$.jsx("pre",{style:{color:"#f87171",marginTop:e.data?"8px":0},children:e.stack})]})]})]},e.id)})}),"network"===a&&$.jsx($.Fragment,{children:0===r.length?$.jsxs("div",{style:Bv.emptyState,children:[$.jsx("span",{style:{fontSize:"48px",marginBottom:"16px"},children:"🌐"}),$.jsx("span",{children:"Nenhuma requisição registrada"})]}):[...r].reverse().map(e=>{const t=e.status&&e.status>=200&&e.status<400,n=p.has(e.id),r={GET:"#22c55e",POST:"#3b82f6",PUT:"#f59e0b",DELETE:"#ef4444",PATCH:"#8b5cf6"};return $.jsxs("div",{style:Bv.networkEntry,children:[$.jsxs("div",{style:{...Bv.networkHeader,backgroundColor:n?"#334155":"transparent"},onClick:()=>N(e.id),children:[$.jsx("span",{style:{color:"#64748b",fontSize:"10px"},children:O(e.timestamp)}),$.jsx("span",{style:{...Bv.networkMethod,backgroundColor:(r[e.method]||"#6b7280")+"30",color:r[e.method]||"#6b7280"},children:e.method}),$.jsx("span",{style:Bv.networkUrl,title:e.url,children:e.url}),$.jsx("span",{style:{...Bv.networkStatus,color:t?"#22c55e":"#ef4444"},children:e.status||"FAILED"}),$.jsx("span",{style:{color:"#64748b",fontSize:"10px"},children:e.duration?`${e.duration}ms`:"-"}),$.jsx("span",{style:{color:"#64748b"},children:n?"▼":"▶"})]}),n&&$.jsxs("div",{style:Bv.networkDetails,children:[e.error&&$.jsxs("div",{style:{color:"#f87171",marginBottom:"8px"},children:[$.jsx("strong",{children:"Error:"})," ",e.error]}),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&$.jsxs("div",{style:{marginBottom:"8px"},children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Request Headers:"}),$.jsx("pre",{style:{marginTop:"4px"},children:JSON.stringify(e.requestHeaders,null,2)})]}),e.requestBody&&$.jsxs("div",{style:{marginBottom:"8px"},children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Request Body:"}),$.jsx("pre",{style:{marginTop:"4px"},children:e.requestBody})]}),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&$.jsxs("div",{style:{marginBottom:"8px"},children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Response Headers:"}),$.jsx("pre",{style:{marginTop:"4px"},children:JSON.stringify(e.responseHeaders,null,2)})]}),e.responseBody&&$.jsxs("div",{children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Response Body:"}),$.jsx("pre",{style:{marginTop:"4px"},children:e.responseBody})]})]})]},e.id)})}),"device"===a&&g&&$.jsxs("div",{style:Bv.deviceInfoGrid,children:[$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"📱 Sistema"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"User Agent"}),$.jsxs("span",{style:{...Bv.deviceInfoValue,fontSize:"9px",maxWidth:"150px",overflow:"hidden",textOverflow:"ellipsis"},children:[g.userAgent.substring(0,50),"..."]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Platform"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.platform})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Language"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.language})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Online"}),$.jsx("span",{style:{...Bv.deviceInfoValue,color:g.onLine?"#22c55e":"#ef4444"},children:g.onLine?"✅ Sim":"❌ Não"})]})]}),$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"📐 Tela"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Screen"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[g.screenWidth,"x",g.screenHeight]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Viewport"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[g.viewportWidth,"x",g.viewportHeight]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Pixel Ratio"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[g.devicePixelRatio,"x"]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Touch"}),$.jsx("span",{style:{...Bv.deviceInfoValue,color:g.touchSupport?"#22c55e":"#94a3b8"},children:g.touchSupport?"✅ Suportado":"❌ Não"})]})]}),$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"🎤 Mídia"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Audio Inputs"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.mediaDevices.audioInputs})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Audio Outputs"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.mediaDevices.audioOutputs})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Video Inputs"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.mediaDevices.videoInputs})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Mic Permission"}),$.jsx("span",{style:{...Bv.deviceInfoValue,color:"granted"===g.permissions.microphone?"#22c55e":"#f59e0b"},children:g.permissions.microphone||"unknown"})]})]}),g.connection&&$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"📶 Conexão"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Type"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.type||"-"})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Effective"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.effectiveType||"-"})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Downlink"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.downlink?`${g.connection.downlink} Mbps`:"-"})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"RTT"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.rtt?`${g.connection.rtt}ms`:"-"})]})]}),g.memory&&$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"💾 Memória"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Heap Used"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[Math.round((g.memory.usedJSHeapSize||0)/1024/1024)," MB"]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Heap Total"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[Math.round((g.memory.totalJSHeapSize||0)/1024/1024)," MB"]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Heap Limit"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[Math.round((g.memory.jsHeapSizeLimit||0)/1024/1024)," MB"]})]})]})]}),"stats"===a&&$.jsxs($.Fragment,{children:[$.jsxs("div",{style:Bv.stats,children:[$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:Bv.statValue,children:n.length}),$.jsx("div",{style:Bv.statLabel,children:"Total Logs"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#ef4444"},children:S.byLevel.error||0}),$.jsx("div",{style:Bv.statLabel,children:"Erros"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#f59e0b"},children:S.byLevel.warn||0}),$.jsx("div",{style:Bv.statLabel,children:"Warnings"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#22c55e"},children:S.networkSuccess}),$.jsx("div",{style:Bv.statLabel,children:"Requests OK"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#ef4444"},children:S.networkError}),$.jsx("div",{style:Bv.statLabel,children:"Requests Failed"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsxs("div",{style:Bv.statValue,children:[S.avgDuration,"ms"]}),$.jsx("div",{style:Bv.statLabel,children:"Avg Response Time"})]})]}),$.jsxs("div",{style:{padding:"16px"},children:[$.jsx("h3",{style:{color:"#94a3b8",marginBottom:"12px"},children:"Logs por Categoria"}),$.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:Object.entries(S.byCategory).sort((e,t)=>t[1]-e[1]).map(([e,t])=>$.jsxs("span",{style:{padding:"6px 12px",backgroundColor:"#1e293b",borderRadius:"6px",fontSize:"11px"},children:[e,": ",$.jsx("strong",{children:t})]},e))})]})]})]}),y&&$.jsx("div",{style:Bv.copySuccess,children:"✅ Logs copiados para a área de transferência!"})]})}function Wv({notice:e,onDismiss:n,onRecheck:r,onHeightChange:i}){const o=t.useRef(null),a=null!==e;if(t.useLayoutEffect(()=>{const e=o.current;if(!i)return;if(!e)return void i(0);const t=()=>i(e.offsetHeight);if(t(),"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect(),i(0)}},[a,i]),!e)return null;const d="call"===e.source||"session"===e.source;return $.jsxs("div",{ref:o,className:`dialer-notice ${e.level}`,role:"error"===e.level?"alert":"status","data-code":e.code,children:[$.jsx("i",{className:`fas ${"error"===e.level?"fa-circle-exclamation":"fa-triangle-exclamation"} dialer-notice-icon`,"aria-hidden":"true"}),$.jsxs("div",{className:"dialer-notice-body",children:[$.jsx("strong",{className:"dialer-notice-title",children:e.title}),$.jsx("span",{className:"dialer-notice-detail",children:e.detail}),e.action&&$.jsx("span",{className:"dialer-notice-action",children:e.action}),"device"===e.source&&r&&$.jsx("button",{type:"button",className:"dialer-notice-btn",onClick:r,children:"Verificar de novo"})]}),d&&n&&$.jsx("button",{type:"button",className:"dialer-notice-close",onClick:n,"aria-label":"Fechar aviso",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})})]})}const Gv={raiva:"raiva",irritacao:"irritação",frustracao:"frustração",desconfianca:"desconfiança",impaciencia:"impaciência",confusao:"confusão",nervosismo:"nervosismo",surpresa:"surpresa",desanimo:"desânimo",cansaco:"cansaço",interesse:"interesse",entusiasmo:"entusiasmo",satisfacao:"satisfação",alivio:"alívio",neutro:"neutro"},Vv={aberto:"cliente aberto",neutro:"cliente neutro",resistente:"cliente resistente",hostil:"cliente hostil",indefinido:"lendo a conversa"},Kv={agent:"Você",customer:"Cliente",mixed:""};function Yv(e,t=2){return(e.emotions??[]).filter(e=>"neutro"!==e.label&&e.intensity>=.3).slice(0,t)}function Xv({maxLines:e=4}){const n=t.useContext(Du);return n?$.jsx(Jv,{client:n,maxLines:e}):null}function Jv({client:e,maxLines:t}){const{segments:n,insight:r,status:i}=function(e){return Mu(e).transcript}(e),o="running"===(null==i?void 0:i.live);if(0===n.length&&!r&&!o)return null;const a=n.slice(-t);return $.jsxs("div",{className:"live-captions",id:"liveCaptions","aria-live":"polite",children:[r&&$.jsxs("div",{className:`live-insight stance-${r.customer.stance}`,id:"liveInsight",title:r.summary,children:[$.jsx("span",{className:"live-insight-stance",children:Vv[r.customer.stance]??r.customer.stance}),$.jsxs("span",{className:"live-insight-interest",children:["interesse ",Math.round(r.customer.interest),"%"]}),r.nextMove&&$.jsx("span",{className:"live-insight-next",children:r.nextMove})]}),a.length>0?$.jsx("ul",{className:"live-caption-list",children:a.map(e=>$.jsxs("li",{className:`live-caption ${e.speaker}${e.interim?" interim":""}${e.refined?" refined":""}`,children:[$.jsx("span",{className:"live-caption-speaker",children:Kv[e.speaker]}),$.jsx("span",{className:"live-caption-text",children:e.text}),Yv(e).map(e=>$.jsxs("span",{className:"live-caption-emotion"+("context"===e.source?" ctx":""),title:e.evidence??"",children:[Gv[e.label]??e.label," ",Math.round(100*e.intensity),"%"]},e.label))]},e.id))}):$.jsx("div",{className:"live-caption-waiting",children:"Ouvindo a conversa…"})]})}const Zv=16,Qv="callix_dialer_form_scale",ey=100,ty="flex flex-shrink-0 items-center justify-center rounded-md transition hover:bg-black hover:bg-opacity-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",ny="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function ry(e,t,n){return Math.min(Math.max(e,t),n)}function iy(e){if(!Number.isFinite(e))return ey;return ry(10*Math.round(e/10),70,180)}function oy(){if("undefined"==typeof window)return ey;try{const e=window.localStorage.getItem(Qv);return null===e||""===e.trim()?ey:iy(Number(e))}catch{return ey}}function ay(){if("undefined"==typeof CSS||"function"!=typeof CSS.supports)return!0;try{if(!CSS.supports("zoom","1.5"))return!1}catch{return!0}const e="undefined"!=typeof navigator?/\bFirefox\/(\d+)/.exec(navigator.userAgent):null;return!(e&&Number(e[1])<131)}function dy(){return"undefined"==typeof window?{width:1024,height:768}:{width:window.innerWidth,height:window.innerHeight}}function sy(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${n}:${r.toString().padStart(2,"0")}`}function ly({isOpen:e,campaignCallInfo:r,campaignContactPhoneId:i,callDuration:o,isCallActive:a,onClose:d,portalTarget:s}){const l=t.useRef(null),u=t.useRef({pointerId:null,offsetX:0,offsetY:0}),c=t.useRef(!1),f=t.useRef(!1),h=t.useRef(null),p=t.useId(),[m,g]=t.useState({x:100,y:100}),[v,y]=t.useState(!1),[b,x]=t.useState(dy),w=t.useMemo(ay,[]),[_,C]=t.useState(oy),[S,E]=t.useState(""),N=w?_/100:1,T=t.useRef(N);T.current=N;const[A,O]=t.useState(null),[I,k]=t.useState(!1),[j,R]=t.useState(null),[P,D]=t.useState({key:null,n:0}),L=null==r?void 0:r.campaignContact,M=t.useMemo(()=>Xp(r,i),[r,i]),U=M?Yp(M):null,F=t.useRef(M);F.current=M;const B=t.useRef(null),q=t.useCallback(()=>{var e;const t=null==(e=l.current)?void 0:e.getBoundingClientRect(),n=T.current;return{width:t&&t.width>0?t.width:520*n,height:t&&t.height>0?t.height:600*n}},[]),z=t.useCallback(e=>{if("undefined"==typeof window)return e;const{width:t,height:n}=q(),r=Math.max(16,window.innerWidth-t-Zv),i=Math.max(16,window.innerHeight-n-Zv);return{x:ry(e.x,16,r),y:ry(e.y,16,i)}},[q]);ny(()=>{if(e&&"undefined"!=typeof window){x(dy());const{width:e,height:t}=q(),n=(window.innerWidth-e)/2,r=(window.innerHeight-t)/2;g(z({x:n,y:r}))}},[e,q,z]),t.useEffect(()=>{if(!e||"undefined"==typeof window)return;const t=()=>{x(dy()),g(e=>z(e))};return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t)}},[e,z]);const H=t.useCallback(()=>{g(e=>{const t=z(e);return t.x===e.x&&t.y===e.y?e:t})},[z]);t.useEffect(()=>{e&&H()},[e,_,H]),t.useEffect(()=>{const t=l.current;if(!e||!t||"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(()=>H());return n.observe(t),()=>n.disconnect()},[e,H]),t.useEffect(()=>{const e=F.current;if(!e||!U)return O(null),R(null),void k(!1);let t=!1,n=null;return k(!0),R(null),Qp(e,{force:P.key===U&&P.n>0}).then(e=>{t||(console.log("[DraggableClientInfoModal] ✅ Formulário carregado:",e.valuesSource,e.layoutSource,e.fields.length,"campos",e.partial?"(parcial)":""),O(e),k(!1),e.partial&&B.current!==U&&(B.current=U,n=setTimeout(()=>D(e=>({key:U,n:e.n+1})),3e3)))}).catch(e=>{t||(console.error("[DraggableClientInfoModal] ❌ Erro ao buscar o formulário:",e),O(null),R(e instanceof Error?e.message:"Erro ao buscar dados do contato"),k(!1))}),()=>{t=!0,n&&clearTimeout(n)}},[U,P]),t.useEffect(()=>{if(!v)return;const e=e=>{if(u.current.pointerId!==e.pointerId)return;c.current=!0;const{width:t,height:n}=q(),r=e.clientX-u.current.offsetX,i=e.clientY-u.current.offsetY,o="undefined"!=typeof window?window.innerWidth:0,a="undefined"!=typeof window?window.innerHeight:0,d=o-t-Zv,s=a-n-Zv,l=Math.max(Zv,d),f=Math.max(Zv,s);g({x:ry(r,Zv,l),y:ry(i,Zv,f)})},t=e=>{u.current.pointerId===e.pointerId&&(y(!1),u.current={pointerId:null,offsetX:0,offsetY:0})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[v,q]);const W=t.useCallback(e=>{if(0!==e.button&&"touch"!==e.pointerType)return;if(e.target instanceof Element&&e.target.closest("button"))return;const t=l.current;if(!t)return;e.preventDefault();const n=e.currentTarget;if("function"==typeof n.setPointerCapture)try{n.setPointerCapture(e.pointerId)}catch{}const r=t.getBoundingClientRect();u.current={pointerId:e.pointerId,offsetX:e.clientX-r.left,offsetY:e.clientY-r.top},c.current=!1,y(!0)},[]),G=t.useCallback(()=>{!a&&d&&d()},[a,d]),V=t.useCallback(()=>{D(e=>({key:U,n:e.n+1}))},[U]),K=t.useCallback(e=>{const t=iy(e);return C(t),function(e){try{window.localStorage.setItem(Qv,String(e))}catch{}}(t),t},[]),Y=_>70,X=_<180,J=t.useCallback(()=>{Y&&E(`Tamanho do formulário: ${K(_-10)}%`)},[K,Y,_]),Z=t.useCallback(()=>{X&&E(`Tamanho do formulário: ${K(_+10)}%`)},[K,X,_]),Q=t.useCallback(()=>{K(ey),E("")},[K]);t.useEffect(()=>{if(!e||"undefined"==typeof document)return;const t=l.current,n=document.activeElement;return h.current=n&&n!==document.body?n:null,!t||n&&n!==document.body||t.focus({preventScroll:!0}),()=>{const e=h.current;f.current&&e&&e.isConnected&&e.focus({preventScroll:!0}),f.current=!1}},[e]);const ee=t.useCallback(()=>{f.current=!0},[]),te=t.useCallback(e=>{e.currentTarget.contains(e.relatedTarget)||(f.current=!1)},[]),ne=t.useCallback(e=>{"Escape"!==e.key||a||(e.stopPropagation(),G())},[G,a]);if(!e)return null;const re=(null==A?void 0:A.rows)&&A.rows.length>0?A.rows:[],ie=re.length>0,oe=Boolean(A&&A.fields.length>0),ae=ie||oe,de={zoom:N,width:"520px",maxWidth:`${Math.max(160,Math.floor((b.width-32)/N))}px`,maxHeight:`${Math.max(120,Math.floor((b.height-32)/N))}px`},se=N<1?Math.ceil(28/N):28,le={width:`${se}px`,height:`${se}px`},ue={height:`${se}px`,minWidth:`${Math.ceil(48/Math.min(N,1))}px`},ce=$.jsx("div",{ref:l,role:"dialog","aria-labelledby":p,tabIndex:-1,onKeyDown:ne,onFocus:ee,onBlur:te,className:Gh`fixed z-[9999] overflow-hidden rounded-xl border border-gray-300 bg-white text-gray-900 shadow-2xl focus:outline-none`,style:{left:`${m.x}px`,top:`${m.y}px`,maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 32px)"},children:$.jsxs("div",{"data-testid":"campaign-form-scaled","data-scale":w?_:ey,className:Gh`flex flex-col`,style:de,children:[$.jsxs("div",{onPointerDown:W,className:Gh`flex flex-wrap cursor-move select-none items-center gap-2 border-b border-gray-200 bg-gradient-to-r from-blue-600 to-blue-700 px-3 py-2.5 text-white`,style:{touchAction:"none"},children:[$.jsxs("div",{className:Gh`flex min-w-[7rem] flex-1 items-center gap-2`,children:[$.jsx(Fc,{"aria-hidden":!0,className:Gh`h-5 w-5 flex-shrink-0`}),$.jsx("h3",{id:p,className:Gh`truncate text-sm font-bold`,children:"Informações da Campanha"})]}),w&&$.jsxs("div",{role:"group","aria-label":"Tamanho do formulário",className:Gh`ml-auto flex flex-shrink-0 items-center gap-0.5`,children:[$.jsx("button",{type:"button",onClick:J,"aria-disabled":!Y,"aria-label":"Diminuir o tamanho do formulário",title:"Diminuir o formulário e o texto",className:Gh`${ty} ${Y?"":"cursor-not-allowed"}`,style:le,children:$.jsx(Ic,{"aria-hidden":!0,className:Gh`h-4 w-4 ${Y?"":"opacity-40"}`})}),$.jsxs("button",{type:"button",onClick:Q,"aria-label":`Tamanho atual ${_}%. Restaurar o tamanho padrão`,title:"Restaurar o tamanho padrão (100%)",className:Gh`flex-shrink-0 rounded-md px-1 text-center text-xs font-semibold tabular-nums transition hover:bg-black hover:bg-opacity-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white`,style:ue,children:[_,"%"]}),$.jsx("button",{type:"button",onClick:Z,"aria-disabled":!X,"aria-label":"Aumentar o tamanho do formulário",title:"Aumentar o formulário e o texto",className:Gh`${ty} ${X?"":"cursor-not-allowed"}`,style:le,children:$.jsx(Lc,{"aria-hidden":!0,className:Gh`h-4 w-4 ${X?"":"opacity-40"}`})}),$.jsx("span",{role:"status",className:Gh`sr-only`,children:S})]}),$.jsx("button",{type:"button",onClick:G,disabled:a,"aria-label":a?"Aguarde o fim da chamada para fechar":"Fechar",className:Gh`${ty} rounded-full disabled:cursor-not-allowed disabled:opacity-40`,style:le,title:a?"Aguarde o fim da chamada para fechar":"Fechar",children:$.jsx(Wc,{"aria-hidden":!0,className:Gh`h-5 w-5`})})]}),$.jsxs("div",{tabIndex:0,role:"region","aria-label":"Dados do contato",className:Gh`min-h-0 flex-1 space-y-3 overflow-y-auto p-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500`,children:[$.jsxs("div",{className:Gh`grid grid-cols-2 gap-3`,children:[$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-3 py-2`,children:[$.jsx(Cc,{"aria-hidden":!0,className:Gh`h-4 w-4 text-gray-500`}),$.jsxs("div",{children:[$.jsx("p",{className:Gh`text-[10px] text-gray-500 uppercase tracking-wide font-medium`,children:"Duração"}),$.jsx("p",{className:Gh`text-sm font-bold text-gray-800`,children:sy(o)})]})]}),$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-3 py-2`,children:[$.jsx(Fc,{"aria-hidden":!0,className:Gh`h-4 w-4 text-gray-500`}),$.jsxs("div",{className:Gh`min-w-0 flex-1`,children:[$.jsx("p",{className:Gh`text-[10px] text-gray-500 uppercase tracking-wide font-medium`,children:"Cliente"}),$.jsx("p",{className:Gh`truncate text-sm font-bold text-gray-800`,children:(null==L?void 0:L.label)||"N/A"})]})]})]}),I&&$.jsxs("div",{className:Gh`rounded-lg border border-blue-200 bg-blue-50 p-6 text-center`,role:"status",children:[$.jsx("div",{className:Gh`mx-auto mb-2 inline-block h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent`}),$.jsx("p",{className:Gh`text-xs font-medium text-blue-700`,children:"Carregando dados do contato..."})]}),j&&!I&&$.jsx("div",{className:Gh`rounded-lg border border-red-200 bg-red-50 p-3`,children:$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx(yc,{"aria-hidden":!0,className:Gh`h-4 w-4 flex-shrink-0 text-red-600`}),$.jsxs("div",{className:Gh`min-w-0 flex-1`,children:[$.jsx("p",{className:Gh`text-xs font-semibold text-red-700`,children:"Erro ao carregar dados"}),$.jsx("p",{className:Gh`text-[10px] text-red-600`,children:j})]}),$.jsx("button",{type:"button",onClick:V,className:Gh`rounded-md border border-red-300 bg-white px-2 py-1 text-[11px] font-semibold text-red-700 transition hover:bg-red-100`,children:"Tentar novamente"})]})}),!I&&!j&&ie&&$.jsx("div",{className:Gh`space-y-2`,children:re.map((e,t)=>{return $.jsx("div",{className:Gh`grid gap-2 ${n=e.length,2===n?"grid-cols-2":3===n?"grid-cols-3":4===n?"grid-cols-4":n>=5?"grid-cols-5":"grid-cols-1"}`,children:e.map((e,n)=>$.jsx(uy,{label:e.label,value:e.value||"-",fullWidth:"100%"===e.width},`${t}-${n}-${e.key}`))},t);var n})}),!I&&!j&&!ie&&oe&&A&&$.jsx("div",{className:Gh`grid grid-cols-2 gap-2`,children:A.fields.map(e=>$.jsx(uy,{label:e.label,value:e.value||"-"},e.key))}),!I&&!j&&!ae&&$.jsxs("div",{className:Gh`flex flex-col items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-4 py-8 text-center`,children:[$.jsx(Fc,{"aria-hidden":!0,className:Gh`mb-2 h-8 w-8 text-gray-400`}),$.jsx("p",{className:Gh`text-sm text-gray-500`,children:"Nenhum dado disponível"})]})]}),a&&$.jsx("div",{className:Gh`border-t border-gray-200 bg-gray-50 px-4 py-2`,children:$.jsx("p",{className:Gh`text-center text-xs text-gray-500`,children:"Aguarde o fim da chamada para fechar"})})]})});return"undefined"!=typeof document?n.createPortal(ce,s??document.body):null}function uy({label:e,value:t,fullWidth:n}){const r=n?"col-span-full":"";return $.jsxs("div",{className:Gh`rounded-lg border border-gray-200 bg-white p-2 ${r}`,children:[$.jsx("p",{className:Gh`mb-0.5 truncate text-[9px] font-semibold uppercase tracking-wide text-gray-500`,children:e}),$.jsx("p",{className:Gh`overflow-hidden break-words text-xs font-semibold text-gray-800`,style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:t})]})}if("undefined"!=typeof window&&!window.__fetchIntercepted__){window.__fetchIntercepted__=!0;const e=window.fetch.bind(window);window.fetch=async function(t,n){const r=`req_${Date.now()}_${Math.random().toString(36).substring(2,8)}`,i="string"==typeof t?t:t instanceof URL?t.href:t.url,o=(null==n?void 0:n.method)||(t instanceof Request?t.method:"GET"),a={};(null==n?void 0:n.headers)&&(n.headers instanceof Headers?n.headers.forEach((e,t)=>{a[t]=t.toLowerCase().includes("token")||t.toLowerCase().includes("auth")?`${e.substring(0,30)}...(${e.length} chars)`:e}):Array.isArray(n.headers)?n.headers.forEach(([e,t])=>{a[e]=e.toLowerCase().includes("token")||e.toLowerCase().includes("auth")?`${t.substring(0,30)}...(${t.length} chars)`:t}):Object.entries(n.headers).forEach(([e,t])=>{a[e]=e.toLowerCase().includes("token")||e.toLowerCase().includes("auth")?`${String(t).substring(0,30)}...(${String(t).length} chars)`:String(t)}));const d=performance.now();if(console.log(`%c[FETCH ${r}] ➡️ ${o} ${i}`,"color: #4CAF50; font-weight: bold"),console.log(`[FETCH ${r}] Headers:`,JSON.stringify(a,null,2)),null==n?void 0:n.body)try{const e="string"==typeof n.body?n.body:JSON.stringify(n.body);console.log(`[FETCH ${r}] Body:`,e.substring(0,500))}catch{console.log(`[FETCH ${r}] Body: [não serializável]`)}console.log(`[FETCH ${r}] credentials: ${(null==n?void 0:n.credentials)||"default"}, mode: ${(null==n?void 0:n.mode)||"default"}`),Pv("network","Request",`➡️ ${o} ${i.substring(0,60)}...`,{requestId:r,method:o,url:i,headers:a,credentials:null==n?void 0:n.credentials});try{const o=await e(t,n),l=performance.now(),u=Math.round(l-d),c={};o.headers.forEach((e,t)=>{c[t]=e});const f=o.ok?"#4CAF50":"#F44336";if(console.log(`%c[FETCH ${r}] ⬅️ ${o.status} ${o.statusText} (${u}ms)`,`color: ${f}; font-weight: bold`),console.log(`[FETCH ${r}] Response Headers:`,JSON.stringify(c,null,2)),Pv(o.ok?"network":"error","Response",`⬅️ ${o.status} ${i.substring(0,40)}... (${u}ms)`,{requestId:r,status:o.status,statusText:o.statusText,duration:u,headers:c}),401===o.status||403===o.status){console.error(`%c[FETCH ${r}] ❌ AUTH ERROR ${o.status}`,"color: #F44336; font-weight: bold; font-size: 14px"),console.error(`[FETCH ${r}] URL completa:`,i),console.error(`[FETCH ${r}] Todos os headers enviados:`,a);try{const e=o.clone(),t=await e.text();console.error(`[FETCH ${r}] Response Body:`,t),Pv("error","AuthError",`❌ ${o.status} - ${t.substring(0,200)}`,{requestId:r,url:i,headers:a,responseBody:t})}catch(s){console.error(`[FETCH ${r}] Não foi possível ler body do erro:`,s)}}return o}catch(l){const e=performance.now(),t=Math.round(e-d);throw console.error(`%c[FETCH ${r}] ❌ NETWORK ERROR (${t}ms)`,"color: #F44336; font-weight: bold"),console.error(`[FETCH ${r}] Error:`,l),Pv("error","NetworkError",`❌ ${i.substring(0,40)}... - ${String(l)}`,{requestId:r,url:i,error:String(l),duration:t}),l}},console.log("%c[FETCH INTERCEPTOR] ✅ Ativo - todas as requisições serão logadas","color: #2196F3; font-weight: bold; font-size: 12px")}function cy(e,t){return tm({values:e},t)}function fy(e){t.useEffect(()=>{if(!document.querySelector('link[data-mobile-dialer-fa="true"]')){const e=document.createElement("link");e.rel="stylesheet",e.href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css",e.dataset.mobileDialerFa="true",document.head.appendChild(e)}},[]);const n=w$(),r=function(e,t){return"compact"===e||"comfortable"===e?e:t.touchLike?"comfortable":"compact"}(e.density,n);return e.isAuthenticated?$.jsx(gy,{...e,density:r}):$.jsx(hy,{...e,density:r})}function hy({username:e,onLogin:n,isLoadingSession:r,sessionError:i,sessionStatus:o,loginConfirmation:a,onCancelLoginConfirmation:d,density:s}){const[l,u]=t.useState(e??""),[c,f]=t.useState(null);t.useEffect(()=>{u(e??"")},[e]);const h=t.useCallback(async e=>{const t=e.trim();if(t){f(null);try{await Promise.resolve(n(t))}catch(r){f("Falha ao autenticar."),console.error("Erro login",r)}}else f("Informe o usuário Callix.")},[n]),p=t.useCallback(()=>h(l),[h,l]),m=Boolean(a)&&!r,g=((null==a?void 0:a.username)||l||e||"").trim();return $.jsx("div",{className:"phone-container","data-density":"compact"===s?"compact":"comfortable",children:$.jsxs("div",{className:"screen dialer-screen login-screen active",id:"dialerScreen",children:[$.jsx("div",{className:"dialer-header",children:$.jsx("div",{className:"status-container",children:$.jsxs("button",{type:"button",className:"status-badge "+(r?"connecting":"available"),children:[$.jsx("span",{className:"status-dot"}),$.jsx("span",{className:"status-text",children:r?"Conectando":"Login"})]})})}),r?$.jsxs("div",{className:"login-loading",role:"status","aria-live":"polite",children:[$.jsx("div",{className:"login-spinner","aria-hidden":"true"}),g&&$.jsx("div",{className:"login-loading-user",children:g}),$.jsx("div",{className:"login-status",children:o||"Conectando..."})]}):m&&a?$.jsxs("div",{className:"login-confirm",children:[$.jsx("div",{className:"login-confirm-label",children:"Entrar como"}),$.jsxs("div",{className:"login-user-chip",children:[$.jsx("i",{className:"fas fa-user","aria-hidden":"true"}),$.jsx("span",{children:a.username})]}),i&&$.jsx("div",{className:"input-error",children:i}),$.jsxs("button",{type:"button",className:"login-confirm-btn",onClick:()=>{h(a.username)},children:[$.jsx("i",{className:"fas fa-sign-in-alt","aria-hidden":"true"}),$.jsx("span",{children:"Entrar"})]}),!a.locked&&d&&$.jsx("button",{type:"button",className:"login-secondary-btn",onClick:d,children:"Usar outro usuário"}),$.jsx("p",{className:"login-hint",children:"Se você já estiver conectado em outra aba, continue usando o discador por lá."})]}):$.jsxs($.Fragment,{children:[$.jsx("div",{className:"phone-number-display",children:$.jsx("input",{type:"text",className:"phone-input",placeholder:"Digite seu usuário Callix",value:l,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&p(),autoCapitalize:"none",autoCorrect:"off",spellCheck:!1})}),c&&$.jsx("div",{className:"input-error",children:c}),i&&$.jsx("div",{className:"input-error",children:i}),$.jsxs("div",{className:"call-actions",children:[$.jsx("div",{className:"empty-space"}),$.jsx("button",{type:"button",className:"call-button",onClick:p,"aria-label":"Entrar",children:$.jsx("i",{className:"fas fa-sign-in-alt"})}),$.jsx("div",{className:"empty-space"})]})]})]})})}function py(e,t){if(!e)return;const n=Object.entries(e),r=t.map(e=>e.toLowerCase());for(const[i,o]of n)if(r.includes(i.toLowerCase()))return o}function my(e,t){const n=function(e){if(!e)return"";const t=e.trim().split(/\s+/)[0]||"";return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():""}(e);if(!t||"object"!=typeof t||0===Object.keys(t).length)return console.log("[WhatsApp Template] Sem dados de contato, usando mensagem genérica"),`Olá! Aqui é *${n}*, do Grupo Villela. Estou entrando em contato para dar continuidade ao nosso atendimento. Posso ajudar?`;console.log("[WhatsApp Template] Operador:",e,"-> Primeiro nome:",n),console.log("[WhatsApp Template] Campos recebidos:",t),console.log("[WhatsApp Template] Chaves disponíveis:",Object.keys(t));const r=py(t,["DECISOR","SOCIO","NOME","PROSPECT","CLIENTE","CONTATO"]);console.log("[WhatsApp Template] Prospect encontrado:",r);const i=py(t,["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","RAZAO_SOCIAL","COMPANY","NOME_EMPRESA"]);console.log("[WhatsApp Template] Empresa encontrada:",i);const o=py(t,["BENEFICIO","BENEFÍCIO","CAPITAL_RECUPERAR","CAPITAL A RECUPERAR","POTENCIAL","VALOR_RECUPERAR","VALOR RECUPERADO"]);if(console.log("[WhatsApp Template] Potencial encontrado:",o),!r&&!i&&!o)return console.log("[WhatsApp Template] Nenhum campo útil encontrado, usando mensagem genérica"),`Olá! Aqui é *${n}*, do Grupo Villela. Estou entrando em contato para dar continuidade ao nosso atendimento. Posso ajudar?`;let a=`Oi, *${r||"tudo bem"}*. Aqui é *${n}*, do Grupo Villela. Empresa líder no mercado de redução de dívidas e recuperação de capital, com mais de 20 anos de experiência.`;return i&&(a+=`\n\nVimos que a *${i}* tem um débito federal que contém cobranças indevidas.`),o?a+=`\n\nEm uma análise preliminar, verificamos que é possível recuperar para sua empresa um valor aproximado de *${o}*.`:i&&(a+="\n\nEm uma análise preliminar, verificamos que é possível recuperar valores significativos para sua empresa."),a+="\n\nGostaríamos de fazer um *diagnóstico gratuito* para te apresentar os valores reais que a empresa pode economizar. Posso te encaminhar o link para autorização?",a}function gy({username:e,showClientInfoModal:n=!1,density:r}){var i,o,a,d;const{skipManualQualification:s}=Iy(),[l,u]=t.useState(""),[c,f]=t.useState("dialer"),[h,p]=t.useState(!1),[m,g]=t.useState(!1),[v,y]=t.useState("success"),[b,x]=t.useState(null),[w,_]=t.useState(null),[C,S]=t.useState(0),[E,N]=t.useState(null),[T,A]=t.useState(!1),[O,I]=t.useState(!1);Fv();const[k,j]=t.useState(null),[R,P]=t.useState(null),[D,L]=t.useState(0),[M,U]=t.useState({finalData:{},isLoading:!1,error:null}),[F,B]=t.useState([]),[q,z]=t.useState(!1),[H,W]=t.useState(null),[G,V]=t.useState(""),[K,Y]=t.useState(null),[X,J]=t.useState(!1),Z=t.useRef(null),Q=t.useRef(0),[ee,te]=t.useState(!1),[ne,re]=t.useState([]),[ie,oe]=t.useState(null),[ae,de]=t.useState("default"),[se,le]=t.useState(null),ue=Yu(),ce=Xu(),fe=Zu(),{hangup:he,answer:pe,reject:me}=nc(),ge=Qu(),$e=ec(),ve=tc(),ye=t.useMemo(()=>$e??[],[$e]),be=t.useMemo(()=>ve??[],[ve]),{makeManualCall:xe,finishAfterCall:we}=Ju(),{goOnBreak:_e,goOffBreak:Ce}=am(),Se=om(null==ue?void 0:ue.breaks)||[],Ee=om(null==ue?void 0:ue.user),Ne="onBreak"===(null==ce?void 0:ce.state),[Te,Ae]=rc(),Oe=function(){const e=t.useCallback((e="light")=>{if("undefined"==typeof navigator||!("vibrate"in navigator))return;const t=_v[e];try{navigator.vibrate(t)}catch{}},[]),n=t.useCallback(()=>e("light"),[e]),r=t.useCallback(()=>e("medium"),[e]),i=t.useCallback(()=>e("heavy"),[e]),o=t.useCallback(()=>e("selection"),[e]),a=t.useCallback(()=>e("success"),[e]),d=t.useCallback(()=>e("warning"),[e]),s=t.useCallback(()=>e("error"),[e]);return{trigger:e,impactLight:n,impactMedium:r,impactHeavy:i,selectionChanged:o,notificationSuccess:a,notificationWarning:d,notificationError:s}}(),Ie=function(e={}){const{enabled:n=!0,volume:r=Ev,duration:i=Sv}=e,o=t.useRef(null),a=t.useRef([]),d=t.useCallback(()=>{var e;if(!n)return null;if(!o.current)try{const e=window.AudioContext||window.webkitAudioContext;e&&(o.current=new e)}catch{return console.warn("[useDTMF] Web Audio API não suportada"),null}return"suspended"===(null==(e=o.current)?void 0:e.state)&&o.current.resume().catch(()=>{}),o.current},[n]),s=t.useCallback(e=>{const t=d();if(!t)return;const n=Cv[e];if(!n)return;const[o,s]=n,l=t.currentTime,u=l+i/1e3;try{const e=t.createOscillator(),n=t.createOscillator(),d=t.createGain(),c=t.createGain();e.type="sine",n.type="sine",e.frequency.setValueAtTime(o,l),n.frequency.setValueAtTime(s,l),d.gain.setValueAtTime(0,l),d.gain.linearRampToValueAtTime(r,l+Nv),d.gain.setValueAtTime(r,u-Nv),d.gain.linearRampToValueAtTime(0,u),c.gain.setValueAtTime(0,l),c.gain.linearRampToValueAtTime(r,l+Nv),c.gain.setValueAtTime(r,u-Nv),c.gain.linearRampToValueAtTime(0,u),e.connect(d),d.connect(t.destination),n.connect(c),c.connect(t.destination),e.start(l),n.start(l),e.stop(u+.01),n.stop(u+.01),a.current.push(e,n),setTimeout(()=>{a.current=a.current.filter(t=>t!==e&&t!==n)},i+50)}catch(c){console.warn("[useDTMF] Erro ao tocar tom:",c)}},[d,i,r]),l=t.useCallback(()=>{a.current.forEach(e=>{try{e.stop()}catch{}}),a.current=[]},[]);return t.useEffect(()=>()=>{l(),o.current&&(o.current.close().catch(()=>{}),o.current=null)},[l]),{play:s,stopAll:l,isSupported:"undefined"!=typeof window&&!(!window.AudioContext&&!window.webkitAudioContext)}}({enabled:!0}),ke=t.useRef(""),je=t.useRef(null),Re=t.useCallback(e=>!!["*#0000#","*#3284#"].includes(e)&&(Pv("info","Debug","🔓 Código secreto detectado - abrindo painel de debug"),I(!0),u(""),ke.current="",!0),[]);t.useEffect(()=>{var e,t;const n=async()=>{try{const t=document.createElement("audio");if(!("setSinkId"in t))return console.log("[MobileDialer] setSinkId não suportado neste navegador"),void le(!1);let n=!1,r=await navigator.mediaDevices.enumerateDevices(),i=r.filter(e=>"audiooutput"===e.kind);if(!i.some(e=>e.label&&e.label.length>0)&&i.length>0){console.log("[MobileDialer] Labels vazios, solicitando permissão de áudio...");try{const e=await navigator.mediaDevices.getUserMedia({audio:!0});n=!0,e.getTracks().forEach(e=>e.stop()),r=await navigator.mediaDevices.enumerateDevices(),i=r.filter(e=>"audiooutput"===e.kind),console.log("[MobileDialer] Permissão concedida. Dispositivos:",i.length,i)}catch(e){console.log("[MobileDialer] Usuário negou permissão de áudio:",e)}}else n=!0;if(console.log("[MobileDialer] Dispositivos de saída encontrados:",i.length,i),i.length<=1)return console.log("[MobileDialer] Apenas um dispositivo de saída - viva-voz não disponível"),void le(!1);re(i);const o=i.find(e=>e.label.toLowerCase().includes("speaker")||e.label.toLowerCase().includes("alto-falante")||e.label.toLowerCase().includes("viva-voz")),a=i.find(e=>"default"===e.deviceId||e.label.toLowerCase().includes("default")||e.label.toLowerCase().includes("earpiece")||e.label.toLowerCase().includes("fone"))||i[0];if(o&&o.deviceId!==(null==a?void 0:a.deviceId))oe(o.deviceId),de((null==a?void 0:a.deviceId)||"default"),le(!0),console.log("[MobileDialer] Viva-voz disponível:",o.label);else if(i.length>1){const e=i.find(e=>e.deviceId!==(null==a?void 0:a.deviceId));e?(oe(e.deviceId),de((null==a?void 0:a.deviceId)||"default"),le(!0),console.log("[MobileDialer] Usando dispositivo alternativo para viva-voz:",e.label)):le(!1)}else le(!1)}catch(t){console.error("[MobileDialer] Erro ao detectar dispositivos de áudio:",t),le(!1)}};n();const r=()=>{console.log("[MobileDialer] Mudança de dispositivos detectada"),n()};return null==(t=null==(e=navigator.mediaDevices)?void 0:e.addEventListener)||t.call(e,"devicechange",r),()=>{var e,t;null==(t=null==(e=navigator.mediaDevices)?void 0:e.removeEventListener)||t.call(e,"devicechange",r)}},[]);const Pe=null==ce?void 0:ce.state,De=t.useRef(!1);t.useEffect(()=>{if(0===Se.length||"idle"!==Pe||De.current||Ne)return;if(!_e)return;De.current=!0;const e=Se.find(e=>5===e.id||e.name.toLowerCase()==="Reunião".toLowerCase());if(e)console.log("[MobileDialer] Operador conectado (idle), entrando em pausa inicial:",e.name),Promise.resolve(_e(e.id)).then(()=>{console.log("[MobileDialer] Pausa inicial aplicada com sucesso:",e.name),j(e.name),P(Date.now())}).catch(e=>{console.error("[MobileDialer] Falha ao entrar em pausa:",e),De.current=!1});else{const e=Se[0];console.log('[MobileDialer] Pausa "Reunião" não encontrada, usando:',e.name),Promise.resolve(_e(e.id)).then(()=>{console.log("[MobileDialer] Pausa inicial aplicada com sucesso:",e.name),j(e.name),P(Date.now())}).catch(e=>{console.error("[MobileDialer] Falha ao entrar em pausa:",e),De.current=!1})}},[Se,Pe,Ne,_e]),t.useEffect(()=>{console.log("[MobileDialer] Breaks loaded:",Se),Pv("state","Breaks",`Pausas carregadas: ${Se.length}`,Se)},[Se]),t.useEffect(()=>{console.log("[MobileDialer] Call state changed:",Pe),Pv("state","CallState",`Estado da chamada: ${Pe}`,{callState:Pe,isOnBreak:Ne}),"offline"===Pe&&(console.warn("[MobileDialer] Estado OFFLINE detectado - verifique a conexão"),Pv("warn","Connection","⚠️ Estado OFFLINE detectado"))},[Pe,Ne]),t.useEffect(()=>{ge&&console.log("[MobileDialer] Call info atualizado:",{type:null==ge?void 0:ge.type,info:"campaign"===(null==ge?void 0:ge.type)?{campaign:ge.info.campaign,campaignContact:ge.info.campaignContact}:ge})},[ge]);const Le=t.useMemo(()=>{var e;return"campaign"===(null==ge?void 0:ge.type)?Xp(ge.info,(null==(e=null==fe?void 0:fe.data)?void 0:e.campaignContactPhoneId)??null):null},[ge,fe]),Me=Le?Yp(Le):null,Ue=t.useRef(Le);Ue.current=Le,t.useEffect(()=>{const e=Ue.current;if(!e||!Me)return void U({finalData:{},isLoading:!1,error:null});let t=!1,n=null;U({finalData:{},isLoading:!0,error:null}),Pv("debug","FetchContact","Buscando formulário do contato",{contactId:e.id,source:e.source});const r=t=>{U({finalData:t.values,isLoading:!1,error:null}),Pv("info","FetchContact",`✅ Formulário: ${t.fields.length} campos (${t.valuesSource}, layout ${t.layoutSource})`,{contactId:e.id,partial:!0===t.partial})};return Qp(e).then(i=>{t||(r(i),i.partial&&(n=setTimeout(()=>{t||Qp(e,{force:!0}).then(e=>{t||r(e)}).catch(()=>{})},3e3)))}).catch(e=>{t||(console.error("[MobileDialer] Erro ao buscar o formulário:",e),U({finalData:{},isLoading:!1,error:e instanceof Error?e.message:"Erro ao buscar dados"}))}),()=>{t=!0,n&&clearTimeout(n)}},[Me]);const Fe=Pe,{notice:Be,dismiss:qe,recheckDevices:ze}=function(e={}){const n=Xu(),r=Zu(),[i,o]=t.useState(null),[a,d]=t.useState(null),[s,l]=t.useState(null),[u,c]=t.useState(null),f=t.useRef(null),h=e.callFailureTtlMs??2e4,p=t.useCallback(async()=>{if(!1===e.checkDevices)return;const t=await Lp();o(t)},[e.checkDevices]);t.useEffect(()=>{var t;if(!1===e.checkDevices)return;let n=!1;const r=async()=>{const e=await Lp();n||o(e)};r();const i="undefined"!=typeof navigator?navigator.mediaDevices:void 0,a=()=>{r()};return null==(t=null==i?void 0:i.addEventListener)||t.call(i,"devicechange",a),()=>{var e;n=!0,null==(e=null==i?void 0:i.removeEventListener)||e.call(i,"devicechange",a)}},[e.checkDevices]),ac("userSessionDropped",e=>{d((null==e?void 0:e.originator)??"unknown")}),t.useEffect(()=>{if(!(null==r?void 0:r.on))return;const e=e=>{var t;const n=(null==e?void 0:e.failure)??(null==(t=r.toCallData)?void 0:t.call(r).failure)??null;l(n??{cause:null}),c(null),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>l(null),h)};return r.on("failed",e),()=>{var t;null==(t=r.off)||t.call(r,"failed",e)}},[r,h]),t.useEffect(()=>{var e,t;if("manualCallFailed"!==(null==n?void 0:n.state))return;const r=(null==(t=null==(e=n.call)?void 0:e.toCallData)?void 0:t.call(e).failure)??null;l(e=>e??r??{cause:null}),c(null)},[n]),t.useEffect(()=>{"callInProgress"!==(null==n?void 0:n.state)&&"manualCallRinging"!==(null==n?void 0:n.state)&&"callRinging"!==(null==n?void 0:n.state)||l(null),"idle"!==(null==n?void 0:n.state)&&"onBreak"!==(null==n?void 0:n.state)||d(null)},[null==n?void 0:n.state]),t.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const m=Hp({deviceIssue:i,operatorState:(null==n?void 0:n.state)??null,startupError:"startupError"===(null==n?void 0:n.state)?n.error??null:null,sessionDrop:a,callFailure:s});return{notice:m&&m.code!==u?m:null,deviceIssue:i,dismiss:t.useCallback(()=>{m&&("call"===m.source?l(null):"session"===m.source?d(null):c(m.code))},[m]),recheckDevices:p}}(),[He,We]=t.useState(0),Ge="startupError"===Fe||"offline"===Fe||"device"===(null==Be?void 0:Be.source)||"session"===(null==Be?void 0:Be.source),Ve=!Fe||"starting"===Fe||"idle"===Fe||"manualCallSetup"===Fe||"onBreak"===Fe,Ke="manualCallSetup"===Pe||"manualCallRinging"===Pe||"callRinging"===Pe,Ye="callInProgress"===Pe,Xe="afterCall"===Pe,Je=t.useMemo(()=>ge&&"campaign"===ge.type?ge.info:null,[ge]);t.useEffect(()=>{n&&(Ye||Ke)&&"campaign"===(null==ge?void 0:ge.type)&&A(!0)},[n,Ye,Ke,ge]),t.useEffect(()=>{n&&(Ye||Ke||Xe||A(!1))},[n,Ye,Ke,Xe]),t.useEffect(()=>{if(!Ye)return void S(0);const e=setInterval(()=>{S(e=>e+1)},1e3);return()=>clearInterval(e)},[Ye]),t.useEffect(()=>{if(!Ne||!R)return;const e=setInterval(()=>{const e=Math.floor((Date.now()-R)/1e3);L(e)},1e3);return()=>clearInterval(e)},[Ne,R]),t.useEffect(()=>{!Ne&&k&&(j(null),P(null),L(0))},[Ne,k]),t.useEffect(()=>{const e=e=>{const t=e.detail;(null==t?void 0:t.phone)&&(N(null),u(T$(t.phone).slice(0,32)),f("dialer"),Pv("event","Call",`🖱️ Click-to-call recebido: ${t.phoneDisplay}`,{taskId:t.id,source:t.source}))};return window.addEventListener(_$,e),()=>window.removeEventListener(_$,e)},[]),t.useEffect(()=>{console.log("[MobileDialer] Screen control effect - callState:",Pe,"isInCall:",Ye,"isConnecting:",Ke,"isAfterCall:",Xe),Ye||Ke?f("call"):(Xe||Ve||Ne)&&f("dialer")},[Ye,Ke,Xe,Ve,Ne,Pe]),t.useEffect(()=>{if(Xe){console.log("[MobileDialer] 📋 afterCall triggered - callInfo:",JSON.stringify(ge,null,2)),console.log("[MobileDialer] 📋 afterCall - callInfo?.type:",null==ge?void 0:ge.type),console.log("[MobileDialer] 📋 afterCall - skipManualQualification:",s),console.log("[MobileDialer] 📋 afterCall - successQualifications:",ye.length),console.log("[MobileDialer] 📋 afterCall - discardQualifications:",be.length);if("campaign"===(null==ge?void 0:ge.type)&&!0===ge.info.campaign.skipCallQualification&&we)return console.log("[MobileDialer] 🚀 Campanha com skipCallQualification - finalizando automaticamente"),void Promise.resolve(we({result:"success",qualificationId:void 0}));if("manual"===(null==ge?void 0:ge.type)&&we)return console.log("[MobileDialer] 🚀 Chamada MANUAL detectada - finalizando automaticamente (chamadas manuais NUNCA exibem qualificação)"),void Promise.resolve(we({result:"success",qualificationId:void 0}));if(0===ye.length&&0===be.length&&we)return console.log("[MobileDialer] 🚀 Sem qualificações configuradas - finalizando automaticamente"),void Promise.resolve(we({result:"success",qualificationId:void 0}));console.log("[MobileDialer] ⚠️ Abrindo modal de qualificação - tipo:",null==ge?void 0:ge.type);const e=ye.length>0;y(e?"success":"failure"),x(null),_(null),g(!0)}else g(!1)},[Xe,ge,we,ye,be,s]);const Ze=t.useMemo(()=>c$(l),[l]),Qe=t.useMemo(()=>{if(/[*#]/.test(l))return null;const e=l.replace(/\D/g,"");if(!e)return null;const t=u$(e);return t&&t!==e&&p$(t)?c$(t):null},[l]),et=t.useCallback(e=>u$(e),[]),tt=t.useCallback(e=>{if(Oe.impactLight(),Ie.play(e),je.current&&clearTimeout(je.current),ke.current+=e,console.log("[MobileDialer] Sequência atual:",ke.current),Re(ke.current))return console.log("[MobileDialer] 🔓 Código secreto detectado!"),void u("");if(ke.current.length>20&&(ke.current=ke.current.slice(-10)),je.current=setTimeout(()=>{ke.current=""},3e3),Ye||Ke){if(fe&&"function"==typeof fe.sendDtmf)try{fe.sendDtmf(e)}catch(t){console.error("Falha ao enviar DTMF",t)}}else u(t=>(t+e).slice(0,32))},[fe,Ye,Ke,Oe,Ie,Re]),nt=t.useCallback(()=>{Oe.impactLight(),u(e=>e.slice(0,-1))},[Oe]),rt=t.useCallback(async()=>{console.log("[MobileDialer] handleCall triggered, dialValue:",l),Pv("event","Call","📞 Iniciando chamada manual",{dialValue:l});const e=et(l);if(console.log("[MobileDialer] Sanitized number:",e),!e||!p$(e))return console.log("[MobileDialer] Invalid phone format"),Pv("warn","Call","⚠️ Número inválido",{sanitized:e,isValid:!1}),N("Número inválido. Informe o DDD e o número (fixo com 8 ou celular com 9 dígitos)."),void Oe.notificationError();if(N(null),!xe)return console.error("[MobileDialer] makeManualCall is not available"),Pv("error","Call","❌ makeManualCall não disponível"),void N("Função de chamada não disponível.");const t=f$(e)??`+55${e}`;console.log("[MobileDialer] Calling makeManualCall with E.164:",t),Pv("info","Call",`📞 Ligando para ${t}`,{e164Number:t}),Oe.impactMedium();try{xe(t),console.log("[MobileDialer] makeManualCall called successfully"),Pv("info","Call","✅ makeManualCall executado com sucesso")}catch(n){console.error("[MobileDialer] Erro ao iniciar chamada manual:",n),Pv("error","Call","❌ Erro ao iniciar chamada",n),N("Erro ao iniciar chamada."),Oe.notificationError()}},[l,xe,et,Oe]),it=t.useCallback(async()=>{if(he){Pv("event","Call","📴 Encerrando chamada"),Oe.impactHeavy();try{await he(),Pv("info","Call","✅ Chamada encerrada")}catch(e){console.error("[MobileDialer] Erro ao desligar",e)}}},[he,Oe]),ot=t.useCallback(()=>{Oe.impactLight(),Ae(!Te)},[Te,Ae,Oe]),at=t.useCallback(()=>{if(Oe.impactLight(),!1===se)return console.warn("[MobileDialer] Viva-voz não suportado neste navegador/dispositivo"),void Oe.notificationWarning();if(!ie||null===se)return console.warn("[MobileDialer] Dispositivos de saída não detectados ainda"),void Oe.notificationWarning();const e=!ee,t=e?ie:ae;console.log("[MobileDialer] Alternando viva-voz:",e?"LIGADO":"DESLIGADO","Device:",t);try{(null==ue?void 0:ue.audioOutput)?(ue.audioOutput.setAudioOutputDevice(t),te(e),Oe.notificationSuccess(),console.log("[MobileDialer] Dispositivo de saída alterado com sucesso")):(console.warn("[MobileDialer] audioOutput não disponível no operator"),Oe.notificationError())}catch(n){console.error("[MobileDialer] Erro ao alternar viva-voz:",n),Oe.notificationError()}},[Oe,se,ie,ae,ee,ue]),dt=t.useCallback(async({phone:e,limit:t})=>{const n=null==Ee?void 0:Ee.id;if(!n)throw new Error("Aguardando ID do usuário");const r=new URLSearchParams({agent_id:String(n),limit:String(t)});e&&r.set("phone",e);const i=await fetch(`${Gp}/api/call-history?${r.toString()}`,{method:"GET",headers:Vp(),credentials:"omit"});if(!i.ok)throw new Error(401===i.status||403===i.status?"Sessão expirada. Entre novamente para ver o histórico.":`Erro ${i.status}`);return(await i.json()).items||[]},[null==Ee?void 0:Ee.id]),st=t.useCallback(async()=>{if(null==Ee?void 0:Ee.id){z(!0),W(null),Z.current=null;try{const e=await dt({limit:50});console.log("[MobileDialer] Histórico recebido:",e.length,"registros"),B(e)}catch(e){console.error("[MobileDialer] Erro ao buscar histórico:",e),W(e instanceof Error&&e.message.startsWith("Sessão")?e.message:"Erro ao carregar histórico"),B([])}finally{z(!1)}}else console.log("[MobileDialer] Aguardando ID do usuário para buscar histórico")},[dt,null==Ee?void 0:Ee.id]),lt=t.useCallback(async e=>{V(e);const t=iv(e),n=++Q.current;if("empty"===t.kind)return Y(null),void J(!1);J(!0);try{let e;"phone"===t.kind?e=await dt({phone:t.digits,limit:100}):(Z.current||(Z.current=await dt({limit:200})),e=Z.current),n===Q.current&&Y(e)}catch(r){console.error("[MobileDialer] Erro na busca do histórico:",r),n===Q.current&&Y(null)}finally{n===Q.current&&J(!1)}},[dt]),ut=t.useMemo(()=>{const e=iv(G);return"phone"===e.kind?"Busca por número em todo o histórico":"text"===e.kind?K?"Busca por texto nas últimas 200 chamadas":"Busca por texto nas chamadas carregadas":null},[G,K]);t.useEffect(()=>{"history"===c&&st()},[c,st]);const ct=t.useCallback(()=>{var t;let n="";"campaign"===(null==ge?void 0:ge.type)&&(null==(t=ge.info.campaignContact)?void 0:t.phoneNumber)?n=ge.info.campaignContact.phoneNumber:l&&(n=l);let r=n.replace(/[^\d+]/g,"");r.startsWith("+")||(r.startsWith("55")||(r="55"+r),r="+"+r);const i=my((null==Ee?void 0:Ee.name)||e||"",M.finalData),o=encodeURIComponent(i),a=`https://wa.me/${r.replace("+","")}?text=${o}`;console.log("[MobileDialer] Abrindo WhatsApp com template:",a),window.open(a,"_blank")},[ge,l,Ee,e,M.finalData]),ft=t.useCallback(async e=>{if(_e)try{const t=Se.find(t=>t.id===e);await _e(e),Oe.notificationSuccess(),j((null==t?void 0:t.name)??"Em pausa"),P(Date.now()),L(0),p(!1)}catch(t){console.error("Erro ao entrar em pausa",t),Oe.notificationError()}},[_e,Se,Oe]),ht=t.useCallback(async()=>{if(Ce)try{await Ce(),Oe.notificationSuccess(),j(null),P(null),L(0),p(!1)}catch(e){console.error("Erro ao sair de pausa",e),Oe.notificationError()}},[Ce,Oe]),pt=t.useCallback(async()=>{if(!we)return;if(!("success"===v?ye:be).length)return _("Nenhuma qualificação disponível."),void Oe.notificationWarning();if(!b)return _("Selecione uma qualificação."),void Oe.notificationWarning();_(null),Oe.impactMedium();try{await Promise.resolve(we({result:v,qualificationId:b})),Oe.notificationSuccess(),g(!1)}catch(e){_("Erro ao enviar qualificação."),Oe.notificationError(),console.error("Erro finishAfterCall",e)}},[be,we,v,b,ye,Oe]),mt=t.useMemo(()=>{var e;return"campaign"===(null==ge?void 0:ge.type)&&(null==(e=ge.info.campaignContact)?void 0:e.phoneNumber)?c$(ge.info.campaignContact.phoneNumber):Ze||"(--) ----- ----"},[ge,Ze]),gt=t.useMemo(()=>Ke?"Ligando...":Ye?"Em chamada":Xe?"Encerrando...":"manualCallFailed"===Fe?"Chamada não concluída":Ge?(null==Be?void 0:Be.title)??"Erro de conexão":Ne?"Em pausa":"Disponível",[Fe,Be,Xe,Ke,Ge,Ye,Ne]),$t=t.useMemo(()=>Ge?"error":Ne?"paused":"available",[Ge,Ne]),vt=t.useMemo(()=>Ge?"device"===(null==Be?void 0:Be.source)?Be.title:"Erro":Ne?k||"Em pausa":"Disponível",[Be,Ge,Ne,k]),yt=t.useMemo(()=>{const e=Math.floor(D/3600),t=Math.floor(D%3600/60).toString().padStart(2,"0"),n=(D%60).toString().padStart(2,"0");return e>0?`${e}:${t}:${n}`:`${t}:${n}`},[D]),bt=t.useMemo(()=>`${Math.floor(C/60).toString().padStart(2,"0")}:${(C%60).toString().padStart(2,"0")}`,[C]),xt=(e,t)=>$.jsxs("div",{className:"key","data-value":e,onClick:()=>tt(e),role:"button","aria-label":`Tecla ${e}`,children:[$.jsx("span",{className:"number","aria-hidden":"true",children:e}),$.jsx("span",{className:"letters","aria-hidden":"true",children:t||" "})]},e);return O?$.jsx(Hv,{onClose:()=>{I(!1),Pv("info","Debug","🔒 Painel de debug fechado")}}):$.jsxs("div",{className:"phone-container","data-density":"compact"===r?"compact":"comfortable",style:{"--notice-h":`${He}px`},children:[$.jsxs("div",{className:"screen dialer-screen "+("dialer"===c?"active":""),id:"dialerScreen",children:[$.jsxs("div",{className:"dialer-header",children:[$.jsx("div",{className:"status-container",children:$.jsxs("button",{className:`status-badge ${$t}`,id:"statusBadge",children:[$.jsx("span",{className:"status-dot"}),Ne?$.jsxs("div",{className:"status-info",children:[$.jsx("span",{className:"status-text",children:vt}),$.jsx("span",{className:"pause-timer",children:yt})]}):$.jsx("span",{className:"status-text",children:vt})]})}),$.jsx("div",{className:"status-actions",children:Ne?$.jsxs("button",{className:"resume-btn",id:"resumeBtn",onClick:ht,children:[$.jsx("i",{className:"fas fa-play"}),$.jsx("span",{children:"Voltar"})]}):$.jsxs("button",{className:"pause-btn",id:"pauseBtn",onClick:()=>p(!0),children:[$.jsx("i",{className:"fas fa-pause"}),$.jsx("span",{children:"Pausa"})]})})]}),$.jsx(Wv,{notice:Be,onDismiss:qe,onRecheck:()=>{ze()},onHeightChange:We}),$.jsx("div",{className:"phone-number-display",children:$.jsx(Q$,{id:"phoneNumber",className:"phone-input",placeholder:"","aria-label":"Número de telefone",value:l,onChange:e=>u(e.slice(0,32)),onSubmit:()=>{rt()}})}),Qe&&$.jsxs("div",{className:"dial-preview",children:["Será discado: ",Qe]}),$.jsxs("div",{className:"keypad",children:[xt("1",""),xt("2","ABC"),xt("3","DEF"),xt("4","GHI"),xt("5","JKL"),xt("6","MNO"),xt("7","PQRS"),xt("8","TUV"),xt("9","WXYZ"),xt("*",""),xt("0","+"),xt("#","")]}),E&&$.jsx("div",{className:"input-error",children:E}),$.jsxs("div",{className:"call-actions",children:[$.jsx("div",{className:"empty-space"}),$.jsx("button",{className:"call-button",id:"callButton",onClick:rt,disabled:!Ze||!Ve,children:$.jsx("i",{className:"fas fa-phone"})}),$.jsx("button",{className:"delete-button",id:"deleteButton",style:{visibility:l?"visible":"hidden"},onClick:nt,children:$.jsx("i",{className:"fas fa-delete-left"})})]})]}),$.jsxs("div",{className:"screen call-screen "+("call"===c?"active":""),id:"callScreen",children:[$.jsxs("div",{className:"call-info",children:[$.jsxs("div",{className:"call-status",children:[$.jsx("span",{className:"operator-badge-small",children:(null==e?void 0:e.slice(0,2).toUpperCase())||"OP"}),Ye?$.jsx("span",{id:"callTimer",children:bt}):$.jsx("span",{id:"callStatus",children:gt})]}),$.jsx("div",{className:"call-number",id:"callNumber",children:mt}),$.jsx("div",{className:"call-location",children:"Brasil"}),"campaign"===(null==ge?void 0:ge.type)&&$.jsx("div",{className:"client-card",id:"clientCard",children:M.isLoading?$.jsxs("div",{className:"client-card-loading",children:[$.jsx("i",{className:"fas fa-spinner fa-spin"}),$.jsx("span",{children:"Carregando dados..."})]}):M.error?$.jsxs("div",{className:"client-card-error",children:[$.jsx("i",{className:"fas fa-exclamation-circle"}),$.jsx("span",{children:M.error})]}):$.jsxs($.Fragment,{children:[$.jsxs("div",{className:"client-card-header",children:[$.jsx("i",{className:"fas fa-user-circle client-avatar"}),$.jsxs("div",{className:"client-main-info",children:[$.jsx("span",{className:"client-name",id:"clientName",children:cy(M.finalData,["DECISOR","NOME","CLIENTE","PROSPECT"])??(null==(i=ge.info.campaignContact)?void 0:i.label)??"--"}),$.jsx("span",{className:"client-company",id:"clientCompany",children:cy(M.finalData,["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","RAZAO_SOCIAL"])??(null==(o=ge.info.campaign)?void 0:o.name)??"--"})]})]}),$.jsx("div",{className:"client-card-divider"}),$.jsxs("div",{className:"client-info-list",children:[$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"Socio"}),$.jsx("span",{className:"client-info-value",children:cy(M.finalData,["SOCIO","PROSPECT","DECISOR","NOME","CLIENTE"])??(null==(a=ge.info.campaignContact)?void 0:a.label)??"--"})]}),$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"Empresa"}),$.jsx("span",{className:"client-info-value",children:cy(M.finalData,["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","RAZAO_SOCIAL","COMPANY"])??"--"})]}),$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"CNPJ"}),$.jsx("span",{className:"client-info-value",children:cy(M.finalData,["CNPJ","CPF_CNPJ","CPF/CNPJ","DOCUMENTO"])??"--"})]}),$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"Dívida federal ativa"}),$.jsx("span",{className:"client-info-value debt",children:cy(M.finalData,["DIVIDA_ATIVA","DIVIDA ATIVA","DÍVIDA ATIVA","DIVIDA FEDERAL","DÍVIDA FEDERAL ATIVA","VALOR DIVIDA"])??"R$ 0,00"})]})]}),$.jsx("div",{className:"client-card-divider"}),$.jsxs("div",{className:"client-capital-section",children:[$.jsx("span",{className:"client-capital-label",children:"Capital a recuperar"}),$.jsx("span",{className:"client-capital-value",children:cy(M.finalData,["CAPITAL_RECUPERAR","CAPITAL A RECUPERAR","BENEFICIO","BENEFÍCIO","VALOR_TOTAL","VALOR RECUPERADO"])??"R$ 0,00"})]})]})})]}),$.jsx(Xv,{}),$.jsxs("div",{className:"call-controls",children:[$.jsxs("div",{className:"control-row",children:[$.jsxs("button",{className:`control-button ${ee?"active":""} ${!1===se?"disabled":""}`,id:"speakerBtn",onClick:at,disabled:!1===se,title:!1===se?"Viva-voz não suportado neste dispositivo":"",children:[$.jsx("div",{className:"control-icon",children:$.jsx("i",{className:"fas "+(ee?"fa-volume-high":"fa-volume-low")})}),$.jsx("span",{children:ee?"Viva-voz":"Alto-falante"})]}),$.jsxs("button",{className:"control-button "+(Te?"active":""),id:"muteBtn",onClick:ot,children:[$.jsx("div",{className:"control-icon",children:$.jsx("i",{className:"fas "+(Te?"fa-microphone-slash":"fa-microphone")})}),$.jsx("span",{children:"Mudo"})]}),$.jsxs("button",{className:"control-button",id:"keypadBtn",onClick:()=>f("incallKeypad"),children:[$.jsx("div",{className:"control-icon",children:$.jsx("i",{className:"fas fa-th"})}),$.jsx("span",{children:"Teclado"})]})]}),$.jsxs("div",{className:"control-row control-row-center",children:[$.jsxs("button",{className:"control-button whatsapp-btn",id:"whatsappBtn",onClick:ct,children:[$.jsx("div",{className:"control-icon whatsapp-icon",children:$.jsx("i",{className:"fab fa-whatsapp"})}),$.jsx("span",{children:"WhatsApp"})]}),$.jsxs("div",{className:"end-call-wrapper",children:[$.jsx("button",{className:"end-call-button",id:"endCallButton",onClick:it,children:$.jsx("i",{className:"fas fa-phone-slash"})}),$.jsx("span",{className:"end-call-label",children:"Desligar"})]})]})]})]}),$.jsxs("div",{className:"screen incall-keypad-screen "+("incallKeypad"===c?"active":""),id:"incallKeypadScreen",children:[$.jsx("div",{className:"incall-header",children:$.jsx("button",{className:"hide-keypad-btn",id:"hideKeypadBtn",onClick:()=>f("call"),children:$.jsx("span",{children:"Ocultar"})})}),$.jsx("div",{className:"incall-number-display",children:$.jsx("span",{id:"incallPhoneNumber",children:mt})}),$.jsx("div",{className:"keypad incall-keypad",children:["1","2","3","4","5","6","7","8","9","*","0","#"].map(e=>$.jsxs("div",{className:"key incall-key","data-value":e,onClick:()=>tt(e),children:[$.jsx("span",{className:"number",children:e}),$.jsx("span",{className:"letters",children:" "})]},e))}),$.jsx("div",{className:"incall-actions",children:$.jsx("button",{className:"end-call-button",id:"endCallButton2",onClick:it,children:$.jsx("i",{className:"fas fa-phone-slash"})})})]}),$.jsx("div",{className:"screen call-history-screen "+("history"===c?"active":""),id:"callHistoryScreen",children:$.jsx(wv,{items:K??F,isLoading:q,error:H,onRefresh:st,query:G,onQueryChange:lt,isSearching:X,searchHint:ut,onCall:e=>{Oe.impactLight(),u(nv(e)),f("dialer")},onWhatsApp:t=>{Oe.impactLight();const n=`55${nv(t)}`,r=my((null==Ee?void 0:Ee.name)||e||"",t.fields);window.open(`https://wa.me/${n}?text=${encodeURIComponent(r)}`,"_blank")},apiBaseUrl:Gp,getAuthHeaders:Vp})}),$.jsxs("nav",{className:"bottom-nav "+("call"===c||"incallKeypad"===c?"hidden":""),id:"bottomNav",children:[$.jsxs("div",{className:"nav-item "+("history"===c?"active":""),id:"navCalls",onClick:()=>f("history"),children:[$.jsx("div",{className:"nav-icon",children:$.jsx("i",{className:"fas fa-clock-rotate-left"})}),$.jsx("span",{children:"Recentes"})]}),$.jsxs("div",{className:"nav-item "+("dialer"===c||"call"===c||"incallKeypad"===c?"active":""),id:"navKeypad",onClick:()=>f("dialer"),children:[$.jsx("div",{className:"nav-icon",children:$.jsx("i",{className:"fas fa-th"})}),$.jsx("span",{children:"Teclado"})]})]}),$.jsx("div",{className:"modal-overlay "+(h?"active":""),id:"pauseModal",children:$.jsxs("div",{className:"modal-content",children:[$.jsxs("div",{className:"modal-header",children:[$.jsx("h2",{className:"modal-title",children:"Selecionar Pausa"}),$.jsx("button",{className:"modal-close",id:"closePauseModal",onClick:()=>p(!1),children:$.jsx("i",{className:"fas fa-xmark"})})]}),$.jsxs("div",{className:"pause-options",id:"pauseOptions",children:[Se.map(e=>$.jsxs("div",{className:"pause-option",onClick:()=>ft(e.id),children:[$.jsx("div",{className:"pause-option-icon",children:$.jsx("i",{className:`fas ${e.icon||"fa-circle-pause"}`})}),$.jsxs("div",{className:"pause-option-info",children:[$.jsx("div",{className:"pause-option-name",children:e.name}),$.jsxs("div",{className:"pause-option-id",children:["ID: ",e.id]})]})]},e.id)),!Se.length&&$.jsx("div",{className:"history-empty",children:"Nenhuma pausa configurada."})]}),$.jsx("button",{className:"modal-cancel-btn",id:"cancelPauseBtn",onClick:()=>p(!1),children:"Cancelar"})]})}),$.jsx("div",{className:"modal-overlay qualification-modal "+(m?"active":""),id:"qualificationModal",children:$.jsxs("div",{className:"qualification-sheet",children:[$.jsx("div",{className:"sheet-handle"}),$.jsxs("div",{className:"sheet-header",children:[$.jsx("span",{className:"sheet-title",children:"Qualificar Chamada"}),$.jsx("span",{className:"sheet-subtitle",children:"Registre o resultado do atendimento"})]}),$.jsxs("div",{className:"result-segmented",children:[$.jsx("button",{className:"segment "+("success"===v?"active":""),id:"resultSuccess","data-type":"success",onClick:()=>{y("success"),x(null)},children:"Sucesso"}),$.jsx("button",{className:"segment "+("failure"===v?"active":""),id:"resultFailure","data-type":"failure",onClick:()=>{y("failure"),x(null)},children:"Falha"}),$.jsx("div",{className:"segment-indicator"})]}),$.jsx("div",{className:"qualifications-container",children:$.jsxs("div",{className:"qualification-list",id:"qualificationList",children:[("success"===v?ye:be).map(e=>$.jsx("button",{className:"qualification-item "+(b===e.id?"selected":""),onClick:()=>x(e.id),children:$.jsx("span",{children:e.name})},e.id)),!("success"===v?ye:be).length&&$.jsx("div",{className:"history-empty",children:"Nenhuma qualificação configurada."})]})}),w&&$.jsx("div",{className:"input-error",children:w}),$.jsx("div",{className:"sheet-footer",children:$.jsx("button",{className:"confirm-btn",id:"confirmQualificationBtn",onClick:pt,disabled:!b,children:"Confirmar"})})]})}),n&&$.jsx(ly,{isOpen:T,campaignCallInfo:Je,campaignContactPhoneId:(null==(d=null==fe?void 0:fe.data)?void 0:d.campaignContactPhoneId)??null,callDuration:C,isCallActive:Ye||Ke,onClose:()=>A(!1)})]})}const $y=16;function vy(e,t,n){return Math.min(Math.max(e,t),n)}function yy({isOpen:e,result:r,onChangeResult:i,successQualifications:o,discardQualifications:a,selectedQualificationId:d,onSelectQualification:s,onSubmit:l,isSubmitting:u,errorMessage:c,portalTarget:f=null}){const h=t.useRef(null),p=t.useRef({pointerId:null,offsetX:0,offsetY:0}),m=t.useRef(!1),[g,v]=t.useState({x:100,y:100}),[y,b]=t.useState(!1),x="success"===r?o:a,w=x.length>0,_=t.useCallback(e=>{if("undefined"==typeof window)return e;const t=window.innerWidth,n=window.innerHeight,r=h.current,i=(null==r?void 0:r.offsetWidth)??400,o=(null==r?void 0:r.offsetHeight)??500,a=Math.max(16,t-i-$y),d=Math.max(16,n-o-$y);return{x:vy(e.x,16,a),y:vy(e.y,16,d)}},[]);t.useEffect(()=>{if(e&&"undefined"!=typeof window){const e=h.current,t=(null==e?void 0:e.offsetWidth)??400,n=(null==e?void 0:e.offsetHeight)??500,r=(window.innerWidth-t)/2,i=(window.innerHeight-n)/2;v(_({x:r,y:i}))}},[e,_]),t.useEffect(()=>{if(!e||"undefined"==typeof window)return;const t=()=>{v(e=>_(e))};return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t)}},[e,_]),t.useEffect(()=>{if(!y)return;const e=e=>{var t,n;if(p.current.pointerId!==e.pointerId)return;m.current=!0;const r=(null==(t=h.current)?void 0:t.offsetWidth)??0,i=(null==(n=h.current)?void 0:n.offsetHeight)??0,o=e.clientX-p.current.offsetX,a=e.clientY-p.current.offsetY,d="undefined"!=typeof window?window.innerWidth:0,s="undefined"!=typeof window?window.innerHeight:0,l=d-r-$y,u=s-i-$y,c=Math.max($y,l),f=Math.max($y,u);v({x:vy(o,$y,c),y:vy(a,$y,f)})},t=e=>{p.current.pointerId===e.pointerId&&(b(!1),p.current={pointerId:null,offsetX:0,offsetY:0})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[y]);const C=t.useCallback(e=>{if(0!==e.button&&"touch"!==e.pointerType)return;const t=h.current;if(!t)return;const n=t.getBoundingClientRect();p.current={pointerId:e.pointerId,offsetX:e.clientX-n.left,offsetY:e.clientY-n.top},m.current=!1,b(!0)},[]);if(!e)return null;const S=$.jsxs("div",{ref:h,className:Gh`fixed z-[9999] flex flex-col overflow-hidden rounded-xl border border-slate-300 bg-white shadow-2xl`,style:{left:`${g.x}px`,top:`${g.y}px`,width:"420px",maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 32px)"},children:[$.jsx("div",{onPointerDown:C,className:Gh`flex cursor-move items-center justify-center border-b border-slate-200 bg-gradient-to-r from-indigo-500 to-indigo-600 px-4 py-3 text-white`,children:$.jsx("h3",{className:Gh`text-sm font-bold`,children:"Qualificar Chamada"})}),$.jsxs("div",{className:Gh`flex-1 space-y-4 overflow-y-auto p-5`,children:[$.jsx("div",{className:Gh`text-center`,children:$.jsx("p",{className:Gh`text-sm text-slate-600`,children:"Esta etapa é obrigatória para registrar o desfecho do atendimento."})}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsx("p",{className:Gh`text-sm font-semibold text-slate-700`,children:"Resultado da chamada"}),$.jsxs("div",{className:Gh`grid grid-cols-2 gap-3`,children:[$.jsxs("button",{type:"button",onClick:()=>i("success"),className:Gh`${"success"===r?"border-emerald-500 bg-emerald-50 ring-2 ring-emerald-500":"border-slate-200 bg-white hover:border-emerald-300"} flex flex-col items-center justify-center gap-2 rounded-lg border px-4 py-3 transition`,children:[$.jsx(_c,{className:Gh`h-6 w-6 ${"success"===r?"text-emerald-600":"text-slate-400"}`}),$.jsx("span",{className:Gh`text-sm font-semibold ${"success"===r?"text-emerald-700":"text-slate-600"}`,children:"Sucesso"})]}),$.jsxs("button",{type:"button",onClick:()=>i("failure"),className:Gh`${"failure"===r?"border-rose-500 bg-rose-50 ring-2 ring-rose-500":"border-slate-200 bg-white hover:border-rose-300"} flex flex-col items-center justify-center gap-2 rounded-lg border px-4 py-3 transition`,children:[$.jsx(Hc,{className:Gh`h-6 w-6 ${"failure"===r?"text-rose-600":"text-slate-400"}`}),$.jsx("span",{className:Gh`text-sm font-semibold ${"failure"===r?"text-rose-700":"text-slate-600"}`,children:"Falha"})]})]})]}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsx("p",{className:Gh`text-sm font-semibold text-slate-700`,children:"Selecione uma qualificação"}),w?$.jsx("div",{className:Gh`max-h-64 space-y-2 overflow-y-auto rounded-lg border border-slate-200 bg-slate-50 p-2`,children:x.map(e=>{const t=d===e.id;return $.jsx("button",{type:"button",onClick:()=>s(e.id),className:Gh`${t?"border-blue-400 bg-blue-100 ring-2 ring-blue-400":"border-slate-200 bg-white hover:border-blue-300"} w-full rounded-lg border px-4 py-3 text-left transition`,children:$.jsx("p",{className:Gh`text-sm font-semibold ${t?"text-blue-800":"text-slate-800"}`,children:e.name})},e.id)})}):$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700`,children:[$.jsx(yc,{className:Gh`h-5 w-5 flex-shrink-0`}),$.jsx("span",{children:"Nenhuma qualificação disponível para este tipo de resultado."})]})]}),c&&$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700`,children:[$.jsx(yc,{className:Gh`h-5 w-5 flex-shrink-0`}),$.jsx("span",{children:c})]})]}),$.jsx("div",{className:Gh`border-t border-slate-200 bg-slate-50 px-5 py-4`,children:$.jsxs("button",{type:"button",onClick:l,disabled:!w||!d||u,className:Gh`flex w-full items-center justify-center gap-2 rounded-lg bg-indigo-600 px-4 py-3 text-sm font-bold text-white shadow-md transition hover:bg-indigo-700 disabled:cursor-not-allowed disabled:opacity-50`,children:[u&&$.jsxs("svg",{className:Gh`h-4 w-4 animate-spin text-white`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[$.jsx("circle",{className:Gh`opacity-25`,cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),$.jsx("path",{className:Gh`opacity-75`,fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u?"Enviando...":"Confirmar Qualificação"]})})]});return"undefined"!=typeof document?n.createPortal(S,f??document.body):null}function by({variant:e="default",portalTarget:t,isAuthenticated:n,mode:r,...i}){const o="min"===e;return"mobile"===e?$.jsx(fy,{isAuthenticated:n,showClientInfoModal:"inline"===r,...i}):n&&o?$.jsx(xy,{portalTarget:t,...i}):$.jsx(M$,{variant:e,portalTarget:t,isAuthenticated:n,...i})}function xy({username:e,onLogin:n,onLogout:r,isLoadingSession:i,sessionError:o,portalTarget:a}){var d;const{skipManualQualification:s}=Iy(),l=Xu(),u=Qu(),c=Zu(),f=ec(),h=tc(),p=t.useMemo(()=>f??[],[f]),m=t.useMemo(()=>h??[],[h]),{finishAfterCall:g}=Ju(),[v,y]=t.useState(!1),[b,x]=t.useState(!1),[w,_]=t.useState(0),[C,S]=t.useState("success"),[E,N]=t.useState(null),[T,A]=t.useState(!1),[O,I]=t.useState(null),k=null==l?void 0:l.state,j="callInProgress"===k,R="manualCallSetup"===k||("manualCallRinging"===k||"callRinging"===k),P="afterCall"===k;t.useEffect(()=>{if(!j)return void _(0);const e=setInterval(()=>{_(e=>e+1)},1e3);return()=>clearInterval(e)},[j]),t.useEffect(()=>{(j||R)&&"campaign"===(null==u?void 0:u.type)&&y(!0)},[j,R,u]),t.useEffect(()=>{if(P){if("campaign"===(null==u?void 0:u.type)&&!0===u.info.campaign.skipCallQualification&&g)return void Promise.resolve(g({result:"success",qualificationId:void 0}));if("manual"===(null==u?void 0:u.type)&&g)return console.log("[InlineDialer] 🚀 Chamada MANUAL detectada - finalizando automaticamente (chamadas manuais NUNCA exibem qualificação)"),void Promise.resolve(g({result:"success",qualificationId:void 0}));if(0===p.length&&0===m.length&&g)return console.log("[InlineDialer] 🚀 Sem qualificações configuradas - finalizando automaticamente"),void Promise.resolve(g({result:"success",qualificationId:void 0}));const e=p.length>0;S(e?"success":"failure"),N(null),I(null),x(!0)}else x(!1)},[P,u,g,p,m,s]),t.useEffect(()=>{j||R||P||y(!1)},[j,R,P]);const D=t.useMemo(()=>u&&"campaign"===u.type?u.info:null,[u]);return $.jsxs($.Fragment,{children:[$.jsx("style",{dangerouslySetInnerHTML:{__html:'\n /* Container externo do HTML - SEM padding/border para não vazar */\n #dialer-inline.callix.mode.min {\n display: block !important;\n width: 100% !important;\n max-width: 100% !important;\n padding: 0 !important;\n border: none !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n\n /* Estilos para modo mini quando Tailwind CDN não processa classes */\n .callix.mode.min {\n display: flex !important;\n flex-direction: column !important;\n gap: 0.75rem !important;\n border-radius: 1rem !important;\n border: 1px solid #e2e8f0 !important;\n background: rgba(255, 255, 255, 0.95) !important;\n padding: 0.75rem !important;\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;\n color: #1e293b !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n }\n\n /* Visor de número - fonte menor para caber todos os dígitos */\n .callix.mode.min [class*="truncate"] {\n font-size: 0.875rem !important; /* text-sm */\n line-height: 1.25rem !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n }\n\n /* Botões do modo mini */\n .callix.mode.min button {\n cursor: pointer !important;\n transition: all 0.2s ease !important;\n }\n \n .callix.mode.min button:disabled {\n cursor: not-allowed !important;\n opacity: 0.6 !important;\n }\n\n /* Grid do teclado numérico */\n .callix.mode.min [class*="grid-cols-3"] {\n display: grid !important;\n grid-template-columns: repeat(3, minmax(0, 1fr)) !important;\n gap: 0.5rem !important;\n }\n\n /* Botões do teclado */\n .callix.mode.min [class*="grid-cols-3"] button {\n display: flex !important;\n height: 3rem !important;\n flex-direction: column !important;\n align-items: center !important;\n justify-content: center !important;\n border-radius: 0.5rem !important;\n border: 1px solid #e2e8f0 !important;\n background: white !important;\n font-size: 1rem !important;\n font-weight: 600 !important;\n color: #1e293b !important;\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;\n }\n\n .callix.mode.min [class*="grid-cols-3"] button:hover:not(:disabled) {\n border-color: #cbd5e1 !important;\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;\n }\n\n .callix.mode.min [class*="grid-cols-3"] button:active:not(:disabled) {\n transform: scale(0.95) !important;\n }\n\n /* Botão principal de Ligar/Encerrar */\n .callix.mode.min > button[class*="bg-emerald"],\n .callix.mode.min > button[class*="bg-rose"] {\n display: flex !important;\n height: 2.75rem !important;\n width: 100% !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 0.5rem !important;\n border-radius: 0.75rem !important;\n font-size: 0.875rem !important;\n font-weight: 700 !important;\n color: white !important;\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;\n border: none !important;\n }\n\n .callix.mode.min > button[class*="bg-emerald"] {\n background: #10b981 !important;\n }\n\n .callix.mode.min > button[class*="bg-emerald"]:hover:not(:disabled) {\n background: #059669 !important;\n }\n\n .callix.mode.min > button[class*="bg-rose"] {\n background: #f43f5e !important;\n }\n\n .callix.mode.min > button[class*="bg-rose"]:hover:not(:disabled) {\n background: #e11d48 !important;\n }\n '}}),$.jsx(M$,{isAuthenticated:!0,username:e,onLogin:n,onLogout:r,isLoadingSession:i,sessionError:o,variant:"min"}),$.jsx(ly,{isOpen:v,campaignCallInfo:D,campaignContactPhoneId:(null==(d=null==c?void 0:c.data)?void 0:d.campaignContactPhoneId)??null,callDuration:w,isCallActive:j||R,onClose:()=>y(!1),portalTarget:a}),$.jsx(yy,{isOpen:b,result:C,onChangeResult:S,successQualifications:p,discardQualifications:m,selectedQualificationId:E,onSelectQualification:N,onSubmit:async()=>{if(("success"===C?p:m).length)if(E)if("function"==typeof g){A(!0),I(null);try{await Promise.resolve(g({result:C,qualificationId:E})),x(!1)}catch(e){I("Erro ao enviar qualificacao."),console.error("Erro ao finalizar afterCall:",e)}finally{A(!1)}}else I("Não foi possível enviar a qualificação.");else I("Selecione uma qualificação para finalizar.");else I("Nenhuma qualificação configurada para este resultado.")},isSubmitting:T,errorMessage:O})]})}const wy=new Set(["STORE_NOT_CONFIGURED","SERVER_NOT_CONFIGURED"]),_y=new Set(["manualCallSetup","manualCallRinging","callInProgress","afterCall"]);function Cy(e){return e?{"Content-Type":"application/json","x-session-token":e,Authorization:`Bearer ${e}`}:Vp()}const Sy=e=>new Promise(t=>setTimeout(t,e));function Ey({enabled:e=!0,pollIntervalMs:n,sessionToken:r,onTask:i}){const o=Xu(),{makeManualCall:a}=Ju(),d=t.useRef(null==o?void 0:o.state);d.current=null==o?void 0:o.state;const s=t.useRef(a);s.current=a;const l=t.useRef(i);l.current=i;const u=t.useRef(null),c=t.useRef(null);return t.useEffect(()=>{var e;null==(e=c.current)||e.call(c)},[null==o?void 0:o.state]),t.useEffect(()=>{if(!e)return;let t=!1,i=!1,o=0,a=0,f="normal",h=!1,p=45e3,m=Math.max(1e3,n??4e3);const g={apiBaseUrl:Gp,headers:Cy(r)},$=()=>{if("notConfigured"===f)return 3e5;const e=Math.max(1e3,Math.floor(p/2)),t=Math.min(m,e);if("backoff"===f)return Math.min(t*2**a,6e4);const n=Math.min(3*t,e);return S$(C$(d.current))?t:n},v=()=>{var e;return null==(e=u.current)?void 0:e.setInterval($())};c.current=v;const y=async e=>{for(let r=0;r<3;r++){try{const t=await N$({...g,...e});if(t.ok)return!0;if(!(t.status>=500||408===t.status||429===t.status))return console.warn("[ClickToCall] confirmação recusada pelo servidor:",t.status,t.code??"","(tarefa",e.taskId,")"),!1}catch(n){console.warn("[ClickToCall] confirmação falhou (tentativa",r+1,"):",n instanceof Error?n.message:n)}if(t||2===r)break;await Sy(1500*(r+1))}return console.error("[ClickToCall] não foi possível confirmar a tarefa",e.taskId,"; o servidor a marcará como não confirmada"),!1},b=async e=>{var n;const r=d.current;if(o=Date.now()+6e3,!S$(C$(r)))return console.warn("[ClickToCall] tarefa",e.id,"recebida com operador ocupado (",r,"): devolvendo à fila"),void(await y({taskId:e.id,status:"failed",error:`Operador indisponível (${r??"desconhecido"})`,retry:!0}));console.log("[ClickToCall] 🖱️ ligação pedida pela API:",e.phoneDisplay,"(tarefa",e.id,")");try{window.dispatchEvent(new CustomEvent(_$,{detail:e}))}catch(a){console.warn("[ClickToCall] falha ao notificar o discador:",a)}try{null==(n=l.current)||n.call(l,e)}catch(a){console.warn("[ClickToCall] onTask lançou erro:",a)}try{s.current(e.phone)}catch(a){const t=a instanceof Error?a.message:String(a);return console.error("[ClickToCall] makeManualCall falhou:",t),void(await y({taskId:e.id,status:"failed",error:t,retry:!1}))}const i=await new Promise(e=>{const n=Date.now()+4e3,r=()=>{if(t)return e("disposed");const i=d.current;return i&&_y.has(i)?e("started"):"manualCallFailed"===i?e("manual_failed"):"callRinging"===i||"offline"===C$(i)?e("interrupted"):Date.now()>=n?e("not_started"):void setTimeout(r,100)};r()});switch(i){case"started":return void(await y({taskId:e.id,status:"calling"}));case"manual_failed":return console.error("[ClickToCall] o SDK não conseguiu completar a chamada manual"),void(await y({taskId:e.id,status:"failed",error:"Chamada manual falhou no SDK",retry:!1}));case"interrupted":return console.warn("[ClickToCall] chamada manual não aconteceu (estado",d.current,"): devolvendo à fila"),void(await y({taskId:e.id,status:"failed",error:`Discador interrompido (${d.current??"desconhecido"})`,retry:!0}));case"disposed":return void(await y({taskId:e.id,status:"failed",error:"Discador encerrado durante a discagem",retry:!0}));default:{const t=`SDK não iniciou a chamada (estado continua ${d.current??"desconhecido"})`;console.error("[ClickToCall]",t),await y({taskId:e.id,status:"failed",error:t,retry:!1})}}},x=async()=>{if(!t&&!i){i=!0;try{const r=d.current,i=S$(C$(r))&&Date.now()>=o;let s;try{s=await async function(e){const{signal:t,clear:n}=E$(e.signal);try{const n=await fetch(`${e.apiBaseUrl}/api/click-to-call/poll`,{method:"POST",headers:e.headers,body:JSON.stringify({state:e.state??null,claim:e.claim}),credentials:"omit",signal:t});if(!n.ok){let e=null;try{const t=await n.json();e="string"==typeof(null==t?void 0:t.error)?t.error:null}catch{}return{ok:!1,status:n.status,code:e}}const r=await n.json();return{ok:!0,presence:r.presence??"unknown",task:r.task&&"object"==typeof r.task&&"string"==typeof r.task.phone?r.task:null,pollIntervalMs:"number"==typeof r.pollIntervalMs?r.pollIntervalMs:0,presenceTtlSeconds:"number"==typeof r.presenceTtlSeconds&&r.presenceTtlSeconds>0?r.presenceTtlSeconds:45}}finally{n()}}({...g,state:r,claim:i})}catch(e){s={ok:!1,status:0,code:e instanceof Error&&"AbortError"===e.name?"TIMEOUT":"NETWORK"}}if(t)return void(s.ok&&s.task&&await y({taskId:s.task.id,status:"failed",error:"Discador encerrado antes de discar",retry:!0}));if(!s.ok){a+=1;const e=null!==s.code&&wy.has(s.code);return f=e?"notConfigured":"backoff",e?h||(h=!0,console.warn("[ClickToCall] backend sem click-to-call configurado (",s.code,"); nova tentativa em 5 min")):1===a&&console.warn("[ClickToCall] polling falhou (HTTP",s.status,s.code??"","); aplicando backoff"),void v()}if("normal"!==f&&(f="normal",a=0),p=1e3*s.presenceTtlSeconds,void 0===n&&s.pollIntervalMs>0&&(m=Math.max(1e3,s.pollIntervalMs)),v(),s.task)try{await b(s.task)}catch(e){console.error("[ClickToCall] erro ao tratar a tarefa",s.task.id,":",e instanceof Error?e.message:e)}}finally{i=!1}}},w=function(e,t){let n=Math.max(250,Math.round(t)),r=null,i=null,o=null,a=!1;const d=()=>{a||(r&&clearInterval(r),r=setInterval(e,n))};try{"undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL&&URL.createObjectURL?(o=URL.createObjectURL(new Blob(["\nlet timer = null;\nself.onmessage = (event) => {\n const interval = Number(event && event.data && event.data.interval) || 0;\n if (timer) { clearInterval(timer); timer = null; }\n if (interval > 0) { timer = setInterval(() => self.postMessage('tick'), interval); }\n};\n"],{type:"application/javascript"})),i=new Worker(o),i.onmessage=()=>{a||e()},i.onerror=()=>{null==i||i.terminate(),i=null,d()},i.postMessage({interval:n})):d()}catch{i=null,d()}return{setInterval(e){if(a)return;const t=Math.max(250,Math.round(e));t!==n&&(n=t,i?i.postMessage({interval:n}):d())},stop(){a=!0,i&&(i.terminate(),i=null),o&&(URL.revokeObjectURL(o),o=null),r&&(clearInterval(r),r=null)}}}(()=>{x()},$());return u.current=w,x(),()=>{t=!0,w.stop(),u.current===w&&(u.current=null),c.current===v&&(c.current=null),function(e){try{fetch(`${e.apiBaseUrl}/api/click-to-call/poll`,{method:"POST",headers:e.headers,body:JSON.stringify({state:"offline",claim:!1}),credentials:"omit",keepalive:!0}).catch(()=>{})}catch{}}(g)}},[e,n,r]),null}const Ny="2.6.0";let Ty=null;function Ay(){return new Promise(e=>{if(!Ty)return console.log("[Callix Dialer] 📭 Nenhum WebSocket SIP ativo para fechar"),void e();if(Ty.readyState===WebSocket.CLOSED||Ty.readyState===WebSocket.CLOSING)return console.log("[Callix Dialer] 📭 WebSocket SIP já está fechando/fechado"),Ty=null,void e();console.log("[Callix Dialer] 🔌 Fechando WebSocket SIP existente...");const t=Ty;!function(e){if(e.readyState===WebSocket.OPEN)try{console.log("[Callix Dialer] 📤 Tentando enviar sinalização de fechamento...");const t=e;t._ua&&"function"==typeof t._ua.stop?(console.log("[Callix Dialer] 🔌 Encontrado UA, chamando stop()..."),t._ua.stop()):t._connection&&"function"==typeof t._connection.close&&(console.log("[Callix Dialer] 🔌 Fechando conexão interna..."),t._connection.close())}catch(t){console.warn("[Callix Dialer] ⚠️ Não foi possível enviar UNREGISTER:",t)}}(t);const n=setTimeout(()=>{console.log("[Callix Dialer] ⏱️ Timeout ao fechar WebSocket, continuando...");try{t.close(1e3,"Force close after timeout")}catch{}e()},3e3);t.addEventListener("close",()=>{clearTimeout(n),console.log("[Callix Dialer] ✅ WebSocket SIP fechado com sucesso"),e()},{once:!0}),setTimeout(()=>{t.close(1e3,"Page reload - cleaning up SIP connection")},500)})}!function(){if("undefined"==typeof window)return;if(window.__callixWsInterceptorSetup)return;window.__callixWsInterceptorSetup=!0;const e=window.WebSocket;window.WebSocket=function(t,n){const r=new e(t,n);return"string"==typeof t&&t.includes("callix")&&t.includes("/ws")&&(console.log("[Callix Dialer] 🔌 WebSocket SIP detectado:",t),Ty=r,r.addEventListener("message",e=>{if("string"==typeof e.data&&e.data.includes("Call-ID:")){const t=e.data.match(/Call-ID:\s*([^\r\n]+)/i);t&&t[1].trim()}}),r.addEventListener("close",()=>{console.log("[Callix Dialer] 🔌 WebSocket SIP fechado"),Ty===r&&(Ty=null)})),r},Object.assign(window.WebSocket,{CONNECTING:e.CONNECTING,OPEN:e.OPEN,CLOSING:e.CLOSING,CLOSED:e.CLOSED}),console.log("[Callix Dialer] ✅ WebSocket interceptor configurado")}(),"undefined"!=typeof window&&(window.__callixUnloadSetup||(window.__callixUnloadSetup=!0,window.addEventListener("beforeunload",()=>{console.log("[Callix Dialer] 🚪 Página fechando, limpando WebSocket SIP..."),Ty&&Ty.readyState===WebSocket.OPEN&&Ty.close(1e3,"Page unload")}),window.addEventListener("pagehide",()=>{Ty&&Ty.readyState===WebSocket.OPEN&&Ty.close(1e3,"Page hide")}),console.log("[Callix Dialer] ✅ Page unload cleanup configurado"))),function(){if("undefined"==typeof document)return;if(document.querySelector('meta[name="format-detection"]'))return;const e=document.createElement("meta");e.name="format-detection",e.content="telephone=no, date=no, email=no, address=no",document.head.appendChild(e),console.log("[Callix Dialer] ✅ iOS format-detection meta tag adicionada")}();const Oy=t.createContext(null);function Iy(){const e=t.useContext(Oy);return e||{skipManualQualification:!1}}const ky=t.forwardRef(function({children:e},n){const r=Yu(),i=Ju();return t.useImperativeHandle(n,()=>({goOffline:()=>{console.log("[Callix Dialer] 📴 Chamando goOffline() para enviar SIP UNREGISTER...");try{i.goOffline(),console.log("[Callix Dialer] ✅ goOffline() chamado com sucesso")}catch(e){console.error("[Callix Dialer] ❌ Erro ao chamar goOffline():",e)}},stop:()=>{console.log("[Callix Dialer] 🛑 Chamando stop() no CallOperator...");try{r.stop(),console.log("[Callix Dialer] ✅ stop() chamado com sucesso")}catch(e){console.error("[Callix Dialer] ❌ Erro ao chamar stop():",e)}}}),[r,i]),t.useEffect(()=>()=>{console.log("[Callix Dialer] 🔌 SdkCleanupManager desmontando, chamando goOffline()...");try{i.goOffline()}catch(e){console.warn("[Callix Dialer] ⚠️ Erro no cleanup automático:",e)}},[i]),$.jsx($.Fragment,{children:e})});class jy{constructor(e){this.root=null,this.container=null,this.options=e}init(){try{if("string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container,!this.container)throw new Error(`Container não encontrado: ${this.options.container}`);const e=function(e){const t={},n=e.getAttribute("data-callix-engine-url")??e.dataset.callixEngineUrl;n&&n.trim()&&(t.engineUrl=n.trim());const r=e.getAttribute("data-callix-engine-token")??e.dataset.callixEngineToken;r&&r.trim()&&(t.engineToken=r.trim());const i=e.getAttribute("data-callix-mode")||e.dataset.callixMode||e.dataset.mode,o=e.getAttribute("data-callix-username")||e.dataset.callixUsername||e.dataset.username,a=Array.from(e.classList),d=a.map(e=>e.toLowerCase()),s=d.includes("callix"),l=i?i.toLowerCase():void 0;if("min"===l||"mini"===l?t.uiVariant="min":"mobile"===l?t.uiVariant="mobile":"default"===l||"floating"===l||"full"===l||"inline"===l?t.uiVariant="default":s&&(d.includes("mode-min")||d.includes("mode-mini")||d.includes("mode")&&d.includes("min"))&&(t.uiVariant="min"),!t.presetUsername&&o&&(t.presetUsername=o.trim()),!t.presetUsername)for(const h of a){const e=h.match(/(?:user|username|callix-user)[-_:]([A-Za-z0-9.@_-]+)/i);if(e){t.presetUsername=e[1];break}}t.presetUsername&&(t.presetUsername=t.presetUsername.trim());const u=e.getAttribute("data-callix-auto-login")??e.dataset.callixAutoLogin??e.dataset.autoLogin;null!=u&&(t.autoLogin=["true","1","yes",""].includes(u.trim().toLowerCase()));const c=function(e){const t=(e??"").trim().toLowerCase();return"compact"===t||"compacta"===t||"compacto"===t?"compact":"comfortable"===t||"confortavel"===t||"confortável"===t||"touch"===t?"comfortable":"auto"===t?"auto":void 0}(e.getAttribute("data-callix-density")??e.dataset.callixDensity);c&&(t.density=c);const f=e.getAttribute("data-callix-click-to-call")??e.dataset.callixClickToCall;return null!=f&&(t.clickToCall=!["false","0","no","off"].includes(f.trim().toLowerCase())),t}(this.container);!this.options.uiVariant&&e.uiVariant&&(this.options.uiVariant=e.uiVariant),!this.options.presetUsername&&e.presetUsername&&(this.options.presetUsername=e.presetUsername),void 0===this.options.autoLogin&&void 0!==e.autoLogin&&(this.options.autoLogin=e.autoLogin),void 0===this.options.density&&void 0!==e.density&&(this.options.density=e.density),void 0===this.options.clickToCall&&void 0!==e.clickToCall&&(this.options.clickToCall=e.clickToCall),!this.options.engineUrl&&e.engineUrl&&(this.options.engineUrl=e.engineUrl),!this.options.engineToken&&e.engineToken&&(this.options.engineToken=e.engineToken),this.root=x.createRoot(this.container),this.root.render($.jsx(t.StrictMode,{children:$.jsx(Dy,{options:this.options,containerEl:this.container})})),this.options.onReady&&this.options.onReady()}catch(e){this.options.onError?this.options.onError(e):console.error("[Callix Dialer] Erro ao inicializar:",e)}}destroy(){this.root&&(this.root.unmount(),this.root=null)}}const Ry=e=>({SESSION_TOKEN:`callix_dialer_${e}_session_token`,DOMAIN:`callix_dialer_${e}_domain`,TIMESTAMP:`callix_dialer_${e}_timestamp`,SKIP_MANUAL_QUALIFICATION:`callix_dialer_${e}_skip_manual_qualification`}),Py="callix_dialer_last_username";function Dy({options:e,containerEl:n}){const[r,i]=t.useState(null),[o,a]=t.useState(!1),[d,s]=t.useState(!1),[l,u]=t.useState(null),[c,f]=t.useState(null),[h,p]=t.useState(null),[m,g]=t.useState(!0),[v,y]=t.useState(!1),[b,x]=t.useState(null),w=t.useRef(null),[_,C]=t.useState(()=>Date.now()),[S,E]=t.useState(!1),N=e.presetUsername?e.presetUsername.trim():null,T=e.uiVariant??"default",A=!0===e.autoLogin,O=t.useMemo(()=>e.portalTarget??n??null,[e.portalTarget,n]),I=t.useRef(!1),k=t.useRef(N),j=t.useRef({apiUrl:e.apiUrl||"/api/user-sdk-session",token:null});t.useEffect(()=>{j.current.token=c},[c]);const R=Boolean(e.engineUrl),P=t.useRef(R);P.current=R;const D=t.useRef(null),L=t.useCallback(t=>{const n=D.current;if(n&&n.agentId===t)return n.connect(),n;null==n||n.close();const r=new Pu({url:e.engineUrl??"",token:e.engineToken??"",agentId:t,label:"Discador",log:e=>console.log("[Callix Dialer/motor]",e)});return r.onSessionLost(e=>{const t=Fp(e.originator);u(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`),a(!1),f(null),I.current=!0}),r.connect(),D.current=r,r},[e.engineUrl,e.engineToken]);t.useEffect(()=>()=>{var e;null==(e=D.current)||e.close(),D.current=null},[]),t.useEffect(()=>{const e=()=>{if(P.current)return;const{apiUrl:e,token:t}=j.current;if(t){const n=JSON.stringify({logout:!0}),r=`${e}?logout=true`;if(navigator.sendBeacon){const e=new Blob([n],{type:"application/json"});navigator.sendBeacon(r,e),console.log("[Callix Dialer] Logout enviado via sendBeacon")}else fetch(e,{method:"DELETE",headers:{Authorization:`Bearer ${t}`},keepalive:!0}).catch(()=>{})}};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[]),t.useEffect(()=>{if("undefined"!=typeof window)try{const e=localStorage.getItem(Py);if(!e)return console.log("[Callix Dialer] Nenhum username salvo, aguardando login manual"),void g(!1);if(N&&e!==N)return console.log("[Callix Dialer] Ignorando sessao salva por mismatch com preset:",e,"!=",N),void g(!1);console.log("[Callix Dialer] Username encontrado, irá fazer novo login:",e),i(e);const t=Ry(e),n=localStorage.getItem(t.SKIP_MANUAL_QUALIFICATION);n&&y("true"===n)}catch(e){console.error("[Callix Dialer] Erro ao verificar sessão:",e)}finally{g(!1)}else g(!1)},[N]),t.useEffect(()=>{N&&r!==N&&i(N)},[N,r]);const M=t.useCallback(async t=>{var n,r;if(s(!0),u(null),x("Preparando login..."),console.log("[Callix Dialer] 🚀 handleLogin iniciado para usuário:",t),e.engineUrl){const n=e.apiUrl||"/api/user-sdk-session";try{x("Conectando ao motor...");const r=L(t),o=await r.waitForView(15e3),d=e.domain||new URL(n,window.location.href).host,s=("running"===o.engine||"starting"===o.engine)&&!o.sessionLost;let l=null;if(s){try{l=localStorage.getItem(Ry(t).SESSION_TOKEN)}catch{l=null}console.log("[Callix Dialer] motor já tem a sessão do agente; entrando sem novo login")}else{x("Autenticando no Callix...");const e=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t}),credentials:"same-origin"});if(!e.ok){const t=await e.json().catch(()=>({error:"Erro desconhecido"}));throw new Error(t.error||`Falha na autenticação: ${e.status}`)}l=(await e.json()).userSessionToken,r.setSession({domain:d,userSessionToken:l}),x("Subindo o motor...")}if(l){const e=await async function(e,t){var n,r;try{const i=await fetch(`https://${e}/sdk/v1/client/user-service/config`,{headers:{Authorization:`Bearer ${t}`},credentials:"omit"});if(!i.ok)return null;const o=await i.json();return!0===(null==(r=null==(n=null==o?void 0:o.service)?void 0:n.outboundOptions)?void 0:r.skipQualification)}catch{return null}}(d,l);if(null!==e){y(e);try{localStorage.setItem(Ry(t).SKIP_MANUAL_QUALIFICATION,String(e))}catch{}}}try{if(localStorage.setItem(Py,t),l){const e=Ry(t);localStorage.setItem(e.SESSION_TOKEN,l),localStorage.setItem(e.DOMAIN,d),localStorage.setItem(e.TIMESTAMP,Date.now().toString())}}catch{}f(l),p(d),i(t),a(!0),u(null),C(Date.now()),console.log("[Callix Dialer] Conectado ao motor como",t)}catch(h){console.error("[Callix Dialer] Erro ao entrar pelo motor:",h),u(h instanceof Error?h.message:"Erro ao conectar ao motor"),a(!1),f(null)}finally{s(!1),x(null)}return}const d=e.apiUrl||"/api/user-sdk-session";let l;if("undefined"!=typeof window)try{const e=Ry(t);l=localStorage.getItem(e.SESSION_TOKEN)||void 0,console.log("[Callix Dialer] 🔍 Token anterior no localStorage:",l?"ENCONTRADO":"NÃO ENCONTRADO")}catch(h){console.warn("[Callix Dialer] Erro ao buscar token anterior:",h)}if(l){x("Encerrando sessão anterior..."),console.log("[Callix Dialer] 🔌 Token anterior encontrado, fazendo logout no servidor...");try{const e=await fetch(d,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${l}`,"x-session-token":l},credentials:"same-origin"});console.log("[Callix Dialer] 📡 Resposta do logout:",e.status),e.ok?console.log("[Callix Dialer] ✅ Logout no servidor concluído"):console.log("[Callix Dialer] ⚠️ Logout retornou status:",e.status)}catch(m){console.warn("[Callix Dialer] ⚠️ Erro no logout (pode ser sessão expirada):",m)}x("Aguardando liberação da sessão anterior..."),console.log("[Callix Dialer] ⏳ Aguardando Kamailio processar unregister (5 segundos)..."),await new Promise(e=>setTimeout(e,5e3)),console.log("[Callix Dialer] ✅ Período de espera concluído")}if("undefined"!=typeof window)try{const e=Ry(t);localStorage.removeItem(e.SESSION_TOKEN),localStorage.removeItem(e.TIMESTAMP),console.log("[Callix Dialer] 🗑️ Token antigo removido do localStorage")}catch(h){console.warn("[Callix Dialer] Erro ao limpar localStorage:",h)}x("Fechando conexão anterior..."),console.log("[Callix Dialer] 🔌 Verificando WebSocket SIP local..."),await Ay(),(o||c)&&(console.log("[Callix Dialer] 🔌 Preparando para fechar conexão SIP local..."),w.current&&(console.log("[Callix Dialer] 📴 Chamando goOffline() via cleanupRef..."),w.current.goOffline(),await new Promise(e=>setTimeout(e,500)),console.log("[Callix Dialer] 🛑 Chamando stop() via cleanupRef..."),w.current.stop(),await new Promise(e=>setTimeout(e,500))),console.log("[Callix Dialer] ⏳ Desmontando CallixClientProvider..."),a(!1),f(null),E(!0),await new Promise(e=>setTimeout(e,1e3)),E(!1),console.log("[Callix Dialer] ✅ SDK desmontado"));try{x("Autenticando no Callix..."),console.log("[Callix Dialer] 🔐 Criando nova sessão no servidor...");const o=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,previousToken:l}),credentials:"same-origin"});if(!o.ok){const e=await o.json().catch(()=>({error:"Erro desconhecido"}));throw new Error(e.error||`Falha na autenticação: ${o.status}`)}const s=await o.json(),c=e.domain||s.domain||"villelabrasil.callix.com.br";f(s.userSessionToken),p(c),i(t),a(!0),u(null),C(Date.now()),console.log("[Callix Dialer] Nova providerKey gerada para forçar recriação do SDK");try{const e=`https://${c}/sdk/v1/client/user-service/config`;x("Carregando configurações..."),console.log("[Callix Dialer] 🔍 Buscando configuração do serviço:",e);const i=await fetch(e,{headers:{Authorization:`Bearer ${s.userSessionToken}`},credentials:"omit"});if(console.log("[Callix Dialer] 📡 Resposta da config:",i.status),i.ok){const e=await i.json();console.log("[Callix Dialer] 📦 Dados da config recebidos:",JSON.stringify(e,null,2));const o=!0===(null==(r=null==(n=null==e?void 0:e.service)?void 0:n.outboundOptions)?void 0:r.skipQualification);if(console.log("[Callix Dialer] ✅ skipQualification configurado:",o),y(o),"undefined"!=typeof window){const e=Ry(t);localStorage.setItem(e.SKIP_MANUAL_QUALIFICATION,o.toString()),console.log("[Callix Dialer] 💾 skipQualification salvo no localStorage")}}else{const e=await i.text();console.warn("[Callix Dialer] ⚠️ Erro ao buscar config do serviço:",i.status,e)}}catch(g){console.error("[Callix Dialer] ❌ Erro ao buscar config do serviço:",g)}if("undefined"!=typeof window)try{const e=Ry(t);localStorage.setItem(Py,t),localStorage.setItem(e.SESSION_TOKEN,s.userSessionToken),localStorage.setItem(e.DOMAIN,c),localStorage.setItem(e.TIMESTAMP,Date.now().toString()),console.log("[Callix Dialer] Sessão salva no localStorage")}catch(h){console.warn("[Callix Dialer] Não foi possível salvar sessão:",h)}x("Conectando ao discador..."),console.log("[Callix Dialer] Autenticado com sucesso:",t)}catch(h){console.error("[Callix Dialer] Erro ao autenticar:",h),u(h instanceof Error?h.message:"Erro ao autenticar"),a(!1),f(null)}finally{s(!1),x(null)}},[e.apiUrl,e.domain,e.engineUrl,o,c,L]);t.useEffect(()=>{k.current!==N&&(k.current=N,I.current=!1),N&&A&&(o||d||m||l||I.current||(I.current=!0,M(N)))},[N,A,o,d,m,l,M]),t.useEffect(()=>{!A||N||!r||o||d||m||l||I.current||(console.log("[Callix Dialer] Auto-login com username restaurado:",r),I.current=!0,M(r))},[A,N,r,o,d,m,l,M]);const U=t.useCallback(async()=>{var t;const n=r;if(e.engineUrl?null==(t=D.current)||t.command({name:"logoff"}):w.current&&(console.log("[Callix Dialer] 📴 Logout: Chamando goOffline()..."),w.current.goOffline(),await new Promise(e=>setTimeout(e,500)),console.log("[Callix Dialer] 🛑 Logout: Chamando stop()..."),w.current.stop(),await new Promise(e=>setTimeout(e,500))),i(N??null),a(!1),f(null),p(null),u(null),I.current=!0,k.current=N??null,"undefined"!=typeof window&&n)try{const e=Ry(n);localStorage.removeItem(Py),localStorage.removeItem(e.SESSION_TOKEN),localStorage.removeItem(e.DOMAIN),localStorage.removeItem(e.TIMESTAMP),console.log("[Callix Dialer] Sessão removida do localStorage")}catch(o){console.warn("[Callix Dialer] Não foi possível limpar sessão:",o)}},[r,N,e.engineUrl]),F=A&&Boolean(r)&&!o&&!l&&!I.current,B=t.useMemo(()=>o||d||m||S||!r||F?null:{username:r,locked:Boolean(N)},[o,d,m,S,r,N,F]),q=t.useCallback(()=>{if(i(null),u(null),"undefined"!=typeof window)try{localStorage.removeItem(Py)}catch{}},[]),z="inline"===e.mode||"mobile"===T?by:M$,H=e.mode,W=!1===(G=e.clickToCall)?{enabled:!1}:!0===G||null==G?{enabled:!0}:{...G,enabled:!1!==G.enabled};var G;return S?$.jsx(Oy.Provider,{value:{skipManualQualification:v},children:$.jsx(z,{isAuthenticated:!1,username:r,onLogin:M,onLogout:U,isLoadingSession:!0,sessionError:null,sessionStatus:"Encerrando sessão anterior...",variant:T,portalTarget:O,density:e.density,mode:H})}):o&&(R||c&&h)?R&&D.current?$.jsx(Oy.Provider,{value:{skipManualQualification:v},children:$.jsxs(Lu,{client:D.current,children:[$.jsx(z,{isAuthenticated:o,username:r,onLogin:M,onLogout:U,isLoadingSession:d,sessionError:l,sessionStatus:b,variant:T,portalTarget:O,density:e.density,mode:H}),c&&$.jsx(Ey,{enabled:W.enabled,pollIntervalMs:W.pollIntervalMs,sessionToken:c,onTask:W.onTask})]},_)}):c&&h?$.jsx(Oy.Provider,{value:{skipManualQualification:v},children:$.jsx(ku.CallixClientProvider,{domain:h,userSessionToken:c,children:$.jsxs(ky,{ref:w,children:[$.jsx(z,{isAuthenticated:o,username:r,onLogin:M,onLogout:U,isLoadingSession:d,sessionError:l,sessionStatus:b,variant:T,portalTarget:O,density:e.density,mode:H}),$.jsx(Ey,{enabled:W.enabled,pollIntervalMs:W.pollIntervalMs,sessionToken:c,onTask:W.onTask})]})},_)}):null:$.jsx(Oy.Provider,{value:{skipManualQualification:v},children:$.jsx(z,{isAuthenticated:!1,username:r,onLogin:M,onLogout:U,isLoadingSession:d||m||F,sessionError:l,sessionStatus:b,loginConfirmation:B,onCancelLoginConfirmation:q,variant:T,portalTarget:O,density:e.density,mode:H})})}function Ly(e){console.log(`[Callix Dialer] 🔧 Widget v${Ny} inicializando...`);const t=new jy(e);return t.init(),t}const My={CallixDialerWidget:jy,init:Ly,version:Ny};"undefined"!=typeof window&&(window.CallixDialer=My),e.CallixDialerWidget=jy,e.WIDGET_VERSION=Ny,e.default=My,e.init=Ly,e.useDialerConfig=Iy,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
25
|
+
*/var ku=function(){if(Tu)return Nu;Tu=1;var e,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{CallOperatorStartupError:()=>d.CallOperatorStartupError,CallixClientParams:()=>d.CallixClientParams,CallixClientProvider:()=>g,CallixClientSdk:()=>d.CallixClientSdk,useCallOperator:()=>_,useCallOperatorAudioInputMuted:()=>M,useCallOperatorAudioOutputControls:()=>P,useCallOperatorAudioOutputMuted:()=>L,useCallOperatorAudioOutputVolume:()=>D,useCallOperatorBreaks:()=>U,useCallOperatorControls:()=>E,useCallOperatorCurrentBreak:()=>k,useCallOperatorCurrentCall:()=>N,useCallOperatorCurrentCallControls:()=>I,useCallOperatorCurrentCallInfo:()=>T,useCallOperatorDiscardQualifications:()=>O,useCallOperatorEventListener:()=>R,useCallOperatorStartupError:()=>j,useCallOperatorState:()=>C,useCallOperatorSuccessQualifications:()=>A,useCallixClient:()=>p}),e=a,Nu=((e,t,a,d)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))!o.call(e,s)&&s!==a&&n(e,s,{get:()=>t[s],enumerable:!(d=r(t,s))||d.enumerable});return e})(n({},"__esModule",{value:!0}),e);var d=vu(),s=vu(),l=Cu(),u=Iu(),c=m(),f=(0,l.createScope)(null),h=(0,l.molecule)((e,t)=>{let n=t(f);if(!n)throw new Error("Missing CallixClient parameters. You must wrap your component tree with CallixClientProvider.");return new s.CallixClientSdk(n)});function p(){return(0,u.useMolecule)(h)}function g({children:e,...t}){return(0,c.jsx)(u.ScopeProvider,{scope:f,value:t,children:e})}var $=Cu(),v=Iu(),y=t,b=t;function x(e){return(0,b.useSyncExternalStore)(e.subscribe.bind(e),e.get.bind(e),e.get.bind(e))}var w=(0,$.molecule)(e=>{let t=e(h).createCallOperator();return(0,$.onMount)(()=>{t.start();let e=()=>{t.stop()};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),(0,$.onUnmount)(()=>{t.stop()}),t});function _(){return(0,v.useMolecule)(w)}function C(){let e=_(),t=x(e.currentStateKeys);for(let n of t){if("startup.error"===n)return{state:"startupError",error:e.startupError.get()};if("startup"===n)return{state:"starting"};if("offline"===n||"available.networkDown"===n||"onBreak.networkDown"===n)return{state:"offline"};if("onBreak"===n)return{state:"onBreak",break:e.currentBreak.get()};if("available.callRinging"===n)return{state:"callRinging",call:e.currentCall.get()};if("manualCall.callSetup"===n)return{state:"manualCallSetup",call:e.currentCall.get()};if("manualCall.callRinging"===n)return{state:"manualCallRinging",call:e.currentCall.get()};if("manualCall.callFailed"===n)return{state:"manualCallFailed",call:e.currentCall.get()};if("available"===n||"manualCall.idle"===n)return{state:"idle"};if("inCall"===n)return{state:"callInProgress",call:e.currentCall.get()};if("afterCall"===n)return{state:"afterCall"}}}function S(e,t,n){return Object.fromEntries(n.map(n=>[n,(0,y.useCallback)((...r)=>{if(t){if("function"==typeof t[n])return t[n].apply(t,r);console.warn(`Method ${String(n)} is not a function on obj ${e}.`)}else console.warn(`Obj ${e} is null or undefined, cannot call method ${String(n)}.`)},[t])]))}function E(){return S("callOperator",_(),["becomeAvailable","goOffline","enterOnBreak","makeManualCall","finishAfterCall"])}function N(){return x(_().currentCall)}function T(){return x(_().currentCallInfo)}function A(){return x(_().successQualifications)}function O(){return x(_().discardQualifications)}function I(){return S("currentCall",N(),["answer","reject","hangup","isOnHold","hold","unhold","isMuted","mute","unmute"])}function k(){return x(_().currentBreak)}function j(){let e=C();if("startupError"===(null==e?void 0:e.state))return e.error}function R(e,t){let n=_(),r=(0,y.useRef)(t);r.current=t,(0,y.useEffect)(()=>{if(n)return n.on(e,(...e)=>{r.current.apply(null,e)})},[e,n])}function P(){return S("audioOutput",_().audioOutput,["setVolume","setMute"])}function D(){let e=_(),{setVolume:t}=P();return[x(e.audioOutput.volume),t]}function L(){let e=_(),{setMute:t}=P();return[x(e.audioOutput.isMuted),t]}function M(){let e=N(),[t,n]=(0,y.useState)((null==e?void 0:e.isMuted())??!1);return[t,(0,y.useCallback)(t=>{e&&(t?e.mute():e.unmute(),n(t))},[e])]}function U(){return x(_().breaks)}return Nu}();class ju{constructor(e){this.value=e,this.listeners=new Set}get(){return this.value}set(e){if(JSON.stringify(e)!==JSON.stringify(this.value)){this.value=e;for(const t of this.listeners)t(e)}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}}const Ru={segments:[],status:null,insight:null,interims:0};class Pu{constructor(e){this.options=e,this.userSignal=new ju(void 0),this.listeners=new Set,this.sessionLostListeners=new Set,this.viewWaiters=[],this.ws=null,this.reconnectDelay=500,this.reconnectTimer=null,this.closed=!1,this.iceServers=[{urls:"stun:stun.l.google.com:19302"}],this.pc=null,this.connectionId=null,this.remoteSet=!1,this.pendingCandidates=[],this.micStream=null,this.audioSeq=0,this.unlockListener=null,this.agentId=e.agentId,this.session=e.session??null,this.log=e.log??(()=>{}),this.audio=void 0!==e.audioElement?e.audioElement:function(){if("undefined"==typeof document)return null;const e=document.createElement("audio");return e.autoplay=!0,e.setAttribute("playsinline","true"),e.style.display="none",e.dataset.callixEngineAudio="true",document.body.appendChild(e),e}(),this.state={wsState:"idle",tabId:null,view:null,engaged:!1,pcState:"idle",needsUnlock:!1,micError:null,lastError:null,inputMuted:!1,outputMuted:!1,outputVolume:100,transcript:Ru,sessionLost:null}}getState(){return this.state}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setState(e){this.state={...this.state,...e};for(const t of this.listeners)t()}get currentCall(){var e,t;return(null==(t=null==(e=this.state.view)?void 0:e.snapshot)?void 0:t.leg.call)??null}connect(){if(this.closed&&(this.closed=!1),this.ws&&(this.ws.readyState===WebSocket.OPEN||this.ws.readyState===WebSocket.CONNECTING))return;const e=this.options.WebSocketImpl??WebSocket;this.setState({wsState:"connecting"});const t=new e(function(e){const t=new URL(e,"undefined"!=typeof window?window.location.href:"http://localhost");return t.protocol="https:"===t.protocol?"wss:":"ws:",t.pathname=`${t.pathname.replace(/\/+$/,"")}/ws`,t.search="",t.hash="",t.toString()}(this.options.url));this.ws=t,t.onopen=()=>{if(this.ws!==t)return;this.reconnectDelay=500,this.setState({wsState:"open"});const e={type:"hello",role:"tab",agentId:this.agentId,token:this.options.token,label:this.options.label??"Discador",...this.session?{session:this.session}:{}};this.send(e),this.log("conectado ao host do motor")},t.onmessage=e=>{if(this.ws!==t)return;let n;try{n=JSON.parse(String(e.data))}catch{return}this.handle(n)},t.onclose=()=>{if(this.ws!==t)return;this.ws=null;const e=this.state.engaged;this.setState({wsState:"closed",tabId:null,engaged:!1}),e&&this.stopAudio(),this.closed||(this.log(`conexão com o motor caiu; nova tentativa em ${this.reconnectDelay} ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.reconnectDelay),this.reconnectDelay=Math.min(2*this.reconnectDelay,5e3))},t.onerror=()=>{}}close(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopAudio();const e=this.ws;this.ws=null,e&&(e.onclose=null,e.close());for(const t of this.viewWaiters.splice(0))clearTimeout(t.timer);this.setState({wsState:"closed",tabId:null,engaged:!1})}waitForView(e=15e3){return this.state.view&&this.state.tabId?Promise.resolve(this.state.view):new Promise((t,n)=>{const r=setTimeout(()=>{const e=this.viewWaiters.findIndex(e=>e.timer===r);e>=0&&this.viewWaiters.splice(e,1),n(new Error("o motor não respondeu"))},e);this.viewWaiters.push({resolve:t,timer:r})})}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}handle(e){switch(e.type){case"welcome":Array.isArray(e.iceServers)&&e.iceServers.length>0&&(this.iceServers=e.iceServers),this.setState({tabId:e.tabId}),this.applyView(e.view),this.log(`sou a aba ${e.tabId}`),!1!==this.options.autoEngage&&e.view.engagedTabId!==e.tabId&&this.engage();break;case"view":this.applyView(e.view);break;case"engage":this.setState({engaged:e.engaged}),e.engaged?this.startAudio():this.stopAudio();break;case"signal":this.onSignal(e.payload);break;case"error":this.setState({lastError:e.message}),this.log(`erro do host: ${e.message}`);break;case"transcript":this.pushSegment(e.segment);break;case"transcript-sync":this.setState({transcript:{segments:e.segments??[],status:e.status??null,insight:e.insight??null,interims:0}});break;case"insight":{const t=this.state.transcript.insight;(!t||e.insight.revision>=t.revision||e.insight.callId!==t.callId)&&this.setState({transcript:{...this.state.transcript,insight:e.insight}});break}case"transcript-status":this.onTranscriptStatus(e.status)}}applyView(e){var t,n;const r=this.state.view,i=e.sessionLost??null,o=Boolean(i)&&!(null==r?void 0:r.sessionLost);o&&(this.session=null,this.log(`o Callix derrubou a sessão: ${(null==i?void 0:i.message)??""}`));const a=null==(t=e.snapshot)?void 0:t.leg.user;this.userSignal.set(a?{...a,sessionId:0}:void 0);const d=null==(n=e.snapshot)?void 0:n.leg.call,s={view:e,sessionLost:i?{originator:i.originator,message:i.message}:null};d&&"boolean"==typeof d.muted&&d.muted!==this.state.inputMuted&&"ended"!==d.state&&(s.inputMuted=d.muted),this.setState(s);for(const l of this.viewWaiters.splice(0))clearTimeout(l.timer),l.resolve(e);if(o&&i)for(const l of this.sessionLostListeners)l(i)}onSessionLost(e){return this.sessionLostListeners.add(e),()=>{this.sessionLostListeners.delete(e)}}setSession(e){this.session=e,this.send({type:"session",session:e})}engage(){this.send({type:"engage"})}release(){this.send({type:"release"})}command(e){this.send({type:"command",command:e}),this.log(`comando: ${e.name}${e.phone?` ${e.phone}`:""}`)}setInputMuted(e){if(this.micStream)for(const t of this.micStream.getAudioTracks())t.enabled=!e;this.setState({inputMuted:e}),this.currentCall&&this.command({name:e?"mute":"unmute"})}setOutputMuted(e){this.audio&&(this.audio.muted=e),this.setState({outputMuted:e})}setOutputVolume(e){const t=Math.max(0,Math.min(100,Math.round(e)));this.audio&&(this.audio.volume=t/100),this.setState({outputVolume:t})}async setOutputDevice(e){const t=this.audio;if(!(null==t?void 0:t.setSinkId))throw new Error("este navegador não permite escolher a saída de som");await t.setSinkId(e)}async unlockAudio(){if(this.audio&&this.audio.srcObject)try{await this.audio.play(),this.setState({needsUnlock:!1})}catch{this.setState({needsUnlock:!0})}}async startAudio(){const e=++this.audioSeq;this.stopAudio();const t=void 0===this.options.mediaDevices?"undefined"!=typeof navigator?navigator.mediaDevices:null:this.options.mediaDevices;if(!(null==t?void 0:t.getUserMedia))return void this.setState({micError:"Este navegador não permite usar o microfone pela página."});let n;try{n=await t.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(a){const e=`Microfone indisponível: ${a.message}`;return this.setState({micError:e}),void this.log(e)}if(e!==this.audioSeq||!this.state.engaged){for(const e of n.getTracks())e.stop();return}this.micStream=n;for(const d of n.getAudioTracks())d.enabled=!this.state.inputMuted;this.setState({micError:null});const r=new(this.options.PeerConnectionImpl??RTCPeerConnection)({iceServers:this.iceServers});this.pc=r;const i=Math.random().toString(36).slice(2,10);this.connectionId=i,this.remoteSet=!1,this.pendingCandidates=[];for(const d of n.getAudioTracks())r.addTrack(d,n);r.onicecandidate=e=>{this.send({type:"signal",payload:{connectionId:i,candidate:e.candidate?e.candidate.toJSON():null}})},r.ontrack=e=>{const t=e.streams[0]??new MediaStream([e.track]);this.audio&&(this.audio.srcObject=t,this.audio.muted=this.state.outputMuted,this.audio.volume=this.state.outputVolume/100,this.audio.play().then(()=>this.setState({needsUnlock:!1})).catch(()=>{this.setState({needsUnlock:!0}),this.armUnlock()})),this.log("áudio do motor chegou")},r.onconnectionstatechange=()=>{this.pc===r&&(this.setState({pcState:r.connectionState}),this.log(`WebRTC: ${r.connectionState}`),"failed"===r.connectionState&&this.state.engaged&&(this.log("conexão de áudio com o motor falhou; renegociando"),this.startAudio()))};const o=await r.createOffer();this.pc===r&&(await r.setLocalDescription(o),this.send({type:"signal",payload:{connectionId:i,description:{type:o.type,sdp:o.sdp}}}),this.setState({pcState:r.connectionState}))}stopAudio(){if(this.pc&&(this.pc.onconnectionstatechange=null,this.pc.onicecandidate=null,this.pc.ontrack=null,this.pc.close(),this.pc=null),this.connectionId=null,this.micStream){for(const e of this.micStream.getTracks())e.stop();this.micStream=null}this.audio&&(this.audio.srcObject=null),"idle"!==this.state.pcState&&this.setState({pcState:"idle"})}async onSignal(e){const t=this.pc;if(t&&(!e.connectionId||e.connectionId===this.connectionId))try{if(e.description){await t.setRemoteDescription(e.description),this.remoteSet=!0;for(const e of this.pendingCandidates.splice(0))await t.addIceCandidate(e).catch(()=>{})}if(void 0!==e.candidate){const n=e.candidate??void 0;!this.remoteSet&&n?this.pendingCandidates.push(n):await t.addIceCandidate(n).catch(()=>{})}}catch(n){this.log(`sinalização: ${n.message}`)}}armUnlock(){if(this.unlockListener||"undefined"==typeof document)return;const e=()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",e,!0),this.unlockListener=null,this.unlockAudio()};this.unlockListener=e,document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",e,!0)}pushSegment(e){const t=this.state.transcript;let n=t.segments,r=t.insight,i=t.interims;n.length&&n[0].callId!==e.callId&&(n=[],r=null,i=0);const o=n.findIndex(t=>t.id===e.id),a=o>=0?n.map((t,n)=>n===o?e:t):[...n,e];a.length>300&&a.shift(),e.interim&&(i+=1),this.setState({transcript:{...t,segments:a,insight:r,interims:i}})}onTranscriptStatus(e){const t=this.state.transcript;if(!t.status||t.status.recordingId===e.recordingId||"running"===e.live){const n=t.status&&t.status.recordingId!==e.recordingId;this.setState({transcript:{...t,status:e,...n?{segments:[],insight:null,interims:0}:{}}})}}}const Du=t.createContext(null);function Lu({client:e,children:t}){return $.jsx(Du.Provider,{value:e,children:t})}function Mu(e){return t.useSyncExternalStore(e.subscribe.bind(e),e.getState.bind(e),e.getState.bind(e))}const Uu=[{id:0,name:"Pausa"}];function Fu(e){return{id:e.id,name:e.name,isSystemQualification:!1,systemQualificationType:0}}function Bu(e,t){var n;return((null==(n=null==e?void 0:e.snapshot)?void 0:n.leg.qualifications)??[]).filter(e=>e.kind===t).map(Fu)}class qu{constructor(e,t){this.client=e,this.listeners=new Map,this.snapshot=t}get id(){return this.snapshot.id}get direction(){return this.snapshot.direction}get data(){var e;return{destinationNumber:null==(e=this.snapshot.contact)?void 0:e.phone,campaignContactPhoneId:this.snapshot.campaignContactPhoneId,answeredAt:this.snapshot.answeredAt?new Date(this.snapshot.answeredAt):void 0}}get callerNumber(){var e;return null==(e=this.snapshot.contact)?void 0:e.phone}get peerDisplayName(){var e;return null==(e=this.snapshot.contact)?void 0:e.name}get isEstablished(){return"active"===this.snapshot.state}get isEnded(){return"ended"===this.snapshot.state}get currentDurationSeconds(){const e=this.snapshot.answeredAt??this.snapshot.startedAt;return Math.max(0,Math.floor((Date.now()-e)/1e3))}answer(){this.client.command({name:"answer"})}reject(){this.client.command({name:"reject"})}hangup(){this.client.command({name:"hangup"})}isOnHold(){return{local:!1,remote:!1}}async hold(){}async unhold(){}isMuted(){return this.client.getState().inputMuted}mute(){this.client.setInputMuted(!0)}unmute(){this.client.setInputMuted(!1)}sendDtmf(e){this.client.command({name:"dtmf",tones:e})}on(e,t){let n=this.listeners.get(e);return n||(n=new Set,this.listeners.set(e,n)),n.add(t),this}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){var n;return null==(n=this.listeners.get(e))||n.delete(t),this}toCallData(){var e;return{id:this.snapshot.id,direction:this.snapshot.direction,destinationNumber:(null==(e=this.snapshot.contact)?void 0:e.phone)??"",answeredAt:this.snapshot.answeredAt?new Date(this.snapshot.answeredAt).toISOString():void 0,campaignContactPhoneId:this.snapshot.campaignContactPhoneId,isMuted:this.snapshot.muted}}}function zu(e){var n,r;const i=(null==(r=null==(n=Mu(e).view)?void 0:n.snapshot)?void 0:r.leg.call)??null,o=t.useRef(null);return i&&"ended"!==i.state?o.current&&o.current.id===i.id?o.current.snapshot=i:o.current=new qu(e,i):o.current=null,o.current}function Hu(e){const n=Mu(e),r=zu(e);return t.useMemo(()=>function(e,t){var n,r,i;if(!e)return;if("anotherDevice"===(null==(n=e.sessionLost)?void 0:n.originator))return{state:"startupError",error:"userIsAlreadyConnectedOnAnotherDevice"};const o=null==(r=e.snapshot)?void 0:r.leg;if(!o)return"starting"===e.engine||"running"===e.engine?{state:"starting"}:{state:"offline"};const a=t??void 0;switch(o.status){case"starting":return{state:"starting"};case"available":return{state:"idle"};case"ringing":return{state:"callRinging",call:a};case"dialing":return"ringing"===(null==(i=o.call)?void 0:i.state)?{state:"manualCallRinging",call:a}:{state:"manualCallSetup",call:a};case"inCall":return{state:"callInProgress",call:a};case"afterCall":return{state:"afterCall"};case"onBreak":return{state:"onBreak",break:Uu[0]};case"offline":return{state:"offline"};case"error":return{state:"startupError",error:"unknownError"}}}(n.view,r),[n.view,r])}function Wu(e){var n,r,i,o,a;const d=Mu(e).view,s=JSON.stringify([null==(r=null==(n=null==d?void 0:d.snapshot)?void 0:n.leg.call)?void 0:r.id,null==(o=null==(i=null==d?void 0:d.snapshot)?void 0:i.leg.call)?void 0:o.contact,null==(a=null==d?void 0:d.snapshot)?void 0:a.leg.qualifications]);return t.useMemo(()=>function(e){var t;const n=null==(t=null==e?void 0:e.snapshot)?void 0:t.leg,r=null==n?void 0:n.call;if(!n||!r)return;const i=Bu(e,"success"),o=Bu(e,"discard"),a=r.contact;if(null==a?void 0:a.campaign)return{type:"campaign",info:{campaign:{id:0,name:a.campaign,type:0,requireCallComments:!1,enableTransfer:!1,enableScheduledCall:!1,successQualifications:i,discardQualifications:o,previewDuration:"",showCampaignModelOnService:!1,skipCallQualification:!1},campaignList:{id:0,name:""},campaignContact:{id:r.campaignContactPhoneId??0,label:a.name,phoneNumber:a.phone}}};return{type:"manual",info:{successQualifications:i,discardQualifications:o}}}(d),[s])}function Gu(e,n){var r,i;const o=Mu(e),a=(null==(i=null==(r=o.view)?void 0:r.snapshot)?void 0:i.leg.qualifications)??[],d=JSON.stringify(a);return t.useMemo(()=>Bu(o.view,n),[d,n])}const Vu=new WeakMap;function Ku(e){return t.useMemo(()=>function(e){let t=Vu.get(e);t||(t={breaks:new ju(Uu),user:e.userSignal,audioOutput:{setAudioOutputDevice:t=>{e.setOutputDevice(t).catch(()=>{})},setVolume:t=>e.setOutputVolume(t),setMute:t=>e.setOutputMuted(t)},stop:()=>{},goOffline:()=>{},becomeAvailable:()=>{var t,n;"onBreak"===(null==(n=null==(t=e.getState().view)?void 0:t.snapshot)?void 0:n.leg.status)&&e.command({name:"resume"})},enterOnBreak:()=>e.command({name:"pause"}),makeManualCall:t=>e.command({name:"dial",phone:t}),finishAfterCall:t=>{"number"==typeof t.qualificationId?e.command({name:"qualify",qualificationId:t.qualificationId,result:"failure"===t.result?"discard":"success"}):e.command({name:"finish"})}},Vu.set(e,t));return t}(e),[e])}function Yu(){const e=t.useContext(Du);return e?Ku(e):ku.useCallOperator()}function Xu(){const e=t.useContext(Du);return e?Hu(e):ku.useCallOperatorState()}function Ju(){const e=t.useContext(Du);return e?(n=e,t.useMemo(()=>({becomeAvailable:()=>{var e,t;"onBreak"===(null==(t=null==(e=n.getState().view)?void 0:e.snapshot)?void 0:t.leg.status)&&n.command({name:"resume"})},goOffline:()=>{},enterOnBreak:()=>n.command({name:"pause"}),makeManualCall:e=>n.command({name:"dial",phone:e}),finishAfterCall:e=>{"number"==typeof e.qualificationId?n.command({name:"qualify",qualificationId:e.qualificationId,result:"failure"===e.result?"discard":"success"}):n.command({name:"finish"})}}),[n])):ku.useCallOperatorControls();var n}function Zu(){const e=t.useContext(Du);return e?zu(e)??void 0:ku.useCallOperatorCurrentCall()}function Qu(){const e=t.useContext(Du);return e?Wu(e):ku.useCallOperatorCurrentCallInfo()}function ec(){const e=t.useContext(Du);return e?Gu(e,"success"):ku.useCallOperatorSuccessQualifications()}function tc(){const e=t.useContext(Du);return e?Gu(e,"discard"):ku.useCallOperatorDiscardQualifications()}function nc(){const e=t.useContext(Du);return e?(n=e,t.useMemo(()=>({answer:()=>n.command({name:"answer"}),reject:()=>n.command({name:"reject"}),hangup:()=>n.command({name:"hangup"}),isOnHold:()=>({local:!1,remote:!1}),hold:async()=>{},unhold:async()=>{},isMuted:()=>n.getState().inputMuted,mute:()=>n.setInputMuted(!0),unmute:()=>n.setInputMuted(!1)}),[n])):ku.useCallOperatorCurrentCallControls();var n}function rc(){const e=t.useContext(Du);return e?function(e){const n=Mu(e),r=t.useCallback(t=>e.setInputMuted(t),[e]);return[n.inputMuted,r]}(e):ku.useCallOperatorAudioInputMuted()}function ic(){const e=t.useContext(Du);return e?function(e){const n=Mu(e),r=t.useCallback(t=>e.setOutputMuted(t),[e]);return[n.outputMuted,r]}(e):ku.useCallOperatorAudioOutputMuted()}function oc(){const e=t.useContext(Du);return e?function(e){const n=Mu(e),r=t.useCallback(t=>e.setOutputVolume(t),[e]);return[n.outputVolume,r]}(e):ku.useCallOperatorAudioOutputVolume()}function ac(e,n){const r=t.useContext(Du);r?function(e,n,r){const i=t.useRef(r);i.current=r,t.useEffect(()=>e.onSessionLost(e=>{i.current({originator:e.originator})}),[e,n])}(r,e,n):ku.useCallOperatorEventListener(e,n)}var dc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},sc=t.createContext&&t.createContext(dc),lc=["attr","size","title"];function uc(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cc.apply(this,arguments)}function fc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fc(Object(n),!0).forEach(function(t){pc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pc(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mc(e){return e&&e.map((e,n)=>t.createElement(e.tag,hc({key:n},e.attr),mc(e.child)))}function gc(e){return n=>t.createElement($c,cc({attr:hc({},e.attr)},n),mc(e.child))}function $c(e){var n=n=>{var r,{attr:i,size:o,title:a}=e,d=uc(e,lc),s=o||n.size||"1em";return n.className&&(r=n.className),e.className&&(r=(r?r+" ":"")+e.className),t.createElement("svg",cc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,d,{className:r,style:hc(hc({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&t.createElement("title",null,a),e.children)};return void 0!==sc?t.createElement(sc.Consumer,null,e=>n(e)):n(dc)}function vc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"22 12 18 12 15 21 9 3 6 12 2 12"},child:[]}]})(e)}function yc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(e)}function bc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(e)}function xc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function wc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"2",y:"7",width:"20",height:"14",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"},child:[]}]})(e)}function _c(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function Cc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"polyline",attr:{points:"12 6 12 12 16 14"},child:[]}]})(e)}function Sc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"},child:[]},{tag:"line",attr:{x1:"18",y1:"9",x2:"12",y2:"15"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"18",y2:"15"},child:[]}]})(e)}function Ec(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"4",y1:"9",x2:"20",y2:"9"},child:[]},{tag:"line",attr:{x1:"4",y1:"15",x2:"20",y2:"15"},child:[]},{tag:"line",attr:{x1:"10",y1:"3",x2:"8",y2:"21"},child:[]},{tag:"line",attr:{x1:"16",y1:"3",x2:"14",y2:"21"},child:[]}]})(e)}function Nc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 18v-6a9 9 0 0 1 18 0v6"},child:[]},{tag:"path",attr:{d:"M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"},child:[]}]})(e)}function Tc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(e)}function Ac(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"1",y1:"1",x2:"23",y2:"23"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"},child:[]},{tag:"path",attr:{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"12",y2:"23"},child:[]},{tag:"line",attr:{x1:"8",y1:"23",x2:"16",y2:"23"},child:[]}]})(e)}function Oc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"12",y2:"23"},child:[]},{tag:"line",attr:{x1:"8",y1:"23",x2:"16",y2:"23"},child:[]}]})(e)}function Ic(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function kc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"10",y1:"15",x2:"10",y2:"9"},child:[]},{tag:"line",attr:{x1:"14",y1:"15",x2:"14",y2:"9"},child:[]}]})(e)}function jc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Rc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 2 16 8 22 8"},child:[]},{tag:"line",attr:{x1:"23",y1:"1",x2:"16",y2:"8"},child:[]},{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Pc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"23",y1:"1",x2:"1",y2:"23"},child:[]}]})(e)}function Dc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function Lc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Mc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(e)}function Uc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12.01",y2:"18"},child:[]}]})(e)}function Fc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(e)}function Bc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function qc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function zc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"line",attr:{x1:"23",y1:"9",x2:"17",y2:"15"},child:[]},{tag:"line",attr:{x1:"17",y1:"9",x2:"23",y2:"15"},child:[]}]})(e)}function Hc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"15",y1:"9",x2:"9",y2:"15"},child:[]},{tag:"line",attr:{x1:"9",y1:"9",x2:"15",y2:"15"},child:[]}]})(e)}function Wc(e){return gc({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}var Gc=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);var Vc,Kc,Yc,Xc,Jc,Zc,Qc,ef,tf=(e,t)=>!!~e.indexOf(t),nf=(e,t="-")=>e.join(t),rf=(e,t)=>nf(e.filter(Boolean),t),of=(e,t=1)=>e.slice(t),af=e=>e,df=()=>{},sf=e=>e[0].toUpperCase()+of(e),lf=e=>e.replace(/[A-Z]/g,"-$&").toLowerCase(),uf=(e,t)=>{for(;"function"==typeof e;)e=e(t);return e},cf=(e,t)=>{e.size>t&&e.delete(e.keys().next().value)},ff=(e,t)=>!tf("@:&",e[0])&&(tf("rg",(typeof t)[5])||Array.isArray(t)),hf=(e,t,n)=>t?Object.keys(t).reduce((e,r)=>{const i=uf(t[r],n);return ff(r,i)?e[lf(r)]=i:e[r]="@"==r[0]&&tf("figa",r[1])?(e[r]||[]).concat(i):hf(e[r]||{},i,n),e},e):e,pf="undefined"!=typeof CSS&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& ")),mf=e=>(Array.isArray(e)||(e=[e]),"@media "+nf(e.map(e=>("string"==typeof e&&(e={min:e}),e.raw||nf(Object.keys(e).map(t=>`(${t}-width:${e[t]})`)," and "))),",")),gf=e=>{for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"tw-"+((t^t>>>9)>>>0).toString(36)},$f=(e="")=>(Vc.push(e),""),vf=e=>{Vc.length=Math.max(Vc.lastIndexOf("")+~~e,0)},yf=e=>e&&!tf("!:",e[0]),bf=e=>":"==e[0],xf=(e,t)=>{Kc.push({v:Vc.filter(bf),d:e,n:t,i:tf(Vc,"!"),$:""})},wf=e=>{const t="-"==e[0];t&&(e=of(e));const n=nf(Vc.filter(yf));return xf("&"==e?n:(n&&n+"-")+e,t),""},_f=(e,t)=>{let n="";for(let r,i=!1,o=0;r=e[o++];)if(i||"["==r)n+=r,i="]"!=r;else switch(r){case":":n=n&&$f(":"+(e[o]==r?e[o++]:"")+n);break;case"(":n=n&&$f(n),$f();break;case"!":$f(r);break;case")":case" ":case"\t":case"\n":case"\r":n=n&&wf(n),vf(")"!==r);break;default:n+=r}n&&(t?$f(":"+n):"-"==n.slice(-1)?$f(n.slice(0,-1)):wf(n))},Cf=e=>{$f(),Sf(e),vf()},Sf=e=>{switch(typeof e){case"string":_f(e);break;case"function":xf(e);break;case"object":Array.isArray(e)?e.forEach(Cf):e&&Object.keys(e).forEach(t=>{((e,t)=>{if(t){$f();const n=tf("tbu",(typeof t)[1]);_f(e,n),n&&Cf(t),vf()}})(t,e[t])})}},Ef=new WeakMap,Nf=e=>(Vc=[],Kc=[],Array.isArray(e[0])&&Array.isArray(e[0].raw)?(e=>{let t=Ef.get(e);if(!t){let n=NaN,r="";t=e.map((t,i)=>{if(n==n||"["!=t.slice(-1)&&!tf(":-(",(e[i+1]||"")[0])||(n=i),i>=n)return o=>{i==n&&(r=""),r+=t,tf("rg",(typeof o)[5])?r+=o:o&&(_f(r),r="",Sf(o)),i==e.length-1&&_f(r)};const o=Kc=[];_f(t);const a=[...Vc];return Kc=[],e=>{Kc.push(...o),Vc=[...a],e&&Sf(e)}}),Ef.set(e,t)}return t})(e[0]).forEach((t,n)=>t(e[n+1])):Sf(e),Kc),Tf=(e,t)=>("function"==typeof t&&(Yc=!1),t),Af=new WeakMap,Of=(e,t)=>{const n=(e=>{Yc=!0;const t=JSON.stringify(e,Tf);return Yc&&t})(t);let r;if(n){var i=Af.get(e);i||Af.set(e,i=new Map),r=i.get(n)}return r||(r=Object.defineProperty((n,r)=>(r=Array.isArray(n)?r:n,uf(e(t,r),r)),"toJSON",{value:()=>n||t}),i&&(i.set(n,r),cf(i,1e4))),r},If=(e,{css:t})=>t(Nf(e)),kf=e=>(t,n,r,i)=>{if(t){const o=n&&e(n);if(o&&o.length>0)return o.reduce((e,n)=>(e[rf([r,n,i])]=t,e),{})}},jf=kf(e=>({t:["top-left","top-right"],r:["top-right","bottom-right"],b:["bottom-left","bottom-right"],l:["bottom-left","top-left"],tl:["top-left"],tr:["top-right"],bl:["bottom-left"],br:["bottom-right"]}[e])),Rf=e=>{const t=({x:"lr",y:"tb"}[e]||e||"").split("").sort();for(let n=t.length;n--;)if(!(t[n]={t:"top",r:"right",b:"bottom",l:"left"}[t[n]]))return;if(t.length)return t},Pf=kf(Rf),Df=(e,t)=>e+(":"==t[1]?of(t,2)+":":of(t))+":",Lf=(e,t=e.d)=>"function"==typeof t?"":e.v.reduce(Df,"")+(e.i?"!":"")+(e.n?"-":"")+t,Mf=e=>"cols"==e?"columns":"rows",Uf=e=>(t,n,r)=>({[e]:r+((Xc=nf(t))&&"-"+Xc)}),Ff=(e,t)=>(n,r,i)=>(Xc=nf(n,t))&&{[e||i]:Xc},Bf=e=>(t,{theme:n},r)=>(Xc=n(e||r,t))&&{[e||r]:Xc},qf=(e,t)=>(n,{theme:r},i)=>(Xc=r(e||i,n,nf(n,t)))&&{[e||i]:Xc},zf=(e,t)=>(n,r)=>e(n,r,t),Hf=Uf("display"),Wf=Uf("position"),Gf=Uf("textTransform"),Vf=Uf("textDecoration"),Kf=Uf("fontStyle"),Yf=e=>(t,n,r)=>({["--tw-"+e]:r,fontVariantNumeric:"var(--tw-ordinal,/*!*/ /*!*/) var(--tw-slashed-zero,/*!*/ /*!*/) var(--tw-numeric-figure,/*!*/ /*!*/) var(--tw-numeric-spacing,/*!*/ /*!*/) var(--tw-numeric-fraction,/*!*/ /*!*/)"}),Xf=(e,{theme:t},n)=>(Xc=t("inset",e))&&{[n]:Xc},Jf=(e,t,n,r=n)=>(Xc=t(r+"Opacity",of(e)))&&{[`--tw-${n}-opacity`]:Xc},Zf=(e,t)=>Math.round(parseInt(e,16)*t),Qf=(e,t,n)=>e&&"#"==e[0]&&(Xc=(e.length-1)/3)&&(Zc=[17,1,.062272][Xc-1])?`rgba(${Zf(e.substr(1,Xc),Zc)},${Zf(e.substr(1+Xc,Xc),Zc)},${Zf(e.substr(1+2*Xc,Xc),Zc)},${t?`var(--tw-${t}${n?","+n:""})`:n||1})`:e,eh=(e,t,n)=>n&&"string"==typeof n?(Xc=Qf(n,t+"-opacity"))&&Xc!==n?{[`--tw-${t}-opacity`]:"1",[e]:[n,Xc]}:{[e]:n}:void 0,th=e=>(Zc=Qf(e,"","0"))==Xc?"transparent":Zc,nh=(e,{theme:t},n,r,i,o)=>(Xc={x:["right","left"],y:["bottom","top"]}[e[0]])&&(Zc=`--tw-${n}-${e[0]}-reverse`)?"reverse"==e[1]?{[Zc]:"1"}:{[Zc]:"0",[rf([i,Xc[0],o])]:(Jc=t(r,of(e)))&&`calc(${Jc} * var(${Zc}))`,[rf([i,Xc[1],o])]:Jc&&[Jc,`calc(${Jc} * calc(1 - var(${Zc})))`]}:void 0,rh=(e,t)=>t[0]&&{[e]:(tf("wun",(t[0]||"")[3])?"space-":"")+t[0]},ih=e=>t=>tf(["start","end"],t[0])?{[e]:"flex-"+t[0]}:rh(e,t),oh=e=>(t,{theme:n})=>{if(Xc=n("grid"+sf(e),t,""))return{["grid-"+e]:Xc};switch(t[0]){case"span":return t[1]&&{["grid-"+e]:`span ${t[1]} / span ${t[1]}`};case"start":case"end":return(Xc=n("grid"+sf(e)+sf(t[0]),of(t),nf(of(t))))&&{[`grid-${e}-${t[0]}`]:Xc}}},ah=(e,{theme:t},n)=>{switch(e[0]){case"solid":case"dashed":case"dotted":case"double":case"none":return Ff("borderStyle")(e);case"collapse":case"separate":return Ff("borderCollapse")(e);case"opacity":return Jf(e,t,n)}return(Xc=t(n+"Width",e,""))?{borderWidth:Xc}:eh("borderColor",n,t(n+"Color",e))},dh=e=>(e?"translate3d(var(--tw-translate-x,0),var(--tw-translate-y,0),0)":"translateX(var(--tw-translate-x,0)) translateY(var(--tw-translate-y,0))")+" rotate(var(--tw-rotate,0)) skewX(var(--tw-skew-x,0)) skewY(var(--tw-skew-y,0)) scaleX(var(--tw-scale-x,1)) scaleY(var(--tw-scale-y,1))",sh=(e,t,n)=>e[0]&&(Xc=t.theme(n,e[1]||e[0]))&&{[`--tw-${n}-x`]:"y"!==e[0]&&Xc,[`--tw-${n}-y`]:"x"!==e[0]&&Xc,transform:[`${n}${e[1]?e[0].toUpperCase():""}(${Xc})`,dh()]},lh=e=>(t,n,r)=>r[1]?Pf(n.theme(e,t),r[1],e):Bf(e)(t,n,r),uh=lh("padding"),ch=lh("margin"),fh=(e,{theme:t},n)=>(Xc={w:"width",h:"height"}[e[0]])&&{[Xc=`${n}${sf(Xc)}`]:t(Xc,of(e))},hh=(e,{theme:t},n)=>{const r=n.split("-"),i="backdrop"==r[0]?r[0]+"-":"";if(i||e.unshift(...r),"filter"==e[0]){const t=["blur","brightness","contrast","grayscale","hue-rotate","invert",i&&"opacity","saturate","sepia",!i&&"drop-shadow"].filter(Boolean);return"none"==e[1]?{[i+"filter"]:"none"}:t.reduce((e,t)=>(e["--tw-"+i+t]="var(--tw-empty,/*!*/ /*!*/)",e),{[i+"filter"]:t.map(e=>`var(--tw-${i}${e})`).join(" ")})}return Zc=e.shift(),tf(["hue","drop"],Zc)&&(Zc+=sf(e.shift())),(Xc=t(i?"backdrop"+sf(Zc):Zc,e))&&{["--tw-"+i+Zc]:(Array.isArray(Xc)?Xc:[Xc]).map(e=>`${lf(Zc)}(${e})`).join(" ")}},ph={group:(e,{tag:t},n)=>t(nf([n,...e])),hidden:zf(Hf,"none"),inline:Hf,block:Hf,contents:Hf,flow:Hf,table:(e,t,n)=>tf(["auto","fixed"],e[0])?{tableLayout:e[0]}:Hf(e,t,n),flex(e,t,n){switch(e[0]){case"row":case"col":return{flexDirection:nf("col"==e[0]?["column",...of(e)]:e)};case"nowrap":case"wrap":return{flexWrap:nf(e)};case"grow":case"shrink":return null!=(Xc=t.theme("flex"+sf(e[0]),of(e),e[1]||1))&&{["flex-"+e[0]]:""+Xc}}return(Xc=t.theme("flex",e,""))?{flex:Xc}:Hf(e,t,n)},grid(e,t,n){switch(e[0]){case"cols":case"rows":return(Xc=t.theme("gridTemplate"+sf(Mf(e[0])),of(e),2==e.length&&Number(e[1])?`repeat(${e[1]},minmax(0,1fr))`:nf(of(e))))&&{["gridTemplate-"+Mf(e[0])]:Xc};case"flow":return e.length>1&&{gridAutoFlow:nf("col"==e[1]?["column",...of(e,2)]:of(e)," ")}}return Hf(e,t,n)},auto:(e,{theme:t})=>tf(["cols","rows"],e[0])&&(Xc=t("gridAuto"+sf(Mf(e[0])),of(e),nf(of(e))))&&{["gridAuto-"+Mf(e[0])]:Xc},static:Wf,fixed:Wf,absolute:Wf,relative:Wf,sticky:Wf,visible:{visibility:"visible"},invisible:{visibility:"hidden"},antialiased:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},"subpixel-antialiased":{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"},truncate:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"},"not-sr-only":{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"},resize:e=>({resize:{x:"horizontal",y:"vertical"}[e[0]]||e[0]||"both"}),box:e=>e[0]&&{boxSizing:e[0]+"-box"},appearance:Ff(),cursor:qf(),float:Ff(),clear:Ff(),decoration:Ff("boxDecorationBreak"),isolate:{isolation:"isolate"},isolation:Ff(),"mix-blend":Ff("mixBlendMode"),top:Xf,right:Xf,bottom:Xf,left:Xf,inset:(e,{theme:t})=>(Xc=Rf(e[0]))?Pf(t("inset",of(e)),e[0]):(Xc=t("inset",e))&&{top:Xc,right:Xc,bottom:Xc,left:Xc},underline:Vf,"line-through":Vf,"no-underline":zf(Vf,"none"),"text-underline":zf(Vf,"underline"),"text-no-underline":zf(Vf,"none"),"text-line-through":zf(Vf,"line-through"),uppercase:Gf,lowercase:Gf,capitalize:Gf,"normal-case":zf(Gf,"none"),"text-normal-case":zf(Gf,"none"),italic:Kf,"not-italic":zf(Kf,"normal"),"font-italic":zf(Kf,"italic"),"font-not-italic":zf(Kf,"normal"),font:(e,t,n)=>(Xc=t.theme("fontFamily",e,""))?{fontFamily:Xc}:Bf("fontWeight")(e,t,n),items:e=>e[0]&&{alignItems:tf(["start","end"],e[0])?"flex-"+e[0]:nf(e)},"justify-self":Ff(),"justify-items":Ff(),justify:ih("justifyContent"),content:ih("alignContent"),self:ih("alignSelf"),place:e=>e[0]&&rh("place-"+e[0],of(e)),overscroll:e=>e[0]&&{["overscrollBehavior"+(e[1]?"-"+e[0]:"")]:e[1]||e[0]},col:oh("column"),row:oh("row"),duration:Bf("transitionDuration"),delay:Bf("transitionDelay"),tracking:Bf("letterSpacing"),leading:Bf("lineHeight"),z:Bf("zIndex"),opacity:Bf(),ease:Bf("transitionTimingFunction"),p:uh,py:uh,px:uh,pt:uh,pr:uh,pb:uh,pl:uh,m:ch,my:ch,mx:ch,mt:ch,mr:ch,mb:ch,ml:ch,w:Bf("width"),h:Bf("height"),min:fh,max:fh,fill:Bf(),order:Bf(),origin:qf("transformOrigin"," "),select:Ff("userSelect"),"pointer-events":Ff(),align:Ff("verticalAlign"),whitespace:Ff("whiteSpace"),"normal-nums":{fontVariantNumeric:"normal"},ordinal:Yf("ordinal"),"slashed-zero":Yf("slashed-zero"),"lining-nums":Yf("numeric-figure"),"oldstyle-nums":Yf("numeric-figure"),"proportional-nums":Yf("numeric-spacing"),"tabular-nums":Yf("numeric-spacing"),"diagonal-fractions":Yf("numeric-fraction"),"stacked-fractions":Yf("numeric-fraction"),overflow:(e,t,n)=>tf(["ellipsis","clip"],e[0])?Ff("textOverflow")(e):e[1]?{["overflow-"+e[0]]:e[1]}:Ff()(e,t,n),transform:e=>"none"==e[0]?{transform:"none"}:{"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1",transform:dh("gpu"==e[0])},rotate:(e,{theme:t})=>(Xc=t("rotate",e))&&{"--tw-rotate":Xc,transform:[`rotate(${Xc})`,dh()]},scale:sh,translate:sh,skew:sh,gap:(e,t,n)=>(Xc={x:"column",y:"row"}[e[0]])?{[Xc+"Gap"]:t.theme("gap",of(e))}:Bf("gap")(e,t,n),stroke:(e,t,n)=>(Xc=t.theme("stroke",e,""))?{stroke:Xc}:Bf("strokeWidth")(e,t,n),outline:(e,{theme:t})=>(Xc=t("outline",e))&&{outline:Xc[0],outlineOffset:Xc[1]},"break-normal":{wordBreak:"normal",overflowWrap:"normal"},"break-words":{overflowWrap:"break-word"},"break-all":{wordBreak:"break-all"},text(e,{theme:t},n){switch(e[0]){case"left":case"center":case"right":case"justify":return{textAlign:e[0]};case"uppercase":case"lowercase":case"capitalize":return Gf([],Xc,e[0]);case"opacity":return Jf(e,t,n)}const r=t("fontSize",e,"");return r?"string"==typeof r?{fontSize:r}:{fontSize:r[0],..."string"==typeof r[1]?{lineHeight:r[1]}:r[1]}:eh("color","text",t("textColor",e))},bg(e,{theme:t},n){switch(e[0]){case"fixed":case"local":case"scroll":return Ff("backgroundAttachment",",")(e);case"bottom":case"center":case"left":case"right":case"top":return Ff("backgroundPosition"," ")(e);case"no":return"repeat"==e[1]&&Ff("backgroundRepeat")(e);case"repeat":return tf("xy",e[1])?Ff("backgroundRepeat")(e):{backgroundRepeat:e[1]||e[0]};case"opacity":return Jf(e,t,n,"background");case"clip":case"origin":return e[1]&&{["background-"+e[0]]:e[1]+("text"==e[1]?"":"-box")};case"blend":return Ff("background-blend-mode")(of(e));case"gradient":if("to"==e[1]&&(Xc=Rf(e[2])))return{backgroundImage:`linear-gradient(to ${nf(Xc," ")},var(--tw-gradient-stops))`}}return(Xc=t("backgroundPosition",e,""))?{backgroundPosition:Xc}:(Xc=t("backgroundSize",e,""))?{backgroundSize:Xc}:(Xc=t("backgroundImage",e,""))?{backgroundImage:Xc}:eh("backgroundColor","bg",t("backgroundColor",e))},from:(e,{theme:t})=>(Xc=t("gradientColorStops",e))&&{"--tw-gradient-from":Xc,"--tw-gradient-stops":`var(--tw-gradient-from),var(--tw-gradient-to,${th(Xc)})`},via:(e,{theme:t})=>(Xc=t("gradientColorStops",e))&&{"--tw-gradient-stops":`var(--tw-gradient-from),${Xc},var(--tw-gradient-to,${th(Xc)})`},to:(e,{theme:t})=>(Xc=t("gradientColorStops",e))&&{"--tw-gradient-to":Xc},border:(e,t,n)=>{var r;const i=null==(r=Rf(e[0]))?void 0:r.map(sf);i&&(e=of(e));let o=ah(e,t,n);return i&&o&&"object"==typeof o&&(o=Object.entries(o).reduce((e,[t,n])=>{if(t.startsWith("border"))for(const r of i)e[t.slice(0,6)+r+t.slice(6)]=n;else e[t]=n;return e},{})),o},divide:(e,t,n)=>(Xc=nh(e,t,n,"divideWidth","border","width")||ah(e,t,n))&&{"&>:not([hidden])~:not([hidden])":Xc},space:(e,t,n)=>(Xc=nh(e,t,n,"space","margin"))&&{"&>:not([hidden])~:not([hidden])":Xc},placeholder:(e,{theme:t},n)=>(Xc="opacity"==e[0]?Jf(e,t,n):eh("color","placeholder",t("placeholderColor",e)))&&{"&::placeholder":Xc},shadow:(e,{theme:t})=>(Xc=t("boxShadow",e))&&{":global":{"*":{"--tw-shadow":"0 0 transparent"}},"--tw-shadow":"none"==Xc?"0 0 transparent":Xc,boxShadow:[Xc,"var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)"]},animate:(e,{theme:t,tag:n})=>{if(Zc=t("animation",e)){const e=Zc.split(" ");return(Xc=t("keyframes",e[0],Jc={}))!==Jc?(Zc=n(e[0]))&&{animation:Zc+" "+nf(of(e)," "),["@keyframes "+Zc]:Xc}:{animation:Zc}}},ring(e,{theme:t},n){switch(e[0]){case"inset":return{"--tw-ring-inset":"inset"};case"opacity":return Jf(e,t,n);case"offset":return(Xc=t("ringOffsetWidth",of(e),""))?{"--tw-ring-offset-width":Xc}:{"--tw-ring-offset-color":t("ringOffsetColor",of(e))}}return(Xc=t("ringWidth",e,""))?{"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${Xc} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)",":global":{"*":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":t("ringOffsetColor","","#fff"),"--tw-ring-color":Qf(t("ringColor","","#93c5fd"),"ring-opacity",t("ringOpacity","","0.5")),"--tw-ring-offset-shadow":"0 0 transparent","--tw-ring-shadow":"0 0 transparent"}}}:{"--tw-ring-opacity":"1","--tw-ring-color":Qf(t("ringColor",e),"ring-opacity")}},object:(e,t,n)=>tf(["contain","cover","fill","none","scale-down"],nf(e))?{objectFit:nf(e)}:qf("objectPosition"," ")(e,t,n),list:(e,t,n)=>"item"==nf(e)?Hf(e,t,n):tf(["inside","outside"],nf(e))?{listStylePosition:e[0]}:qf("listStyleType")(e,t,n),rounded:(e,t,n)=>jf(t.theme("borderRadius",of(e),""),e[0],"border","radius")||Bf("borderRadius")(e,t,n),"transition-none":{transitionProperty:"none"},transition:(e,{theme:t})=>({transitionProperty:t("transitionProperty",e),transitionTimingFunction:t("transitionTimingFunction",""),transitionDuration:t("transitionDuration","")}),container:(e,{theme:t})=>{const{screens:n=t("screens"),center:r,padding:i}=t("container"),o=e=>(Xc=i&&("string"==typeof i?i:i[e]||i.DEFAULT))?{paddingRight:Xc,paddingLeft:Xc}:{};return Object.keys(n).reduce((e,t)=>((Zc=n[t])&&"string"==typeof Zc&&(e[mf(Zc)]={"&":{"max-width":Zc,...o(t)}}),e),{width:"100%",...r?{marginRight:"auto",marginLeft:"auto"}:{},...o("xs")})},filter:hh,blur:hh,brightness:hh,contrast:hh,grayscale:hh,"hue-rotate":hh,invert:hh,saturate:hh,sepia:hh,"drop-shadow":hh,backdrop:hh},mh={dark:"@media (prefers-color-scheme:dark)",sticky:"@supports ((position: -webkit-sticky) or (position:sticky))","motion-reduce":"@media (prefers-reduced-motion:reduce)","motion-safe":"@media (prefers-reduced-motion:no-preference)",first:"&:first-child",last:"&:last-child",even:"&:nth-child(2n)",odd:"&:nth-child(odd)",children:"&>*",siblings:"&~*",sibling:"&+*",override:"&&"},gh="__twind",$h=e=>{let t=self[gh];return t||(t=document.head.appendChild(document.createElement("style")),t.id=gh,e&&(t.nonce=e),t.appendChild(document.createTextNode(""))),t},vh=e=>({unknown(e,t=[],n,r){n||this.report({id:"UNKNOWN_THEME_VALUE",key:e+"."+nf(t)},r)},report:({id:t,...n})=>e(`[${t}] ${JSON.stringify(n)}`)}),yh=vh(e=>console.warn(e)),bh=vh(e=>{throw new Error(e)}),xh=vh(df),wh=(e,t,n)=>`${e}:${t}${n?" !important":""}`,_h=(e,t,n)=>{let r="";const i=(o=e,Gc.get(o));var o;i&&(r+=`${wh(i,t,n)};`);let a=function(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}(e);return 1&a&&(r+=`-webkit-${wh(e,t,n)};`),2&a&&(r+=`-moz-${wh(e,t,n)};`),4&a&&(r+=`-ms-${wh(e,t,n)};`),a=function(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?"-"===t[3]?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}(e,t),1&a&&(r+=`${wh(e,`-webkit-${t}`,n)};`),2&a&&(r+=`${wh(e,`-moz-${t}`,n)};`),4&a&&(r+=`${wh(e,`-ms-${t}`,n)};`),r+=wh(e,t,n),r},Ch=(e,t)=>{const n={};do{for(let t=1;t<e;t++)n[`${t}/${e}`]=Number((t/e*100).toFixed(6))+"%"}while(++e<=t);return n},Sh=(e,t,n=0)=>{const r={};for(;n<=e;n=2*n||1)r[n]=n+t;return r},Eh=(e,t="",n=1,r=0,i=1,o={})=>{for(;r<=e;r+=i)o[r]=r/n+t;return o},Nh=e=>t=>t(e),Th={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},colors:{transparent:"transparent",current:"currentColor",black:"#000",white:"#fff",gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},yellow:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},green:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},purple:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"}},spacing:{px:"1px",0:"0px",...Eh(4,"rem",4,.5,.5),...Eh(12,"rem",4,5),14:"3.5rem",...Eh(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},backdropBlur:Nh("blur"),backdropBrightness:Nh("brightness"),backdropContrast:Nh("contrast"),backdropGrayscale:Nh("grayscale"),backdropHueRotate:Nh("hueRotate"),backdropInvert:Nh("invert"),backdropOpacity:Nh("opacity"),backdropSaturate:Nh("saturate"),backdropSepia:Nh("sepia"),backgroundColor:Nh("colors"),backgroundImage:{none:"none"},backgroundOpacity:Nh("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Eh(200,"",100,0,50),...Eh(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:e=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:Nh("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderWidth:{DEFAULT:"1px",...Sh(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none"},contrast:{...Eh(200,"",100,0,50),75:"0.75",125:"1.25"},divideColor:Nh("borderColor"),divideOpacity:Nh("borderOpacity"),divideWidth:Nh("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:{current:"currentColor"},grayscale:{0:"0",DEFAULT:"100%"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{0:"0",DEFAULT:"100%"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gridTemplateColumns:{},gridTemplateRows:{},gridAutoColumns:{min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gap:Nh("spacing"),gradientColorStops:Nh("colors"),height:e=>({auto:"auto",...e("spacing"),...Ch(2,6),full:"100%",screen:"100vh"}),inset:e=>({auto:"auto",...e("spacing"),...Ch(2,4),full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",...Eh(10,"rem",4,3)},margin:e=>({auto:"auto",...e("spacing")}),maxHeight:e=>({...e("spacing"),full:"100%",screen:"100vh"}),maxWidth:(e,{breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content"},opacity:{...Eh(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0",...Eh(12,"",1,1)},outline:{none:["2px solid transparent","2px"],white:["2px dotted white","2px"],black:["2px dotted black","2px"]},padding:Nh("spacing"),placeholderColor:Nh("colors"),placeholderOpacity:Nh("opacity"),ringColor:e=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:Nh("colors"),ringOffsetWidth:Sh(8,"px"),ringOpacity:e=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",...Sh(8,"px")},rotate:{...Sh(2,"deg"),...Sh(12,"deg",3),...Sh(180,"deg",45)},saturate:Eh(200,"",100,0,50),scale:{...Eh(150,"",100,0,50),...Eh(110,"",100,90,5),75:"0.75",125:"1.25"},sepia:{0:"0",DEFAULT:"100%"},skew:{...Sh(2,"deg"),...Sh(12,"deg",3)},space:Nh("spacing"),stroke:{current:"currentColor"},strokeWidth:Eh(2),textColor:Nh("colors"),textOpacity:Nh("opacity"),transitionDuration:e=>({DEFAULT:"150ms",...e("durations")}),transitionDelay:Nh("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"background-color,border-color,color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:e=>({...e("spacing"),...Ch(2,4),full:"100%"}),width:e=>({auto:"auto",...e("spacing"),...Ch(2,6),...Ch(12,12),screen:"100vw",full:"100%",min:"min-content",max:"max-content"}),zIndex:{auto:"auto",...Eh(50,"",1,0,10)}},Ah=(e,t={},n=[])=>(Object.keys(e).forEach(r=>{const i=e[r];"DEFAULT"==r&&(t[nf(n)]=i,t[nf(n,".")]=i);const o=[...n,r];t[nf(o)]=i,t[nf(o,".")]=i,i&&"object"==typeof i&&Ah(i,t,o)},t),t),Oh={negative:()=>({}),breakpoints:e=>Object.keys(e).filter(t=>"string"==typeof e[t]).reduce((t,n)=>(t["screen-"+n]=e[n],t),{})},Ih=e=>{const t=new Map,n={...Th,...e},r=(e,t)=>{const n=e&&e[t],r="function"==typeof n?n(i,Oh):n;return r&&"colors"==t?Ah(r):r},i=(e,i,o)=>{const a=e.split(".");e=a[0],a.length>1&&(o=i,i=nf(of(a),"."));let d=t.get(e);if(d||(t.set(e,d={...r(n,e)}),Object.assign(d,r(n.extend,e))),null!=i){const t=((e,t)=>(t="["==t[0]&&"]"==t.slice(-1)&&t.slice(1,-1))&&tf(e,"olor")==/^(#|(hsl|rgb)a?\(|[a-z]+$)/.test(t)&&(tf(t,"calc(")?t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "):t))(e,i=(Array.isArray(i)?nf(i):i)||"DEFAULT")||d[i];return null==t?o:Array.isArray(t)&&!tf(["fontSize","outline","dropShadow"],e)?nf(t,","):t}return d};return i},kh=/^:(group(?:(?!-focus).+?)*)-(.+)$/,jh=/^(:not)-(.+)/,Rh=e=>"["==e[1]?of(e):e,Ph=e=>(31&((ef=/(?:^|min-width: *)(\d+(?:.\d+)?)(p)?/.exec(e))?+ef[1]/(ef[2]?15:1)/10:0))<<22,Dh=e=>{ef=0;for(let t=e.length;t--;)ef+=tf("-:,",e[t]);return ef},Lh=e=>(15&Dh(e))<<18,Mh=["rst","st","en","d","nk","sited","pty","ecked","cus-w","ver","cus","cus-v","tive","sable","ad-on","tiona","quire"],Uh=(e,t)=>(n,r)=>{return n|((ef=e("screens",of(r),""))?1<<27|Ph(mf(ef)):":dark"==r?1<<30:"@"==(ef=t[r]||r.replace(jh,":$2"))[0]?Lh(ef):(i=r,1<<(~(ef=Mh.indexOf(i.replace(kh,":$2").slice(3,8)))?ef:17)));var i},Fh=(e,t)=>t+"{"+e+"}",Bh=(e,t,n)=>{const{theme:r,tag:i}=n,o=(e,t)=>"--"+i(t),a=e=>`${e}`.replace(/--(tw-[\w-]+)\b/g,o);let d;const s=(t,r,i,o,l)=>{if(Array.isArray(o))return void o.forEach(e=>e&&s(t,r,i,e,l));let u="",c=0,f=0;o["@apply"]&&(o=hf(uf(((...e)=>Of(If,e))(o["@apply"]),n),{...o,"@apply":void 0},n)),Object.keys(o).forEach(h=>{const p=uf(o[h],n);if(ff(h,p)){if(""!==p&&h.length>1){const t=lf(h);f+=1,c=Math.max(c,(e=>"-"==e[0]?0:Dh(e)+((ef=/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7}$)|([fl].{5}l|g.{8}$|pl))/.exec(e))?+!!ef[1]||-!!ef[2]:0)+1)(t)),u=(u&&u+";")+((t,n,r)=>(t=a(t),Array.isArray(n)?nf(n.filter(Boolean).map(n=>e(t,a(n),r)),";"):e(t,a(n),r)))(t,p,l)}}else if(p)if(":global"==h&&(h="@global"),"@"==h[0])if("g"==h[1])s([],"",0,p,l);else if("f"==h[1])s([],h,0,p,l);else if("k"==h[1]){const e=d.length;s([],"",0,p,l);const t=d.splice(e,d.length-e);d.push({r:Fh(nf(t.map(e=>e.r),""),h),p:t.reduce((e,t)=>e+t.p,0)})}else"i"==h[1]?(Array.isArray(p)?p:[p]).forEach(e=>e&&d.push({p:0,r:`${h} ${e};`})):("c"==h[2]&&(h=mf(n.theme("screens",of(h,8).trim()))),s([...t,h],r,i|Ph(h)|Lh(h),p,l));else s(t,r?r.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(e,t,n)=>h.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(e,n,r)=>(tf(n,"&")?n.replace(/&/g,t):(t&&t+" ")+n)+r)+n):h,i,p,l)}),f&&d.push({r:t.reduceRight(Fh,Fh(u,r)),p:256*i+((15&Math.max(0,15-f))<<4|15&(c||15))})},l=Uh(r,t);return(e,t,n,r=0)=>(r<<=28,d=[],s([],t?"."+pf(t):"",n?n.v.reduceRight(l,r):r,e,n&&n.i),d)},qh=(e,t,n,r=t)=>!1===e?n:!0===e?r:e||t,zh={_:{value:"",writable:!0}},Hh=(e={})=>{const t=Ih(e.theme),n=(e=>("string"==typeof e?{t:bh,a:yh,i:xh}[e[1]]:e)||yh)(e.mode),r=qh(e.hash,!1,!1,gf),i=e.important;let o={v:[]},a=0;const d=[],s={tw:(...e)=>b(e),theme:(e,r,i)=>{var a;const d=null!=(a=t(e,r,i))?a:n.unknown(e,null==r||Array.isArray(r)?r:r.split("."),null!=i,s);return o.n&&d&&tf("rg",(typeof d)[5])?`calc(${d} * -1)`:d},tag:e=>r?r(e):e,css:e=>{a++;const t=d.length;try{("string"==typeof e?Nf([e]):e).forEach(y);const n=Object.create(null,zh);for(let e=t;e<d.length;e++){const t=d[e];if(t)switch(typeof t){case"object":hf(n,t,s);break;case"string":n._+=(n._&&" ")+t}}return n}finally{d.length=t,a--}}},l=((e,t)=>(n,r)=>{if("function"==typeof n.d)return n.d(t);const i=n.d.split(/-(?![^[]*])/g);if(!r&&"tw"==i[0]&&n.$==n.d)return n.$;for(let o=i.length;o;o--){const n=nf(i.slice(0,o));if(Object.prototype.hasOwnProperty.call(e,n)){const a=e[n];return"function"==typeof a?a(of(i,o),t,n):"string"==typeof a?t[r?"css":"tw"](a):a}}})({...ph,...e.plugins},s),u={...mh,...e.variants},c=((e,t,{theme:n,tag:r})=>{const i=(i,o)=>(Qc=n("screens",of(o),""))?{[mf(Qc)]:i}:":dark"==o&&"class"==e?{".dark &":i}:(Qc=kh.exec(o))?{[`.${pf(r(Qc[1]))}:${Qc[2]} &`]:i}:{[t[of(o)]||"&"+o.replace(jh,(e,t,n)=>t+"("+Rh(":"+n)+")")]:i};return(e,t)=>t.v.reduceRight(i,e)})(e.darkMode||"media",u,s),f=Bh(qh(e.prefix,_h,wh),u,s),h=e.sheet||("undefined"==typeof window?{target:null,insert:df}:(({nonce:e,target:t=$h(e).sheet}={})=>{const n=t.cssRules.length;return{target:t,insert:(e,r)=>t.insertRule(e,n+r)}})(e)),{init:p=e=>e()}=h,m=((e,t,n,r)=>{let i,o;return n((e=[])=>i=e),n((e=new Set)=>o=e),({r:n,p:a})=>{if(!o.has(n)){o.add(n);const s=((e,t)=>{for(var n=0,r=e.length;n<r;){const i=r+n>>1;e[i]<=t?n=i+1:r=i}return r})(i,a);try{e.insert(n,s),i.splice(s,0,a)}catch(d){/:-[mwo]/.test(n)||t.report({id:"INJECT_CSS_ERROR",css:n,error:d},r)}}}})(h,n,p,s);let g;p((e=new Map)=>g=e);const $=new WeakMap,v=(e,t)=>"_"==e?void 0:"function"==typeof t?JSON.stringify(uf(t,s),v):t,y=e=>{!a&&o.v.length&&(e={...e,v:[...o.v,...e.v],$:""}),e.$||(e.$=Lf(e,$.get(e.d)));let t=a?null:g.get(e.$);if(null==t){let u=(e=>{const t=o;o=e;try{return uf(l(e),s)}finally{o=t}})(e);if(e.$||(e.$=gf(JSON.stringify(u,v)),$.set(e.d,e.$),e.$=Lf(e,e.$)),u&&"object"==typeof u)if(e.v=e.v.map(Rh),i&&(e.i=i),u=c(u,e),a)d.push(u);else{const n="function"==typeof e.d?"string"==typeof u._?1:3:2;t=r||"function"==typeof e.d?(r||gf)(n+e.$):e.$,f(u,t,e,n).forEach(m),u._&&(t+=" "+u._)}else"string"==typeof u?t=u:(t=e.$,n.report({id:"UNKNOWN_DIRECTIVE",rule:t},s)),a&&"function"!=typeof e.d&&d.push(t);a||(g.set(e.$,t),cf(g,3e4))}return t},b=e=>nf(Nf(e).map(y).filter(Boolean)," "),x=qh(e.preflight,af,!1);if(x){const e=(e=>({":root":{tabSize:4},"body,blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre,fieldset,ol,ul":{margin:"0"},button:{backgroundColor:"transparent",backgroundImage:"none"},'button,[type="button"],[type="reset"],[type="submit"]':{WebkitAppearance:"button"},"button:focus":{outline:["1px dotted","5px auto -webkit-focus-ring-color"]},"fieldset,ol,ul,legend":{padding:"0"},"ol,ul":{listStyle:"none"},html:{lineHeight:"1.5",WebkitTextSizeAdjust:"100%",fontFamily:e("fontFamily.sans","ui-sans-serif,system-ui,sans-serif")},body:{fontFamily:"inherit",lineHeight:"inherit"},"*,::before,::after":{boxSizing:"border-box",border:`0 solid ${e("borderColor.DEFAULT","currentColor")}`},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},img:{borderStyle:"solid"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:"1",color:e("placeholderColor.DEFAULT",e("colors.gray.400","#a1a1aa"))},'button,[role="button"]':{cursor:"pointer"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",margin:"0",padding:"0",lineHeight:"inherit",color:"inherit"},"button,select":{textTransform:"none"},"::-moz-focus-inner":{borderStyle:"none",padding:"0"},":-moz-focusring":{outline:"1px dotted ButtonText"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},'[type="search"]':{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"abbr[title]":{textDecoration:"underline dotted"},"b,strong":{fontWeight:"bolder"},"pre,code,kbd,samp":{fontFamily:e("fontFamily","mono","ui-monospace,monospace"),fontSize:"1em"},"sub,sup":{fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"}}))(t),n=f("function"==typeof x?uf(x(e,s),s)||e:{...e,...x});p((e=(n.forEach(m),!0))=>e)}return{init:()=>n.report({id:"LATE_SETUP_CALL"},s),process:b}},Wh=e=>{let t,n=e=>(r(),n(e)),r=e=>{({process:n,init:r}=Hh(e))};return{tw:Object.defineProperties((...e)=>n(e),{theme:{get:(i="theme",()=>(t||n([e=>(t=e,"")]),t[i]))}}),setup:e=>r(e)};var i},{tw:Gh,setup:Vh}=Wh();let Kh={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Jh(4,"rem",4,.5,.5),...Jh(12,"rem",4,5),14:"3.5rem",...Jh(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Zh("blur"),backdropBrightness:Zh("brightness"),backdropContrast:Zh("contrast"),backdropGrayscale:Zh("grayscale"),backdropHueRotate:Zh("hueRotate"),backdropInvert:Zh("invert"),backdropOpacity:Zh("opacity"),backdropSaturate:Zh("saturate"),backdropSepia:Zh("sepia"),backgroundColor:Zh("colors"),backgroundImage:{none:"none"},backgroundOpacity:Zh("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Jh(200,"",100,0,50),...Jh(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Zh("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Zh("spacing"),borderWidth:{DEFAULT:"1px",...Xh(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Zh("colors"),caretColor:Zh("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Jh(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Zh("borderColor"),divideOpacity:Zh("borderOpacity"),divideWidth:Zh("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Yh(2,6),...Yh(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Zh("spacing"),gradientColorStops:Zh("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Yh(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Yh(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Jh(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Jh(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Zh("spacing"),placeholderColor:Zh("colors"),placeholderOpacity:Zh("opacity"),outlineColor:Zh("colors"),outlineOffset:Xh(8,"px"),outlineWidth:Xh(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Zh("colors"),ringOffsetWidth:Xh(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Xh(8,"px")},rotate:{...Xh(2,"deg"),...Xh(12,"deg",3),...Xh(180,"deg",45)},saturate:Jh(200,"",100,0,50),scale:{...Jh(150,"",100,0,50),...Jh(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Zh("spacing"),scrollPadding:Zh("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Xh(2,"deg"),...Xh(12,"deg",3)},space:Zh("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Jh(2),textColor:Zh("colors"),textDecorationColor:Zh("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Xh(8,"px")},textUnderlineOffset:{auto:"auto",...Xh(8,"px")},textIndent:Zh("spacing"),textOpacity:Zh("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Zh("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Yh(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Jh(50,"",1,0,10),auto:"auto"}};function Yh(e,t){let n={};do{for(var r=1;r<e;r++)n[`${r}/${e}`]=Number((r/e*100).toFixed(6))+"%"}while(++e<=t);return n}function Xh(e,t,n=0){let r={};for(;n<=e;n=2*n||1)r[n]=n+t;return r}function Jh(e,t="",n=1,r=0,i=1,o={}){for(;r<=e;r+=i)o[r]=r/n+t;return o}function Zh(e){return({theme:t})=>t(e)}let Qh={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Kh.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Kh.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};function ep(e,t="@media "){return t+tp(e).map(e=>("string"==typeof e&&(e={min:e}),e.raw||Object.keys(e).map(t=>`(${t}-width:${e[t]})`).join(" and "))).join(",")}function tp(e=[]){return Array.isArray(e)?e:null==e?[]:[e]}function np(e,t){return Math.round(parseInt(e,16)*t)}function rp(e,t={}){if("function"==typeof e)return e(t);let{opacityValue:n="1",opacityVariable:r}=t,i=r?`var(${r})`:n;if(e.includes("<alpha-value>"))return e.replace("<alpha-value>",i);if("#"==e[0]&&(4==e.length||7==e.length)){let t=(e.length-1)/3,n=[17,1,.062272][t-1];return`rgba(${[np(e.substr(1,t),n),np(e.substr(1+t,t),n),np(e.substr(1+2*t,t),n),i]})`}return"1"==i?e:"0"==i?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function ip(e,t,n){return[e,op(t,n)]}function op(e,t){return"function"==typeof e?e:"string"==typeof e&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):ap(n,1)}):t=>e||{[t[1]]:ap(t,2)}}function ap(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return"-"==e.input[0]?`calc(${n} * -1)`:n}function dp(e,t,n,r){return[e,sp(t,n,r)]}function sp(e,t,n){let r="string"==typeof t?(e,r)=>({[t]:n?n(e,r):e._}):t||(({1:e,_:t},n,r)=>({[e||r]:t}));return(t,n)=>{let i=hp(e||t[1]),o=n.theme(i,t.$$)??fp(t.$$,i,n);if(null!=o)return t._=ap(t,0,o),r(t,n,i)}}function lp(e,t={},n){return[e,up(t,n)]}function up(e={},t){return(n,r)=>{let{section:i=hp(n[0]).replace("-","")+"Color"}=e,[o,a]=(n.$$.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1);if(!o)return;let d=r.theme(i,o)||fp(o,i,r);if(!d||"object"==typeof d)return;let{opacityVariable:s=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=i.replace("Color","Opacity"),property:u=i,selector:c}=e,f=r.theme(l,a||"DEFAULT")||a&&fp(a,l,r),h=t||(({_:e})=>{let t=cp(u,e);return c?{[c]:t}:t});n._={value:rp(d,{opacityVariable:s||void 0,opacityValue:f||void 0}),color:e=>rp(d,e),opacityVariable:s||void 0,opacityValue:f||void 0};let p=h(n,r);if(!n.dark){let e=r.d(i,o,d);e&&e!==d&&(n._={value:rp(e,{opacityVariable:s||void 0,opacityValue:f||"1"}),color:t=>rp(e,t),opacityVariable:s||void 0,opacityValue:f||void 0},p={"&":p,[r.v("dark")]:h(n,r)})}return p}}function cp(e,t){let n={};return"string"==typeof t?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function fp(e,t,n){if("["==e[0]&&"]"==e.slice(-1)){if(e=pp(function(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(e,n,r,i,o="")=>{let a=t(r,o);return"function"==typeof a&&/color|fill|stroke/i.test(r)?rp(a):""+tp(a).filter(e=>Object(e)!==e)})}(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!/^color:/.test(e)&&!/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e)||/image/i.test(t)&&!/^image:/.test(e)&&!/^[a-z-]+\(/.test(e)||/weight/i.test(t)&&!/^(number|any):/.test(e)&&!/^\d+$/.test(e)||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function hp(e){return e.replace(/-./g,e=>e[1].toUpperCase())}function pp(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",n,r="")=>pp(t)+n+pp(r)):e.replace(/(^|[^\\])_+/g,(e,t)=>t+" ".repeat(e.length-t.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}let mp=[ip("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:fp(`[${t}]`,"",n)}}})),ip("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),dp("aspect-","aspectRatio"),ip("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:i}=t("container"),o={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...a("xs")};for(let d in n){let e=n[d];"string"==typeof e&&(o[ep(e)]={"&":{maxWidth:e,...a(d)}})}return o;function a(e){let t=i&&("string"==typeof i?i:i[e]||i.DEFAULT);if(t)return{paddingRight:t,paddingLeft:t}}}),dp("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),ip("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),ip("box-(border|content)","boxSizing",({1:e})=>e+"-box"),ip("hidden",{display:"none"}),ip("table-(auto|fixed)","tableLayout"),ip(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",ip("isolate","isolation"),ip("object-(contain|cover|fill|none|scale-down)","objectFit"),dp("object-","objectPosition"),ip("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",gp),ip("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),ip("(static|fixed|absolute|relative|sticky)","position"),dp("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:"-x"!=e&&t,right:"-y"!=e&&t,bottom:"-x"!=e&&t,left:"-y"!=e&&t})),dp("-?(top|bottom|left|right)(?:$|-)","inset"),ip("(visible|collapse)","visibility"),ip("invisible",{visibility:"hidden"}),dp("-?z-","zIndex"),ip("flex-((row|col)(-reverse)?)","flexDirection",$p),ip("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),dp("(flex-(?:grow|shrink))(?:$|-)"),dp("(flex)-"),dp("grow(?:$|-)","flexGrow"),dp("shrink(?:$|-)","flexShrink"),dp("basis-","flexBasis"),dp("-?(order)-"),"-?(order)-(\\d+)",dp("grid-cols-","gridTemplateColumns"),ip("grid-cols-(\\d+)","gridTemplateColumns",Np),dp("col-","gridColumn"),ip("col-(span)-(\\d+)","gridColumn",Ep),dp("col-start-","gridColumnStart"),ip("col-start-(auto|\\d+)","gridColumnStart"),dp("col-end-","gridColumnEnd"),ip("col-end-(auto|\\d+)","gridColumnEnd"),dp("grid-rows-","gridTemplateRows"),ip("grid-rows-(\\d+)","gridTemplateRows",Np),dp("row-","gridRow"),ip("row-(span)-(\\d+)","gridRow",Ep),dp("row-start-","gridRowStart"),ip("row-start-(auto|\\d+)","gridRowStart"),dp("row-end-","gridRowEnd"),ip("row-end-(auto|\\d+)","gridRowEnd"),ip("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>gp($p(e))),ip("grid-flow-(dense)","gridAutoFlow"),dp("auto-cols-","gridAutoColumns"),dp("auto-rows-","gridAutoRows"),dp("gap-x(?:$|-)","gap","columnGap"),dp("gap-y(?:$|-)","gap","rowGap"),dp("gap(?:$|-)","gap"),"(justify-(?:items|self))-",ip("justify-","justifyContent",bp),ip("(content|items|self)-",e=>({["align-"+e[1]]:bp(e)})),ip("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),dp("p([xytrbl])?(?:$|-)","padding",xp("padding")),dp("-?m([xytrbl])?(?:$|-)","margin",xp("margin")),dp("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),ip("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),dp("w-","width"),dp("min-w-","minWidth"),dp("max-w-","maxWidth"),dp("h-","height"),dp("min-h-","minHeight"),dp("max-h-","maxHeight"),dp("font-","fontWeight"),dp("font-","fontFamily",({_:e})=>"string"==typeof(e=tp(e))[1]?{fontFamily:yp(e)}:{fontFamily:yp(e[0]),...e[1]}),ip("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),ip("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),ip("italic","fontStyle"),ip("not-italic",{fontStyle:"normal"}),ip("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>"normal"==t?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Tp({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),dp("tracking-","letterSpacing"),dp("leading-","lineHeight"),ip("list-(inside|outside)","listStylePosition"),dp("list-","listStyleType"),ip("list-","listStyleType"),dp("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),lp("placeholder-",{property:"color",selector:"&::placeholder"}),ip("text-(left|center|right|justify|start|end)","textAlign"),ip("text-(ellipsis|clip)","textOverflow"),dp("text-opacity-","textOpacity","--tw-text-opacity"),lp("text-",{property:"color"}),dp("text-","fontSize",({_:e})=>"string"==typeof e?{fontSize:e}:{fontSize:e[0],..."string"==typeof e[1]?{lineHeight:e[1]}:e[1]}),dp("indent-","textIndent"),ip("(overline|underline|line-through)","textDecorationLine"),ip("no-underline",{textDecorationLine:"none"}),dp("underline-offset-","textUnderlineOffset"),lp("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),dp("decoration-","textDecorationThickness"),ip("decoration-","textDecorationStyle"),ip("(uppercase|lowercase|capitalize)","textTransform"),ip("normal-case",{textTransform:"none"}),ip("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),ip("align-","verticalAlign"),ip("whitespace-","whiteSpace"),ip("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),ip("break-words",{overflowWrap:"break-word"}),ip("break-all",{wordBreak:"break-all"}),ip("break-keep",{wordBreak:"keep-all"}),lp("caret-",{opacityVariable:!1,opacitySection:"opacity"}),lp("accent-",{opacityVariable:!1,opacitySection:"opacity"}),ip("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${vp(e," ")},var(--tw-gradient-stops))`),lp("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),lp("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),lp("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),ip("bg-(fixed|local|scroll)","backgroundAttachment"),ip("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),ip(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),ip("bg-blend-","backgroundBlendMode"),ip("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+("text"==e?"":"-box")),dp("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),lp("bg-",{section:"backgroundColor"}),dp("bg-","backgroundImage"),dp("bg-","backgroundPosition"),ip("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",gp),dp("bg-","backgroundSize"),dp("rounded(?:$|-)","borderRadius"),dp("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${vp(n[0])}-radius`]:t,[`border-${vp(n[1])}-radius`]:t}}),ip("border-(collapse|separate)","borderCollapse"),dp("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),ip("border-(solid|dashed|dotted|double|none)","borderStyle"),dp("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...Tp({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),lp("border-([xytrbl])-",{section:"borderColor"},xp("border","Color")),lp("border-"),dp("border-([xytrbl])(?:$|-)","borderWidth",xp("border","Width")),dp("border(?:$|-)","borderWidth"),dp("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),ip("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),ip("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),dp("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${vp(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${vp(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),lp("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),dp("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),lp("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),dp("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),ip("ring-inset",{"--tw-ring-inset":"inset"}),lp("ring-",{property:"--tw-ring-color"}),dp("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...Tp({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":rp(t("ringOffsetColor","","#fff")),"--tw-ring-color":rp(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),lp("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),dp("shadow(?:$|-)","boxShadow",({_:e})=>({...Tp({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":yp(e),"--tw-shadow-colored":yp(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),dp("(opacity)-"),ip("mix-blend-","mixBlendMode"),...wp(),...wp("backdrop-"),dp("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:yp(e),transitionTimingFunction:"none"==e._?void 0:yp(t("transitionTimingFunction","")),transitionDuration:"none"==e._?void 0:yp(t("transitionDuration",""))})),dp("duration(?:$|-)","transitionDuration","transitionDuration",yp),dp("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",yp),dp("delay(?:$|-)","transitionDelay","transitionDelay",yp),dp("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let i=yp(e),o=i.split(" "),a=t("keyframes",o[0]);return a?{["@keyframes "+(o[0]=r(n(o[0])))]:a,animation:o.join(" ")}:{animation:i}}),"(transform)-(none)",ip("transform",Cp),ip("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":Sp("gpu"==e)})),dp("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Cp()})),dp("-?(rotate)-","rotate",_p),dp("-?(translate-[xy])-","translate",_p),dp("-?(skew-[xy])-","skew",_p),ip("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",gp),"(appearance)-",dp("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",dp("(cursor)-"),"(cursor)-",ip("snap-(none)","scroll-snap-type"),ip("snap-(x|y|both)",({1:e})=>({...Tp({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),ip("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),ip("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),ip("snap-(normal|always)","scroll-snap-stop"),ip("scroll-(auto|smooth)","scroll-behavior"),dp("scroll-p([xytrbl])?(?:$|-)","padding",xp("scroll-padding")),dp("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",xp("scroll-margin")),ip("touch-(auto|none|manipulation)","touch-action"),ip("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...Tp({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),ip("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),ip("outline",{outlineStyle:"solid"}),ip("outline-(dashed|dotted|double)","outlineStyle"),dp("-?(outline-offset)-"),lp("outline-",{opacityVariable:!1,opacitySection:"opacity"}),dp("outline-","outlineWidth"),"(pointer-events)-",dp("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"}[e]||e||"both")],ip("select-(none|text|all|auto)","userSelect"),lp("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),lp("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),dp("stroke-","strokeWidth"),ip("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),ip("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function gp(e){return("string"==typeof e?e:e[1]).replace(/-/g," ").trim()}function $p(e){return("string"==typeof e?e:e[1]).replace("col","column")}function vp(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function yp(e){return e&&""+(e._||e)}function bp({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function xp(e,t=""){return({1:n,_:r})=>{let i={x:"lr",y:"tb"}[n]||n+n;return i?{...cp(e+"-"+vp(i[0])+t,r),...cp(e+"-"+vp(i[1])+t,r)}:cp(e+t,r)}}function wp(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Tp(n),[`${e}filter`]:t.map(t=>`var(--tw-${e}${t})`).join(" ")},[`(${e}filter)-(none)`,ip(`${e}filter`,n),...t.map(t=>dp(`${"h"==t[0]?"-?":""}(${e}${t})(?:$|-)`,t,({1:e,_:r})=>({[`--tw-${e}`]:tp(r).map(e=>`${t}(${e})`).join(" "),...n})))]}function _p({1:e,_:t}){return{["--tw-"+e]:t,...Cp()}}function Cp(){return{...Tp({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Sp()}),transform:"var(--tw-transform)"}}function Sp(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function Ep({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function Np({1:e}){return`repeat(${e},minmax(0,1fr))`}function Tp(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}let Ap=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||fp(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:i=t},{e:o,h:a,v:d})=>{let s=pp(r)||("["==n[0]?n:d(n.slice(1)));return`${(s.includes("&")?s:"&"+s).replace(/&/g,`:merge(.${o(a(e+i))})`)}${"p"==e[0]?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&(e=t.theme("supports",e)||fp(e,"",t)),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&(e=t.theme("screens",e)||fp(e,"",t)),"string"==typeof e)return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&(e=fp(e,"",t)),e&&`@media (min-width:${e})`)],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&pp(e).replace(/[}]+$/,"").split("{")]];let Op={__proto__:null,slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"}};const Ip=globalThis;if(!Ip.__twindInitialized){Vh({presets:[function({disablePreflight:e}={}){return function({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:Qh,theme:{...Kh,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:Ap,rules:mp,finalize:e=>e.n&&e.d&&e.r.some(e=>/^&::(before|after)$/.test(e))&&!/(^|;)content:/.test(e.d)?{...e,d:"content:var(--tw-content);"+e.d}:e}}({colors:Op,disablePreflight:e})}({disablePreflight:!0})],theme:{extend:{colors:{primary:"#1f7aed",primaryDark:"#1557a5",accent:"#1dd1a1"}}}}),Ip.__twindInitialized=!0}const kp={unsupported:{level:"error",title:"Navegador sem acesso ao microfone",detail:"Este navegador não permite usar o microfone pela página.",action:"Use Chrome, Edge ou Firefox atualizados."},"insecure-context":{level:"error",title:"Página sem HTTPS",detail:"O navegador só libera o microfone em páginas HTTPS (ou localhost).",action:"Abra o discador pelo endereço com https://."},"no-microphone":{level:"error",title:"Sem microfone",detail:"Nenhum microfone foi encontrado neste computador, por isso o discador não consegue conectar nem ligar.",action:"Conecte um fone ou headset e confira se o microfone está habilitado nas configurações de som do Windows; o discador reconhece sozinho quando aparecer."},"mic-permission-denied":{level:"error",title:"Microfone bloqueado pelo navegador",detail:"O navegador não permitiu que o discador use o microfone.",action:"Clique no cadeado ao lado do endereço, permita o microfone e recarregue a página."},"mic-unavailable":{level:"error",title:"Microfone em uso ou com falha",detail:"Outro programa pode estar usando o microfone, ou o dispositivo falhou ao iniciar.",action:"Feche outros aplicativos de áudio (Teams, Meet, gravadores) e tente de novo."},"no-speaker":{level:"warning",title:"Sem saída de som",detail:"Nenhum alto-falante ou fone foi encontrado: você não vai ouvir o cliente.",action:"Conecte um fone e confira o dispositivo de saída nas configurações de som."},"enumerate-failed":{level:"warning",title:"Não foi possível verificar os dispositivos de áudio",detail:"O navegador não listou os dispositivos de áudio.",action:"Confira as permissões da página e recarregue."}};function jp(e,t){const n=kp[e];return{...n,detail:t?`${n.detail} (${t})`:n.detail,kind:e,source:"device",code:`device:${e}`}}const Rp=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]),Pp=new Set(["NotAllowedError","PermissionDeniedError","PermissionDismissedError","SecurityError"]),Dp=new Set(["NotReadableError","TrackStartError","AbortError","SourceUnavailableError"]);async function Lp(e={}){const t=void 0===e.mediaDevices?"undefined"!=typeof navigator?navigator.mediaDevices:null:e.mediaDevices,n=e.isSecureContext??("undefined"==typeof window||!1!==window.isSecureContext);if(!t||"function"!=typeof t.getUserMedia)return jp(n?"unsupported":"insecure-context");try{const e=await t.getUserMedia({audio:!0});for(const t of e.getTracks())t.stop()}catch(i){const e=function(e){const t=(null==e?void 0:e.name)??"";return Rp.has(t)?"no-microphone":Pp.has(t)?"mic-permission-denied":(Dp.has(t),"mic-unavailable")}(i),t=null==i?void 0:i.name;return jp(e,"mic-unavailable"===e&&t?t:void 0)}if("function"!=typeof t.enumerateDevices)return null;let r;try{r=await t.enumerateDevices()}catch{return jp("enumerate-failed")}if(!r.some(e=>"audioinput"===e.kind))return jp("no-microphone");return(e.canListOutputs??("undefined"!=typeof HTMLMediaElement&&"setSinkId"in HTMLMediaElement.prototype))&&!r.some(e=>"audiooutput"===e.kind)?jp("no-speaker"):null}const Mp={missingAudioPermissions:{level:"error",title:"Discador sem acesso ao microfone",detail:"O Callix não conseguiu usar o microfone para iniciar o atendimento.",action:"Conecte ou habilite um microfone, permita o uso no navegador e recarregue a página."},maxUsersReached:{level:"error",title:"Limite de usuários do Callix atingido",detail:"O serviço já está com o número máximo de agentes conectados.",action:"Aguarde um colega sair ou fale com o supervisor."},userIsAlreadyConnectedOnAnotherDevice:{level:"error",title:"Usuário já conectado em outro lugar",detail:"Este login está ativo em outro computador, aba ou no Callix web.",action:"Saia de lá (ou feche a outra aba) e entre de novo aqui."},unknownError:{level:"error",title:"O discador não conseguiu iniciar",detail:"O Callix não respondeu como esperado ao iniciar o atendimento.",action:"Recarregue a página; se continuar, confira a internet e avise o suporte."}};function Up(e){const t=e&&e in Mp?e:"unknownError";return{...Mp[t],source:"startup",code:`startup:${t}`}}const Fp={exclusiveLogin:{level:"error",title:"Você entrou em outro lugar",detail:"Este login foi aberto em outro computador, aba ou no Callix web, e a sessão daqui foi encerrada.",action:"Feche o outro acesso e entre de novo aqui."},supervisor:{level:"error",title:"Sessão encerrada pelo supervisor",detail:"Um supervisor desconectou você do atendimento.",action:"Fale com o supervisor antes de entrar de novo."},userBlocked:{level:"error",title:"Usuário bloqueado",detail:"Seu usuário foi bloqueado no Callix.",action:"Fale com o supervisor ou o administrador."},breakTimeLimit:{level:"warning",title:"Tempo de pausa excedido",detail:"A pausa passou do limite e o Callix encerrou a sessão.",action:"Entre de novo para voltar ao atendimento."},manualCallTimeLimit:{level:"warning",title:"Tempo de chamada manual excedido",detail:"A chamada manual passou do limite configurado e a sessão foi encerrada.",action:"Entre de novo para continuar."},idle:{level:"warning",title:"Sessão encerrada por inatividade",detail:"Ficou muito tempo sem atividade e o Callix desconectou.",action:"Entre de novo para continuar."},user:{level:"warning",title:"Você saiu do atendimento",detail:"A sessão foi encerrada a seu pedido.",action:"Entre de novo quando quiser voltar."}};function Bp(e){const t=e&&e in Fp?e:null;return t?{...Fp[t],source:"session",code:`session:${t}`}:{level:"error",source:"session",code:"session:unknown",title:"Sessão encerrada",detail:`A sessão no Callix foi encerrada${e?` (${e})`:""}.`,action:"Entre de novo para continuar."}}const qp={1:{title:"Número inválido",detail:"O Callix recusou o número discado.",action:"Confira o DDD e o número."},2:{title:"Usuário não encontrado",detail:"O Callix não reconheceu o usuário para esta chamada.",action:"Saia e entre de novo no discador."},3:{title:"Equipe bloqueada para ligar",detail:"Sua equipe está sem permissão de chamada manual neste momento.",action:"Fale com o supervisor."},4:{title:"Número na black list",detail:"Este número está na lista de bloqueio e não pode ser discado."},5:{title:"Sem rota para este número",detail:"A telefonia não tem rota de saída para este destino.",action:"Confira o número ou fale com o suporte."},6:{title:"Chamada recusada pelo Callix",detail:"O Callix não autorizou esta chamada."},7:{title:"Erro interno do Callix",detail:"O Callix falhou ao iniciar a chamada.",action:"Tente de novo em instantes."},8:{title:"Ligação internacional não autorizada",detail:"Chamadas internacionais estão desligadas para o seu usuário.",action:"Fale com o supervisor."},9:{title:"Saldo de telefonia insuficiente",detail:"A conta de telefonia do Callix está sem saldo.",action:"Avise o administrador."},10:{title:"Caixa postal ou silêncio",detail:"A chamada caiu em caixa postal ou ninguém falou do outro lado."}},zp={Busy:{title:"Número ocupado",detail:"O destino está em outra ligação.",action:"Tente de novo em alguns minutos."},Unavailable:{title:"Número indisponível",detail:"O destino não atendeu ou está fora de área."},"Not Found":{title:"Número não existe",detail:"A operadora respondeu que este número não existe.",action:"Confira o DDD e o número."},"Address Incomplete":{title:"Número incompleto",detail:"Faltam dígitos no número discado.",action:"Confira o DDD e o número."},"Blocked By Carrier":{title:"Bloqueado pela operadora",detail:"A operadora bloqueou a chamada para este destino."},Rejected:{title:"Chamada recusada",detail:"O destino ou a operadora recusou a chamada."},"SIP Failure Code":{title:"Falha na telefonia",detail:"A operadora devolveu um erro ao completar a chamada.",action:"Tente de novo; se repetir, avise o suporte."},"Bad Media Description":{title:"Falha de áudio na chamada",detail:"A negociação de áudio com a operadora falhou.",action:"Recarregue a página e tente de novo."},"Silence or Machine Detected":{title:"Caixa postal ou silêncio",detail:"A chamada caiu em caixa postal ou ninguém falou do outro lado."}};function Hp(e){const t=null!=(null==e?void 0:e.rejectReason)?qp[e.rejectReason]:void 0,n=(null==e?void 0:e.cause)?zp[e.cause]:void 0,r=t??n;if(r)return{level:"warning",source:"call",code:`call:${null!=(null==e?void 0:e.rejectReason)?`reject-${e.rejectReason}`:null==e?void 0:e.cause}`,...r};const i=(null==e?void 0:e.message)||(null==e?void 0:e.cause);return{level:"warning",source:"call",code:"call:unknown",title:"Chamada não concluída",detail:i?`O Callix informou: ${i}.`:"O Callix não informou o motivo.",action:"Tente de novo; se repetir, avise o suporte."}}const Wp="https://callix-zeta.vercel.app";const Gp=function(){if("undefined"==typeof window)return Wp;const e=window.__CALLIX_API_BASE_URL__;return"string"==typeof e&&e.trim()?e.trim().replace(/\/+$/,""):Wp}();function Vp(){const e={"Content-Type":"application/json"},t=function(){if("undefined"==typeof window)return null;try{const e=localStorage.getItem("callix_dialer_last_username");if(e){const t=localStorage.getItem(`callix_dialer_${e}_session_token`);if(t)return t}for(let t=0;t<localStorage.length;t++){const e=localStorage.key(t);if(e&&/^callix_dialer_.*_session_token$/.test(e)){const t=localStorage.getItem(e);if(t)return t}}}catch{}return null}();return t&&(e["x-session-token"]=t,e.Authorization=`Bearer ${t}`),e}const Kp=new Map;function Yp(e){return`${e.source}:${e.id}`}function Xp(e,t){var n,r;const i=null==e?void 0:e.campaignContact;if(!(null==i?void 0:i.id))return null;const o=i.customer;return(null==o?void 0:o.id)&&(null==o?void 0:o.formId)?{source:"customer",id:o.id,formId:o.formId,campaignId:(null==(n=null==e?void 0:e.campaign)?void 0:n.id)??null,phoneId:t??null}:{source:"campaign",id:i.id,campaignId:(null==(r=null==e?void 0:e.campaign)?void 0:r.id)??null,phoneId:t??null}}async function Jp(e,t){const n=new AbortController,r=setTimeout(()=>n.abort(),15e3);try{const r=await fetch(e,{method:"GET",headers:t,credentials:"omit",signal:n.signal});if(!r.ok){const e=await r.json().catch(()=>({})),t=new Error(function(e,t){if(401===e)return"Sessão expirada. Entre novamente no discador.";const n=t.message||t.error;return n||(404===e?"Rota do formulário não encontrada no servidor do discador. Atualize o back-end (deploy) para esta versão do widget.":`Erro ${e}`)}(r.status,e));throw t.status=r.status,t}const i=await r.json();if(!function(e){if(!e||"object"!=typeof e)return!1;const t=e;return"number"==typeof t.id&&!!t.values&&"object"==typeof t.values&&Array.isArray(t.fields)}(i))throw new Error("Resposta inesperada do servidor");return i}catch(i){if(i instanceof Error&&"AbortError"===i.name)throw new Error("Tempo esgotado ao buscar o formulário");if(i instanceof TypeError){const e=new Error("Não foi possível conectar ao servidor do discador. Verifique a conexão ou se o back-end está atualizado.");throw e.cause=i,e}throw i}finally{clearTimeout(r)}}function Zp(e){const t=null==e?void 0:e.status;return void 0===t||(t>=500||408===t||429===t)}function Qp(e,t={}){const n=Yp(e),r=Date.now(),i=Kp.get(n);if(i&&i.until>r&&!t.force)return i.promise;const o=function(e,t){const n=new URLSearchParams;"customer"===t.source&&n.set("source","customer"),t.campaignId&&n.set("campaignId",String(t.campaignId)),t.formId&&n.set("formId",String(t.formId)),t.phoneId&&n.set("phoneId",String(t.phoneId)),t.signature&&t.expiresAt&&(n.set("sig",t.signature),n.set("exp",String(t.expiresAt)));const r=n.toString();return`${e}/api/campaign-form/${encodeURIComponent(String(t.id))}${r?`?${r}`:""}`}(t.apiBaseUrl??Gp,e),a=t.headers??Vp(),d=Math.max(0,t.retries??2),s=(async()=>{let e;for(let n=0;n<=d;n++)try{return await Jp(o,a)}catch(t){if(e=t,n===d||!Zp(t))break;await new Promise(e=>setTimeout(e,800*2**n))}throw e instanceof Error?e:new Error("Erro ao buscar o formulário")})();return Kp.set(n,{promise:s,until:r+3e5}),s.then(e=>{var t;e.partial&&(null==(t=Kp.get(n))?void 0:t.promise)===s&&Kp.delete(n)}).catch(()=>{var e;(null==(e=Kp.get(n))?void 0:e.promise)===s&&Kp.delete(n)}),s}function em(e){return String(e??"").normalize("NFC").trim().toLowerCase().replace(/\s+/g," ")}function tm(e,t){if(!(null==e?void 0:e.values))return;const n=new Map;for(const[r,i]of Object.entries(e.values)){const e=nm(em(r));n.has(e)||null==i||""===String(i).trim()||n.set(e,String(i))}for(const r of t){const e=n.get(nm(em(r)));if(void 0!==e)return e}}function nm(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"")}function rm(){var e;const t=Qu(),n=Zu(),r=(null==(e=null==n?void 0:n.data)?void 0:e.campaignContactPhoneId)??null;return"campaign"===(null==t?void 0:t.type)?$.jsx(im,{campaignCallInfo:t.info,campaignContactPhoneId:r}):t?$.jsx("div",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2",children:$.jsx("p",{className:"text-xs font-semibold text-amber-700",children:"Chamada manual (sem informações de campanha)"})}):null}function im(e){const{campaign:n,campaignContact:r}=e.campaignCallInfo,[i,o]=t.useState({form:null,isLoading:!1,error:null}),[a,d]=t.useState({key:null,n:0}),s=t.useMemo(()=>Xp(e.campaignCallInfo,e.campaignContactPhoneId),[e.campaignCallInfo,e.campaignContactPhoneId]),l=s?Yp(s):null,u=t.useRef(s);u.current=s;const c=t.useRef(null);t.useEffect(()=>{const e=u.current;if(!e||!l)return void o({form:null,isLoading:!1,error:null});let t=!1,n=null;return o({form:null,isLoading:!0,error:null}),Qp(e,{force:a.key===l&&a.n>0}).then(e=>{t||(o({form:e,isLoading:!1,error:null}),e.partial&&c.current!==l&&(c.current=l,n=setTimeout(()=>d(e=>({key:l,n:e.n+1})),3e3)))}).catch(e=>{t||(console.error("[CampaignCallInfoDisplay] Erro ao buscar dados:",e),o({form:null,isLoading:!1,error:e instanceof Error?e.message:"Erro ao buscar dados do contato"}))}),()=>{t=!0,n&&clearTimeout(n)}},[l,a]);const f=t.useMemo(()=>[{label:"Decisor",keys:["DECISOR","CONTATO","NOME"],icon:$.jsx(Fc,{className:"text-sm"})},{label:"Empresa",keys:["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","CLIENTE"],icon:$.jsx(wc,{className:"text-sm"})},{label:"Dívida ativa",keys:["DIVIDA ATIVA","DÍVIDA ATIVA","VALOR TOTAL DEVIDO"],icon:$.jsx(Ec,{className:"text-sm"})},{label:"Telefone",keys:["TELEFONE","CELULAR","WHATSAPP"],icon:$.jsx(Uc,{className:"text-sm"})}],[]),h=t.useMemo(()=>f.map(e=>{const t=("Telefone"===e.label?tm(i.form,e.keys)??(null==r?void 0:r.phoneNumber):tm(i.form,e.keys))||"",n="Telefone"===e.label?function(e){if(!e)return"-";const t=e.replace(/\D/g,"");if(t.length>=10){const e=t.slice(0,2),n=t.slice(2,t.length-4),r=t.slice(-4);return`(${e}) ${n.length>5?`${n.slice(0,n.length-4)} ${n.slice(n.length-4)}`:n}-${r}`.replace(/\s+/g," ").trim()}return e.trim()}(t):(t||"-").toString().trim()||"-";return{...e,value:n,isEmpty:!t}}),[null==r?void 0:r.phoneNumber,i.form,f]),p=h.some(e=>!e.isEmpty);return $.jsxs("div",{className:"mb-4 rounded-2xl border border-slate-200 bg-white/90 p-3 shadow-sm",children:[$.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[$.jsxs("div",{className:"flex items-center gap-3",children:[$.jsx("span",{className:"inline-flex h-9 w-9 items-center justify-center rounded-2xl bg-emerald-500 text-white shadow-inner",children:$.jsx(jc,{className:"text-base"})}),$.jsxs("div",{className:"min-w-0",children:[$.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-slate-500",children:"Campanha"}),$.jsx("p",{className:"truncate text-sm font-bold text-slate-900",children:(null==n?void 0:n.name)||"Chamada de campanha"})]})]}),$.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-1 text-[10px] font-bold uppercase text-emerald-700",children:[$.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500"}),"Em chamada"]})]}),i.isLoading&&$.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-4 text-center",role:"status",children:[$.jsx("div",{className:"mx-auto mb-2 inline-block h-7 w-7 animate-spin rounded-full border-2 border-emerald-500 border-t-transparent"}),$.jsx("p",{className:"text-xs font-medium text-slate-600",children:"Carregando dados do contato..."})]}),i.error&&$.jsxs("div",{className:"rounded-xl border border-rose-200 bg-rose-50 p-3",children:[$.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[$.jsx(bc,{className:"text-sm text-rose-600"}),$.jsx("p",{className:"text-xs font-semibold text-rose-700",children:"Erro ao carregar dados"})]}),$.jsx("p",{className:"ml-6 text-[11px] text-rose-600",children:i.error}),$.jsx("button",{type:"button",onClick:()=>d(e=>({key:l,n:e.n+1})),className:"mt-2 ml-6 text-[11px] font-semibold text-rose-700 underline hover:text-rose-800",children:"Tentar novamente"})]}),!i.isLoading&&!i.error&&$.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:h.map(e=>$.jsxs("div",{className:"flex flex-col gap-1 rounded-xl border border-slate-200 bg-slate-50 p-2.5 shadow-[inset_0_1px_0_rgba(255,255,255,0.6)]",children:[$.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wider text-slate-500",children:[e.icon,$.jsx("span",{className:"truncate",children:e.label})]}),$.jsx("p",{className:"break-words text-sm font-bold leading-tight text-slate-900",children:e.value||"-"})]},e.label))}),!i.isLoading&&!i.error&&!p&&$.jsx("div",{className:"rounded-xl border border-slate-200 bg-slate-50 p-3 text-xs font-medium text-slate-600",children:"Nenhuma informação de campanha disponível para este contato."})]})}function om(e){const[n,r]=t.useState(null==e?void 0:e.get());return t.useEffect(()=>{if(!e)return void r(void 0);r(e.get());return e.subscribe(e=>{r(e)})},[e]),n}function am(){const{enterOnBreak:e,becomeAvailable:t}=Ju();return{goOnBreak:e,goOffBreak:t}}const dm={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6],0,0,0,0,0,0,0,[["6[2-467]\\d{3}",[5]],["4\\d{4}",[5]],0,0,0,0,["(?:0[1-9]|[1589]\\d)\\d{4}",[6]]]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[["[78]\\d{5}",[6]],["690\\d{6}|[356]\\d{5}",[6,9]],["180[02]\\d{4}",[8]],["[19]\\d{5}",[6]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0",0,0,0,0,0,[["[2-4679][2-8]\\d{6}",[8]],["5[024-68]\\d{7}",[9]],["400\\d{6}|800\\d{2,9}"],["900[02]\\d{5}",[9]],0,0,["600[25]\\d{5}",[9]],0,0,["700[05]\\d{5}",[9]]]],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0",0,0,0,0,0,[["(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}"],["7\\d{8}"]]],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268",[["268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}"],["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,["26840[69]\\d{4}"],["26848[01]\\d{4}"]]],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264",[["264(?:292|4(?:6[12]|9[78]))\\d{4}"],["264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,["264724\\d{4}"]]],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0",0,0,0,0,0,[["4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}",[8]],["6(?:[78][2-9]|9\\d)\\d{6}",[9]],["800\\d{4}",[7]],["900[1-9]\\d\\d",[6]],["700[2-9]\\d{4}",[8]],0,0,0,0,["808[1-9]\\d\\d",[6]]]],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}"],["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"],["800\\d{5}"],["90[016]\\d{5}"],0,0,0,0,["60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}"],["80[1-4]\\d{5}"]]],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]],0,0,0,0,0,0,[["2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}"],["9[1-79]\\d{7}"]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1",0,0,[["3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68])))\\d{6}|(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",[10]],["93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|9(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68]))))\\d{6}|9(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}"],["800\\d{7,8}"],["60[04579]\\d{7}",[10]],0,0,["810\\d{7}",[10]]]],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684",[["6846(?:22|33|44|55|77|88|9[19])\\d{4}"],["684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0",0,0,0,0,0,[["1(?:11\\d|[2-9]\\d{3,11})|(?:316|463)\\d{3,10}|648[34]\\d{3,9}|(?:51|66|73)2\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-7]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}"],["6(?:485|(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d)\\d{3,9}",[7,8,9,10,11,12,13]],["800\\d{6,10}",[9,10,11,12,13]],["(?:8[69][2-68]|9(?:0[01]|3[019]))\\d{6,10}",[9,10,11,12,13]],0,0,0,0,["5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}",[5,6,7,8,9,10,11,12,13]],["8(?:10|2[018])\\d{6,10}|828\\d{5}",[8,9,10,11,12,13]]]],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]],0,0,0,0,0,0,[["5(?:2\\d|8[1-9])\\d{4}"],["(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"],["800\\d{4}"],["900\\d{4}"],0,0,0,0,["(?:28\\d|501)\\d{4}"]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",[["18[1-8]\\d{3,6}",[6,7,8,9]],["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",[6,7,8,9,10]],["800\\d{4,6}",[7,8,9]],["[67]00\\d{5,6}",[8,9]],0,0,["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]],"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:2[12]428|3655[02])\\d{4}|(?:2(?:22[0-79]|63[0-28])|3654)\\d{5}|(?:(?:1[28]|46)\\d|2(?:[014-6]2|[23]3))\\d{6}"],["36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}"],["88\\d{7}"],["900200\\d{3}"]]],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0",0,0,0,0,0,[["(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}",[8]],["6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"],["8[08]\\d{6}",[8]],["9[0246]\\d{6}",[8]],0,0,["703[235]0\\d{3}|70(?:2[0-5]|3[0146]|[56]0)\\d{4}",[8]],0,0,["8[12]\\d{6}",[8]]]],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246",[["246521[0369]\\d{3}|246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}"],["246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["(?:246976|900[2-9]\\d\\d)\\d{4}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,["246(?:292|367|4(?:1[7-9]|3[01]|4[47-9]|67)|7(?:1[2-9]|2\\d|3[016]|53))\\d{4}"],0,["24631\\d{5}"]]],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0",0,0,0,0,0,[["(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2(?:[23]\\d|[45])\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}"],["(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}",[10]],["80[03]\\d{7}",[10]],0,0,0,0,0,["96(?:0[469]|1[0-47]|3[389]|43|6[69]|7[78])\\d{6}",[10]]]],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0",0,0,0,0,0,[["80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}",[8]],["4[5-9]\\d{7}",[9]],["800[1-9]\\d{4}",[8]],["(?:70(?:2[0-57]|3[04-7]|44|6[04-69]|7[0579])|90\\d\\d)\\d{4}",[8]],0,0,["78(?:0[578]|1[014-8]|2[25]|3[15-8]|48|5[05]|60|7[06-8]|9\\d)\\d{4}",[8]],0,0,["7879\\d{4}",[8]]]],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]],0,0,0,0,0,0,[["2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}"],["(?:0[1-7]|44|5[0-8]|[67]\\d)\\d{6}"]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0",0,0,0,0,0,[["2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}",[6,7,8]],["(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}",[8,9]],["(?:00800\\d\\d|800)\\d{5}",[8,12]],["90\\d{6}",[8]],0,0,0,0,0,["700\\d{5}",[8]]]],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]],0,0,0,0,0,0,[["(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}"],["(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}"],["8[02369]\\d{6}"],["(?:87|9[0-8])\\d{6}"],0,0,0,0,0,["84\\d{6}"]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]],0,0,0,0,0,0,[["(?:22|31)\\d{6}"],["(?:29|6[124-9]|7[125-9])\\d{6}"]]],BJ:["229","00","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]],0,0,0,0,0,0,[["2090\\d{4}|(?:012\\d\\d|2(?:02|1[037]|2[45]|3[68]|4\\d))\\d{5}"],["(?:01(?:2[5-9]|[4-69]\\d)|4[0-8]|[56]\\d|9[013-9])\\d{6}"],0,0,0,0,["81\\d{6}",[8]],0,["857[58]\\d{4}",[8]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441",[["441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}"],["441(?:[2378]\\d|5[0-39]|9[02])\\d{5}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]],0,0,0,0,0,0,[["22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}"],["(?:22[89]|[78]\\d\\d)\\d{4}"],0,0,0,0,0,0,["5[34]\\d{5}"]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?",0,0,0,[["(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}",[8]],["[67]\\d{7}",[8]],["8001[07]\\d{4}",[9]],0,0,0,0,0,["50\\d{6}",[8]]]],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]",[["(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}"],["(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]]],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",0,0,[["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",[10]],["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}",[10,11]],["800\\d{6,7}",[9,10]],["[59]00\\d{6,7}",[9,10]],0,0,0,0,0,["(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|370|864))\\d{4}|300\\d{5}",[8,10]]]],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242",[["242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-5]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}"],["242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}"],["242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,["242225\\d{4}"]]],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]],0,0,0,0,0,0,[["(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",[7]],["(?:1[67]|[78]7)\\d{6}",[8]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}",[7]],["(?:321|7[1-8]\\d)\\d{5}",[8]],["(?:0800|800\\d)\\d{6}",[10]],["90\\d{5}",[7]],0,0,0,0,["79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}",[8]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,[["(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",[9]],["(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}",[9]],["800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}"],["(?:810|902)\\d{7}",[10]],0,0,0,0,["249\\d{6}",[9]]],"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]],0,0,0,0,0,0,[["(?:2(?:[02]\\d|36|[68]0)|[3-58](?:[02]\\d|[68]0)|7(?:[02]\\d|32|[68]0))\\d{4}",[7]],["6[0-35-7]\\d{5}",[7]],["0800\\d{7}",[11]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}"],["88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}",[7,9]]]],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]],0,0,0,0,0,0,[["2[12]\\d{6}"],["7[024-7]\\d{6}"],0,["8776\\d{4}"]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]],0,0,0,0,0,0,[["222[1-589]\\d{5}"],["026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}"],0,["80[0-2]\\d{6}"]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",[9]],["(?:6[89]|7[235-9])\\d{7}",[9]],["800\\d{6}",[9]],["90[016]\\d{6}",[9]],["878\\d{6}",[9]],["860\\d{9}",[12]],["5[18]\\d{7}",[9]],["74[0248]\\d{6}",[9]],0,["84[0248]\\d{6}",[9]]]],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]],0,0,0,0,0,0,[["2(?:[15]\\d{3}|7(?:2(?:0[23]|1[2357]|2[245]|3[45]|4[3-5])|3(?:06|1[69]|[2-6]7)))\\d{5}"],["0[157]\\d{8}"]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]],0,0,0,0,0,0,[["(?:2\\d|3[13-7]|4[1-5])\\d{3}"],["[578]\\d{4}"]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]],0,0,0,0,0,0,[["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|2\\d{3}|3(?:(?:2\\d|50)\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389]|9[0-8])|600)|646[59])|(?:(?:3[2-5]|[47][1-35]|5[1-3578])\\d|6(?:00|[13-57]\\d)|8(?:0[1-9]|[1-9]\\d))\\d\\d|9(?:(?:10[01]|(?:[2458]\\d|7[1-9])\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}",[9]],["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|2\\d{3}|3(?:(?:2\\d|50)\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389]|9[0-8])|600)|646[59])|(?:(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57])\\d|8(?:0[1-8]|[1-9]\\d))\\d\\d|9(?:(?:10[01]|(?:[2458]\\d|7[1-9])\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}",[9]],["(?:123|8)00\\d{6}",[9,11]],0,0,0,0,0,["44\\d{7}",[9]],["600\\d{7,8}",[10,11]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]],0,0,0,0,0,0,[["2(?:22|33)\\d{6}",[9]],["(?:24[23]|6(?:[25-9]\\d|40))\\d{6}",[9]],["88\\d{6,7}"]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,[["(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|2(?:[02-57-9]\\d{3}|1(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))|(?:41[03]|8078|9(?:78|94))\\d\\d)\\d{5}|(?:10|2[0-57-9])(?:1(?:00|23)\\d\\d|95\\d{3,4})|(?:41[03]|9(?:78|94))(?:100\\d\\d|95\\d{3,4})|8078123|(?:43[35]|754|851)\\d{7,8}|(?:43[35]|754|851)(?:1(?:00\\d|23)\\d|95\\d{3,4})|(?:3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[13-9]\\d{6}|2(?:[0-24-9]\\d{5}|3\\d(?:\\d{4})?))|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[24-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[13-9]\\d{5}|2(?:[0-24-9]\\d{4}|3\\d(?:\\d{3})?))|9(?:[0-46-9]\\d{5}|5\\d{3,5}))",[7,8,9,10,11]],["1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}",[11]],["(?:(?:10|21)8|8)00\\d{7}",[10,12]],["16[08]\\d{5}",[8]],0,0,0,0,0,["10(?:10\\d{4}|96\\d{3,4})|400\\d{7}|950\\d{7,8}|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",[7,8,9,10,11]]],"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?",0,0,0,[["601055(?:[0-4]\\d|50)\\d\\d|6010(?:[0-4]\\d|5[0-4])\\d{4}|(?:46|60(?:[18][1-9]|[24-7][2-9]))\\d{6}",[8,10]],["333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:(?:0[0-5]|1\\d|5[01]|70)\\d|2(?:[0-3]\\d|4[1-9])|3(?:00|3[0-24-9]))|9(?:101|408))\\d{6}",[10]],["1800\\d{7}",[11]],["(?:19(?:0[01]|4[78])|901)\\d{7}",[10,11]]]],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))",0,0,0,[["210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}",[8]],["(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}",[8]],["800\\d{7}",[10]],["90[059]\\d{7}",[10]],0,0,0,0,["(?:210[0-6]|4\\d{3}|5100)\\d{4}",[8]]]],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:3[23]|4[89])\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}"],["(?:5\\d|6[2-4])\\d{6}",[8]],["800\\d{7}",[10]],0,0,0,0,0,0,["807\\d{7}",[10]]]],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]],0,0,0,0,0,0,[["2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}"],["(?:36|5[1-389]|9\\d)\\d{5}"],["800\\d{4}"],0,0,0,0,0,["(?:3[3-5]|4[356])\\d{5}"]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]",[["9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}"],["953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}"],0,0,0,0,0,["955\\d{5}",[8]],0,["60[0-2]\\d{4}",[7]]]],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]],0,0,0,0,0,0,[["2[2-6]\\d{6}"],["9(?:10|[4-79]\\d)\\d{5}"],["800\\d{5}"],["90[09]\\d{5}"],["700\\d{5}"],0,["(?:50|77)\\d{6}"],0,0,["80[1-9]\\d{5}"]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,[["(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}",[9]],["7(?:060\\d|19(?:[0-4]\\d|50))\\d{4}|(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}",[9]],["800\\d{6}",[9]],["9(?:0[05689]|76)\\d{6}",[9]],["70[01]\\d{6}",[9]],["9(?:3\\d{9}|6\\d{7,10})"],["9(?:5\\d|7[2-4])\\d{6}",[9]],0,["9[17]0\\d{6}",[9]],["8[134]\\d{7}",[9]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0",0,0,0,0,0,[["32\\d{9,11}|49[1-6]\\d{10}|322\\d{6}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}",[5,6,7,8,9,10,11,12,13,14,15]],["1(?:(?:5(?:[0-25-9]\\d\\d|3(?:10|33))|7[26-9]\\d\\d)\\d{6}|6[023]\\d{7,8})|17\\d{8}",[10,11]],["800\\d{7,12}",[10,11,12,13,14,15]],["(?:137[7-9]|900(?:[135]|9\\d))\\d{6}",[10,11]],["700\\d{8}",[11]],["1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",[12,13]],["18(?:1\\d{5,11}|[2-9]\\d{8})",[8,9,10,11,12,13,14]],["16(?:4\\d{1,10}|[89]\\d{1,11})",[4,5,6,7,8,9,10,11,12,13,14]],0,["180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}",[7,8,9,10,11,12,13,14]]]],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]],0,0,0,0,0,0,[["2(?:1[2-5]|7[45])\\d{5}"],["77\\d{6}"]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:[0-59][1-9]|[6-8]\\d)|3(?:[0-3][1-9]|4[13]|5[1-58]|6[1347-9]|7\\d|8[1-8]|9[1-79])|4(?:[0-25][1-9]|[34][2-9]|6[13-579]|7[13579]|8[1-47]|9[127])|5(?:[0-36][1-9]|4[146-9]|5[3-57-9]|7[568]|8[1-358]|9[1-69])|6(?:[0135][1-9]|2[1-68]|4[2-8]|6[1689]|[78]\\d|9[15689])|7(?:[0-69][1-9]|7[3-9]|8[147])|8(?:[16-9][1-9]|2[1-58])|9(?:[1-47-9][1-9]|6\\d))\\d{5}"],["(?:2[6-8]|37|6[78]|96)\\d{6}|(?:2[0-59]|3[0-689]|[457]\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\d{5}"],["80\\d{6}"],["90\\d{6}"]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767",[["767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}"],["767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9",[["8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}"],["8[024]9[2-9]\\d{6}"],["800(?:14|[2-9]\\d)\\d{5}|8[024]9[01]\\d{6}|8(?:33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0",0,0,0,0,0,[["9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[013-689])\\d{6}"],["(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}",[9]],["800\\d{6}",[9]],["80[3-689]1\\d{5}",[9]],0,0,0,0,["98[23]\\d{6}",[9]],["80[12]1\\d{5}",[9]]]],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["[2-7][2-7]\\d{6}",[8]],["964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}",[9]],["1800\\d{7}|1[78]00\\d{6}",[10,11]],0,0,0,0,0,["[2-7]890\\d{4}",[8]]]],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",[7]],["(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|(?:2[0-59]|[3-79]\\d)\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[13-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}",[7,8]],["800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}"],["(?:40\\d\\d|900)\\d{4}",[7,8]],["70[0-2]\\d{5}",[8]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0",0,0,0,0,0,[["13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2\\d|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}",[8,9]],["1[0-25]\\d{8}",[10]],["800\\d{7}",[10]],["900\\d{7}",[10]]]],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]",[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}"],["(?:17[1-3]|7\\d\\d)\\d{4}"]]],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]],0,0,0,0,0,0,[["96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}"],["(?:590[16]00\\d|9(?:6906(?:09|10)|7390\\d\\d))\\d\\d|(?:6\\d|7[1-48])\\d{7}"],["[89]00\\d{6}"],["80[367]\\d{6}"],["70\\d{7}"],0,["51\\d{7}"],0,0,["90[12]\\d{6}"]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0",0,0,0,0,0,[["11667[01]\\d{3}|(?:11(?:1(?:1[1-468]|2[2-7]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8]|7\\d)|5(?:1[578]|44|5[0-4])|6(?:1[578]|2[69]|39|4[5-7]|5[0-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}"],["700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\d\\d)\\d{6}"]]],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",[["1[3-7][1-8]\\d{3,6}|(?:19[1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}",[5,6,7,8,9]],["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",[6,7,8,9,10]],["800\\d{4,6}",[7,8,9]],["[67]00\\d{5,6}",[8,9]],0,0,["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]],"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,[["603\\d{4}|(?:3[0-5]|6[25-7]|8[58])\\d{5}",[7]],["(?:[279]\\d|45|5[01568]|8[034679])\\d{5}",[7]],["0800\\d{7}",[11]]],"00"],FK:["500","00","[2-7]\\d{4}",[5],0,0,0,0,0,0,0,[["[2-47]\\d{4}"],["[56]\\d{4}"]]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]],0,0,0,0,0,0,[["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}"],["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}"]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))",0,0,0,[["(?:20|[34]\\d|8[19])\\d{4}"],["(?:[27][1-9]|5\\d|9[16])\\d{4}"],["80[257-9]\\d{3}"],["90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d"],0,0,0,0,["(?:6[0-36]|88)\\d{4}"]]],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0",0,0,0,0,0,[["(?:26[013-9]|59[1-35-9])\\d{6}|(?:[13]\\d|2[0-57-9]|4[1-9]|5[0-8])\\d{7}"],["(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"],["80[0-5]\\d{6}"],["836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}"],0,0,["80[6-9]\\d{6}"],0,["9\\d{8}"],["8(?:1[01]|2[0156]|4[024]|84)\\d{6}"]]],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1",0,0,[["[01]1\\d{6}",[8]],["(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}"]]],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473",[["473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-4]|5[59]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}"],["473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[6-8])|5(?:2[01]|3[3-8])|901)\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0",0,0,0,0,0,[["(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}"],["5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|(?:[14]\\d|77)\\d|22[02])|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-4])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200|333|444)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"],["800\\d{6}"],0,0,0,0,0,["70[67]\\d{6}"]]],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0",0,0,0,0,0,[["594(?:[02-49]\\d|1[0-5]|5[6-9]|6[0-3]|80)\\d{4}"],["(?:694(?:[0-249]\\d|3[0-8])|7093[0-3])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:396|76\\d)\\d|476[0-6])\\d{4}"]]],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0",0,0,0,0,0,[["3082[0-5]\\d{4}|3(?:0(?:[237]\\d|8[01])|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}",[9]],["(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}",[9]],["800\\d{5}",[8]]]],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]],0,0,0,0,0,0,[["2190[0-2]\\d{3}|2(?:0(?:[02]\\d|3[01])|16[24-9]|2[2-5]\\d)\\d{4}"],["5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}"]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]],0,0,0,0,0,0,[["(?:19|3[1-7]|[68][1-9]|70|9\\d)\\d{4}"],["[245]\\d{5}"],["80\\d{4}"],0,0,0,0,0,["3[89]\\d{4}"]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8[0-589]\\d\\d)\\d{3}"],["556\\d{4}|(?:[23679]\\d|4[015]|5[0-489]|8[67])\\d{5}"]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]],0,0,0,0,0,0,[["3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}",[8]],["6[0-356]\\d{7}",[9]],0,0,0,0,0,0,["722\\d{6}",[9]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]],0,0,0,0,0,0,[["33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}"],["(?:222|55\\d)\\d{6}"],["80\\d[1-9]\\d{5}"],["90\\d[1-9]\\d{5}"]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}",[10]],["68[57-9]\\d{7}|(?:69|94)\\d{8}",[10]],["800\\d{7,9}"],["90[19]\\d{7}",[10]],["70\\d{8}",[10]],0,["5005000\\d{3}",[10]],0,0,["8(?:0[16]|12|[27]5|50)\\d{7}",[10]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[["[267][2-9]\\d{6}",[8]],["(?:[3-5]\\d\\d|80[0-4])\\d{5}",[8]],["18[01]\\d{8}",[11]],["19\\d{9}",[11]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671",[["671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]],0,0,0,0,0,0,[["443\\d{6}",[9]],["9(?:5\\d|6[569]|77)\\d{6}",[9]],0,0,0,0,0,0,["40\\d{5}",[7]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}"],["(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[0-39]|70))\\d{4}"],["(?:289|8(?:00|6[28]|88|99))\\d{4}"],["9008\\d{3}"],0,0,0,0,["515\\d{4}"]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,[["(?:2(?:[13-9]\\d|2[013-9])\\d|3(?:(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69])\\d|8(?:4[0-8]|[579]\\d|6[0-5]))|58(?:0[1-9]|1[2-9]))\\d{4}",[8]],["(?:4(?:44[0-35-9]|6(?:4[0-57-9]|6[0-4])|7(?:3[0-4]|4[0-48]|6[0-5]))|5(?:35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-25])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",[8]],["800\\d{6}",[9]],["900(?:[0-24-9]\\d{7}|3\\d{1,4})",[5,6,7,8,11]],["8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}",[8]],0,["30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",[8]],["7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}",[8]]],"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]],0,0,0,0,0,0,[["2(?:2(?:0[0-59]|1[1-9]|[23]\\d|4[02-7]|5[57]|6[245]|7[0135689]|8[01346-9]|9[0-2])|4(?:0[578]|2[3-59]|3[13-9]|4[0-68]|5[1-3589])|5(?:0[2357-9]|1[1-356]|4[03-5]|5\\d|6[014-69]|7[04]|80)|6(?:[056]\\d|17|2[067]|3[047]|4[0-378]|[78][0-8]|9[01])|7(?:0[5-79]|6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}",[8]],["[37-9]\\d{7}",[8]],["8002\\d{7}",[11]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0",0,0,0,0,0,[["1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",[8,9]],["9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-79])))\\d{4}|98\\d{6}",[8,9]],["80\\d{5,7}"],["6[01459]\\d{6}|6[01]\\d{5}",[7,8]],["7[45]\\d{6}",[8]],0,["62\\d{6,7}|72\\d{6}",[8,9]]]],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]],0,0,0,0,0,0,[["2(?:2\\d|5[1-5]|81|9[149])\\d{5}"],["(?:[34]\\d|5[56])\\d{6}"],["8\\d{7}"],0,0,0,0,0,["9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}"]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06",0,0,0,0,0,[["(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}",[8]],["(?:[257]0|3[01])\\d{7}",[9]],["(?:[48]0\\d|680[29])\\d{5}"],["9[01]\\d{6}",[8]],0,0,["38\\d{7}",[9]],0,["21\\d{7}",[9]]]],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0",0,0,0,0,0,[["2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",[7,8,9,10,11]],["8[1-35-9]\\d{7,10}",[9,10,11,12]],["00(?:1803\\d{5,11}|7803\\d{7})|(?:177\\d|800)\\d{5,7}",[8,9,10,11,12,13,14,15,16,17]],["809\\d{7}",[10]],0,0,["(?:1500|8071\\d{3})\\d{3}",[7,10]],0,0,["804\\d{7}",[10]]]],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}"],["8(?:22|[35-9]\\d)\\d{6}",[9]],["1800\\d{6}",[10]],["15(?:1[2-8]|[2-8]0|9[089])\\d{6}",[10]],["700\\d{6}",[9]],["88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}",[10]],["818\\d{6}",[9]],0,["76\\d{7}",[9]],["18[59]0\\d{6}",[10]]]],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0",0,0,0,0,0,[["153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}",[8,11,12]],["55(?:4(?:0[01]|10|5[0-7])|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}",[9]],["1(?:255|80[019]\\d{3})\\d{3}",[7,10]],["1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}",[8,10]],0,["151\\d{8,9}",[11,12]],["1599\\d{6}",[10]],0,["7(?:38(?:[05]\\d|8[018])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",[9]],["1700\\d{6}",[10]]]],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24",[["1624(?:230|[5-8]\\d\\d)\\d{3}"],["76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"],["808162\\d{4}"],["8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}"],["70\\d{8}"],0,["3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}"],0,["56\\d{8}"]]],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0",0,0,0,0,0,[["2717(?:[2-7]\\d|95)\\d{4}|(?:271[0-689]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683|79[1-7])\\d|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}",[10]],["(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}",[10]],["000800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))"],["186[12]\\d{9}",[13]],0,0,["140\\d{7}",[10]],0,0,["1860\\d{7}",[11]]]],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]],0,0,0,0,0,0,[["37\\d{5}"],["38\\d{5}"]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",[8,9]],["7[3-9]\\d{8}",[10]]]],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0",0,0,0,0,0,[["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|(?:12\\d|30[0-2])\\d|2(?:121|[2689]0\\d)|4(?:111|40\\d))\\d{4}",[6,7,10]],["9(?:(?:0[0-5]|[13]\\d|2[0-3])\\d\\d|9(?:[0-46]\\d\\d|5(?:10|5\\d)|8(?:[12]\\d|88)|9(?:0[0-3]|[19]\\d|21|69|77|8[7-9])))\\d{5}",[10]],0,0,0,0,["96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])",[4,5]]]],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-24589]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}",[7]],["(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"],["80[0-8]\\d{4}",[7]],["90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}",[7]],0,["(?:689|8(?:7[18]|80)|95[48])\\d{4}",[7]],["809\\d{4}",[7]],0,["49[0-24-79]\\d{4}",[7]]],"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876",[["8766060\\d{3}|(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[0235-9]|[23]\\d|40|5[06]|6[2-589]|7[0-25-9]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}"],["(?:658295|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}",[8]],["7(?:[78][0-25-9]|9\\d)\\d{6}",[9]],["80\\d{6}",[8]],["9\\d{7}",[8]],["70\\d{7}",[9]],0,["8(?:10|8\\d)\\d{5}",[8]],["74(?:66|77)\\d{5}",[9]],0,["85\\d{6}",[8]]]],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1",0,0,[["(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}",[9]],["(?:601[0-4]0|[7-9]0[1-9]\\d\\d)\\d{5}",[10]],["00777(?:[01]|5\\d)\\d\\d|(?:00(?:7778|882[1245])|(?:120|800\\d)\\d\\d)\\d{4}|00(?:37|66|78)\\d{6,13}"],["990\\d{6}",[9]],["60\\d{7}",[9]],0,["570\\d{6}",[9]],["20\\d{8}",[10]],["50[1-9]\\d{7}",[10]]]],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,[["(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}",[7,8,9]],["(?:1(?:0[0-8]|1\\d|2[014]|[34]0)|7\\d\\d)\\d{6}",[9]],["800[02-8]\\d{5,6}",[9,10]],["900[02-9]\\d{5}",[9]]]],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",[9]],["312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}",[9]],["800\\d{6,7}"]]],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})",[8,9]],["(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}",[8,9]],["1800(?:1\\d|2[019])\\d{4}",[10]],["1900(?:1\\d|2[09])\\d{4}",[10]]]],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0",0,0,0,0,0,[["(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}"],["(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}",[8]],0,0,0,0,0,0,["30(?:0[01]\\d\\d|12(?:11|20))\\d\\d",[8]]]],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]],0,0,0,0,0,0,[["7[4-7]\\d{5}"],["[34]\\d{6}"],0,["8\\d{6}"]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869",[["869(?:2(?:29|36)|302|4(?:6[015-9]|70)|56[5-7])\\d{4}"],["869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}"],["19[1-3]\\d{7}",[10]]]],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?",0,0,0,[["(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}",[5,6,8,9,10]],["1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}",[9,10]],["00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|[38]0)\\d{7}",[9,11,12,13,14]],["60[2-9]\\d{6}",[9]],["50\\d{8,9}",[10,11]],0,["1(?:5(?:22|33|44|66|77|88|99)|6(?:[07]0|44|6[0168]|88)|8(?:00|33|55|77|99))\\d{4}",[8]],["15\\d{7,8}",[9,10]],["70\\d{8}",[10]]]],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]],0,0,0,0,0,0,[["2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}",[8]],["(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:00|1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}",[8]],["18\\d{5}",[7]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345",[["345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|4[89]|88)|9(?:14|4[035-9]))\\d{4}"],["345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["(?:345976|900[2-9]\\d\\d)\\d{4}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",[["(?:33622|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9]|97)|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]|59))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59))))\\d{5}",[10]],["7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}",[10]],["8(?:00|108\\d{3})\\d{7}"],["809\\d{7}",[10]],["808\\d{7}",[10]],0,0,0,["751\\d{7}",[10]]],"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,0,0,0,0,[["(?:2[13]|[35-7][14]|41|8[1468])\\d{6}",[8]],["(?:20(?:[23579]\\d|8[78])|30[24]\\d)\\d{6}|30\\d{7}",[9,10]]]],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0",0,0,0,0,0,[["7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}"],["(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[1-3]))\\d{5}"],0,["9[01]\\d{6}",[8]],0,0,0,0,0,["80\\d{6}",[8]]]],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758",[["758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}"],["758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0",0,0,0,[["(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}",[7]],["(?:6(?:(?:4[5-9]|5\\d)\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}"],["8002[28]\\d\\d|80(?:05\\d|9)\\d{4}"],["90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",[7]],0,["697(?:42|56|[78]\\d)\\d{4}",[9]],["870(?:28|87)\\d\\d",[7]]]],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0",0,0,0,0,0,[["(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}"],["7(?:[0-25-8]\\d|4[0-4])\\d{6}"],0,0,0,0,["1973\\d{5}"]]],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0",0,0,0,0,0,[["2\\d{7}",[8]],["(?:(?:(?:22|33)0|555|7(?:6[01]|7\\d)|88\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}",[7,9]],0,["332(?:02|[34]\\d)\\d{4}",[9]]]],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]],0,0,0,0,0,0,[["2\\d{7}"],["[56]\\d{7}"],["800[1256]\\d{4}"]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]",0,0,0,[["(?:3[1478]|4[124-6]|52)\\d{6}"],["6\\d{7}"],["80[02]\\d{5}"],["9(?:0[0239]|10)\\d{5}"],["70[05]\\d{5}"],0,["70[67]\\d{5}"],0,["[89]01\\d{5}"],["808\\d{5}"]]],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)",0,0,0,[["(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}"],["6(?:[269][18]|5[1568]|7[189]|81)\\d{6}",[9]],["800\\d{5}",[8]],["90[015]\\d{5}",[8]],0,0,0,0,["20(?:1\\d{5}|[2-689]\\d{1,7})",[4,5,6,7,8,9,10]],["801\\d{5}",[8]]]],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]],0,0,0,0,0,0,[["6\\d{7}"],["2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}"],["80\\d{6}"],["90\\d{6}"],0,0,0,0,0,["81\\d{6}"]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}"],["9[1-6]\\d{7}"]]],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0",0,0,0,0,0,[["(?:870|9[2-47-9]\\d)\\d{5}",[8]],["4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}"],["(?:800|90\\d)\\d{5}",[8]]]],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}"],["562\\d{5}|(?:6\\d|7[16-9])\\d{6}"],["800\\d{5}"],["90[056]\\d{5}"],0,0,["803\\d{5}"],0,["3[08]\\d{6}"],["808\\d{5}"]]],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}",[8]],["6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}",[8]],["80(?:[0-2578]|9\\d)\\d{5}"],["9(?:4[1568]|5[178])\\d{5}",[8]],0,0,["77[1-9]\\d{5}",[8]],0,["78[1-49]\\d{5}",[8]]]],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1",0,0,[["2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}"],["3[2-47-9]\\d{7}"],0,0,0,0,0,0,["22\\d{7}"]]],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1",0,0,0,0,0,[["(?:247|528|625)\\d{4}"],["(?:(?:23|54)5|329|45[35-8])\\d{4}"],0,0,0,0,0,0,["635\\d{4}"]]],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0",0,0,0,0,0,[["(?:(?:2(?:62|77)0|3444)\\d|4[56]440)\\d{3}|(?:34|4[357])700\\d{3}|(?:2(?:[0-3]\\d|5[0-578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}"],["7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"],["800\\d{5}"],["5\\d{7}"],0,0,0,0,0,["8(?:0[1-9]|[1-9]\\d)\\d{5}"]]],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]],0,0,0,0,0,0,[["2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-59]))\\d{5}"],["2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[0-3]|[679]\\d|8[2-59])\\d{6}"],["80\\d{6}"]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:(?:12|[28]\\d|3[56]|7[3-6]|9[0-6])\\d|4(?:2[29]|7[0-2]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|22|7[0-2]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[013])|3(?:20\\d|4(?:70|83)|56)|420\\d|5(?:2\\d|470))|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|2472|3(?:20\\d|470)|4(?:2[04]\\d|472)|7(?:3\\d\\d|4[67]0|8(?:[01459]\\d|8))))\\d{4}|5(?:2(?:2\\d{5,6}|47[02]\\d{4})|(?:3472|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[01])|8(?:20\\d|47[02])|9(?:20\\d|470))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:(?:2\\d|51)\\d|4(?:[1-35-9]\\d|4[0-57-9]))|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|(?:[35]2|64)\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}",[6,7,8,9]],["(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}",[7,8,9,10]],["80080(?:0[1-9]|2\\d)\\d{3}",[10]],0,0,0,0,0,["1333\\d{4}",[8]]]],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0",0,0,0,0,0,[["[12]2[1-3]\\d{5,6}|(?:(?:[12](?:1|27)|5[368])\\d\\d|7(?:0(?:[0-5]\\d|7[078]|80)|128))\\d{4}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}"],["92[0139]\\d{5}|(?:5[05]|6[069]|7[28]|8[0135689]|9[013-9])\\d{6}",[8]],0,0,0,0,0,0,["712[0-79]\\d{4}|7(?:1[013-9]|[5-79]\\d)\\d{5}",[8]]]],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]],0,0,0,0,0,0,[["(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}",[8]],["6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}",[8]],["0800\\d{3}",[7]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670",[["670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:596(?:[03-7]\\d|1[05]|2[7-9]|8[0-39]|9[04-9])|80[6-9]\\d\\d|9(?:477[6-9]|767[4589]))\\d{4}"],["(?:69[67]\\d\\d|7091[0-3])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:397[0-3]|477[0-5]|76(?:6\\d|7[0-367]))\\d{4}"]]],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]],0,0,0,0,0,0,[["(?:25[08]|35\\d|45[1-7])\\d{5}"],["[2-4][0-46-9]\\d{6}"],["800\\d{5}"]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664",[["6644(?:1[0-3]|91)\\d{4}"],["664(?:3(?:49|9[1-6])|49[2-6])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]],0,0,0,0,0,0,[["20(?:3[1-4]|6[059])\\d{4}|2(?:0[19]|[1-357]\\d|60)\\d{5}"],["(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"],["800(?:02|[3467]\\d)\\d{3}"],["5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}"],0,0,["501\\d{5}"],["7117\\d{4}"],["3550\\d{4}"]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,[["(?:2(?:[0346-8]\\d|1[0-8])|4(?:[013568]\\d|2[4-8]|71|90)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",[7,8]],["5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-6]|3[013]))\\d{5}",[8]],["802\\d{7}|80[0-2]\\d{4}",[7,10]],["30\\d{5}",[7]],0,0,0,["219\\d{4}",[7]],["3(?:20|9\\d)\\d{4}",[7]]],"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,[["(?:3(?:0[0-4]|3[0-59])|6(?:[58][024689]|6[024-68]|7[02468]))\\d{4}",[7]],["(?:46[46]|[79]\\d\\d)\\d{4}",[7]],["800\\d{7}",[10]],["900\\d{7}",[10]],0,0,["4(?:0[01]|50)\\d{4}",[7]]],"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:1[2-9]|2[12]\\d\\d)\\d{5}"],["111\\d{6}|(?:31|77|[89][89])\\d{7}",[9]]]],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"],["(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"],["8(?:00|88)\\d{7}"],["900\\d{7}"],["500\\d{7}"],0,0,0,0,["300\\d{7}"]],"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0",0,0,0,0,0,[["427[01]\\d{4}|(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}",[8,9]],["1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-7]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}",[9,10]],["1[378]00\\d{6}",[10]],["1600\\d{6}",[10]],0,0,0,0,["15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}",[10]]]],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",[8]],["8[2-79]\\d{7}",[9]],["800\\d{6}",[9]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0",0,0,0,0,0,[["64426\\d{3}|6(?:1(?:2[2-7]|3[01378]|4[0-4])|254|32[0237]|4(?:27|41|5[25])|52[236-8]|626|7(?:2[2-4]|30))\\d{4,5}|6(?:1(?:(?:0\\d|2[0189]|3[24-69]|4[5-9])\\d|17|69|7[014])|2(?:17|5[0-36-8]|69|70)|3(?:17|2[14-689]|34|6[289]|7[01]|81)|4(?:17|2[0-2]|4[06]|5[0137]|69|7[01])|5(?:17|2[0459]|69|7[01])|6(?:17|25|38|42|69|7[01])|7(?:17|2[569]|3[13]|6[89]|7[01]))\\d{4}"],["(?:60|8[1245])\\d{7}",[9]],["80\\d{7}",[9]],["8701\\d{5}",[9]],0,0,0,0,["8(?:3\\d\\d|86)\\d{5}"]]],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]],0,0,0,0,0,0,[["(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}"],["(?:[579]\\d|8[0-79])\\d{4}"],["050\\d{3}"],["36\\d{4}"]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]],0,0,0,0,0,0,[["2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}"],["(?:23|7[0467]|[89]\\d)\\d{6}"],["08\\d{6}"],["09\\d{6}"]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1",0,0,[["(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}"],["(?:14|3[58])\\d{4}"]]],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0",0,0,0,0,0,[["20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}",[10]],["(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}",[10]],["800\\d{7,11}"],0,0,0,["700\\d{7,11}"]]],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]],0,0,0,0,0,0,[["2\\d{7}"],["(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"],["1800\\d{4}"]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}",[9]],["(?:6[1-58]|970\\d)\\d{7}",[9,11]],["800\\d{4,7}",[7,8,9,10]],["90[069]\\d{4,7}",[7,8,9,10]],0,0,["140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d",[5,6,9]],["66\\d{7}",[9]],["(?:85|91)\\d{7}",[9]]]],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]",[["(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",[8]],["(?:4[015-8]|9\\d)\\d{6}",[8]],["80[01]\\d{5}",[8]],["82[09]\\d{5}",[8]],["880\\d{5}",[8]],["81[23]\\d{5}",[8]],["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"],0,["85[0-5]\\d{5}",[8]],["810(?:0[0-6]|[2-8]\\d)\\d{3}",[8]]]],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0",0,0,0,0,0,[["(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}",[8]],["9(?:00|6[0-3]|7[0-24-6]|8[0-24-68])\\d{7}",[10]],["1(?:66001|800\\d\\d)\\d{5}",[11]]]],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]],0,0,0,0,0,0,[["444\\d{4}"],["(?:222|55[3-9]|666|777|8\\d\\d|999)\\d{4}"]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]],0,0,0,0,0,0,[["[47]\\d{3}",[4]],["(?:[56]|888[1-9])\\d{3}"]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,[["240\\d{5}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}",[8]],["2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}",[8,9,10]],["508\\d{6,7}|80\\d{6,8}",[8,9,10]],["(?:1[13-57-9]\\d{5}|50(?:0[08]|30|66|77|88))\\d{3}|90\\d{6,8}",[7,8,9,10]],["70\\d{7}",[9]],0,["8(?:1[16-9]|22|3\\d|4[045]|5[459]|6[235-9]|7[0-3579]|90)\\d{2,7}"]],"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]],0,0,0,0,0,0,[["2[1-6]\\d{6}",[8]],["1505\\d{4}|(?:7(?:[125-9]\\d|41)|9(?:0[1-9]|[1-9]\\d))\\d{5}",[8]],["8007\\d{4,5}|(?:500|800[05])\\d{4}"],["900\\d{5}",[8]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["(?:1(?:0\\d|1[0479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[047-9]\\d|1[0-8]|2[0-5]|33|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",[7]],["(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}",[7,8]],["800\\d{4,5}|(?:00800|800\\d)\\d{6}"],["(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}",[7]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,[["(?:(?:(?:4[34]|5[14])[0-8]|687)\\d|7(?:173|(?:3[0-8]|55)\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[0569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}",[8]],["9\\d{8}",[9]],["800\\d{5}",[8]],["805\\d{5}",[8]],["80[24]\\d{5}",[8]],0,0,0,0,["801\\d{5}",[8]]],"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],0,0,0,0,0,0,[["4(?:0[4-689]|9[4-68])\\d{5}",[8]],["8[7-9]\\d{6}",[8]],["80[0-5]\\d{6}",[9]],0,0,0,["44\\d{4}",[6]],0,["499\\d{5}",[8]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,[["(?:(?:3[0-2]|4[257]|5[34]|9[78])\\d|64[1-9]|85[02-46-9])\\d{4}",[7]],["(?:7\\d|8[1-48])\\d{6}",[8]],["180\\d{4}",[7]],0,0,0,0,["27[01]\\d{4}",[7]],["2(?:0[0-57]|7[568])\\d{4}",[7]]],"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0",0,0,0,0,0,[["(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|(?:2|8[2-8]\\d\\d)\\d{5}",[6,8,9,10]],["(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}",[10]],["1800\\d{7,9}",[11,12,13]]]],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0",0,0,0,0,0,[["(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}",[9,10]],["3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}",[10]],["800\\d{5}(?:\\d{3})?",[8,11]],["900\\d{5}",[8]],["122\\d{6}",[9]],0,["(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",[11,12]]]],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]],0,0,0,0,0,0,[["47\\d{7}|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))",[7,9]],["2131[89]\\d{4}|21(?:1[013-5]|2\\d|3[2-9])\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",[9]],["800\\d{6,7}",[9,10]],["70[01346-8]\\d{6}",[9]],0,0,["804\\d{6}",[9]],["64\\d{4,7}",[6,7,8,9]],["39\\d{7}",[9]],["801\\d{6}",[9]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:4[1-35-9]|5[0-47-9]|80[6-9]\\d\\d)\\d{4}"],["(?:4[02-489]|5[02-9]|708(?:4[0-5]|5[0-6]))\\d{4}"],["80[0-5]\\d{6}",[9]],["8[129]\\d{7}",[9]]]],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939",[["(?:787|939)[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}",[8]],["5[69]\\d{7}",[9]],["1800\\d{6}",[10]],0,0,0,0,0,0,["1700\\d{6}",[10]]]],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]],0,0,0,0,0,0,[["2(?:[12]\\d|3[1-689]|4[1-59]|[57][1-9]|6[1-35689]|8[1-69]|9[1256])\\d{6}"],["6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"],["80[02]\\d{6}"],["(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}"],["884[0-4689]\\d{5}"],["600\\d{6}|6[06]92(?:0\\d|3[349]|49)\\d{3}"],["70(?:38[01]|596|(?:7\\d|8[17])\\d)\\d{4}"],["6(?:222\\d|89(?:00|88|99))\\d{4}"],["30\\d{7}"],["80(?:8\\d|9[1579])\\d{5}"]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}"],["(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\d{4}|(?:45|77|88)\\d{5}"]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,[["(?:[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:2[4-68]|[4-68]\\d|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}",[7,8,9]],["9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}",[9]],["9800\\d{5,7}",[9,10,11]],0,0,0,["[2-9]0\\d{4,7}",[6,7,8,9]],0,["8700[0-4]\\d{4}",[9]]]],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]],0,0,0,0,0,0,[["4(?:1111|2022)\\d{3}|4(?:[04]\\d\\d|14[0-6]|999)\\d{4}",[8]],["[35-7]\\d{7}",[8]],["800\\d{4}|(?:0080[01]|800)\\d{6}",[7,9,11]],0,0,0,0,["2[136]\\d{5}",[7]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,[["[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d"],["(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}",[9]],["800\\d{6}",[9]],["90[0136]\\d{6}",[9]],0,0,["(?:37\\d|80[578])\\d{6}",[9]],0,0,["801\\d{6}",[9]]],0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0",0,0,0,0,0,[["(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}",[7,8,9,10,11,12]],["6(?:[0-689]|7\\d)\\d{6,7}",[8,9,10]],["800\\d{3,9}"],["(?:78\\d|90[0169])\\d{3,7}",[6,7,8,9,10]],0,0,["7[06]\\d{4,10}"]]],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:06|2[23568]\\d)\\d{6}"],["7[237-9]\\d{7}",[9]],["800\\d{6}",[9]],["900\\d{6}",[9]]]],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0",0,0,0,0,0,[["1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",[9]],["579[01]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}",[9]],["800\\d{7}",[10]],["925\\d{6}",[9]],0,0,0,0,0,["920\\d{6}",[9]]]],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]],0,0,0,0,0,0,[["(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}",[5]],["48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}"],["1[38]\\d{3}",[5]],0,0,0,0,0,["5[12]\\d{3}",[5]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,[["4[2-46]\\d{5}"],["2[125-8]\\d{5}"],["800[08]\\d{3}"],["85\\d{5}"],0,0,0,0,["971\\d{4}|(?:64|95)\\d{5}"]],"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0",0,0,0,0,0,[["1(?:5\\d|8[35-7])\\d{6}"],["(?:1[0-2]|9[0-3569])\\d{7}"]]],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0",0,0,0,0,0,[["(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}",[7,8,9]],["7[02369]\\d{7}",[9]],["20\\d{4,7}",[6,7,8,9]],["649\\d{6}|99[1-59]\\d{4}(?:\\d{3})?|9(?:00|39|44)[1-8]\\d{3,6}",[7,8,9,10]],["75[1-8]\\d{6}",[9]],["(?:25[245]|67[3-68])\\d{9}",[12]],["10[1-8]\\d{6}",[9]],["74[02-9]\\d{6}",[9]],0,["77[0-7]\\d{6}",[9]]]],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[["662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}",[8]],["898[02-8]\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}",[8]],["(?:18|8)00\\d{7}",[10,11]],["1900\\d{7}",[11]],0,0,["7000\\d{7}",[11]],0,["(?:3[12]\\d|666)\\d{5}",[8]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]",[["2(?:[0-57-9]\\d|6[4-9])\\d\\d"],["[56]\\d{4}",[5]],0,0,0,0,0,0,["262\\d\\d",[5]]]],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,[["(?:[1-357][2-8]|4[24-8])\\d{6}",[8]],["65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}",[8]],["80\\d{4,6}",[6,7,8]],["89[1-3]\\d{2,5}|90\\d{4,6}"],0,0,0,0,["(?:59\\d\\d|8(?:1(?:[67]\\d|8[0-589])|2(?:0\\d|2[0-37-9]|8[0-2489])|3[389]\\d))\\d{4}",[8]]],"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79",[["79\\d{6}",[8]],["(?:4[015-8]|9\\d)\\d{6}",[8]],["80[01]\\d{5}",[8]],["82[09]\\d{5}",[8]],["880\\d{5}",[8]],["81[23]\\d{5}",[8]],["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"],0,["85[0-5]\\d{5}",[8]],["810(?:0[0-6]|[2-8]\\d)\\d{3}",[8]]]],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d"],["909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}",[9]],["800\\d{6}",[9]],["9(?:00|[78]\\d)\\d{6}",[9]],0,0,["96\\d{7}",[9]],["9090\\d{3}",[7]],["6(?:02|5[0-4]|9[0-6])\\d{6}",[9]],["8[5-9]\\d{7}",[9]]]],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0",0,0,0,0,0,[["22[2-4][2-9]\\d{4}"],["(?:25|3[0-5]|66|7[1-9]|8[08]|9[09])\\d{6}"]]],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1",0,0,[["0549(?:8[0157-9]|9\\d)\\d{4}",[10]],["6[16]\\d{6}",[8]],0,["7[178]\\d{6}",[8]],0,0,0,0,["5[158]\\d{6}",[8]]]],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]],0,0,0,0,0,0,[["3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}"],["7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|3[356]|[4-7]\\d|8[35]))\\d{5}"],["800\\d{6}"],["88[4689]\\d{6}"],0,0,0,0,["(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}"],["81[02468]\\d{6}"]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0",0,0,0,0,0,[["(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}",[6,7]],["(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}",[7,8,9]]]],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]],0,0,0,0,0,0,[["(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}",[6]],["(?:6[08]|7[124-7]|8[1-9])\\d{5}",[7]],["80\\d{5}",[7]],["90\\d{5}",[7]],0,0,0,0,["56\\d{4}",[6]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0",0,0,0,0,0,[["1[89]\\d{7}"],["(?:12|9[1257-9])\\d{7}"]]],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]],0,0,0,0,0,0,[["22\\d{5}"],["900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}"]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,[["2(?:79(?:0[0347-9]|[1-9]\\d)|89(?:0[024589]|[1-9]\\d))\\d{3}|2(?:[1-69]\\d|[78][0-8])\\d{5}",[8]],["[67]\\d{7}",[8]],["800\\d{8}|80[01]\\d{4}",[7,11]],["900\\d{4}(?:\\d{4})?",[7,11]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721",[["7215(?:4[2-8]|8[239]|9[056])\\d{4}"],["7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0",0,0,0,0,0,[["21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}"],["(?:50|9[1-9])\\d{7}",[9]]]],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]],0,0,0,0,0,0,[["[23][2-5]\\d{6}",[8]],["7[5-9]\\d{6}",[8]],["0800\\d{4}",[8]],["900\\d{6}",[9]],0,0,0,0,["70\\d{6}",[8]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8",[["8\\d{3}"]]],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649",[["649(?:266|712|9(?:4\\d|50))\\d{4}"],["649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["649(?:71[01]|966)\\d{4}"]]],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,[["22(?:[37-9]0|5[0-5]|6[89])\\d{4}"],["(?:30|[69]\\d|77|8[56])\\d{6}"]],"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]],0,0,0,0,0,0,[["2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}"],["(?:7[0-29]|9[0-36-9])\\d{6}"]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0",0,0,0,0,0,[["(?:1[0689]|2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}",[8]],["67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}",[9]],["(?:001800\\d|1800)\\d{6}",[10,13]],["1900\\d{6}",[10]],0,0,0,0,["6[08]\\d{7}",[9]]]],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,[["(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}"],["(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0-27-9]|2[0-27]|[34]0|5[05]|7[01578]|8[078])\\d{7}"]],"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7],0,0,0,0,0,0,0,[["(?:2[2-4]|[34]\\d)\\d{2,5}"],["7[2-4]\\d{2,5}"]]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]],0,0,0,0,0,0,[["(?:2[1-5]|3[1-9]|4[1-4])\\d{5}",[7]],["7[2-8]\\d{6}",[8]],["80\\d{5}",[7]],["90\\d{5}",[7]],["70\\d{5}",[7]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,[["(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}"],["(?:6\\d|71)\\d{6}"]],"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]],0,0,0,0,0,0,[["81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}"],["3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}"],["8010\\d{4}"],["88\\d{6}"],0,0,0,0,0,["8[12]10\\d{4}"]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]],0,0,0,0,0,0,[["(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}",[5]],["(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}",[7]],["0800\\d{3}",[7]],0,0,0,0,0,["55[0-37-9]\\d{4}",[7]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0",0,0,0,0,0,[["(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",[10]],["561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}",[10]],["8(?:00\\d{7}(?:\\d{2,3})?|11\\d{7})",[10,12,13]],["(?:8[89]8|900)\\d{7}",[10]],["592(?:21[12]|461)\\d{4}",[10]],0,["444\\d{4}",[7]],["512\\d{7}",[10]],["850\\d{7}",[10]]]],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868",[["868(?:2(?:01|1[5-9]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}"],["868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],["868619\\d{4}"]]],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]],0,0,0,0,0,0,[["2[02-9]\\d{3}",[5]],["(?:7[01]\\d|90)\\d{4}",[6,7]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}",[8,9]],["(?:40001[0-2]|9[0-8]\\d{4})\\d{3}",[9]],["80[0-79]\\d{6}|800\\d{5}",[8,9]],["20(?:[013-9]\\d\\d|2)\\d{4}",[7,9]],["99\\d{7}",[9]],0,["50[0-46-9]\\d{6}",[9]],0,["7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}",[10,11]]],0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0",0,0,0,0,0,[["2[2-8]\\d{7}"],["(?:6[125-9]|7[13-9])\\d{7}"],["80[08]\\d{6}"],["90\\d{7}"],0,0,0,0,["41\\d{7}"],["8(?:40|6[01])\\d{6}"]]],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,[["(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",[9]],["790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}",[9]],["800[1-8]\\d{5,6}"],["900[239]\\d{5,6}"],0,0,0,0,["89[1-579]\\d{6}",[9]]],"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0",0,0,0,0,0,[["20(?:(?:240|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[017]\\d|2[5-9]|3[1-4]|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}"],["72[48]0\\d{5}|7(?:[014-8]\\d|2[067]|36|9[0-289])\\d{6}"],["800[1-3]\\d{5}"],["90[1-3]\\d{6}"]]],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,[["(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}",[8]],["9[1-9]\\d{6}",[8]],["0004\\d{2,9}|(?:405|80[05])\\d{4}",[6,7,8,9,10,11,12,13]],["90[0-8]\\d{4}",[7]],0,0,["21\\d{2,3}",[4,5]]],"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]],0,0,0,0,0,0,[["(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}"],["(?:(?:[25]0|33|8[78]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}"]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698",[["06698\\d{1,6}",[6,7,8,9,10,11]],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784",[["784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}"],["784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["78451[0-2]\\d{4}"]]],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}"],["4(?:1[24-8]|2[246])\\d{7}"],["800\\d{7}"],["90[01]\\d{7}"],0,0,["501\\d{7}"]]],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284",[["284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}"],["284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340",[["340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0",0,0,0,0,0,[["2(?:0[3-9]|1[0-689]|2[0-25-9]|[38][2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|9[0-4679])\\d{7}",[10]],["(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}",[9]],["1800\\d{4,6}|12(?:0[13]|28)\\d{4}",[8,9,10]],["1900\\d{4,6}",[8,9,10]],0,0,["(?:[17]99|80\\d)\\d{4}|69\\d{5,6}",[7,8]],0,["672\\d{6}",[9]]]],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]],0,0,0,0,0,0,[["(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}",[5]],["(?:[58]\\d|7[013-7])\\d{5}",[7]],["81[18]\\d\\d",[5]],0,0,0,["(?:3[03]|900\\d)\\d{3}"],0,["9(?:0[1-9]|1[01])\\d{4}",[7]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],0,0,0,0,0,0,[["72\\d{4}",[6]],["(?:72|8[23])\\d{4}",[6]],["80[0-5]\\d{6}",[9]],0,0,["[48]0\\d{4}",[6]],0,0,["9[23]\\d{4}",[6]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]],0,0,0,0,0,0,[["6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}",[5,6]],["(?:7[1-35-8]|8(?:[3-7]|9\\d{3}))\\d{5}",[7,10]],["800\\d{3}",[6]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0",0,0,0,0,0,[["38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})"],["4[3-9]\\d{6}",[8]],["800\\d{5}",[8]],["900\\d{5}",[8]]]],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,[["78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}",[7,8]],["7[01378]\\d{7}",[9]]]],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:0330|4302)|52087)0\\d{3}|(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",[9]],["(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:50[0-2]|6\\d\\d|7(?:[0-46-9]\\d|5[0-4]))\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}",[5,6,7,8,9]],["80\\d{7}",[9]],["(?:86[2-9]|9[0-2]\\d)\\d{6}",[9]],0,0,["861\\d{6,7}",[9,10]],0,["87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}",[9]],["860\\d{6}",[9]]]],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0",0,0,0,0,0,[["21[1-8]\\d{6}"],["(?:[59][5-8]|7[5-9])\\d{7}"],["800\\d{6}"],0,0,0,0,0,["63\\d{7}"]]],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}"],["7(?:[1278]\\d|3[1-9])\\d{6}",[9]],["80(?:[01]\\d|20|8[0-8])\\d{3}",[7]],0,0,0,0,0,["86(?:1[12]|22|30|44|55|77|8[368])\\d{6}",[10]]]]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function sm(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var lm={}.constructor;function um(e){return null!=e&&e.constructor===lm}function cm(e){return(cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hm(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pm(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pm(e){var t=function(e,t){if("object"!=cm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=cm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==cm(t)?t:t+""}var mm=" ext. ",gm=/^\d+$/,$m=function(){return hm(function e(t){fm(this,e),_m(t),this.metadata=t,Em.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&gm.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new vm(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new vm(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),vm=function(){return hm(function e(t,n){fm(this,e),this.globalMetadataObject=n,this.metadata=t,Em.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map(function(t){return new ym(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&wm(this.types(),e))return new xm(wm(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?mm:this.metadata[13]||mm}}])}(),ym=function(){return hm(function e(t,n){fm(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||bm.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),bm=/^\(?\$1\)?$/,xm=function(){return hm(function e(t,n){fm(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function wm(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function _m(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!um(e)||!um(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(um(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Cm(e)+": "+e,"."))}var Cm=function(e){return cm(e)};function Sm(e,t){if((t=new $m(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Em(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===sm(t,"1.2.0")?this.v2=!0:-1===sm(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Nm(e,t,n){return function(e,t,n,r){t&&(r=new $m(r.metadata)).selectNumberingPlan(t);var i=r.type(n),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,d=o[0];if(d===a)return"IS_POSSIBLE";if(d>a)return"TOO_SHORT";if(o[o.length-1]<a)return"TOO_LONG";return o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Tm(e,t,n){return"IS_POSSIBLE"===Nm(e,t,n)}function Am(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Om(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Im(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Im(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Im(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var km=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function jm(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new $m(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Am(r,n.nationalNumberPattern())){if(Rm(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Rm(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=Om(km);!(i=o()).done;){var a=i.value;if(Rm(r,a,n))return a}}}}function Rm(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Am(e,t.pattern()))}function Pm(e,t,n){var r=new $m(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new $m(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Dm="0-90-9٠-٩۰-۹",Lm="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),Mm=new RegExp("(["+Dm+"])");function Um(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Fm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fm(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bm(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,t){var n=t.countries,r=t.metadata;r=new $m(r);for(var i,o=Um(n);!(i=o()).done;){var a=i.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(jm({phone:e,country:a},void 0,r.metadata))return a}}(n,{countries:i,metadata:r.metadata})}function qm(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,d=r.length-1,s=d>0&&r[d];if(t.nationalPrefixTransformRule()&&s)i=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(o=r[1]);else{var l=r[0];i=e.slice(l.length),s&&(o=r[1])}if(s){var u=e.indexOf(r[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,n),i=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(Am(e,n.nationalNumberPattern())&&!Am(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Bm(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(Nm(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function zm(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var i=new $m(r);i.selectNumberingPlan(t,n);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(Mm);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,n,r,i);if(!a||a===e){if(n||r){var d=function(e,t,n,r,i){var o=n?Sm(n,i):r;if(0===e.indexOf(o)){(i=new $m(i)).selectNumberingPlan(n,o);var a=e.slice(o.length),d=qm(a,t,i).nationalNumber,s=qm(e,t,i).nationalNumber;if(!Am(s,i.nationalNumberPattern())&&Am(d,i.nationalNumberPattern())||"TOO_LONG"===Nm(s,t,i))return{countryCallingCode:o,number:a}}return{number:e}}(e,t,n,r,i),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new $m(i);for(var u=2;u-1<=3&&u<=e.length;){var c=e.slice(1,u);if(i.hasCallingCode(c))return i.selectNumberingPlan(c),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:e.slice(u)};u++}return{}}var Hm=/(\$\d)/;function Wm(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix,o=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(Hm,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Lm,"]+"),"g")," ").trim()}(o):o}var Gm=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var Vm=function(e){return"([".concat(Dm,"]{1,").concat(e,"})")};function Km(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",i="[ \\t]*";return";ext="+Vm("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+Vm("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+Vm("9")+r)+"|"+("[- ]+"+Vm("6")+"#")+"|"+(i+"(?:,{2}|;)"+n+Vm("15")+r)+"|"+(i+"(?:,)+"+n+Vm("9")+r)}var Ym="["+Dm+"]{2}",Xm="[++]{0,1}(?:["+Lm+"]*["+Dm+"]){3,}["+Lm+Dm+"]*",Jm=new RegExp("^[++]{0,1}(?:["+Lm+"]*["+Dm+"]){1,2}$","i"),Zm=Xm+"(?:"+Km()+")?",Qm=new RegExp("^"+Ym+"$|^"+Zm+"$","i");var eg={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function tg(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},eg,n):eg,r=new $m(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,o=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?rg(i=ng(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(i=ng(a,null,"INTERNATIONAL",r,n),rg(i="+".concat(o," ").concat(i),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,r,i){var o=Sm(r,i.metadata);if(o===n){var a=ng(e,t,"NATIONAL",i);return"1"===n?n+" "+a:a}var d=function(e,t,n){var r=new $m(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Gm.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(d)return"".concat(d," ").concat(n," ").concat(ng(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,n.fromCountry,r);return rg(d,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function ng(e,t,n,r,i){var o,a,d=(o=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return Am(a,e.pattern())}));return d?Wm(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix}):e}function rg(e,t,n,r){return t?r(e,t,n):e}function ig(e){return(ig="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ag(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?og(Object(n),!0).forEach(function(t){dg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):og(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dg(e,t,n){return(t=lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sg(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lg(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lg(e){var t=function(e,t){if("object"!=ig(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ig(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ig(t)?t:t+""}var ug=function(){return sg(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(um(n)&&um(n.countries)){r=n;var i=t;if(!fg.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=zm(i,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");_m(r);var a=function(e,t){var n,r,i=new $m(t);cg(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=a.country,s=a.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Pm(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new $m(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Tm(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return e=this,t={v2:!0},n=this.getMetadata(),t=t||{},(n=new $m(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==jm(e,t,n.metadata):Am(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern());var e,t,n}},{key:"isNonGeographic",value:function(){return new $m(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return jm(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return tg(this,e,t?ag(ag({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),cg=function(e){return/^[A-Z]{2}$/.test(e)};var fg=/^\+\d+$/;function hg(e){return(hg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pg(e,t,n){return t=vg(t),function(e,t){if(t&&("object"==hg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gg()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}function mg(e){var t="function"==typeof Map?new Map:void 0;return mg=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(gg())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&$g(i,n.prototype),i}(e,arguments,vg(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),$g(n,e)},mg(e)}function gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gg=function(){return!!e})()}function $g(e,t){return($g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vg(e){return(vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yg=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=pg(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$g(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(mg(Error)),bg=new RegExp("(?:"+Km()+")$","i");var xg={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function wg(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_g(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cg(e){for(var t,n="",r=wg(e.split(""));!(t=r()).done;){n+=Sg(t.value,n)||""}return n}function Sg(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return xg[e]}(e)}var Eg="(["+Dm+"]|[\\-\\.\\(\\)]?)",Ng=new RegExp("^\\+"+Eg+"*["+Dm+"]"+Eg+"*$","g"),Tg=new RegExp("^("+("["+Dm+"]+((\\-)*["+Dm+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Dm+"])*")+"\\.?$","g"),Ag="tel:",Og=";phone-context=";function Ig(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(Og);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Ng.test(e)||Tg.test(e))}(i))throw new yg("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o,a=e.indexOf(Ag);o=a>=0?a+4:0;var d=e.indexOf(Og);n+=e.substring(o,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var kg=new RegExp("[++"+Dm+"]"),jg=new RegExp("[^"+Dm+"#]+$");function Rg(e,t,n){if(t=t||{},n=new $m(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new yg("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=Ig(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new yg("TOO_LONG");return}if(!1===t)return e;var r=e.search(kg);if(r<0)return;return e.slice(r).replace(jg,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&Qm.test(e)}(r))return function(e){return Jm.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(bg);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(bg),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,t.v2,t.extract),i=r.number,o=r.ext,a=r.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new yg("TOO_SHORT");throw new yg("NOT_A_NUMBER")}return{}}var d=function(e,t,n,r){var i,o=zm(Cg(e),void 0,t,n,r.metadata),a=o.countryCallingCodeSource,d=o.countryCallingCode,s=o.number;if(d)r.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),d=n||Sm(t,r.metadata)}if(!s)return{countryCallingCodeSource:a,countryCallingCode:d};var l=qm(Cg(s),i,r),u=l.nationalNumber,c=l.carrierCode,f=Bm(d,{nationalNumber:u,metadata:r});f&&(i=f,"001"===f||r.selectNumberingPlan(i));return{country:i,countryCallingCode:d,countryCallingCodeSource:a,nationalNumber:u,carrierCode:c}}(i,t.defaultCountry,t.defaultCallingCode,n),s=d.country,l=d.nationalNumber,u=d.countryCallingCode,c=d.countryCallingCodeSource,f=d.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new yg("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new yg("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new yg("TOO_LONG");return{}}if(t.v2){var h=new ug(u,l,n.metadata);return s&&(h.country=s),f&&(h.carrierCode=f),o&&(h.ext=o),h.__countryCallingCodeSource=c,h}var p=!!(t.extended?n.hasSelectedNumberingPlan():s)&&Am(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:u,carrierCode:f,valid:p,possible:!!p||!(!0!==t.extended||!n.possibleLengths()||!Tm(l,s,n)),phone:l,ext:o}:p?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,o):{}}function Pg(e){return(Pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(n),!0).forEach(function(t){Mg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Pg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Pg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ug(e){return(Ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Ug(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Ug(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ug(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,d=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(u){l=!0,i=u}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zg(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hg(e){var t,n,r,i=qg(Array.prototype.slice.call(e),4),o=i[0],a=i[1],d=i[2],s=i[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!um(a))throw new Error("Invalid second argument: ".concat(a));d?(n=a,r=d):r=a}else s?(n=d,r=s):(n=void 0,r=d),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fg(Object(n),!0).forEach(function(t){Bg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}function Wg(e){return(Wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gg(Object(n),!0).forEach(function(t){Kg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Wg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Wg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yg(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=Vg(Vg({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Rg(e,Lg(Lg({},t),{},{v2:!0}),n)}(e,t,n)}catch(r){if(!(r instanceof yg))throw r}}function Xg(e){return(Xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Zg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jg(Object(n),!0).forEach(function(t){Qg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qg(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Xg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Xg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e$(){var e=Hg(arguments),t=e.text,n=e.options,r=e.metadata,i=Yg(t,n=Zg(Zg({},n),{},{extract:!1}),r);return i&&i.isValid()||!1}function t$(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(dm),e.apply(this,n)}(e$,arguments)}const n$="55";function r$(e){return null==e?"":String(e).replace(/\D/g,"")}const i$=/^0?((?:800|300|500|900)\d{6,7})$/;function o$(e){const t=r$(e).match(i$);return t?t[1]:null}function a$(e){const t=r$(e);return 8===t.length?/^[2-5]/.test(t)?"landline":/^[6-9]/.test(t)?"mobile":"unknown":9===t.length&&t.startsWith("9")?"mobile":"unknown"}function d$(e){let t=r$(e);for(;t.startsWith("0")&&t.length>10;)t=t.slice(1);return!t.startsWith(n$)||12!==t.length&&13!==t.length||(t=t.slice(2)),t}const s$=["12","14","15","17","21","23","25","31","41","43"];function l$(e,t={}){const n=void 0===t.defaultDDD?"48":t.defaultDDD,r=t.legacyMobile??"all",i=r$(e),o=i.startsWith("0"),a=o$(i);if(a)return a;let d=d$(i);if(!d)return"";const s=o$(d);if(s)return s;if(d.length>13)return d;if(12===d.length||13===d.length){const e=d.slice(0,2);if(!o||!s$.includes(e))return d;d=d.slice(2)}const l=e=>"mobile"===a$(e)&&("all"===r||!e.startsWith("9"));if(11===d.length)return d;if(10===d.length){const e=d.slice(0,2),t=d.slice(2);return l(t)?`${e}9${t}`:d}if(9===d.length)return d.startsWith("9")&&n?`${n}${d}`:d;if(8===d.length){const e=a$(d);return n&&"unknown"!==e?l(d)?`${n}9${d}`:`${n}${d}`:d}return d}function u$(e){return l$(e)}function c$(e){if(!e)return"";const t=String(e);if(/[*#]/.test(t))return t;let n=r$(t);if(!n)return t;let r="";const i=t.trim().startsWith("+");if(n.startsWith(n$)&&(i||n.length>=12)&&n.length<=13&&(r="+55 ",n=n.slice(2)),n.length<=2)return`${r}${n}`;const o=n.match(/^(0?)((?:800|300|500|900))(\d{0,7})$/);if(o){const e=o[3],t=e.length<=3?e:`${e.slice(0,3)} ${e.slice(3)}`;return`${r}${o[1]}${o[2]}${t?` ${t}`:""}`}const a=n.slice(0,2),d=n.slice(2);return d.length<=4?`${r}(${a}) ${d}`:d.length<=8?`${r}(${a}) ${d.slice(0,4)}-${d.slice(4)}`:9===d.length?`${r}(${a}) ${d.slice(0,5)}-${d.slice(5)}`:`${r}${n}`}function f$(e){const t=(e??"").trim();if(t.startsWith("+")){const e=r$(t);return e?`+${e}`:null}const n=d$(t),r=o$(n);return r?`+${n$}${r}`:10!==n.length&&11!==n.length?null:`+${n$}${n}`}function h$(e){if(!e)return!1;try{return t$(e)}catch{return!1}}function p$(e){const t=f$(e);return!!t&&(t.startsWith(`+${n$}`)&&h$(t))}const m$="+55";function g$(e){if(!e)return"";const t=e.normalize("NFKC");let n="";for(const r of t)(/^[0-9*#]$/.test(r)||"+"===r&&0===n.length)&&(n+=r);return n}function $$(e,t=m$){const n=g$(e);if(!n)return"";const r=n.startsWith("+"),i=n.replace(/[^0-9]/g,""),o=t.replace(/[^0-9]/g,""),a=o.length||2,d=r?i.slice(0,Math.min(a,i.length)):o||i.slice(0,a);let s=r?i.slice(d.length):i;const l=r?`+${d}`:t,u="55"===d?s.match(/^(0?)((?:800|300|500|900))(\d{0,7})$/):null;if(u){const e=u[3],t=e.length<=3?e:`${e.slice(0,3)} ${e.slice(3)}`;return`${l} ${u[1]}${u[2]}${t?` ${t}`:""}`}if("55"===d&&s.length>=8){return`${l} (${s.slice(0,2)}) ${s.slice(2,Math.max(s.length-4,2))}-${s.slice(-4)}`.replace(/\s+/g," ").trim()}if(!s)return l.trim();const c=[];for(;s.length>4;)c.push(s.slice(0,3)),s=s.slice(3);s&&c.push(s);return`${l} ${c.join(" ")}`.replace(/\s+/g," ").trim()}function v$(e,t=m$){const n=g$(e).slice(0,32),r=$$(n,t),i=function(e,t=m$){const n=g$(e);if(!n)return null;if(n.startsWith("+")){const e=n.replace(/[^0-9]/g,"");return e?`+${e}`:null}const r=r$(n);if(!r)return null;const i=t.replace(/[^0-9]/g,"");if("55"!==i)return i?`+${i}${r}`:`+${r}`;const o=l$(r,{defaultDDD:null,legacyMobile:"unambiguous"});return o.length<10&&!o$(o)?null:`+55${o}`}(n,t),o=h$(i),a=i?$$(i,t):null,d=n.startsWith("+")?r$(n):`${t.replace(/[^0-9]/g,"")}${r$(n)}`;return{raw:n,display:r,e164:i,dialDisplay:a,isValid:o,differs:Boolean(i)&&r$(i??"")!==d}}const y$={fine:"(pointer: fine)",coarse:"(pointer: coarse)",hover:"(hover: hover)"};function b$(e){if("undefined"==typeof window||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(e).matches}catch{return null}}function x$(){const e=b$(y$.fine),t=b$(y$.coarse),n=b$(y$.hover),r=t?"coarse":e?"fine":"unknown";return{pointer:r,hover:!0===n,touchLike:"coarse"===r||"fine"!==r&&!1===n}}function w$(){const[e,n]=t.useState(()=>x$());return t.useEffect(()=>{if("undefined"==typeof window||"function"!=typeof window.matchMedia)return;const e=()=>n(x$()),t=[];for(const n of Object.values(y$))try{const r=window.matchMedia(n);"function"==typeof r.addEventListener?r.addEventListener("change",e):"function"==typeof r.addListener&&r.addListener(e),t.push(r)}catch{}return e(),()=>{for(const n of t)"function"==typeof n.removeEventListener?n.removeEventListener("change",e):"function"==typeof n.removeListener&&n.removeListener(e)}},[]),e}const _$="callix:click-to-call";function C$(e){if(!e)return"unknown";switch(e){case"idle":return"available";case"onBreak":return"on_break";case"afterCall":case"manualCallFailed":return"after_call";case"offline":case"stopped":case"startupError":case"startup.error":case"networkDown":return"offline";case"starting":return"unknown";case"callRinging":case"manualCallSetup":case"manualCallRinging":case"callInProgress":return"in_call";default:return/call|ringing|dial/i.test(e)?"in_call":"unknown"}}function S$(e){return"available"===e||"on_break"===e}function E$(e){const t=new AbortController,n=setTimeout(()=>t.abort(),1e4);return e&&(e.aborted?t.abort():e.addEventListener("abort",()=>t.abort(),{once:!0})),{signal:t.signal,clear:()=>clearTimeout(n)}}async function N$(e){const{signal:t,clear:n}=E$();try{const n=await fetch(`${e.apiBaseUrl}/api/click-to-call/${encodeURIComponent(e.taskId)}`,{method:"PATCH",headers:e.headers,body:JSON.stringify({status:e.status,error:e.error,retry:!0===e.retry}),credentials:"omit",keepalive:!0,signal:t});if(!n.ok){let e=null;try{const t=await n.json();e="string"==typeof(null==t?void 0:t.error)?t.error:null}catch{}return{ok:!1,status:n.status,code:e}}return{ok:!0,task:(await n.json()).task??null}}finally{n()}}function T$(e){const t=(e??"").replace(/\D/g,"");return!t.startsWith("55")||12!==t.length&&13!==t.length?e.startsWith("+")?`+${t}`:t:t.slice(2)}const A$={width:448,height:640},O$=280,I$=420,k$=1024,j$=[{value:"1",detail:""},{value:"2",detail:"ABC"},{value:"3",detail:"DEF"},{value:"4",detail:"GHI"},{value:"5",detail:"JKL"},{value:"6",detail:"MNO"},{value:"7",detail:"PQRS"},{value:"8",detail:"TUV"},{value:"9",detail:"WXYZ"},{value:"*",detail:""},{value:"0",detail:"+"},{value:"#",detail:""}],R$={rttMs:null,bitrateKbps:null,packetLossRatio:null},P$={jitterMs:null,packetLossRatio:null,audioLevel:null},D$="candidate-pair",L$="inbound-rtp";function M$({isAuthenticated:e,username:n,onLogin:r,onLogout:i,isLoadingSession:o,sessionError:a,sessionStatus:d=null,loginConfirmation:s=null,onCancelLoginConfirmation:l,onTakeOverSession:u,onLogoutAllTabs:c,variant:f="default",portalTarget:h=null}){const p=t.useRef(null),m=t.useRef(null),g=t.useRef({pointerId:null,offsetX:0,offsetY:0}),v=t.useRef({pointerId:null,originX:0,originY:0,startWidth:A$.width,startHeight:A$.height,edge:"corner"}),y=t.useRef(!1),[b,x]=t.useState({x:24,y:24}),[w,_]=t.useState(!1),[C,S]=t.useState(!1),[E,N]=t.useState(!1),[T,A]=t.useState(""),[O,I]=t.useState(null),[k,j]=t.useState({width:A$.width,height:A$.height}),R=t.useRef(e),P=t.useMemo(()=>g$(T),[T]),D="min"===f,L=t.useMemo(()=>{const e=k.width/A$.width,t=k.height/A$.height;return G$(Math.min(e,t),.55,2.5)},[k]),M=t.useCallback(e=>{if("undefined"==typeof window)return{width:G$(e.width,O$,k$),height:G$(e.height,I$,960)};const t=window.innerWidth,n=window.innerHeight,r=t<640?12:16,i=Math.min(k$,t-2*r),o=Math.min(960,n-2*r);return{width:G$(e.width,O$,Math.max(O$,i)),height:G$(e.height,I$,Math.max(I$,o))}},[]),U=t.useCallback(e=>{if("undefined"==typeof window)return e;const t=window.innerWidth,n=window.innerHeight,r=p.current,i=(null==r?void 0:r.offsetWidth)??0,o=(null==r?void 0:r.offsetHeight)??0,a=O??k??A$,d=E?a.width:80,s=E?a.height:80,l=i>0?i:d,u=o>0?o:s,c=t<640?12:16,f=c,h=c,m=Math.max(f,t-l-c),g=Math.max(h,n-u-c);let $=e.x,v=e.y;return t<640&&E&&($=Math.round((t-l)/2),v=c),n<u+2*c&&(v=c),{x:G$($,f,m),y:G$(v,h,g)}},[E,O,k]),F=t.useCallback(e=>{A(t=>g$("function"==typeof e?e(t):e))},[]);t.useEffect(()=>{var e,t;if("undefined"==typeof window)return;const n=(null==(e=p.current)?void 0:e.offsetWidth)??96,r=(null==(t=p.current)?void 0:t.offsetHeight)??96,i=window.innerWidth-n-24,o=window.innerHeight-r-24;x(U({x:i,y:o}))},[U]),t.useEffect(()=>{x(e=>U(e))},[E,U]),t.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>{x(e=>U(e)),I(e=>e?M(e):e)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[U,M]),t.useEffect(()=>{if(!E)return;const e=m.current;if(!e)return;const t=(e,t)=>{j({width:e,height:t})};if("undefined"!=typeof ResizeObserver){const n=new ResizeObserver(e=>{const n=e[0];if(n){const{width:e,height:r}=n.contentRect;t(e,r)}});return n.observe(e),()=>n.disconnect()}const n=e.getBoundingClientRect();t(n.width,n.height)},[E,O]),t.useEffect(()=>{e&&!R.current&&N(!0),R.current=e},[e]),t.useEffect(()=>{const e=e=>{const t=e.detail;N(!0),(null==t?void 0:t.phone)&&F(T$(t.phone).slice(0,32))};return window.addEventListener(_$,e),()=>window.removeEventListener(_$,e)},[F]);const B=t.useRef(!1);t.useEffect(()=>{const t=!e&&Boolean(s||a);t&&!B.current&&N(!0),B.current=t},[e,s,a]),t.useEffect(()=>{if(!w)return;const e=e=>{var t,n;if(g.current.pointerId!==e.pointerId)return;y.current=!0;const r=(null==(t=p.current)?void 0:t.offsetWidth)??0,i=(null==(n=p.current)?void 0:n.offsetHeight)??0,o=e.clientX-g.current.offsetX,a=e.clientY-g.current.offsetY,d="undefined"!=typeof window?window.innerWidth:0,s=d<640?12:16,l=d-r-s,u=("undefined"!=typeof window?window.innerHeight:0)-i-s,c=Math.max(s,l),f=Math.max(s,u);x({x:G$(o,s,c),y:G$(a,s,f)})},t=e=>{g.current.pointerId===e.pointerId&&(_(!1),g.current={pointerId:null,offsetX:0,offsetY:0})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[w]),t.useEffect(()=>{if(!C)return;const e=e=>{if(v.current.pointerId!==e.pointerId)return;e.preventDefault();const{edge:t,startWidth:n,startHeight:r,originX:i,originY:o}=v.current;let a=n,d=r;"right"!==t&&"corner"!==t||(a=n+(e.clientX-i)),"bottom"!==t&&"corner"!==t||(d=r+(e.clientY-o));const s=M({width:a,height:d});I(e=>e&&e.width===s.width&&e.height===s.height?e:s)},t=e=>{var t,n;if(v.current.pointerId===e.pointerId){try{null==(n=null==(t=e.target)?void 0:t.releasePointerCapture)||n.call(t,e.pointerId)}catch{}S(!1),v.current={...v.current,pointerId:null}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[C,M]),t.useEffect(()=>{E||(y.current=!1)},[E]),t.useEffect(()=>{x(e=>U(e))},[O,k,U]);const q=t.useCallback(e=>t=>{var n,r;if(0!==t.button&&"touch"!==t.pointerType)return;t.preventDefault(),t.stopPropagation();const i=m.current,o=null==i?void 0:i.getBoundingClientRect(),a=(null==o?void 0:o.width)??(null==O?void 0:O.width)??A$.width,d=(null==o?void 0:o.height)??(null==O?void 0:O.height)??A$.height;v.current={pointerId:t.pointerId,originX:t.clientX,originY:t.clientY,startWidth:a,startHeight:d,edge:e};try{null==(r=(n=t.currentTarget).setPointerCapture)||r.call(n,t.pointerId)}catch{}S(!0)},[O]),z=t.useCallback(e=>{var t;if(0!==e.button)return;const n=null==(t=p.current)?void 0:t.getBoundingClientRect();g.current={pointerId:e.pointerId,offsetX:e.clientX-((null==n?void 0:n.left)??0),offsetY:e.clientY-((null==n?void 0:n.top)??0)},y.current=!1,_(!0)},[]),H=t.useCallback(()=>{y.current?y.current=!1:N(e=>!e)},[]),W=t.useCallback(async e=>{const t=e.trim();t&&await r(t)},[r]),G=e?$.jsx(F$,{username:n??"",dialValue:P,setDialValue:F,onLogout:i,variant:f,onRequestClose:()=>N(!1),portalTarget:h}):$.jsx(U$,{defaultValue:n??"",onSubmit:W,isLoading:o,error:a,statusMessage:d,confirmation:s,onCancelConfirmation:l,onTakeOver:u,onLogoutAll:c});if(D)return G;const V=Number.isFinite(L)&&L>0?L:1,K=A$.width/V,Y=A$.height/V,X={width:O?`${O.width}px`:void 0,height:O?`${O.height}px`:void 0,minWidth:"280px",minHeight:"420px",maxWidth:"min(1024px, calc(100vw - 1.5rem))",maxHeight:"calc(100vh - 3rem)"},J={flex:1,display:"flex",flexDirection:"column",transform:`scale(${V})`,transformOrigin:"top left",width:`${K}px`,minHeight:`${Y}px`},Z={flex:1,display:"flex",flexDirection:"column",width:`${A$.width}px`,minHeight:`${A$.height}px`};return $.jsx("div",{ref:p,className:["callix","mode","full",Gh`fixed z-50 select-none`].join(" "),"data-callix-variant":"default",style:{transform:`translate3d(${b.x}px, ${b.y}px, 0)`,top:0,left:0},children:E?$.jsxs("div",{ref:m,"data-floating-dialer-card":"true",className:Gh`relative flex flex-col items-start overflow-hidden rounded-3xl border border-slate-200/60 bg-gradient-to-br from-white/95 via-slate-50/95 to-white/90 shadow-2xl backdrop-blur-lg transition-all duration-300 w-[min(32rem,calc(100vw-1.5rem))] max-w-[calc(100vw-1.5rem)] sm:w-[28rem] md:w-[30rem] max-h-[calc(100vh-3rem)] sm:max-h-none`,style:X,children:[$.jsx("div",{className:Gh`flex flex-1 flex-col overflow-hidden`,style:J,children:$.jsxs("div",{"data-floating-dialer-content":!0,className:Gh`flex flex-1 flex-col rounded-3xl overflow-hidden`,style:Z,children:[$.jsxs("div",{className:Gh`cursor-grab touch-none active:cursor-grabbing flex items-center justify-between bg-gradient-to-r from-primary to-primaryDark px-4 py-3 text-white shadow-sm`,onPointerDown:z,children:[$.jsxs("div",{className:Gh`flex items-center gap-3`,children:[$.jsx("span",{className:Gh`inline-flex h-10 w-10 items-center justify-center rounded-2xl bg-white/15 shadow-inner`,children:$.jsx(jc,{className:Gh`text-xl`})}),$.jsxs("div",{className:Gh`space-y-0.5`,children:[$.jsx("p",{className:Gh`text-[11px] uppercase tracking-[0.2em] text-white/70`,children:"Discadora"}),$.jsx("p",{className:Gh`text-base font-semibold`,children:n??"Visitante"})]})]}),$.jsx("button",{type:"button",className:Gh`rounded-full p-2 text-white/80 transition hover:bg-white/15 hover:text-white`,onClick:()=>N(!1),"aria-label":"Fechar discadora",children:$.jsx(Wc,{className:Gh`text-lg`})})]}),$.jsx("div",{className:Gh`flex-1 overflow-y-auto p-3`,children:G})]})}),$.jsx("div",{role:"presentation","data-floating-dialer-resize":"right","aria-hidden":"true",className:Gh`absolute right-0 top-16 bottom-12 w-3 cursor-ew-resize touch-none rounded-md border border-transparent transition-colors duration-150 hover:border-primary/30 hover:bg-primary/10`,onPointerDown:q("right")}),$.jsx("div",{role:"presentation","data-floating-dialer-resize":"bottom","aria-hidden":"true",className:Gh`absolute left-16 right-12 bottom-0 h-3 cursor-ns-resize touch-none rounded-md border border-transparent transition-colors duration-150 hover:border-primary/30 hover:bg-primary/10`,onPointerDown:q("bottom")}),$.jsx("div",{role:"presentation","data-floating-dialer-resize":"corner",className:Gh`absolute bottom-1 right-1 flex h-6 w-6 items-center justify-center cursor-nwse-resize touch-none`,onPointerDown:q("corner"),"aria-label":"Redimensionar discadora",children:$.jsx("span",{className:Gh`h-3 w-3 rotate-45 rounded-sm border border-slate-300 bg-white/80 shadow`})})]}):$.jsx("button",{type:"button",onPointerDown:z,onClick:H,className:Gh`flex h-16 w-16 items-center justify-center rounded-full bg-primary text-white shadow-xl transition-transform hover:scale-105 hover:bg-primaryDark focus:outline-none focus:ring-4 focus:ring-primary/30`,"aria-label":"Abrir discadora",children:$.jsx(Dc,{className:Gh`text-2xl`})})})}function U$({defaultValue:e,onSubmit:n,isLoading:r,error:i,statusMessage:o,confirmation:a,onCancelConfirmation:d,onTakeOver:s,onLogoutAll:l}){const[u,c]=t.useState(e),[f,h]=t.useState(!1);t.useEffect(()=>{c(e)},[e]);const p=f&&!u.trim();if(r){const e=((null==a?void 0:a.username)||u||"").trim();return $.jsxs("div",{className:Gh`flex flex-col items-center justify-center gap-3 rounded-2xl border border-slate-200 bg-white px-4 py-8 text-center`,role:"status","aria-live":"polite",children:[$.jsx("span",{className:Gh`inline-flex h-10 w-10 animate-spin rounded-full border-4 border-primary/20 border-t-primary`}),e&&$.jsx("p",{className:Gh`text-sm font-semibold text-slate-800`,children:e}),$.jsx("p",{className:Gh`text-xs text-slate-500`,children:o||"Conectando..."})]})}return(null==a?void 0:a.elsewhere)?$.jsxs("div",{className:Gh`space-y-4`,"data-login-state":"elsewhere",children:[$.jsxs("div",{className:Gh`space-y-2 text-center`,children:[$.jsx("p",{className:Gh`text-[11px] font-semibold uppercase tracking-wide text-slate-500`,children:"Discador ativo em outra aba"}),$.jsxs("p",{className:Gh`inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-sm font-semibold text-slate-800`,children:[$.jsx(Fc,{className:Gh`text-primary`}),a.username]})]}),i&&$.jsx("p",{className:Gh`text-center text-xs text-red-500`,children:i}),$.jsx("button",{type:"button",id:"takeOverBtn",onClick:()=>null==s?void 0:s(),className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-white shadow-lg transition hover:bg-primaryDark`,children:"Usar o discador nesta aba"}),$.jsx("button",{type:"button",id:"logoutAllBtn",onClick:()=>null==l?void 0:l(),className:Gh`w-full text-center text-xs font-semibold text-red-500 transition hover:text-red-600`,children:"Sair em todas as abas"}),$.jsx("p",{className:Gh`text-center text-[11px] text-slate-400`,children:"O Callix aceita uma conexão por usuário: você já está conectado em outra aba deste navegador e pode continuar por lá."})]}):a?$.jsxs("div",{className:Gh`space-y-4`,"data-login-state":"choose",children:[$.jsxs("div",{className:Gh`space-y-2 text-center`,children:[$.jsx("p",{className:Gh`text-[11px] font-semibold uppercase tracking-wide text-slate-500`,children:"Entrar como"}),$.jsxs("p",{className:Gh`inline-flex items-center gap-2 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-sm font-semibold text-slate-800`,children:[$.jsx(Fc,{className:Gh`text-primary`}),a.username]})]}),i&&$.jsx("p",{className:Gh`text-center text-xs text-red-500`,children:i}),!i&&a.note&&$.jsx("p",{className:Gh`text-center text-xs text-slate-500`,children:a.note}),$.jsx("button",{type:"button",id:"loginConfirmBtn",onClick:()=>{n(a.username)},className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-white shadow-lg transition hover:bg-primaryDark`,children:"Entrar"}),!a.locked&&d&&$.jsx("button",{type:"button",onClick:d,className:Gh`w-full text-center text-xs font-semibold text-slate-500 transition hover:text-primary`,children:"Usar outro usuário"}),$.jsx("p",{className:Gh`text-center text-[11px] text-slate-400`,children:"Ao entrar, todas as abas abertas passam a usar o discador. Vai usar o Callix web? Então não entre aqui: nada é conectado sem a sua confirmação."})]}):$.jsxs("form",{className:Gh`space-y-4`,onSubmit:async e=>{e.preventDefault(),h(!0),u.trim()&&await n(u)},children:[$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsxs("label",{className:Gh`flex items-center gap-2 text-sm font-medium text-slate-700`,htmlFor:"dialer-username",children:[$.jsx(Fc,{className:Gh`text-base text-primary`}),"Usuario"]}),$.jsx("input",{id:"dialer-username",type:"text",placeholder:"Digite seu usuario Callix",className:Gh`w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-base shadow-inner focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40`,value:u,onChange:e=>c(e.target.value),onBlur:()=>h(!0),autoCapitalize:"none",autoCorrect:"off",spellCheck:!1}),p&&$.jsx("p",{className:Gh`text-xs text-red-500`,children:"Informe um usuario para continuar."}),i&&$.jsx("p",{className:Gh`text-xs text-red-500`,children:i})]}),$.jsx("button",{type:"submit",className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-white shadow-lg transition hover:bg-primaryDark`,children:"Entrar"})]})}function F$({username:e,dialValue:r,setDialValue:i,onLogout:o,variant:a,onRequestClose:d,portalTarget:s=null}){var l,u;const c="min"===a,{skipManualQualification:f}=Wy();console.log("[FloatingDialer/AuthenticatedDialer] 🔧 skipManualQualification:",f);const h=Yu(),p=Xu(),m=Zu(),g=Qu(),v=ec(),y=tc(),b=t.useMemo(()=>v??[],[v]),x=t.useMemo(()=>y??[],[y]),{makeManualCall:w,becomeAvailable:_,finishAfterCall:C}=Ju(),{hangup:S,answer:E,reject:N}=nc(),[T,A]=rc(),[O,I]=ic(),[k,j]=oc();t.useEffect(()=>{console.log("[FloatingDialer] Estado do operador mudou:",{state:null==p?void 0:p.state,operatorState:p,hasCall:!!m,currentCall:m})},[p,m]),t.useEffect(()=>{console.log("[FloatingDialer] Qualificações:",{success:b,discard:x,callState:null==p?void 0:p.state})},[b,x,null==p?void 0:p.state]),t.useEffect(()=>{"incoming"===(null==m?void 0:m.direction)&&console.log("[FloatingDialer] 📞 CHAMADA RECEBIDA:",{call:m,direction:m.direction,state:null==p?void 0:p.state,counterpart:z$(m)})},[m,null==p?void 0:p.state]);const[R,P]=t.useState(!1),D=t.useRef(null),L=t.useRef(null),M=t.useRef(null),U=t.useRef(null),[F,B]=t.useState(null),[q,z]=t.useState(null);ac("userSessionDropped",e=>{const t=Bp(null==e?void 0:e.originator);z(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`)});const[H,W]=t.useState(null),[G,V]=t.useState(!1),[K,Y]=t.useState("success"),[X,J]=t.useState(null),[Z,Q]=t.useState(0),[ee,te]=t.useState(0),[ne,re]=t.useState(R$),[ie,oe]=t.useState(P$),ae=t.useRef(null),de=t.useRef(!1),[se,le]=t.useState({inputs:[],outputs:[]}),[ue,ce]=t.useState(null),[fe,he]=t.useState(null),[pe,me]=t.useState(null),[ge,$e]=t.useState(!1),ve=t.useRef(null),[ye,be]=t.useState(null),[xe,we]=t.useState(!1),[_e,Ce]=t.useState(null),[Se,Ee]=t.useState("undefined"!=typeof window&&window.innerWidth<=640),Ne="mobile"===a,Te=w$(),Ae=Ne||Se&&Te.touchLike,Oe=om(null==h?void 0:h.breaks)||[],{goOnBreak:Ie,goOffBreak:ke}=am(),je=t.useMemo(()=>r.slice(0,32),[r]),Re=t.useMemo(()=>v$(je,m$),[je]),Pe=Re.e164,De=Re.display,Le=Re.differs?Re.dialDisplay:null,Me=null==p?void 0:p.state,Ue="idle"===Me,Fe="onBreak"===Me,Be="incoming"===(null==m?void 0:m.direction),qe="callInProgress"===Me,ze="manualCallRinging"===Me||"callRinging"===Me,He="manualCallSetup"===Me||ze,We=!Me||"starting"===Me||"idle"===Me||"manualCallSetup"===Me||"onBreak"===Me,Ge=We||qe||ze,Ve=Re.isValid,Ke=t.useCallback(async e=>{if("function"==typeof _)try{await Promise.resolve(_())}catch(t){console.error(e,t),z(e)}else z(e)},[_]);t.useEffect(()=>{if(de.current)return;de.current=!0;Me&&["onBreak","manualCallSetup","manualCallRinging","manualCallFailed","callRinging","callInProgress","afterCall"].includes(Me)||Ke("Nao foi possivel ficar disponivel automaticamente.")},[Ke,Me]),t.useEffect(()=>{"idle"===Me&&(z(null),B(null))},[Me]),t.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>Ee(window.innerWidth<=640);return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[]),t.useEffect(()=>{"offline"===Me&&(z("Conexao perdida. Tentando reconectar..."),Ke("Conexao perdida. Tentando reconectar..."))},[Me,Ke]),t.useEffect(()=>{if("afterCall"===Me){if("campaign"===(null==g?void 0:g.type)&&!0===g.info.campaign.skipCallQualification)return console.log("[FloatingDialer] 🚀 skipCallQualification ativado - finalizando automaticamente"),void("function"==typeof C&&Promise.resolve(C({result:"success",qualificationId:void 0})));if("manual"===(null==g?void 0:g.type))return console.log("[FloatingDialer] 🚀 Chamada MANUAL detectada - finalizando automaticamente (chamadas manuais NUNCA exibem qualificação)"),void("function"==typeof C&&Promise.resolve(C({result:"success",qualificationId:void 0})));if(0===b.length&&0===x.length)return console.log("[FloatingDialer] 🚀 Sem qualificações configuradas - finalizando automaticamente"),void("function"==typeof C&&Promise.resolve(C({result:"success",qualificationId:void 0})));const e=b.length>0;Y(e?"success":"failure"),J(null),W(null)}},[Me,b.length,x.length,g,C,f]),t.useEffect(()=>{if("undefined"==typeof window)return;if("starting"!==Me)return;const e=window.setTimeout(()=>{z(e=>e??"Conexao demorando mais que o esperado. Verifique rede ou credenciais.")},8e3);return()=>window.clearTimeout(e)},[Me]);const Ye=t.useRef(Pe);Ye.current=Pe,t.useEffect(()=>{if("manualCallRinging"===Me||"callInProgress"===Me){const e=Ye.current;e&&be(t=>t??e),i("")}"idle"===Me&&be(null)},[Me,i]),t.useEffect(()=>{var e;if("undefined"==typeof navigator||!(null==(e=navigator.mediaDevices)?void 0:e.enumerateDevices))return;let t=!1;const n=async()=>{try{navigator.mediaDevices.getUserMedia&&await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){console.warn("Permissao de microfone nao concedida ainda",e)}try{const e=await navigator.mediaDevices.enumerateDevices();if(t)return;const n=e.filter(e=>"audioinput"===e.kind),r=e.filter(e=>"audiooutput"===e.kind);le({inputs:n,outputs:r});const i=await Lp();if(t)return;me(i?`${i.title}: ${i.detail}${i.action?` ${i.action}`:""}`:null),ce(e=>{var t;return e??(null==(t=n[0])?void 0:t.deviceId)??null}),he(e=>{var t;return e??(null==(t=r[0])?void 0:t.deviceId)??null})}catch(e){t||(console.error("Listagem de dispositivos falhou",e),me("Nao foi possivel listar dispositivos de audio. Verifique as permissoes."))}};n();const r=()=>{n()},i=navigator.mediaDevices;return"addEventListener"in i?i.addEventListener("devicechange",r):"ondevicechange"in i&&(i.ondevicechange=r),()=>{t=!0,"removeEventListener"in i?i.removeEventListener("devicechange",r):"ondevicechange"in i&&(i.ondevicechange=null)}},[]),t.useEffect(()=>{if(!m||"callInProgress"!==Me)return Q(0),re(R$),void oe(P$);const e=Math.floor(m.currentDurationSeconds??0);Q(e),console.log("[FloatingDialer] ?? Timer iniciado:",{initialDuration:e,currentDurationSeconds:m.currentDurationSeconds,callState:Me});const t=window.setInterval(()=>{const e=Math.floor(m.currentDurationSeconds??0);Q(e),e%5==0&&e>0&&console.log("[FloatingDialer] ?? Timer atualizado:",e,"segundos")},1e3);return()=>{console.log("[FloatingDialer] ?? Timer parado"),window.clearInterval(t)}},[m,Me]),t.useEffect(()=>{if(!m||"callInProgress"!==Me)return;const e=e=>{const t=B$(e,"stat")??{},n="string"==typeof t.type?t.type:void 0;if(n===D$){const e=H$(t,"currentRoundTripTime"),n=H$(t,"availableOutgoingBitrate");re(t=>({rttMs:null!=e?1e3*e:t.rttMs,bitrateKbps:null!=n?n/1e3:t.bitrateKbps,packetLossRatio:t.packetLossRatio}))}if(n===L$){const e=H$(t,"packetsReceived")??0,n=H$(t,"packetsLost")??0,r=e+n,i=r>0?n/r:null,o=H$(t,"jitter"),a=H$(t,"audioLevel");oe(e=>({jitterMs:null!=o?1e3*o:e.jitterMs,packetLossRatio:i??e.packetLossRatio,audioLevel:a??e.audioLevel})),re(e=>({rttMs:e.rttMs,bitrateKbps:e.bitrateKbps,packetLossRatio:i??e.packetLossRatio}))}};return m.on("webRTCStat",e),()=>{m.off("webRTCStat",e)}},[m,Me]),t.useEffect(()=>{var e;if(!ue)return;if("undefined"==typeof navigator||!(null==(e=navigator.mediaDevices)?void 0:e.getUserMedia))return;let t=!1;return(async()=>{var e,n,r,i;const o=null==(n=null==(e=ve.current)?void 0:e.getAudioTracks)?void 0:n.call(e)[0],a=null==(r=null==o?void 0:o.getSettings)?void 0:r.call(o).deviceId;let d=ve.current;if(!d||a!==ue)try{const e=await navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:ue}}});if(t)return void e.getTracks().forEach(e=>e.stop());ve.current&&ve.current!==e&&ve.current.getTracks().forEach(e=>e.stop()),ve.current=e,d=e}catch(l){return void(t||(console.error("Falha ao acessar microfone selecionado",l),me("Nao foi possivel acessar o microfone selecionado.")))}if(!d)return;const s=d.getAudioTracks()[0];if(s)try{const e=q$(h,"setAudioInputDevice");if(e)return await Promise.resolve(e(ue)),void me(null);const t=function(e){const t=B$(e,"rtcSession")??B$(e,"_session")??B$(e,"session"),n=B$(t,"_connection")??B$(t,"connection");if(n)return n;return B$(e,"pc")??void 0}(m),n=null==(i=null==t?void 0:t.getSenders)?void 0:i.call(t).find(e=>{var t;return"audio"===(null==(t=e.track)?void 0:t.kind)});if(null==n?void 0:n.replaceTrack)return await n.replaceTrack(s),void me(null);const r=q$(m,"setInputTrack");if(r)return await Promise.resolve(r(s)),void me(null);const o=q$(m,"replaceTrack");if(o)return await Promise.resolve(o(s)),void me(null);console.warn("Nao foi possivel aplicar o microfone via API conhecida"),me(null)}catch(l){t||(console.error("Erro ao aplicar microfone",l),me("Nao foi possivel aplicar o microfone selecionado."))}})(),()=>{t=!0}},[ue,h,m]),t.useEffect(()=>{if(!fe||!h)return;(async()=>{try{const e=q$(B$(h,"audioOutput"),"setAudioOutputDevice");if(!e)return void console.warn("Nao foi possivel localizar API para alterar dispositivo de saida.");await Promise.resolve(e(fe)),me(null)}catch(e){console.error("Erro ao aplicar dispositivo de saida",e),me("Nao foi possivel aplicar a saida de audio selecionada.")}})()},[fe,h]),t.useEffect(()=>{if(!m)return;const e=e=>{const t=Hp(null==e?void 0:e.failure);B(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`)};return m.on("failed",e),()=>{m.off("failed",e)}},[m]),t.useEffect(()=>()=>{const e=ae.current;e&&e.close().catch(()=>{})},[]),t.useEffect(()=>()=>{var e;null==(e=ve.current)||e.getTracks().forEach(e=>e.stop()),ve.current=null},[]);const Xe=t.useCallback(async()=>{if("undefined"==typeof window)return null;const e=window.AudioContext||window.webkitAudioContext;if(!e)return null;if(ae.current||(ae.current=new e),"suspended"===ae.current.state)try{await ae.current.resume()}catch(t){console.error("Falha ao retomar audio",t)}return ae.current},[]),Je=t.useCallback(async e=>{const t=W$[e];if(!t)return;const n=await Xe();if(!n)return;const r=n.createGain(),[i,o]=t,a=n.createOscillator(),d=n.createOscillator();a.type="sine",d.type="sine",a.frequency.setValueAtTime(i,n.currentTime),d.frequency.setValueAtTime(o,n.currentTime),r.gain.setValueAtTime(0,n.currentTime),r.gain.linearRampToValueAtTime(.22,n.currentTime+.01),r.gain.linearRampToValueAtTime(0,n.currentTime+.18),a.connect(r),d.connect(r),r.connect(n.destination);const s=n.currentTime,l=s+.2;a.start(s),d.start(s),a.stop(l),d.stop(l);const u=()=>{try{a.disconnect(),d.disconnect(),r.disconnect()}catch(e){console.error("Erro ao limpar tons DTMF",e)}};a.onended=u,d.onended=u},[Xe]),Ze=t.useCallback(e=>{if(Je(e),m&&(qe||ze)){try{m.sendDtmf(e)}catch(n){console.error("Falha ao enviar DTMF",n),B("Nao foi possivel enviar o tom DTMF.")}return}if(!We)return;if(B(null),!/^[0-9*#]$/.test(e))return void console.warn("[handleDial] Dígito inválido ignorado:",e);const t=ee;i(n=>{const r=n,i=(r.slice(0,t)+e+r.slice(t)).slice(0,32),o=Math.min(t+1,i.length);return te(o),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(o,o))},0),i})},[Je,m,qe,ze,We,ee,i]),Qe=t.useCallback(()=>{B(null),i(""),te(0),setTimeout(()=>{U.current&&U.current.focus()},0)},[i]),et=t.useCallback(()=>{B(null);const e=ee;0!==e&&i(t=>{const n=t.slice(0,e-1)+t.slice(e),r=e-1;return te(r),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(r,r))},0),n})},[i,ee]);t.useEffect(()=>{const e=e=>{const t=e.detail;(null==t?void 0:t.phone)&&(B(null),be(t.phone))};return window.addEventListener(_$,e),()=>window.removeEventListener(_$,e)},[]);const tt=t.useCallback(async()=>{if(!Ue&&!Fe)return;if(!je)return void B("Informe um numero para ligar.");const e=Pe;if(console.log("[handleCall] sanitizedDialValue:",je,"-> E.164:",e),e)if(h$(e)){console.log("[handleCall] 🚀 Ligando para:",e);try{B(null),be(e),w&&w(e)}catch(t){console.error("Erro ao iniciar chamada",t),B("Nao foi possivel iniciar a ligacao.")}}else B("Numero invalido. Informe o DDD e o numero (fixo com 8 ou celular com 9 digitos).");else B("Informe um numero para ligar.")},[Ue,Fe,je,Pe,w]),nt=t.useCallback(async e=>{if(Ie)try{Ce(null),await Ie(e),we(!1),console.log("[FloatingDialer] Entrou em pausa com sucesso:",e)}catch(t){console.error("[FloatingDialer] Erro ao entrar em pausa:",t),Ce(t instanceof Error?t.message:"N�o foi poss�vel entrar em pausa.")}},[Ie]),rt=t.useCallback(async()=>{if(ke)try{await ke(),console.log("[FloatingDialer] Saiu da pausa com sucesso")}catch(e){console.error("[FloatingDialer] Erro ao sair da pausa:",e),z("N�o foi poss�vel sair da pausa.")}},[ke]);t.useEffect(()=>{if(U.current&&je.length<ee){const e=je.length;te(e),U.current.setSelectionRange(e,e)}},[je,ee]),t.useEffect(()=>{if(c)return;if(!R)return;const e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;const t=e.key;if("Backspace"===t)return e.preventDefault(),void et();if("Delete"===t)return e.preventDefault(),void Qe();if("Enter"===t)return void(Ue&&(e.preventDefault(),tt()));const n="NumpadEnter"===t?null:t;if(n&&["0","1","2","3","4","5","6","7","8","9","#","*","+"].includes(n))return e.preventDefault(),void Ze(n);if(t.startsWith("Numpad")){const n=t.replace("Numpad","");if("Add"===n)return e.preventDefault(),void Ze("+");if("Multiply"===n)return e.preventDefault(),void Ze("*");/^[0-9]$/.test(n)&&(e.preventDefault(),Ze(n))}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[c,R,et,Qe,Ze,tt,Ue]);const it=t.useCallback(async()=>{if(S)try{await S()}catch(e){console.error("Erro ao encerrar chamada",e),B("Falha ao encerrar chamada.")}},[S]),ot=t.useCallback(async()=>{if(E)try{await E()}catch(e){console.error("Erro ao atender chamada",e),B("Nao foi possivel atender.")}},[E]),at=t.useCallback(async()=>{if(N)try{await N()}catch(e){console.error("Erro ao rejeitar chamada",e),B("Nao foi possivel rejeitar.")}},[N]),dt=t.useCallback(async()=>{if(("success"===K?b:x).length)if(X)if("function"==typeof C)try{V(!0),W(null),await Promise.resolve(C({result:K,qualificationId:X}))}catch(e){console.error("Erro ao finalizar pos-chamada",e),W("Falha ao finalizar atendimento. Tente novamente.")}finally{V(!1)}else W("Nao foi possivel enviar a qualificacao.");else W("Selecione uma qualificacao para finalizar.");else W("Nenhuma qualificacao configurada para este resultado.")},[K,x,C,X,b]),st=t.useCallback(()=>{P(!0)},[]),lt=t.useCallback(e=>{const t=e.relatedTarget;D.current&&t&&D.current.contains(t)||P(!1)},[]),ut=t.useCallback(e=>{e.preventDefault();const t=e.clipboardData.getData("text");if(!t)return;const n=u$(t);i(n),te(n.length),setTimeout(()=>{U.current&&(U.current.focus(),U.current.setSelectionRange(n.length,n.length))},0)},[i]),ct=t.useCallback(e=>{const t=e.target,n=g$(t.value).slice(0,32);B(null),i(n),te(Math.min(t.selectionStart??n.length,n.length))},[i]),ft=t.useCallback((e,t)=>{if(!t)return void e.preventDefault();const n=e.key;return"Enter"===n?(e.preventDefault(),void tt()):/^[0-9*#]$/.test(n)&&m&&(qe||ze)?(e.preventDefault(),void Ze(n)):void(/^[0-9*#+]$/.test(n)?Je(n):1!==n.length||e.ctrlKey||e.metaKey||e.altKey||e.preventDefault())},[tt,Ze,m,qe,ze,Je]),ht=t.useCallback(e=>{const t=e.target.value;ce(t||null)},[]),pt=t.useCallback(e=>{const t=e.target.value;he(t||null)},[]),mt=t.useCallback(e=>{const t=Number.isFinite(e)?e:0,n=Math.min(Math.max(t,0),1);j(Number((n*(("number"==typeof k?k:0)>1?100:1)).toFixed(2)))},[k,j]),gt=p&&"call"in p?p.call:void 0,$t=z$(m)??z$(gt),vt=Pe||ye,yt=(null==$t?void 0:$t.displayName)??(null==$t?void 0:$t.phoneNumber)??("campaign"===(null==g?void 0:g.type)?g.info.campaignContact.phoneNumber:void 0)??((qe||He)&&vt?vt:void 0),bt=function(e){switch(e){case"starting":return"Conectando";case"idle":return"Disponivel";case"manualCallSetup":return"Preparando";case"manualCallRinging":return"Chamando";case"callRinging":return"Recebida";case"callInProgress":return"Em chamada";case"afterCall":return"Finalizando";case"onBreak":return"Em pausa";case"offline":return"Offline";case"error":return"Erro";default:return"Aguardando"}}(Me),xt=De||je,wt=(null==(l=se.inputs.find(e=>e.deviceId===ue))?void 0:l.label)||"Microfone padrao",_t=(null==(u=se.outputs.find(e=>e.deviceId===fe))?void 0:u.label)||"Saida padrao",Ct="number"==typeof k?k:0,St=Ct>1?100:1,Et=Math.min(Math.max(Ct/St,0),1),Nt=Math.round(100*Et),Tt=O?zc:Et>.65?qc:Bc,At=T?Ac:Oc,Ot=function(e){switch(e){case"idle":return{Icon:_c,badgeClass:Gh`border-green-200 bg-green-50 text-green-700`,dotClass:Gh`bg-green-500`};case"callInProgress":case"manualCallSetup":case"manualCallRinging":case"callRinging":return{Icon:vc,badgeClass:Gh`border-primary/30 bg-primary/10 text-primary`,dotClass:Gh`bg-primary`};case"onBreak":return{Icon:kc,badgeClass:Gh`border-amber-200 bg-amber-50 text-amber-700`,dotClass:Gh`bg-amber-500`};case"offline":case"error":return{Icon:bc,badgeClass:Gh`border-rose-200 bg-rose-50 text-rose-700`,dotClass:Gh`bg-rose-500`};default:return{Icon:jc,badgeClass:Gh`border-slate-200 bg-slate-50 text-slate-600`,dotClass:Gh`bg-slate-500`}}}(Me);if("afterCall"===Me&&!c)return $.jsx(K$,{username:e,result:K,onChangeResult:Y,successQualifications:b,discardQualifications:x,selectedQualificationId:X,onSelectQualification:J,onSubmit:dt,isSubmitting:G,errorMessage:H,onLogout:o,isMobile:Ae,onClose:d});const It=s?Gh`absolute inset-0 z-50 flex items-center justify-center bg-black/50 p-4`:Gh`fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4`,kt=$.jsx("div",{className:It,children:$.jsxs("div",{className:Gh`bg-white rounded-2xl shadow-2xl max-w-md w-full p-6 space-y-4`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between`,children:[$.jsx("h3",{className:Gh`text-lg font-bold text-slate-800`,children:"Selecione uma Pausa"}),$.jsx("button",{type:"button",onClick:()=>{we(!1),Ce(null)},className:Gh`text-slate-400 hover:text-slate-600 transition`,children:$.jsx(Wc,{className:Gh`text-xl`})})]}),_e&&$.jsxs("div",{className:Gh`rounded-lg bg-red-50 border border-red-200 px-3 py-2 flex items-start gap-2`,children:[$.jsx(bc,{className:Gh`text-red-500 shrink-0 mt-0.5`}),$.jsx("p",{className:Gh`text-sm text-red-700`,children:_e})]}),Oe&&0!==Oe.length?$.jsx("div",{className:Gh`space-y-2 max-h-96 overflow-y-auto`,children:Oe.map(e=>$.jsxs("button",{type:"button",onClick:()=>nt(e.id),className:Gh`w-full flex items-center gap-3 rounded-lg border border-slate-200 bg-white px-4 py-3 text-left transition-all hover:border-amber-300 hover:bg-amber-50 hover:shadow-md`,children:[$.jsx(kc,{className:Gh`text-xl text-amber-600 shrink-0`}),$.jsxs("div",{className:Gh`flex-1 min-w-0`,children:[$.jsx("p",{className:Gh`font-semibold text-slate-800 truncate`,children:e.name}),$.jsxs("p",{className:Gh`text-xs text-slate-500`,children:["ID: ",e.id]})]})]},e.id))}):$.jsx("div",{className:Gh`text-center py-8`,children:$.jsx("p",{className:Gh`text-slate-500`,children:"Nenhuma pausa disponivel"})}),$.jsx("button",{type:"button",onClick:()=>{we(!1),Ce(null)},className:Gh`w-full rounded-lg border border-slate-200 bg-slate-50 px-4 py-2 text-sm font-semibold text-slate-600 transition hover:bg-slate-100`,children:"Cancelar"})]})}),jt=xe?s?n.createPortal(kt,s):kt:null,Rt=qe||He;if(Ae&&!c){const e=!q&&(Ge||Ue||Fe),t=xt||je||"Digite ou cole um numero";return $.jsxs("div",{ref:D,tabIndex:0,role:"application","aria-label":"Discador mobile",onFocusCapture:st,onBlurCapture:lt,className:Gh`callix mobile flex min-h-[calc(100vh-3rem)] w-full max-w-full flex-col gap-4 rounded-3xl border border-slate-200 bg-gradient-to-b from-white via-slate-50 to-white p-4 shadow-xl outline-none`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between gap-2`,children:[$.jsxs("button",{type:"button",onClick:()=>{d?d():Qe()},className:Gh`inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-3 py-2 text-sm font-semibold text-slate-700 shadow-sm transition hover:border-slate-300 hover:shadow-md`,children:[$.jsx(xc,{className:Gh`text-base`}),"Voltar"]}),$.jsxs("div",{className:Gh`${Ot.badgeClass} inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[11px] font-bold`,children:[$.jsx(Ot.Icon,{className:Gh`text-xs`}),$.jsx("span",{children:bt})]}),$.jsxs("button",{type:"button",onClick:Fe?rt:()=>we(!0),className:Gh`inline-flex items-center gap-1.5 rounded-full border ${Fe?"border-green-200 bg-green-50 text-green-700":"border-amber-200 bg-amber-50 text-amber-700"} px-3 py-2 text-sm font-semibold transition hover:shadow-md`,children:[Fe?$.jsx(_c,{className:Gh`text-sm`}):$.jsx(kc,{className:Gh`text-sm`}),Fe?"Voltar":"Pausa"]})]}),Rt?$.jsxs("div",{className:Gh`space-y-3`,children:[$.jsx(Y$,{statusLabel:bt,callTarget:yt,durationSeconds:Z}),$.jsx(rm,{})]}):$.jsxs("div",{className:Gh`space-y-2 rounded-2xl border border-slate-200 bg-white px-3 py-3 shadow-inner`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between`,children:[$.jsx("span",{className:Gh`text-[11px] font-semibold uppercase tracking-wide text-slate-500`,children:"Número"}),De&&$.jsx("span",{className:Gh`text-[11px] font-semibold text-primary`,children:De})]}),$.jsxs("div",{className:Gh`flex items-center gap-3`,children:[$.jsx("input",{ref:U,type:"text",inputMode:"tel",value:je,onChange:ct,onClick:e=>te(e.target.selectionStart||0),onKeyUp:e=>te(e.target.selectionStart||0),onSelect:e=>te(e.target.selectionStart||0),onKeyDown:t=>ft(t,e),onPaste:ut,disabled:!e,placeholder:"Digite ou cole um numero",className:Gh`flex-1 bg-transparent text-3xl font-bold text-slate-900 outline-none placeholder:text-slate-300 disabled:opacity-60`}),$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("button",{type:"button",onClick:et,disabled:!e,className:Gh`inline-flex h-10 w-10 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-700 shadow-sm transition hover:border-slate-300 hover:shadow-md disabled:opacity-40`,"aria-label":"Apagar último digito",children:$.jsx(Sc,{className:Gh`text-lg`})}),$.jsx("button",{type:"button",onClick:Qe,disabled:!e,className:Gh`inline-flex h-10 w-10 items-center justify-center rounded-full border border-rose-300 bg-rose-50 text-rose-600 shadow-sm transition hover:border-rose-400 hover:bg-rose-100 hover:shadow-md disabled:opacity-40`,"aria-label":"Limpar número",children:$.jsx(Wc,{className:Gh`text-lg`})})]})]}),$.jsx("p",{className:Gh`text-[11px] font-medium ${Le?"text-primary":"text-slate-500"}`,children:Le?`Será discado: ${Le}`:`Formatação automática: ${t}`})]}),$.jsx("div",{className:Gh`grid grid-cols-3 gap-2`,children:j$.map(t=>$.jsxs("button",{type:"button",onClick:()=>Ze(t.value),disabled:!e,className:Gh`flex h-14 flex-col items-center justify-center rounded-xl border border-slate-200 bg-white text-xl font-bold text-slate-900 shadow-sm transition active:scale-95 hover:border-slate-300 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-40`,children:[$.jsx("span",{children:t.value}),t.detail&&$.jsx("span",{className:Gh`text-[9px] font-semibold uppercase tracking-widest text-slate-400`,children:t.detail})]},t.value))}),$.jsxs("div",{className:Gh`grid grid-cols-3 gap-2`,children:[$.jsxs("button",{type:"button",onClick:()=>A(!T),className:Gh`${T?"border-rose-300 bg-rose-50 text-rose-700":"border-slate-200 bg-white text-slate-700"} flex items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm font-semibold shadow-sm transition hover:border-slate-300 hover:shadow-md`,children:[$.jsx(At,{className:Gh`text-base`}),T?"Mudo":"Áudio"]}),$.jsxs("button",{type:"button",onClick:()=>I(!O),className:Gh`${O?"border-amber-300 bg-amber-50 text-amber-700":"border-slate-200 bg-white text-slate-700"} flex items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm font-semibold shadow-sm transition hover:border-slate-300 hover:shadow-md`,children:[$.jsx(Tt,{className:Gh`text-base`}),O?"Saída off":`${Nt}%`]}),$.jsxs("button",{type:"button",onClick:Fe?rt:()=>we(!0),className:Gh`${Fe?"border-green-300 bg-green-50 text-green-700":"border-amber-300 bg-amber-50 text-amber-700"} flex items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm font-semibold shadow-sm transition hover:shadow-md`,children:[Fe?$.jsx(_c,{className:Gh`text-base`}):$.jsx(kc,{className:Gh`text-base`}),Fe?"Voltar":"Pausa"]})]}),$.jsxs("div",{className:Gh`flex flex-wrap items-center gap-2`,children:[Ue||Fe?$.jsxs("button",{type:"button",onClick:tt,disabled:!Ve,className:Gh`flex flex-1 min-w-[8rem] items-center justify-center gap-2 rounded-xl bg-green-500 px-4 py-3 text-base font-bold text-white shadow-lg transition hover:bg-green-600 hover:shadow-xl disabled:cursor-not-allowed disabled:opacity-60`,children:[$.jsx(Dc,{className:Gh`text-lg`}),"Ligar"]}):Be?$.jsxs($.Fragment,{children:[$.jsxs("button",{type:"button",onClick:at,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-xl bg-rose-500 px-4 py-3 text-sm font-bold text-white shadow-lg transition hover:bg-rose-600`,children:[$.jsx(Pc,{className:Gh`text-base`}),"Recusar"]}),$.jsxs("button",{type:"button",onClick:ot,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-xl bg-green-500 px-4 py-3 text-sm font-bold text-white shadow-lg transition hover:bg-green-600`,children:[$.jsx(Rc,{className:Gh`text-base`}),"Atender"]})]}):$.jsxs("button",{type:"button",onClick:it,className:Gh`flex flex-1 min-w-[8rem] items-center justify-center gap-2 rounded-xl bg-rose-500 px-4 py-3 text-base font-bold text-white shadow-lg transition hover:bg-rose-600 hover:shadow-xl`,children:[$.jsx(Pc,{className:Gh`text-lg`}),"Encerrar"]}),$.jsxs("button",{type:"button",onClick:o,className:Gh`inline-flex items-center justify-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-700 shadow-sm transition hover:border-red-400 hover:text-red-500`,children:[$.jsx(Tc,{className:Gh`text-base`}),"Sair"]})]}),(F||q||pe)&&$.jsxs("div",{className:Gh`space-y-1.5`,children:[F&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-rose-200 bg-rose-50 px-2.5 py-2 text-[11px] text-rose-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:F})]}),q&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-2.5 py-2 text-[11px] text-amber-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:q})]}),pe&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-sky-200 bg-sky-50 px-2.5 py-2 text-[11px] text-sky-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:pe})]})]}),jt]})}if(c){const e=qe||He,t=je.length>0,n=!e&&!t,r=!q&&(Ge||Ue||Fe);if(console.log("[FloatingDialer Mini] Estado:",{miniCanUseKeypad:r,callButtonDisabled:n,hasNumber:t,dialValue:je,isNumberValid:Ve,availabilityError:q,callState:Me,operatorState:null==p?void 0:p.state}),"afterCall"===Me){const e="success"===K?b:x,t=e.length>0;return console.log("[FloatingDialer Mini] ?? TELA DE QUALIFICA��O:",{callState:Me,afterCallResult:K,successQualifications:b.length,discardQualifications:x.length,hasOptions:t,selectedQualificationId:X}),$.jsx("div",{className:["callix","mode","min",Gh`flex w-full max-w-full flex-col gap-1 rounded-xl border border-slate-200 bg-white/95 p-1.5 shadow-sm text-slate-800 overflow-hidden`].join(" "),"data-callix-variant":"min",children:$.jsxs("div",{className:Gh`space-y-1 rounded-lg border border-slate-200 bg-slate-50 px-1.5 py-1 overflow-hidden`,children:[$.jsx("div",{className:Gh`text-center`,children:$.jsx("p",{className:Gh`text-[9px] font-semibold text-slate-700`,children:"Qualifique a chamada"})}),$.jsxs("div",{className:Gh`grid grid-cols-2 gap-0.5`,children:[$.jsx("button",{type:"button",onClick:()=>Y("success"),className:Gh`${"success"===K?"bg-green-500 text-white":"bg-white text-slate-600"} rounded border border-slate-200 px-1 py-0.5 text-[7px] font-semibold transition`,children:"✓ Concluído"}),$.jsx("button",{type:"button",onClick:()=>Y("failure"),className:Gh`${"failure"===K?"bg-rose-500 text-white":"bg-white text-slate-600"} rounded border border-slate-200 px-1 py-0.5 text-[7px] font-semibold transition`,children:"✗ Descartado"})]}),$.jsxs("div",{className:Gh`space-y-0.5`,children:[$.jsx("p",{className:Gh`text-[7px] font-medium text-slate-700 text-center`,children:"Selecione qualificação"}),t?$.jsx("div",{className:Gh`max-h-16 space-y-0.5 overflow-y-auto`,children:e.map(e=>{const t=X===e.id;return $.jsx("button",{type:"button",onClick:()=>J(e.id),className:Gh`${t?"bg-blue-100 border-blue-300 text-blue-800":"border-slate-200 bg-white text-slate-700"} w-full rounded border px-1 py-0.5 text-left transition`,children:$.jsx("p",{className:Gh`text-[7px] font-medium leading-tight truncate`,children:e.name})},e.id)})}):$.jsx("div",{className:Gh`rounded border border-amber-200 bg-amber-50 px-1 py-0.5 text-[7px] text-amber-700 text-center`,children:"Nenhuma qualificação"})]}),H&&$.jsx("p",{className:Gh`text-[7px] text-red-500 text-center`,children:H}),$.jsxs("button",{type:"button",onClick:dt,disabled:!t||!X||G,className:Gh`flex w-full items-center justify-center gap-1 rounded bg-blue-500 px-1.5 py-1 text-[7px] font-bold text-white transition hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-60`,children:[G&&$.jsx("span",{className:Gh`inline-flex h-2 w-2 animate-spin rounded-full border border-white/50 border-t-white`}),"Finalizar"]})]})})}return console.log("[FloatingDialer Mini] ?? Estado da Chamada:",{isCallActive:e,callState:Me,statusLabel:bt,isInCall:qe,isConnecting:He,isRinging:ze,callDurationSeconds:Z,callTarget:yt,statusVisualUsed:e?"GREEN (green)":"statusVisual",timerVisible:e&&Z>0}),$.jsxs("div",{className:["callix","mode","min",Gh`flex w-full max-w-full flex-col gap-3 rounded-2xl border border-slate-200 bg-white/95 p-3 shadow-sm text-slate-800`].join(" "),"data-callix-variant":"min",children:[$.jsx("input",{ref:M,type:"tel",inputMode:"tel",value:je,onChange:e=>i(e.target.value),onPaste:ut,className:Gh`sr-only`,tabIndex:-1,"aria-hidden":"true"}),$.jsxs("div",{className:Gh`flex items-center justify-between gap-2`,children:[$.jsxs("div",{className:Gh`${e?"border-green-200 bg-green-50 text-green-700":Ot.badgeClass} flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase leading-tight`,children:[$.jsx(Ot.Icon,{className:Gh`text-xs`}),$.jsx("span",{children:bt})]}),Fe?$.jsxs("button",{type:"button",onClick:()=>rt(),className:Gh`inline-flex items-center gap-1 rounded-full border border-green-400 bg-green-50 px-2.5 py-1 text-[10px] font-semibold text-green-700 transition hover:bg-green-100`,children:[$.jsx(_c,{className:Gh`text-xs`}),"Voltar"]}):$.jsxs("button",{type:"button",onClick:()=>we(!0),className:Gh`inline-flex items-center gap-1 rounded-full border border-amber-300 bg-amber-50 px-2.5 py-1 text-[10px] font-semibold text-amber-700 transition hover:bg-amber-100`,children:[$.jsx(kc,{className:Gh`text-xs`}),"Pausa"]})]}),e?$.jsx("div",{className:Gh`rounded-xl border border-green-200 bg-gradient-to-br from-green-50 to-white px-3 py-2`,children:$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("div",{className:Gh`flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-green-500 ${Z>0?"animate-pulse":""}`,children:$.jsx(jc,{className:Gh`text-xs text-white`})}),$.jsxs("div",{className:Gh`flex min-w-0 flex-1 flex-col gap-0.5`,children:[$.jsx("span",{className:Gh`truncate font-mono text-sm font-bold text-slate-800`,children:(null==yt?void 0:yt.replace(/^\+55/,""))||"Conectando..."}),$.jsx("span",{className:Gh`text-[9px] font-medium uppercase tracking-wider text-green-600`,children:bt})]}),Z>0&&$.jsxs("div",{className:Gh`flex shrink-0 items-center gap-1 rounded-lg bg-green-500 px-2 py-1`,children:[$.jsx(Cc,{className:Gh`text-[10px] text-white`}),$.jsx("span",{className:Gh`tabular-nums text-xs font-bold text-white`,children:V$(Z)})]})]})}):$.jsxs("div",{className:Gh`space-y-1 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2`,children:[$.jsx("span",{className:Gh`text-[10px] font-semibold uppercase tracking-wide text-slate-500`,children:"Numero"}),$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("input",{ref:U,type:"text",inputMode:"tel",value:je,onChange:ct,onClick:e=>{te(e.target.selectionStart||0)},onKeyUp:e=>{te(e.target.selectionStart||0)},onSelect:e=>{te(e.target.selectionStart||0)},onKeyDown:e=>ft(e,r),onPaste:ut,disabled:!r,placeholder:"Digite ou cole um numero",className:Gh`flex-1 bg-transparent text-sm font-semibold text-slate-800 outline-none placeholder:text-slate-400 placeholder:text-xs placeholder:font-normal disabled:opacity-60 disabled:cursor-not-allowed`}),$.jsx("button",{type:"button",onClick:et,disabled:!r,className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-lg border border-slate-300 bg-white text-slate-600 transition hover:border-slate-400 hover:text-slate-800 disabled:opacity-40 disabled:cursor-not-allowed`,"aria-label":"Apagar ultimo digito",children:$.jsx(Sc,{className:Gh`text-base`})}),$.jsx("button",{type:"button",onClick:Qe,disabled:!r,className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-lg border border-rose-300 bg-rose-50 text-rose-600 transition hover:border-rose-400 hover:bg-rose-100 disabled:opacity-40 disabled:cursor-not-allowed`,"aria-label":"Limpar numero",children:$.jsx(Wc,{className:Gh`text-sm`})})]}),Le&&$.jsxs("p",{className:Gh`text-[10px] font-medium text-primary`,children:["Será discado: ",Le]})]}),$.jsx("div",{className:Gh`grid grid-cols-3 gap-2`,children:j$.map(e=>$.jsxs("button",{type:"button",onClick:()=>Ze(e.value),disabled:!r,className:Gh`flex h-12 flex-col items-center justify-center rounded-lg border border-slate-200 bg-white text-base font-semibold text-slate-800 shadow-sm transition active:scale-95 hover:border-slate-300 hover:shadow-md disabled:cursor-not-allowed disabled:opacity-40`,children:[$.jsx("span",{children:e.value}),e.detail&&$.jsx("span",{className:Gh`text-[8px] font-semibold uppercase tracking-widest text-slate-400`,children:e.detail})]},e.value))}),$.jsxs("button",{type:"button",onClick:()=>{e?it():tt()},disabled:n,className:Gh`${e?"bg-rose-500 hover:bg-rose-600":"bg-green-500 hover:bg-green-600"} flex h-11 w-full items-center justify-center gap-2 rounded-xl text-sm font-bold text-white shadow-md transition disabled:cursor-not-allowed disabled:opacity-60`,children:[$.jsx(Dc,{className:Gh`text-base`}),e?"Encerrar":"Ligar"]}),(F||q||pe)&&$.jsxs("div",{className:Gh`rounded-lg border border-rose-200 bg-rose-50 px-2.5 py-2 text-[11px] text-rose-700`,children:[$.jsx(bc,{className:Gh`mr-1 inline text-xs`}),F||q||pe]}),jt]})}return $.jsxs("div",{ref:D,tabIndex:0,role:"application","aria-label":"Discador manual",onFocusCapture:st,onBlurCapture:lt,className:Gh`space-y-3 rounded-2xl outline-none`,children:[$.jsxs("div",{className:Gh`flex items-center justify-between gap-2`,children:[$.jsxs("div",{className:Gh`flex items-center gap-2 min-w-0 flex-1`,children:[$.jsx("span",{className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10 text-primary shrink-0`,children:$.jsx(Fc,{className:Gh`text-sm`})}),$.jsxs("div",{className:Gh`min-w-0 flex-1`,children:[$.jsx("p",{className:Gh`text-sm font-bold text-slate-800 truncate`,children:e}),$.jsx("p",{className:Gh`text-[9px] uppercase tracking-wide text-slate-500 font-medium`,children:"Operador"})]})]}),$.jsxs("div",{className:Gh`flex items-center gap-2 shrink-0`,children:[Ue&&$.jsxs("button",{type:"button",onClick:()=>we(!0),className:Gh`inline-flex items-center gap-1 rounded-lg border border-amber-300 bg-amber-50 px-2 py-1 text-[10px] font-bold text-amber-700 transition-all hover:bg-amber-100 hover:shadow-sm`,"aria-label":"Entrar em pausa",children:[$.jsx(kc,{className:Gh`text-xs`}),$.jsx("span",{children:"Pausa"})]}),Fe&&$.jsxs("button",{type:"button",onClick:rt,className:Gh`inline-flex items-center gap-1 rounded-lg border border-green-300 bg-green-50 px-2 py-1 text-[10px] font-bold text-green-700 transition-all hover:bg-green-100 hover:shadow-sm`,"aria-label":"Sair da pausa",children:[$.jsx(_c,{className:Gh`text-xs`}),$.jsx("span",{children:"Voltar"})]}),$.jsxs("div",{className:Gh`${Ot.badgeClass} inline-flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[10px] font-bold ${qe?"animate-pulse":""}`,children:[$.jsx(Ot.Icon,{className:Gh`text-xs`}),$.jsx("span",{children:bt}),$.jsx("span",{className:Gh`${Ot.dotClass} inline-flex h-1.5 w-1.5 rounded-full`,"aria-hidden":!0})]})]})]}),Rt&&$.jsxs($.Fragment,{children:[$.jsx(Y$,{statusLabel:bt,callTarget:yt,durationSeconds:Z}),$.jsx(rm,{})]}),!Rt&&$.jsxs("div",{ref:L,className:Gh`${R?"ring-2 ring-primary/50 shadow-lg":"shadow-sm"} relative overflow-hidden rounded-xl border border-slate-200 bg-gradient-to-br from-white to-slate-50 px-4 py-3 transition-all hover:shadow-md`,onClick:()=>{var e;return null==(e=D.current)?void 0:e.focus()},children:[$.jsx("input",{ref:M,id:"dialer-number",type:"tel",inputMode:"tel",value:je,onChange:e=>i(e.target.value),onPaste:ut,className:Gh`sr-only`,tabIndex:-1,"aria-hidden":"true"}),$.jsxs("div",{className:Gh`flex items-center justify-between mb-2`,children:[$.jsxs("div",{className:Gh`flex items-center gap-1.5`,children:[$.jsx(Dc,{className:Gh`text-sm text-primary`}),$.jsx("span",{className:Gh`text-[10px] uppercase tracking-wider text-slate-500 font-semibold`,children:"N�mero"})]}),R&&$.jsxs("span",{className:Gh`inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[9px] font-semibold text-primary`,children:[$.jsx("span",{className:Gh`inline-block h-1.5 w-1.5 rounded-full bg-primary animate-pulse`}),"Ativo"]})]}),$.jsx("div",{className:Gh`min-h-[2.5rem] flex items-center`,children:$.jsx("p",{className:Gh`text-2xl font-semibold tabular-nums tracking-tight text-slate-800 flex-1 truncate`,children:xt||$.jsx("span",{className:Gh`text-slate-400 text-lg font-normal`,children:"Digite um n�mero"})})}),Le&&$.jsxs("p",{className:Gh`mt-1 text-[11px] font-medium text-primary`,children:["Será discado: ",Le]})]}),$.jsx("div",{className:Gh`grid grid-cols-3 gap-2`,children:j$.map(e=>$.jsxs("button",{type:"button",onClick:()=>Ze(e.value),disabled:!Ge,className:Gh`relative flex h-14 flex-col items-center justify-center rounded-lg border border-slate-200 bg-gradient-to-b from-white to-slate-50 text-lg font-bold text-slate-800 shadow-sm transition-all active:scale-95 hover:border-slate-300 hover:shadow-md outline-none disabled:cursor-not-allowed disabled:opacity-40`,children:[$.jsx("span",{children:e.value}),e.detail&&$.jsx("span",{className:Gh`text-[8px] font-semibold tracking-widest text-slate-400 uppercase`,children:e.detail})]},e.value))}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsxs("div",{className:Gh`flex flex-wrap items-center gap-2`,children:[Ue||Fe?$.jsxs("button",{type:"button",onClick:tt,disabled:!Ve,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-green-500 px-4 py-2.5 text-sm font-bold text-white shadow-lg transition-all hover:bg-green-600 hover:shadow-xl disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:shadow-lg`,children:[$.jsx(Dc,{className:Gh`text-base`}),"Ligar"]}):Be?$.jsxs($.Fragment,{children:[$.jsxs("button",{type:"button",onClick:at,className:Gh`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-rose-500 px-3 py-2 text-xs font-bold text-white shadow-md transition-all hover:bg-rose-600 hover:shadow-lg`,children:[$.jsx(Pc,{className:Gh`text-sm`}),"Recusar"]}),$.jsxs("button",{type:"button",onClick:ot,className:Gh`flex flex-1 min-w-[6rem] items-center justify-center gap-1.5 rounded-lg bg-green-500 px-3 py-2 text-xs font-bold text-white shadow-md transition-all hover:bg-green-600 hover:shadow-lg`,children:[$.jsx(Rc,{className:Gh`text-sm`}),"Atender"]})]}):$.jsxs("button",{type:"button",onClick:it,className:Gh`flex flex-1 min-w-[7rem] items-center justify-center gap-2 rounded-lg bg-rose-500 px-4 py-2.5 text-sm font-bold text-white shadow-lg transition-all hover:bg-rose-600 hover:shadow-xl`,children:[$.jsx(Pc,{className:Gh`text-base`}),"Encerrar"]}),$.jsxs("button",{type:"button",onClick:()=>A(!T),className:Gh`${T?"border-rose-300 bg-rose-50 text-rose-600":"border-slate-300 bg-white text-slate-700"} flex h-9 min-w-[4.5rem] flex-1 items-center justify-center gap-1 rounded-lg border px-2 py-1.5 text-[10px] font-bold transition-all hover:border-slate-400 hover:shadow-md disabled:cursor-not-allowed`,children:[$.jsx(At,{className:Gh`text-xs`}),T?"Mudo":"Mic"]}),$.jsxs("button",{type:"button",onClick:()=>I(!O),className:Gh`${O?"border-amber-300 bg-amber-50 text-amber-700":"border-slate-300 bg-white text-slate-700"} flex h-9 min-w-[4.5rem] flex-1 items-center justify-center gap-1 rounded-lg border px-2 py-1.5 text-[10px] font-bold transition-all hover:border-slate-400 hover:shadow-md`,children:[$.jsx(Tt,{className:Gh`text-xs`}),O?"Mudo":`${Nt}%`]}),$.jsx("button",{type:"button",onClick:et,className:Gh`flex h-9 w-9 items-center justify-center rounded-lg border border-slate-300 bg-white text-slate-700 transition-all hover:border-slate-400 hover:shadow-md`,"aria-label":"Apagar ultimo digito",children:$.jsx(Sc,{className:Gh`text-base`})}),$.jsx("button",{type:"button",onClick:Qe,className:Gh`flex h-9 w-9 items-center justify-center rounded-lg border border-rose-300 bg-rose-50 text-rose-700 font-bold text-xs transition-all hover:border-rose-400 hover:bg-rose-100 hover:shadow-md active:bg-rose-200`,"aria-label":"Limpar numero",children:"C"})]}),$.jsxs("div",{className:Gh`rounded-xl border border-slate-200 bg-white/80 p-3 shadow-sm`,children:[$.jsxs("div",{className:Gh`flex flex-wrap items-center justify-between gap-2`,children:[$.jsxs("div",{children:[$.jsx("p",{className:Gh`text-[10px] uppercase tracking-wide text-slate-500`,children:"Volume"}),$.jsxs("p",{className:Gh`text-sm font-semibold text-slate-800`,children:["Sa�da ",Nt,"%"]})]}),$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx("button",{type:"button",onClick:()=>mt((k??0)-.05),className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 transition hover:border-primary/60 hover:text-primary`,"aria-label":"Diminuir volume",children:$.jsx(Ic,{className:Gh`text-sm`})}),$.jsx("input",{type:"range",min:0,max:1,step:.01,value:Number.isFinite(k)?k:0,onChange:e=>mt(parseFloat(e.target.value)),className:Gh`h-1 w-full max-w-full cursor-pointer appearance-none rounded-full bg-slate-200 accent-primary`,"aria-label":"Volume de saida"}),$.jsx("button",{type:"button",onClick:()=>mt((k??0)+.05),className:Gh`inline-flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 transition hover:border-primary/60 hover:text-primary`,"aria-label":"Aumentar volume",children:$.jsx(Lc,{className:Gh`text-sm`})})]})]}),$.jsxs("div",{className:Gh`mt-2 flex flex-wrap items-center gap-2 text-xs text-slate-600`,children:[$.jsxs("div",{className:Gh`flex items-center gap-1.5`,children:[$.jsx(Oc,{className:Gh`text-sm text-primary`}),$.jsx("span",{className:Gh`truncate max-w-full`,children:wt})]}),$.jsxs("div",{className:Gh`flex items-center gap-1.5`,children:[$.jsx(Nc,{className:Gh`text-sm text-primary`}),$.jsx("span",{className:Gh`truncate max-w-full`,children:_t})]}),(se.inputs.length>0||se.outputs.length>0)&&$.jsxs("button",{type:"button",onClick:()=>$e(e=>!e),className:Gh`inline-flex items-center gap-1 rounded-md border border-slate-300 bg-white px-2 py-0.5 text-[9px] font-bold text-slate-700 transition-all hover:border-slate-400 hover:shadow-sm`,children:[$.jsx(Mc,{className:Gh`text-[10px]`}),ge?"Ocultar":"Config"]})]}),ge&&$.jsxs("div",{className:Gh`mt-3 grid gap-2`,children:[$.jsxs("label",{className:Gh`space-y-1 text-xs text-slate-700`,children:[$.jsxs("span",{className:Gh`flex items-center gap-1.5 font-semibold`,children:[$.jsx(Oc,{className:Gh`text-sm text-primary`}),"Entrada"]}),$.jsxs("select",{className:Gh`w-full rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs shadow-inner focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40`,value:ue??"",onChange:ht,children:[0===se.inputs.length&&$.jsx("option",{value:"",children:"Padr�o"}),se.inputs.map(e=>$.jsx("option",{value:e.deviceId,children:e.label||"Padr�o"},e.deviceId||e.label))]})]}),$.jsxs("label",{className:Gh`space-y-1 text-xs text-slate-700`,children:[$.jsxs("span",{className:Gh`flex items-center gap-1.5 font-semibold`,children:[$.jsx(Nc,{className:Gh`text-sm text-primary`}),"Sa�da"]}),$.jsxs("select",{className:Gh`w-full rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs shadow-inner focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/40`,value:fe??"",onChange:pt,children:[0===se.outputs.length&&$.jsx("option",{value:"",children:"Padr�o"}),se.outputs.map(e=>$.jsx("option",{value:e.deviceId,children:e.label||"Padr�o"},e.deviceId||e.label))]})]})]})]})]}),(F||q||pe)&&$.jsxs("div",{className:Gh`space-y-1.5`,children:[F&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-rose-200 bg-rose-50 px-2.5 py-2 text-[11px] text-rose-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:F})]}),q&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-2.5 py-2 text-[11px] text-amber-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:q})]}),pe&&$.jsxs("div",{className:Gh`flex items-start gap-2 rounded-xl border border-sky-200 bg-sky-50 px-2.5 py-2 text-[11px] text-sky-700`,children:[$.jsx(bc,{className:Gh`mt-0.5 text-xs`}),$.jsx("span",{children:pe})]})]}),jt,$.jsxs("button",{type:"button",onClick:o,className:Gh`flex w-full items-center justify-center gap-2 rounded-2xl border border-slate-200 bg-white px-4 py-3 text-sm font-semibold text-slate-600 transition hover:border-red-400 hover:text-red-500`,children:[$.jsx(Tc,{className:Gh`text-base`}),"Sair"]})]})}function B$(e,t){const n=function(e){return e&&"object"==typeof e?e:null}(e);if(n&&t in n)return n[t]}function q$(e,t){const n=B$(e,t);return"function"==typeof n?n:void 0}function z$(e){const t=B$(e,"counterpart");return function(e){if(!e||"object"!=typeof e)return!1;const t=e,n=t.displayName,r=t.phoneNumber;return!(null!=n&&"string"!=typeof n||null!=r&&"string"!=typeof r)}(t)?t:null}function H$(e,t){const n=e[t];if("number"==typeof n&&Number.isFinite(n))return n;if("string"==typeof n){const e=Number(n);if(Number.isFinite(e))return e}return null}const W$={1:[1209,697],2:[1336,697],3:[1477,697],4:[1209,770],5:[1336,770],6:[1477,770],7:[1209,852],8:[1336,852],9:[1477,852],"*":[1209,941],0:[1336,941],"#":[1477,941]};function G$(e,t,n){return Number.isFinite(e)?n<t?t:Math.min(Math.max(e,t),n):t}function V$(e){const t=Math.max(0,Math.floor(e));return`${Math.floor(t/60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`}function K$({username:e,result:t,onChangeResult:n,successQualifications:r,discardQualifications:i,selectedQualificationId:o,onSelectQualification:a,onSubmit:d,isSubmitting:s,errorMessage:l,onLogout:u,isMobile:c=!1,onClose:f}){const h="success"===t?r:i,p=h.length>0;return $.jsxs("div",{className:Gh`${c?"min-h-[70vh] rounded-3xl border border-slate-200 bg-white p-4 shadow-xl":"space-y-5"}`,children:[$.jsxs("div",{className:Gh`mb-3 flex items-center justify-between`,children:[$.jsx("p",{className:Gh`text-xs uppercase tracking-wide text-slate-500`,children:"Logado como"}),f&&$.jsxs("button",{type:"button",onClick:f,className:Gh`inline-flex items-center gap-1 rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-semibold text-slate-600 transition hover:border-slate-300`,children:[$.jsx(xc,{className:Gh`text-xs`}),"Voltar"]})]}),$.jsx("div",{className:Gh`${c?"space-y-3":"space-y-1"}`,children:$.jsx("p",{className:Gh`text-sm font-semibold text-slate-800`,children:e})}),$.jsxs("div",{className:Gh`space-y-4 rounded-2xl border border-slate-200 bg-slate-50 px-4 py-5 ${c?"shadow-inner":""}`,children:[$.jsxs("div",{children:[$.jsx("p",{className:Gh`text-sm font-semibold text-slate-700`,children:"Qualifique a chamada"}),$.jsx("p",{className:Gh`text-xs text-slate-500`,children:"Esta etapa e obrigatoria para registrar o desfecho do atendimento."})]}),$.jsxs("div",{className:Gh`${c?"grid grid-cols-1 gap-2":"grid grid-cols-2 gap-2"}`,children:[$.jsx("button",{type:"button",onClick:()=>n("success"),className:Gh`${"success"===t?"bg-green-500 text-white shadow-lg":"bg-white text-slate-600"} rounded-xl border border-slate-200 px-3 py-3 text-sm font-semibold transition hover:border-green-400`,children:"Atendimento concluido"}),$.jsx("button",{type:"button",onClick:()=>n("failure"),className:Gh`${"failure"===t?"bg-rose-500 text-white shadow-lg":"bg-white text-slate-600"} rounded-xl border border-slate-200 px-3 py-3 text-sm font-semibold transition hover:border-rose-400`,children:"Atendimento descartado"})]}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsx("p",{className:Gh`text-sm font-medium text-slate-700`,children:"Selecione uma qualificacao"}),p?$.jsx("div",{className:Gh`${c?"max-h-64":"max-h-52"} space-y-2 overflow-y-auto pr-1`,children:h.map(e=>{const t=o===e.id;return $.jsx("button",{type:"button",onClick:()=>a(e.id),className:Gh`${t?"ring-2 ring-primary bg-primary/5 border-primary":"border-slate-200 bg-white"} w-full rounded-xl border px-3 py-3 text-left text-sm font-semibold transition hover:border-primary`,children:$.jsx("p",{className:Gh`text-sm font-semibold text-slate-800`,children:e.name})},e.id)})}):$.jsx("div",{className:Gh`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700`,children:"Nenhuma qualificacao disponivel para este tipo de resultado."})]}),l&&$.jsx("p",{className:Gh`text-xs text-red-500`,children:l}),$.jsxs("button",{type:"button",onClick:d,disabled:!p||!o||s,className:Gh`flex w-full items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-lg transition hover:bg-primaryDark disabled:cursor-not-allowed disabled:opacity-60`,children:[s&&$.jsx("span",{className:Gh`inline-flex h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white`}),"Finalizar atendimento"]})]}),$.jsxs("button",{type:"button",onClick:u,className:Gh`flex w-full items-center justify-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-semibold text-slate-600 transition hover:border-red-400 hover:text-red-500`,children:[$.jsx(Tc,{className:Gh`text-base`}),"Sair"]})]})}function Y$({statusLabel:e,callTarget:t,durationSeconds:n}){const r=n>0?V$(n):"00:00",i=(null==t?void 0:t.replace(/^\+55/,""))||"Conectando...";return $.jsx("div",{className:Gh`rounded-lg border border-green-200 bg-gradient-to-br from-green-50 to-white px-3 py-2`,children:$.jsxs("div",{className:Gh`flex items-center justify-between gap-3`,children:[$.jsxs("div",{className:Gh`flex items-center gap-2.5 min-w-0 flex-1`,children:[$.jsx("div",{className:Gh`flex items-center justify-center w-8 h-8 rounded-full bg-green-500 shrink-0 ${n>0?"animate-pulse":""}`,children:$.jsx(jc,{className:Gh`text-sm text-white`})}),$.jsxs("div",{className:Gh`flex flex-col gap-0.5 min-w-0 flex-1`,children:[$.jsx("span",{className:Gh`text-base font-bold text-slate-800 truncate font-mono`,children:i}),$.jsx("span",{className:Gh`text-[9px] font-medium text-green-600 uppercase tracking-wider`,children:e})]})]}),n>0&&$.jsxs("div",{className:Gh`flex items-center gap-1.5 bg-green-500 rounded-lg px-2.5 py-1.5 shrink-0`,children:[$.jsx(Cc,{className:Gh`text-xs text-white`}),$.jsx("span",{className:Gh`text-sm font-bold tabular-nums text-white`,children:r})]})]})})}const X$=/[0-9*#]/;function J$(e){return(e??"").replace(/[^0-9*#]/g,"")}function Z$(e,t){if(t<=0){const t=e.search(X$);return t<0?e.length:t}let n=0;for(let r=0;r<e.length;r++)if(X$.test(e[r])&&(n++,n===t))return r+1;return e.length}const Q$=t.forwardRef(function({value:e,onChange:n,onSubmit:r,onKeyDown:i,inputMode:o="tel",autoComplete:a="off",...d},s){const l=t.useRef(null),u=t.useRef(null),c=c$(e),f=t.useRef(c),h=t.useCallback(e=>{l.current=e,"function"==typeof s?s(e):s&&(s.current=e)},[s]);t.useLayoutEffect(()=>{f.current=c;const e=l.current,t=u.current;if(!e||null===t)return;if(u.current=null,"undefined"!=typeof document&&document.activeElement!==e)return;const n=Z$(c,t);try{e.setSelectionRange(n,n)}catch{}},[c]);const p=t.useCallback(e=>{var t;const r=e.target,i=r.value,o=r.selectionStart??i.length,a=f.current,d=J$(a),s=(null==(t=e.nativeEvent)?void 0:t.inputType)??"";let l=function(e){let t=0;for(const n of e)X$.test(n)&&t++;return t}(i.slice(0,o)),c=J$(i);if(c===d&&i.length<a.length&&("deleteContentForward"===s?l<c.length&&(c=c.slice(0,l)+c.slice(l+1)):l>0&&(c=c.slice(0,l-1)+c.slice(l),l-=1)),c===d){r.value=a;const e=Z$(a,l);try{r.setSelectionRange(e,e)}catch{}return}u.current=l,n(c)},[n]),m=t.useCallback(e=>{var t;const r=(null==(t=e.clipboardData)?void 0:t.getData("text"))??"";if(!r)return;e.preventDefault();const i=u$(r);i&&(u.current=i.length,n(i))},[n]),g=t.useCallback(e=>{null==i||i(e),e.defaultPrevented||"Enter"===e.key&&r&&(e.preventDefault(),r())},[i,r]);return $.jsx("input",{ref:h,type:"tel",inputMode:o,autoComplete:a,value:c,onChange:p,onPaste:m,onKeyDown:g,...d})});function ev(e,t="America/Sao_Paulo"){const n=function(e,t){const n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}),r={};for(const o of n.formatToParts(e))"literal"!==o.type&&(r[o.type]=o.value);const i="24"===r.hour?"00":r.hour;return{year:r.year,month:r.month,day:r.day,hour:i,minute:r.minute,second:r.second}}(e,t);return`${n.year}-${n.month}-${n.day}`}function tv(e,t,n=new Date){if(e===ev(n))return"Hoje";return e===ev(new Date(n.getTime()-864e5))?"Ontem":t}function nv(e){const t=r$(e.phoneNumber);return!t.startsWith("55")||12!==t.length&&13!==t.length?t:t.slice(2)}function rv(e){return(e??"").toString().normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/\s+/g," ").trim()}function iv(e){const t=(e??"").trim();if(!t)return{kind:"empty",digits:"",text:""};const n=r$(t),r=t.replace(/[\d\s()+\-.]/g,"");return n.length>=3&&0===r.length?{kind:"phone",digits:n,text:rv(t)}:{kind:"text",digits:n,text:rv(t)}}function ov(e,t){if("empty"===t.kind)return!0;if("phone"===t.kind)return nv(e).includes(t.digits)||r$(e.phoneNumber).includes(t.digits)||void 0!==e.protocol&&String(e.protocol).includes(t.digits);const n=function(e){const t=[e.formattedPhone,nv(e),e.callTypeLabel,e.campaignName,e.contactLabel,e.qualificationName,e.failureCauseLabel,e.hangupCauseLabel,e.formattedDate,e.note,void 0!==e.protocol?String(e.protocol):void 0];if(e.fields)for(const n of Object.values(e.fields))null!=n&&t.push(String(n));return rv(t.filter(Boolean).join(" | "))}(e);return t.text.split(" ").filter(Boolean).every(e=>n.includes(e))}const av=1,dv=2,sv=3,lv={manual:"Chamadas manuais",campaign:"Chamadas de campanha"},uv={audio:"Áudios (zip)",data:"Dados (planilha)"},cv=e=>new Intl.DateTimeFormat("en-CA",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).format(e);function fv(e){const t=`${e.kind?lv[e.kind]:"Exportação"} · ${e.content?uv[e.content].toLowerCase():""}`.replace(/ · $/,"");return e.status===sv?`${t}: pronta${e.fileSize?` (${n=e.fileSize,!n||n<=0?"":n<1048576?`${Math.max(1,Math.round(n/1024))} KB`:`${(n/1024/1024).toFixed(1)} MB`})`:""}`:e.status===dv?`${t}: processando${e.progress?` ${e.progress}%`:""}`:e.status===av?`${t}: na fila do Callix`:`${t}: ${e.statusLabel}`;var n}async function hv(e,t){const n=await e.json().catch(()=>null);return"string"==typeof(null==n?void 0:n.error)&&n.error?n.error:t}async function pv(e,t,n){const r=await fetch(`${e}/api/call-exports/${encodeURIComponent(n)}/download`,{method:"GET",headers:t,credentials:"omit"}),i=await r.json().catch(()=>null);return r.ok&&(null==i?void 0:i.url)&&i.export?{state:"ready",url:i.url,filename:i.filename??null,fileSize:i.fileSize??null,export:i.export}:409===r.status&&(null==i?void 0:i.export)?i.export.status<=sv?{state:"pending",export:i.export}:{state:"failed",message:i.error??`Exportação ${i.export.statusLabel}`,export:i.export}:{state:"failed",message:(null==i?void 0:i.error)??`Não foi possível consultar a exportação (${r.status})`,export:null==i?void 0:i.export}}function mv({apiBaseUrl:e,getAuthHeaders:n,onClose:r,pollIntervalMs:i=5e3}){const[o]=t.useState(()=>function(e=new Date){return{from:cv(new Date(e.getTime()-2592e6)),to:cv(e)}}()),[a,d]=t.useState("manual"),[s,l]=t.useState("audio"),[u,c]=t.useState(o.from),[f,h]=t.useState(o.to),[p,m]=t.useState(!1),[g,v]=t.useState(null),[y,b]=t.useState(null),[x,w]=t.useState(null),[_,C]=t.useState([]),[S,E]=t.useState(null),N=t.useRef(!0);t.useEffect(()=>(N.current=!0,()=>{N.current=!1}),[]),t.useEffect(()=>{let t=!0;return async function(e,t){const n=await fetch(`${e}/api/call-exports`,{method:"GET",headers:t,credentials:"omit"});if(!n.ok)throw new Error(await hv(n,`Não foi possível listar as exportações (${n.status})`));return(await n.json()).items??[]}(e,n()).then(e=>{t&&C(e.slice(0,3))}).catch(()=>{}),()=>{t=!1}},[e,n]),t.useEffect(()=>{if(!y||"ready"===(null==x?void 0:x.state)||"failed"===(null==x?void 0:x.state))return;let t=null,r=!0;const o=async()=>{const a=await pv(e,n(),y.id);r&&(w(a),"pending"===a.state?(b(a.export),t=setTimeout(o,i)):"ready"===a.state&&(b(a.export),C(e=>[a.export,...e.filter(e=>e.id!==a.export.id)].slice(0,3))))};return o(),()=>{r=!1,t&&clearTimeout(t)}},[null==y?void 0:y.id,e,n,i]);const T=t.useCallback(async()=>{if(v(null),u&&f)if(f<u)v("O fim do período vem antes do início.");else{m(!0),w(null);try{const t=await async function(e,t,n){const r=await fetch(`${e}/api/call-exports`,{method:"POST",headers:{"Content-Type":"application/json",...t},credentials:"omit",body:JSON.stringify(n)});if(!r.ok)throw new Error(await hv(r,`Não foi possível pedir a exportação (${r.status})`));return(await r.json()).export}(e,n(),{kind:a,content:s,from:u,to:f});if(!N.current)return;b(t),C(e=>[t,...e.filter(e=>e.id!==t.id)].slice(0,3))}catch(t){N.current&&v(t instanceof Error?t.message:"Não foi possível pedir a exportação.")}finally{N.current&&m(!1)}}else v("Informe o período.")},[e,n,a,s,u,f]),A=t.useCallback(async t=>{E(t.id),v(null);try{const r=await pv(e,n(),t.id);if(!N.current)return;"ready"===r.state?window.open(r.url,"_blank","noopener,noreferrer"):v("pending"===r.state?fv(r.export):r.message)}finally{N.current&&E(null)}},[e,n]);return $.jsxs("div",{className:"export-panel",role:"region","aria-label":"Exportar histórico",children:[$.jsxs("div",{className:"export-panel-header",children:[$.jsx("span",{className:"export-panel-title",children:"Exportar histórico"}),$.jsx("button",{type:"button",className:"export-panel-close",onClick:r,"aria-label":"Fechar exportação",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})})]}),$.jsxs("div",{className:"export-panel-form",children:[$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"Tipo"}),$.jsx("select",{value:a,onChange:e=>d(e.target.value),"aria-label":"Tipo de chamada",children:Object.keys(lv).map(e=>$.jsx("option",{value:e,children:lv[e]},e))})]}),$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"Conteúdo"}),$.jsx("select",{value:s,onChange:e=>l(e.target.value),"aria-label":"Conteúdo",children:Object.keys(uv).map(e=>$.jsx("option",{value:e,children:uv[e]},e))})]}),$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"De"}),$.jsx("input",{type:"date",value:u,max:f,onChange:e=>c(e.target.value),"aria-label":"Início do período"})]}),$.jsxs("label",{className:"export-panel-field",children:[$.jsx("span",{children:"Até"}),$.jsx("input",{type:"date",value:f,min:u,onChange:e=>h(e.target.value),"aria-label":"Fim do período"})]}),$.jsx("button",{type:"button",className:"retry-btn export-panel-submit",onClick:()=>{T()},disabled:p,children:p?"Pedindo...":"Exportar"})]}),g&&$.jsx("div",{className:"export-panel-error",role:"alert",children:g}),y&&$.jsxs("div",{className:"export-panel-job",role:"status",children:[$.jsx("span",{children:"failed"===(null==x?void 0:x.state)?x.message:fv(y)}),"ready"===(null==x?void 0:x.state)&&$.jsxs("a",{className:"export-panel-link",href:x.url,target:"_blank",rel:"noopener noreferrer",children:[$.jsx("i",{className:"fas fa-download","aria-hidden":"true"})," Baixar ",x.filename??"arquivo"]})]}),_.length>0&&$.jsx("ul",{className:"export-panel-recent","aria-label":"Exportações recentes",children:_.map(e=>$.jsxs("li",{children:[$.jsx("span",{children:fv(e)}),e.status===sv&&$.jsx("button",{type:"button",className:"export-panel-recent-btn",onClick:()=>{A(e)},disabled:S===e.id,children:S===e.id?"...":"Baixar"})]},e.id))}),$.jsx("p",{className:"export-panel-hint",children:"O Callix prepara o arquivo em alguns minutos; o link de download vale por cerca de uma hora."})]})}function gv(){return $.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[$.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),$.jsx("polyline",{points:"7 7 17 7 17 17"})]})}function $v(){return $.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[$.jsx("line",{x1:"17",y1:"7",x2:"7",y2:"17"}),$.jsx("polyline",{points:"17 17 7 17 7 7"})]})}function vv({state:e,onRetry:n,autoPlay:r}){const i=t.useRef(null),o="ready"===(null==e?void 0:e.status)?e.url:void 0;return t.useEffect(()=>{const e=i.current;if(r&&o&&e&&"function"==typeof e.play)try{const t=e.play();t&&"function"==typeof t.catch&&t.catch(()=>{})}catch{}},[r,o]),e&&"loading"!==e.status?"error"===e.status?$.jsxs("div",{className:"history-player error",role:"alert",children:[$.jsx("i",{className:"fas fa-circle-exclamation","aria-hidden":"true"}),$.jsx("span",{children:e.error||"Erro ao carregar gravação"}),$.jsx("button",{type:"button",className:"retry-link",onClick:n,children:"Tentar novamente"})]}):$.jsx("div",{className:"history-player",children:$.jsx("audio",{ref:i,controls:!0,preload:"metadata",src:e.url,"aria-label":"Gravação da chamada"})}):$.jsxs("div",{className:"history-player loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando gravação..."})]})}function yv({item:e,dayLabel:t,isPlayerOpen:n,recording:r,onTogglePlayer:i,onRetryRecording:o,onOpenDetails:a,onCall:d,onWhatsApp:s}){const l=e.wasAnswered?"":"missed",u=e=>e.stopPropagation(),c=!(!(f=e.qualificationName)||"chamada sem qualificação"===f.trim().toLowerCase());var f;let h=null;return e.wasAnswered?"campaign"===e.callType?h=$.jsxs("span",{className:"history-item-sub campaign "+(c?"with-qualification":""),children:[$.jsx("span",{className:"history-campaign-name",title:e.campaignName,children:e.campaignName||"Campanha"}),c&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"history-meta-dot",children:"•"}),$.jsx("span",{className:"history-qualification",title:e.qualificationName,children:e.qualificationName})]})]}):c&&(h=$.jsx("span",{className:"history-item-sub",children:$.jsx("span",{className:"history-qualification",title:e.qualificationName,children:e.qualificationName})})):h=$.jsxs("span",{className:"history-item-sub failure",children:[$.jsx("i",{className:"fas fa-circle-exclamation","aria-hidden":"true"}),$.jsx("span",{children:e.failureCauseLabel||"Não completada"})]}),$.jsxs("div",{className:`history-item ${l} ${n?"expanded":""}`,"data-call-id":e.id,children:[$.jsxs("div",{className:"history-item-row",children:[$.jsx("div",{className:"history-arrow "+(e.wasAnswered?"answered":"missed"),children:"incoming"===e.callDirection?$.jsx($v,{}):$.jsx(gv,{})}),$.jsxs("button",{type:"button",className:"history-item-info",onClick:()=>a(e),title:"Ver detalhes da chamada",children:[$.jsx("span",{className:`history-item-number ${l} ${"campaign"===e.callType?"linked":""}`,children:e.formattedPhone}),$.jsxs("span",{className:"history-item-meta",children:[$.jsx("span",{className:`history-type-badge ${e.callType}`,children:e.callTypeLabel}),$.jsxs("span",{className:"history-item-datetime",children:[t," ",e.formattedTime]}),e.wasAnswered&&void 0!==e.duration&&$.jsx("span",{className:"history-item-duration",children:e.formattedDuration})]}),h]}),$.jsxs("div",{className:"history-actions",children:[e.hasAudio&&$.jsx("button",{type:"button",className:"history-action-btn play-btn "+(n?"active":""),onClick:t=>{u(t),i(e)},title:n?"Fechar gravação":"Ouvir gravação","aria-label":n?"Fechar gravação":"Ouvir gravação",children:$.jsx("i",{className:"fas "+(n?"fa-xmark":"fa-play"),"aria-hidden":"true"})}),$.jsx("button",{type:"button",className:"history-action-btn call-btn",onClick:t=>{u(t),d(e)},title:"Ligar","aria-label":"Ligar",children:$.jsx("i",{className:"fas fa-phone","aria-hidden":"true"})}),$.jsx("button",{type:"button",className:"history-action-btn whatsapp-btn",onClick:t=>{u(t),s(e)},title:"WhatsApp","aria-label":"WhatsApp",children:$.jsx("i",{className:"fab fa-whatsapp","aria-hidden":"true"})})]})]}),n&&e.hasAudio&&$.jsx(vv,{state:r,onRetry:()=>o(e),autoPlay:!0})]})}function bv({label:e,value:t,tone:n,wide:r}){return t?$.jsxs("div",{className:"details-row "+(r?"wide":""),children:[$.jsx("div",{className:"details-label",children:e}),$.jsx("div",{className:`details-value ${n??""}`,children:t})]}):null}function xv({item:e,dayLabel:n,apiBaseUrl:r,getAuthHeaders:i,recording:o,onLoadRecording:a,onClose:d,onCall:s,onWhatsApp:l}){const[u,c]=t.useState({status:"idle",form:null}),f=t.useRef(null),h="campaign"===e.callType;t.useEffect(()=>{var e;if("undefined"==typeof document)return;const t=document.activeElement;null==(e=f.current)||e.focus();const n=e=>{"Escape"===e.key&&(e.stopPropagation(),d())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n),t&&"function"==typeof t.focus&&document.contains(t)&&t.focus()}},[d]),t.useEffect(()=>{if(!h||!e.campaignContactId)return void c({status:"idle",form:null});let t=!1;return c({status:"loading",form:null}),Qp({source:"campaign",id:e.campaignContactId,campaignId:e.campaignId??null,signature:e.formSignature??null,expiresAt:e.formExpiresAt??null},{apiBaseUrl:r,headers:i(),retries:0}).then(e=>{t||c({status:"ready",form:e})}).catch(e=>{t||(console.warn("[CallHistoryList] Formulário da campanha indisponível, usando campos do histórico:",e),c({status:"error",form:null,error:e instanceof Error?e.message:"Erro ao carregar formulário"}))}),()=>{t=!0}},[r,i,h,e.campaignContactId,e.campaignId,e.id]);const p=t.useMemo(()=>Object.entries(e.fields??{}).filter(([e,t])=>null!=t&&""!==String(t).trim()&&!function(e){const t=e.trim().toLowerCase();return/(^|[\s_-])id$/.test(t)}(e)),[e.fields]),m=t.useMemo(()=>{const t=new Map;for(const[n,r]of Object.entries(e.fields??{}))null!=r&&""!==String(r).trim()&&t.set(nm(em(n)),String(r));return t},[e.fields]),g=e=>{if(e.value&&""!==e.value.trim())return e.value;return m.get(nm(em(e.label)))??m.get(nm(em(e.key)))??"-"},v="ready"===u.status&&u.form?u.form.rows&&u.form.rows.length>0?u.form.rows:u.form.fields.length>0?[u.form.fields]:[]:[],y=v.length>0;let b;b="loading"===u.status&&0===p.length?$.jsxs("div",{className:"details-loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando formulário..."})]}):y?v.map((e,t)=>$.jsx("div",{className:"details-form-row",children:e.map((e,n)=>$.jsxs("div",{className:"details-field",children:[$.jsx("div",{className:"details-field-label",title:e.label,children:e.label}),$.jsx("div",{className:"details-field-value",children:g(e)})]},`${t}-${n}-${e.key}`))},t)):p.length>0?$.jsxs($.Fragment,{children:["loading"===u.status&&$.jsxs("div",{className:"details-loading details-loading-inline",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Atualizando formulário..."})]}),$.jsx("div",{className:"details-form-row",children:p.map(([e,t])=>$.jsxs("div",{className:"details-field",children:[$.jsx("div",{className:"details-field-label",title:e,children:e}),$.jsx("div",{className:"details-field-value",children:t})]},e))})]}):$.jsxs("div",{className:"details-empty",children:[$.jsx("i",{className:"fas fa-user","aria-hidden":"true"}),$.jsx("span",{children:"error"===u.status?u.error||"Formulário indisponível":"Nenhum dado do cliente disponível"})]});let x=null;return e.hasAudio&&(x="ready"===(null==o?void 0:o.status)?$.jsx("audio",{controls:!0,preload:"metadata",src:o.url,"aria-label":"Gravação da chamada"}):"loading"===(null==o?void 0:o.status)?$.jsxs("div",{className:"details-loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando gravação..."})]}):"error"===(null==o?void 0:o.status)?$.jsxs("div",{className:"details-error",role:"alert",children:[$.jsx("i",{className:"fas fa-circle-exclamation","aria-hidden":"true"}),$.jsx("span",{children:o.error}),$.jsx("button",{type:"button",className:"retry-link",onClick:()=>a(e,!0),children:"Tentar novamente"})]}):$.jsxs("button",{type:"button",className:"details-play-btn",onClick:()=>a(e),children:[$.jsx("i",{className:"fas fa-play","aria-hidden":"true"}),$.jsx("span",{children:"Ouvir gravação"})]})),$.jsx("div",{className:"modal-overlay history-details-overlay active",onClick:d,role:"presentation",children:$.jsxs("div",{className:"modal-content history-details-sheet",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":`Detalhes da chamada para ${e.formattedPhone}`,children:[$.jsxs("div",{className:"modal-header",children:[$.jsxs("div",{className:"history-details-heading",children:[$.jsx("h2",{className:"modal-title",children:e.formattedPhone}),$.jsxs("div",{className:"history-details-subtitle",children:[$.jsx("span",{className:`history-type-badge ${e.callType}`,children:e.callTypeLabel}),$.jsxs("span",{children:[n," ",e.formattedTimeWithSeconds]})]})]}),$.jsx("button",{ref:f,type:"button",className:"modal-close",onClick:d,"aria-label":"Fechar",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})})]}),$.jsxs("div",{className:"history-details-body",children:[h&&$.jsxs("section",{className:"details-section",children:[$.jsx("div",{className:"details-section-title",children:"Campanha"}),$.jsx("div",{className:"details-campaign-name",children:e.campaignName||"-"}),e.contactLabel&&$.jsxs("div",{className:"details-contact-label",children:["Cliente: ",e.contactLabel]})]}),$.jsxs("section",{className:"details-section details-grid",children:[$.jsx(bv,{label:"Status",value:e.wasAnswered?"Completada":"Não completada",tone:e.wasAnswered?"success":"failure"}),$.jsx(bv,{label:"Duração",value:e.formattedDuration}),!e.wasAnswered&&$.jsx(bv,{label:"Motivo",value:e.failureCauseLabel||"Não informado",tone:"failure"}),e.wasAnswered&&$.jsx(bv,{label:"Quem desligou",value:e.hangupCauseLabel}),$.jsx(bv,{label:"Qualificação",value:e.qualificationName,wide:!0}),$.jsx(bv,{label:"Protocolo",value:e.protocol?String(e.protocol):void 0}),$.jsx(bv,{label:"Data",value:e.formattedDate}),$.jsx(bv,{label:"Observação",value:e.note,wide:!0})]}),e.hasAudio&&$.jsxs("section",{className:"details-section",children:[$.jsx("div",{className:"details-section-title",children:"Gravação"}),x]}),h&&$.jsxs("section",{className:"details-section",children:[$.jsx("div",{className:"details-section-title",children:"Formulário da campanha"}),b]})]}),$.jsxs("div",{className:"history-details-actions",children:[$.jsxs("button",{type:"button",className:"details-action-btn call",onClick:()=>s(e),children:[$.jsx("i",{className:"fas fa-phone","aria-hidden":"true"}),$.jsx("span",{children:"Ligar"})]}),$.jsxs("button",{type:"button",className:"details-action-btn whatsapp",onClick:()=>l(e),children:[$.jsx("i",{className:"fab fa-whatsapp","aria-hidden":"true"}),$.jsx("span",{children:"WhatsApp"})]})]})]})})}function wv({items:e,isLoading:n,error:r,onRefresh:i,onCall:o,onWhatsApp:a,apiBaseUrl:d,getAuthHeaders:s,query:l,onQueryChange:u,isSearching:c=!1,searchHint:f=null}){const[h,p]=t.useState(null),[m,g]=t.useState(null),[v,y]=t.useState(!1),b=function(e,n){const[i,o]=t.useState({}),a=t.useRef(i),d=t.useRef(new Map),s=t.useRef(new Set);t.useEffect(()=>{a.current=i},[i]);const l=t.useCallback(e=>{const t=d.current.get(e);t&&(URL.revokeObjectURL(t),d.current.delete(e))},[]);t.useEffect(()=>{const e=d.current;return()=>{e.forEach(e=>URL.revokeObjectURL(e)),e.clear()}},[]);const u=t.useCallback(e=>{s.current=e;const t=Object.keys(a.current).filter(t=>!e.has(t));0!==t.length&&(t.forEach(l),o(e=>{const n={...e};return t.forEach(e=>{delete n[e]}),n}))},[l]),c=t.useCallback(async(t,i=!1)=>{if(!t.audioPath)return;const u=a.current[t.id];if(i||!u||"loading"!==u.status&&"ready"!==u.status){s.current=new Set([...s.current,t.id]),l(t.id),o(e=>({...e,[t.id]:{status:"loading"}}));try{if(!t.audioSignature||!t.audioExpiresAt)throw new Error("Gravação indisponível. Atualize o histórico.");const r=new URLSearchParams({path:t.audioPath,exp:String(t.audioExpiresAt),sig:t.audioSignature}),i=`${e}/api/call-audio?${r.toString()}`,a=await fetch(i,{method:"GET",headers:n(),credentials:"omit"});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||`Erro ${a.status}`)}const u=await a.blob();if(!s.current.has(t.id))return void o(e=>{const n={...e};return delete n[t.id],n});l(t.id);const c=URL.createObjectURL(u);d.current.set(t.id,c),o(e=>({...e,[t.id]:{status:"ready",url:c}}))}catch(r){const n=r instanceof Error?r.message:"Erro ao carregar gravação";console.error("[CallHistoryList] Erro ao carregar gravação:",r),o(e=>({...e,[t.id]:{status:"error",error:n}}))}}},[e,n,l]);return t.useMemo(()=>({states:i,load:c,retain:u}),[i,c,u])}(d,s),{retain:x}=b,[w,_]=t.useState(l??""),C=t.useRef(l??""),S=t.useRef(null);t.useEffect(()=>{const e=l??"";e!==C.current&&(C.current=e,_(e))},[l]),t.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const E=t.useCallback(e=>{_(e),u&&(S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{C.current=e,u(e)},350))},[u]),N=t.useCallback(()=>{_(""),S.current&&clearTimeout(S.current),C.current="",null==u||u("")},[u]),T=t.useMemo(()=>iv(w),[w]),A=t.useMemo(()=>function(e,t){const n="string"==typeof t?iv(t):t;return"empty"===n.kind?e:e.filter(e=>ov(e,n))}(e,T),[e,T]),O="empty"!==T.kind,I=t.useMemo(()=>{const t=new Date,n={};for(const r of e)n[r.id]=tv(r.dateKey,r.formattedDate,t);return n},[e]),k=t.useMemo(()=>e.find(e=>e.id===m)??null,[e,m]);t.useEffect(()=>{const t=new Set(e.map(e=>e.id)),n=new Set;h&&t.has(h)&&n.add(h),m&&t.has(m)&&n.add(m),x(n)},[h,m,e,x]);const j=t.useCallback(e=>{h!==e.id?(p(e.id),b.load(e)):p(null)},[h,b]),R=t.useCallback(e=>{b.load(e,!0)},[b]),P=t.useCallback((e,t=!1)=>{b.load(e,t)},[b]),D=t.useCallback(e=>{p(null),g(e.id)},[]),L=t.useCallback(()=>g(null),[]);return $.jsxs($.Fragment,{children:[$.jsxs("div",{className:"history-header",children:[$.jsx("h1",{className:"header-title",children:"Recentes"}),$.jsxs("div",{className:"history-header-actions",children:[$.jsx("button",{type:"button",className:"history-refresh-btn history-export-btn "+(v?"active":""),onClick:()=>y(e=>!e),"aria-label":"Exportar histórico","aria-pressed":v,title:"Exportar áudios ou dados do período",children:$.jsx("i",{className:"fas fa-file-export","aria-hidden":"true"})}),$.jsx("button",{type:"button",className:"history-refresh-btn",onClick:i,disabled:n,"aria-label":"Atualizar histórico",children:$.jsx("i",{className:"fas fa-arrows-rotate "+(n?"fa-spin":""),"aria-hidden":"true"})})]})]}),v&&$.jsx(mv,{apiBaseUrl:d,getAuthHeaders:s,onClose:()=>y(!1)}),$.jsxs("div",{className:"history-search-bar",children:[$.jsxs("label",{className:"history-search",children:[$.jsx("i",{className:"fas fa-magnifying-glass history-search-icon","aria-hidden":"true"}),$.jsx("input",{type:"search",className:"history-search-input",placeholder:"Buscar número, campanha, cliente...","aria-label":"Buscar no histórico",autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:w,onChange:e=>E(e.target.value)}),c?$.jsx("i",{className:"fas fa-spinner fa-spin history-search-spinner","aria-hidden":"true",title:"Buscando..."}):w?$.jsx("button",{type:"button",className:"history-search-clear",onClick:N,"aria-label":"Limpar busca",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})}):null]}),O&&f&&$.jsx("div",{className:"history-search-hint",children:f})]}),$.jsx("div",{className:"call-history-list",id:"callHistoryList",children:n&&0===e.length?$.jsxs("div",{className:"history-loading",role:"status",children:[$.jsx("i",{className:"fas fa-spinner fa-spin","aria-hidden":"true"}),$.jsx("span",{children:"Carregando..."})]}):r?$.jsxs("div",{className:"history-error",role:"alert",children:[$.jsx("i",{className:"fas fa-exclamation-circle","aria-hidden":"true"}),$.jsx("span",{children:r}),$.jsx("button",{type:"button",className:"retry-btn",onClick:i,children:"Tentar novamente"})]}):0===e.length?$.jsxs("div",{className:"history-empty",children:[$.jsx("i",{className:"fas fa-phone-slash","aria-hidden":"true"}),$.jsx("span",{children:"Nenhuma ligação recente"})]}):0===A.length?$.jsxs("div",{className:"history-empty history-empty-search",children:[$.jsx("i",{className:"fas fa-magnifying-glass","aria-hidden":"true"}),$.jsxs("span",{children:["Nenhuma chamada encontrada para ",$.jsxs("strong",{children:["“",w.trim(),"”"]})]}),c&&$.jsx("span",{className:"history-search-status",children:"Buscando no servidor..."})]}):A.map(e=>$.jsx(yv,{item:e,dayLabel:I[e.id]??e.formattedDate,isPlayerOpen:h===e.id,recording:b.states[e.id],onTogglePlayer:j,onRetryRecording:R,onOpenDetails:D,onCall:o,onWhatsApp:a},e.id))}),k&&$.jsx(xv,{item:k,dayLabel:I[k.id]??k.formattedDate,apiBaseUrl:d,getAuthHeaders:s,recording:b.states[k.id],onLoadRecording:P,onClose:L,onCall:e=>{g(null),o(e)},onWhatsApp:a})]})}const _v={light:10,medium:20,heavy:30,selection:10,success:[10,30,10],warning:[20,30,20],error:[30,50,30,50,30]};const Cv={1:[697,1209],2:[697,1336],3:[697,1477],4:[770,1209],5:[770,1336],6:[770,1477],7:[852,1209],8:[852,1336],9:[852,1477],"*":[941,1209],0:[941,1336],"#":[941,1477]},Sv=120,Ev=.08,Nv=.01;let Tv=0,Av=0;const Ov=[],Iv=[],kv=new Set,jv={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console)};let Rv=!1;function Pv(e,t,n,r,i){const o={id:++Tv,timestamp:new Date,level:e,category:t,message:n,data:r,stack:i};for(Ov.push(o);Ov.length>1e3;)Ov.shift();return kv.forEach(e=>e()),o}function Dv(e){const t={id:++Av,timestamp:new Date,...e};for(Iv.push(t);Iv.length>200;)Iv.shift();return kv.forEach(e=>e()),t}function Lv(){if(Rv)return;Rv=!0;const e=(e,t)=>(...n)=>{var r;t(...n);const{category:i,isSIP:o}=function(e){const t=e[0];if("string"==typeof t){if(t.includes("[Callix Dialer]"))return{category:"Callix",isSIP:!1};if(t.includes("[MobileDialer]"))return{category:"MobileDialer",isSIP:!1};if(t.includes("[FloatingDialer]"))return{category:"FloatingDialer",isSIP:!1};if(t.includes("[InlineDialer]"))return{category:"InlineDialer",isSIP:!1};if(t.includes("[DraggableClientInfoModal]"))return{category:"ClientInfo",isSIP:!1};if(t.includes("[WhatsApp"))return{category:"WhatsApp",isSIP:!1};if(t.includes("[API"))return{category:"API",isSIP:!1};if(t.includes("SIP")||t.includes("sip:"))return{category:"SIP",isSIP:!0};if(t.includes("WebSocket"))return{category:"WebSocket",isSIP:!0};if(t.includes("WebRTC")||t.includes("RTC"))return{category:"WebRTC",isSIP:!0};if(t.includes("ICE"))return{category:"ICE",isSIP:!0};if(t.includes("SRTP")||t.includes("DTLS"))return{category:"Media",isSIP:!0};if(t.includes("SDK")||t.includes("sdk"))return{category:"SDK",isSIP:!1};if(t.includes("CallOperator"))return{category:"CallOperator",isSIP:!1};if(t.includes("useEffect")||t.includes("useState"))return{category:"React",isSIP:!1};if(t.includes("render")||t.includes("Render"))return{category:"React",isSIP:!1}}return{category:"General",isSIP:!1}}(n),{message:a,data:d}=function(e){if(0===e.length)return{message:""};const t=[];let n;for(let r=0;r<e.length;r++){const i=e[r];"string"==typeof i?t.push(i):"number"==typeof i||"boolean"==typeof i?t.push(String(i)):i instanceof Error?(t.push(`${i.name}: ${i.message}`),n={errorStack:i.stack}):void 0!==i&&(void 0===n?n=i:Array.isArray(n)?n.push(i):n=[n,i],t.push("object"==typeof i?"[Object]":String(i)))}return{message:t.join(" "),data:n}}(n);let s;"error"===e&&(s=null==(r=(new Error).stack)?void 0:r.split("\n").slice(2).join("\n")),Pv(o?"sip":e,i,a,d,s)};console.log=e("log",jv.log),console.info=e("info",jv.info),console.warn=e("warn",jv.warn),console.error=e("error",jv.error),console.debug=e("debug",jv.debug)}async function Mv(){const e={userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,onLine:navigator.onLine,screenWidth:screen.width,screenHeight:screen.height,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,touchSupport:"ontouchstart"in window||navigator.maxTouchPoints>0,mediaDevices:{audioInputs:0,audioOutputs:0,videoInputs:0},permissions:{}};try{const t=await navigator.mediaDevices.enumerateDevices();e.mediaDevices={audioInputs:t.filter(e=>"audioinput"===e.kind).length,audioOutputs:t.filter(e=>"audiooutput"===e.kind).length,videoInputs:t.filter(e=>"videoinput"===e.kind).length}}catch(r){Pv("warn","DeviceInfo","Failed to enumerate media devices",r)}try{if("permissions"in navigator){const t=await navigator.permissions.query({name:"microphone"});e.permissions.microphone=t.state;const n=await navigator.permissions.query({name:"notifications"});e.permissions.notifications=n.state}}catch(r){}const t=navigator.connection;t&&(e.connection={type:t.type,effectiveType:t.effectiveType,downlink:t.downlink,rtt:t.rtt});const n=performance;return n.memory&&(e.memory={jsHeapSizeLimit:n.memory.jsHeapSizeLimit,totalJSHeapSize:n.memory.totalJSHeapSize,usedJSHeapSize:n.memory.usedJSHeapSize}),e}async function Uv(){const e=await Mv(),t=[];if(t.push("═══════════════════════════════════════════════════════════════"),t.push(" CALLIX DIALER DEBUG LOG "),t.push("═══════════════════════════════════════════════════════════════"),t.push(`Exported: ${(new Date).toISOString()}`),t.push(""),t.push("┌─────────────────────────────────────────────────────────────┐"),t.push("│ DEVICE INFO │"),t.push("├─────────────────────────────────────────────────────────────┤"),t.push(`│ User Agent: ${e.userAgent.substring(0,50)}...`),t.push(`│ Platform: ${e.platform}`),t.push(`│ Language: ${e.language}`),t.push(`│ Online: ${e.onLine}`),t.push(`│ Screen: ${e.screenWidth}x${e.screenHeight}`),t.push(`│ Viewport: ${e.viewportWidth}x${e.viewportHeight}`),t.push(`│ Pixel Ratio: ${e.devicePixelRatio}`),t.push(`│ Touch Support: ${e.touchSupport}`),t.push(`│ Audio Inputs: ${e.mediaDevices.audioInputs}`),t.push(`│ Audio Outputs: ${e.mediaDevices.audioOutputs}`),t.push(`│ Microphone Permission: ${e.permissions.microphone||"unknown"}`),e.connection&&(t.push(`│ Connection Type: ${e.connection.effectiveType||e.connection.type||"unknown"}`),t.push(`│ RTT: ${e.connection.rtt??"unknown"}ms`)),e.memory){const n=Math.round((e.memory.usedJSHeapSize||0)/1024/1024),r=Math.round((e.memory.totalJSHeapSize||0)/1024/1024);t.push(`│ Memory: ${n}MB / ${r}MB`)}if(t.push("└─────────────────────────────────────────────────────────────┘"),t.push(""),t.push("┌─────────────────────────────────────────────────────────────┐"),t.push("│ NETWORK REQUESTS │"),t.push("├─────────────────────────────────────────────────────────────┤"),0===Iv.length)t.push("│ No network requests logged");else for(const r of Iv){const e=r.timestamp.toISOString().split("T")[1].split(".")[0],n=r.status?`${r.status}`:"FAIL",i=r.duration?`${r.duration}ms`:"-";t.push(`│ [${e}] ${r.method} ${n} (${i})`),t.push(`│ URL: ${r.url.substring(0,60)}${r.url.length>60?"...":""}`),r.error&&t.push(`│ ERROR: ${r.error}`)}t.push("└─────────────────────────────────────────────────────────────┘"),t.push(""),t.push("┌─────────────────────────────────────────────────────────────┐"),t.push("│ APPLICATION LOGS │"),t.push("├─────────────────────────────────────────────────────────────┤");const n={log:"📝",info:"ℹ️",warn:"⚠️",error:"❌",debug:"🔍",network:"🌐",event:"⚡",state:"📊",sip:"📞"};for(const r of Ov){const e=r.timestamp.toISOString().split("T")[1].split(".")[0],i=n[r.level]||"•",o=r.level.toUpperCase().padEnd(7),a=`[${r.category}]`.padEnd(20);if(t.push(`│ ${e} ${i} ${o} ${a}`),t.push(`│ ${r.message.substring(0,70)}${r.message.length>70?"...":""}`),r.data)try{const e=JSON.stringify(r.data,null,2).split("\n");for(const n of e.slice(0,10))t.push(`│ ${n}`);e.length>10&&t.push(`│ ... (${e.length-10} more lines)`)}catch{t.push("│ [Data could not be serialized]")}if(r.stack){const e=r.stack.split("\n").slice(0,5);for(const n of e)t.push(`│ ${n.trim()}`)}t.push("│")}return t.push("└─────────────────────────────────────────────────────────────┘"),t.push(""),t.push(`Total Logs: ${Ov.length}`),t.push(`Total Network Requests: ${Iv.length}`),t.push("═══════════════════════════════════════════════════════════════"),t.join("\n")}function Fv(){const[e,n]=t.useState([]),[r,i]=t.useState([]),[o,a]=t.useState(0),d=t.useRef(!1);t.useEffect(()=>{if(d.current)return;d.current=!0,Lv(),function(){if("undefined"==typeof window)return;const e=window.fetch;window.fetch=async(t,n)=>{const r=Date.now(),i="string"==typeof t?t:t instanceof URL?t.toString():t.url,o=(null==n?void 0:n.method)||"GET",a={};let d;(null==n?void 0:n.headers)&&new Headers(n.headers).forEach((e,t)=>{t.toLowerCase().includes("auth")||t.toLowerCase().includes("token")?a[t]=e.substring(0,20)+"...":a[t]=e}),(null==n?void 0:n.body)&&(d="string"==typeof n.body?n.body.substring(0,500):n.body instanceof FormData?"[FormData]":"[Binary/Stream]");try{const s=await e(t,n),l=Date.now()-r,u=s.clone();let c;try{const e=s.headers.get("content-type")||"";if(e.includes("application/json")){const e=await u.json();c=JSON.stringify(e).substring(0,1e3)}else c=e.includes("text")?(await u.text()).substring(0,500):`[${e||"unknown content-type"}]`}catch{c="[Could not read response body]"}const f={};return s.headers.forEach((e,t)=>{f[t]=e}),Dv({method:o,url:i,status:s.status,duration:l,requestHeaders:a,responseHeaders:f,requestBody:d,responseBody:c}),Pv("network","Network",`${s.ok?"✅":"❌"} ${o} ${i} - ${s.status} (${l}ms)`,{status:s.status,duration:l}),s}catch(s){const e=Date.now()-r,t=s instanceof Error?s.message:String(s);throw Dv({method:o,url:i,duration:e,requestHeaders:a,requestBody:d,error:t}),Pv("network","Network",`❌ ${o} ${i} - FAILED: ${t}`,{error:t,duration:e}),s}}}();const e=function(){if("undefined"==typeof window)return()=>{};const e=e=>{var t;Pv("error","GlobalError",`Uncaught: ${e.message}`,{filename:e.filename,lineno:e.lineno,colno:e.colno},null==(t=e.error)?void 0:t.stack)},t=e=>{const t=e.reason;Pv("error","UnhandledRejection",`Unhandled Promise Rejection: ${t instanceof Error?t.message:String(t)}`,{reason:t instanceof Error?{name:t.name,message:t.message}:t},t instanceof Error?t.stack:void 0)};return window.addEventListener("error",e),window.addEventListener("unhandledrejection",t),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",t)}}();return Pv("info","DebugLogger","🚀 Debug Logger initialized",{timestamp:(new Date).toISOString(),version:"1.0.0"}),()=>{e()}},[]),t.useEffect(()=>{const e=()=>{a(e=>e+1)};return kv.add(e),()=>{kv.delete(e)}},[]),t.useEffect(()=>{n([...Ov]),i([...Iv])},[o]);return{logs:e,networkLogs:r,clear:t.useCallback(()=>{Ov.length=0,Iv.length=0,kv.forEach(e=>e())},[]),exportText:t.useCallback(async()=>Uv(),[]),copyToClipboard:t.useCallback(async()=>{const e=await Uv();try{return await navigator.clipboard.writeText(e),Pv("info","DebugLogger","📋 Logs copied to clipboard"),!0}catch(t){return Pv("error","DebugLogger","Failed to copy logs to clipboard",t),!1}},[]),addLog:t.useCallback((e,t,n,r)=>{Pv(e,t,n,r)},[]),collectDeviceInfo:Mv}}const Bv={container:{position:"fixed",inset:0,zIndex:99999,display:"flex",flexDirection:"column",backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:"12px",overflow:"hidden"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",backgroundColor:"#1e293b",borderBottom:"1px solid #334155",flexShrink:0},headerTitle:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:700},headerActions:{display:"flex",alignItems:"center",gap:"8px"},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6px",padding:"8px 12px",borderRadius:"6px",border:"none",fontSize:"11px",fontWeight:600,cursor:"pointer",transition:"all 0.2s"},primaryButton:{backgroundColor:"#3b82f6",color:"#fff"},dangerButton:{backgroundColor:"#dc2626",color:"#fff"},successButton:{backgroundColor:"#16a34a",color:"#fff"},tabs:{display:"flex",backgroundColor:"#1e293b",borderBottom:"1px solid #334155",padding:"0 16px",flexShrink:0,overflowX:"auto"},tab:{padding:"10px 16px",fontSize:"11px",fontWeight:600,cursor:"pointer",borderBottom:"2px solid transparent",color:"#94a3b8",whiteSpace:"nowrap",transition:"all 0.2s"},tabActive:{color:"#3b82f6",borderBottomColor:"#3b82f6"},filters:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",backgroundColor:"#1e293b",borderBottom:"1px solid #334155",flexWrap:"wrap",flexShrink:0},filterChip:{padding:"4px 10px",borderRadius:"12px",fontSize:"10px",fontWeight:600,cursor:"pointer",transition:"all 0.2s"},content:{flex:1,overflow:"auto",padding:"8px"},logEntry:{display:"flex",alignItems:"flex-start",padding:"6px 8px",borderRadius:"4px",marginBottom:"2px",fontSize:"11px",lineHeight:1.4},logTime:{flexShrink:0,width:"75px",color:"#64748b",fontSize:"10px"},logLevel:{flexShrink:0,width:"55px",fontWeight:700,fontSize:"9px",textTransform:"uppercase"},logCategory:{flexShrink:0,width:"100px",color:"#8b5cf6",fontSize:"10px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},logMessage:{flex:1,wordBreak:"break-word",whiteSpace:"pre-wrap"},logData:{marginTop:"4px",padding:"6px",backgroundColor:"#0f172a",borderRadius:"4px",fontSize:"10px",whiteSpace:"pre-wrap",overflow:"auto",maxHeight:"200px"},deviceInfoGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"12px",padding:"16px"},deviceInfoCard:{backgroundColor:"#1e293b",borderRadius:"8px",padding:"12px",border:"1px solid #334155"},deviceInfoTitle:{fontSize:"11px",fontWeight:700,color:"#3b82f6",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},deviceInfoRow:{display:"flex",justifyContent:"space-between",padding:"4px 0",borderBottom:"1px solid #334155",fontSize:"11px"},deviceInfoLabel:{color:"#94a3b8"},deviceInfoValue:{color:"#e2e8f0",fontWeight:600},networkEntry:{backgroundColor:"#1e293b",borderRadius:"6px",marginBottom:"8px",overflow:"hidden"},networkHeader:{display:"flex",alignItems:"center",gap:"12px",padding:"10px 12px",cursor:"pointer",transition:"background-color 0.2s"},networkMethod:{padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:700},networkUrl:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"11px"},networkStatus:{fontWeight:700,fontSize:"11px"},networkDetails:{padding:"12px",backgroundColor:"#0f172a",borderTop:"1px solid #334155",fontSize:"10px"},stats:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(150px, 1fr))",gap:"12px",padding:"16px"},statCard:{backgroundColor:"#1e293b",borderRadius:"8px",padding:"16px",textAlign:"center"},statValue:{fontSize:"28px",fontWeight:700,color:"#3b82f6"},statLabel:{fontSize:"10px",color:"#94a3b8",marginTop:"4px",textTransform:"uppercase"},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px",color:"#64748b"},copySuccess:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:"#16a34a",color:"#fff",padding:"16px 32px",borderRadius:"12px",fontSize:"16px",fontWeight:700,zIndex:1e5,animation:"fadeInOut 2s ease-in-out"}},qv={log:{bg:"#374151",text:"#9ca3af"},info:{bg:"#1e3a5f",text:"#60a5fa"},warn:{bg:"#713f12",text:"#fbbf24"},error:{bg:"#7f1d1d",text:"#f87171"},debug:{bg:"#3f3f46",text:"#a1a1aa"},network:{bg:"#164e63",text:"#22d3ee"},event:{bg:"#4c1d95",text:"#a78bfa"},state:{bg:"#14532d",text:"#4ade80"},sip:{bg:"#581c87",text:"#c084fc"}},zv={log:"📝",info:"ℹ️",warn:"⚠️",error:"❌",debug:"🔍",network:"🌐",event:"⚡",state:"📊",sip:"📞"};function Hv({onClose:e}){const{logs:n,networkLogs:r,clear:i,copyToClipboard:o}=Fv(),[a,d]=t.useState("logs"),[s,l]=t.useState(new Set),[u,c]=t.useState(""),[f,h]=t.useState(""),[p,m]=t.useState(new Set),[g,v]=t.useState(null),[y,b]=t.useState(!1),[x,w]=t.useState(new Set);t.useEffect(()=>{Mv().then(v)},[]);const _=t.useMemo(()=>n.filter(e=>{if(s.size>0&&!s.has(e.level))return!1;if(u&&!e.category.toLowerCase().includes(u.toLowerCase()))return!1;if(f){const t=f.toLowerCase();return e.message.toLowerCase().includes(t)||e.category.toLowerCase().includes(t)||e.data&&JSON.stringify(e.data).toLowerCase().includes(t)}return!0}),[n,s,u,f]),C=t.useMemo(()=>{const e=new Set(n.map(e=>e.category));return Array.from(e).sort()},[n]),S=t.useMemo(()=>{const e={},t={};for(const r of n)e[r.level]=(e[r.level]||0)+1,t[r.category]=(t[r.category]||0)+1;return{byLevel:e,byCategory:t,networkSuccess:r.filter(e=>e.status&&e.status>=200&&e.status<400).length,networkError:r.filter(e=>!e.status||e.status>=400).length,avgDuration:r.length>0?Math.round(r.reduce((e,t)=>e+(t.duration||0),0)/r.length):0}},[n,r]),E=t.useCallback(e=>{l(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),N=t.useCallback(e=>{m(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),T=t.useCallback(e=>{w(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),A=t.useCallback(async()=>{await o()&&(b(!0),setTimeout(()=>b(!1),2e3))},[o]),O=e=>e.toTimeString().split(" ")[0]+"."+e.getMilliseconds().toString().padStart(3,"0");return $.jsxs("div",{style:Bv.container,children:[$.jsxs("div",{style:Bv.header,children:[$.jsxs("div",{style:Bv.headerTitle,children:[$.jsx("span",{children:"🔧"}),$.jsx("span",{children:"Debug Console"}),$.jsxs("span",{style:{fontSize:"10px",backgroundColor:"#374151",padding:"2px 8px",borderRadius:"10px"},children:[n.length," logs"]})]}),$.jsxs("div",{style:Bv.headerActions,children:[$.jsx("button",{style:{...Bv.button,...Bv.successButton},onClick:A,children:"📋 Copiar Todos"}),$.jsx("button",{style:{...Bv.button,...Bv.dangerButton},onClick:i,children:"🗑️ Limpar"}),$.jsx("button",{style:{...Bv.button,...Bv.primaryButton},onClick:e,children:"← Voltar"})]})]}),$.jsxs("div",{style:Bv.tabs,children:[$.jsxs("div",{style:{...Bv.tab,..."logs"===a?Bv.tabActive:{}},onClick:()=>d("logs"),children:["📝 Logs (",n.length,")"]}),$.jsxs("div",{style:{...Bv.tab,..."network"===a?Bv.tabActive:{}},onClick:()=>d("network"),children:["🌐 Network (",r.length,")"]}),$.jsx("div",{style:{...Bv.tab,..."device"===a?Bv.tabActive:{}},onClick:()=>d("device"),children:"📱 Device"}),$.jsx("div",{style:{...Bv.tab,..."stats"===a?Bv.tabActive:{}},onClick:()=>d("stats"),children:"📊 Stats"})]}),"logs"===a&&$.jsxs("div",{style:Bv.filters,children:[$.jsx("input",{type:"text",placeholder:"🔍 Buscar...",value:f,onChange:e=>h(e.target.value),style:{padding:"6px 12px",borderRadius:"6px",border:"1px solid #374151",backgroundColor:"#0f172a",color:"#e2e8f0",fontSize:"11px",width:"150px"}}),$.jsxs("select",{value:u,onChange:e=>c(e.target.value),style:{padding:"6px 12px",borderRadius:"6px",border:"1px solid #374151",backgroundColor:"#0f172a",color:"#e2e8f0",fontSize:"11px"},children:[$.jsx("option",{value:"",children:"Todas categorias"}),C.map(e=>$.jsx("option",{value:e,children:e},e))]}),$.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:Object.keys(qv).map(e=>{const t=s.has(e),n=qv[e];return $.jsxs("span",{style:{...Bv.filterChip,backgroundColor:t?n.text:"#374151",color:t?"#000":"#94a3b8"},onClick:()=>E(e),children:[zv[e]," ",e]},e)})})]}),$.jsxs("div",{style:Bv.content,children:["logs"===a&&$.jsx($.Fragment,{children:0===_.length?$.jsxs("div",{style:Bv.emptyState,children:[$.jsx("span",{style:{fontSize:"48px",marginBottom:"16px"},children:"📭"}),$.jsx("span",{children:"Nenhum log encontrado"})]}):_.slice(-200).reverse().map(e=>{const t=qv[e.level],n=x.has(e.id),r=void 0!==e.data||e.stack;return $.jsxs("div",{style:{...Bv.logEntry,backgroundColor:t.bg+"40",cursor:r?"pointer":"default"},onClick:()=>r&&T(e.id),children:[$.jsx("span",{style:Bv.logTime,children:O(e.timestamp)}),$.jsxs("span",{style:{...Bv.logLevel,color:t.text},children:[zv[e.level]," ",e.level]}),$.jsxs("span",{style:Bv.logCategory,children:["[",e.category,"]"]}),$.jsxs("div",{style:{flex:1},children:[$.jsx("span",{style:Bv.logMessage,children:e.message}),r&&$.jsxs("span",{style:{color:"#64748b",fontSize:"10px",marginLeft:"8px"},children:[n?"▼":"▶"," ",r?"data":""]}),n&&$.jsxs("div",{style:Bv.logData,children:[void 0!==e.data&&$.jsx("pre",{children:(()=>{try{return JSON.stringify(e.data,null,2)}catch{return"[Não serializável]"}})()}),e.stack&&$.jsx("pre",{style:{color:"#f87171",marginTop:e.data?"8px":0},children:e.stack})]})]})]},e.id)})}),"network"===a&&$.jsx($.Fragment,{children:0===r.length?$.jsxs("div",{style:Bv.emptyState,children:[$.jsx("span",{style:{fontSize:"48px",marginBottom:"16px"},children:"🌐"}),$.jsx("span",{children:"Nenhuma requisição registrada"})]}):[...r].reverse().map(e=>{const t=e.status&&e.status>=200&&e.status<400,n=p.has(e.id),r={GET:"#22c55e",POST:"#3b82f6",PUT:"#f59e0b",DELETE:"#ef4444",PATCH:"#8b5cf6"};return $.jsxs("div",{style:Bv.networkEntry,children:[$.jsxs("div",{style:{...Bv.networkHeader,backgroundColor:n?"#334155":"transparent"},onClick:()=>N(e.id),children:[$.jsx("span",{style:{color:"#64748b",fontSize:"10px"},children:O(e.timestamp)}),$.jsx("span",{style:{...Bv.networkMethod,backgroundColor:(r[e.method]||"#6b7280")+"30",color:r[e.method]||"#6b7280"},children:e.method}),$.jsx("span",{style:Bv.networkUrl,title:e.url,children:e.url}),$.jsx("span",{style:{...Bv.networkStatus,color:t?"#22c55e":"#ef4444"},children:e.status||"FAILED"}),$.jsx("span",{style:{color:"#64748b",fontSize:"10px"},children:e.duration?`${e.duration}ms`:"-"}),$.jsx("span",{style:{color:"#64748b"},children:n?"▼":"▶"})]}),n&&$.jsxs("div",{style:Bv.networkDetails,children:[e.error&&$.jsxs("div",{style:{color:"#f87171",marginBottom:"8px"},children:[$.jsx("strong",{children:"Error:"})," ",e.error]}),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&$.jsxs("div",{style:{marginBottom:"8px"},children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Request Headers:"}),$.jsx("pre",{style:{marginTop:"4px"},children:JSON.stringify(e.requestHeaders,null,2)})]}),e.requestBody&&$.jsxs("div",{style:{marginBottom:"8px"},children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Request Body:"}),$.jsx("pre",{style:{marginTop:"4px"},children:e.requestBody})]}),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&$.jsxs("div",{style:{marginBottom:"8px"},children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Response Headers:"}),$.jsx("pre",{style:{marginTop:"4px"},children:JSON.stringify(e.responseHeaders,null,2)})]}),e.responseBody&&$.jsxs("div",{children:[$.jsx("strong",{style:{color:"#94a3b8"},children:"Response Body:"}),$.jsx("pre",{style:{marginTop:"4px"},children:e.responseBody})]})]})]},e.id)})}),"device"===a&&g&&$.jsxs("div",{style:Bv.deviceInfoGrid,children:[$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"📱 Sistema"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"User Agent"}),$.jsxs("span",{style:{...Bv.deviceInfoValue,fontSize:"9px",maxWidth:"150px",overflow:"hidden",textOverflow:"ellipsis"},children:[g.userAgent.substring(0,50),"..."]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Platform"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.platform})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Language"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.language})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Online"}),$.jsx("span",{style:{...Bv.deviceInfoValue,color:g.onLine?"#22c55e":"#ef4444"},children:g.onLine?"✅ Sim":"❌ Não"})]})]}),$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"📐 Tela"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Screen"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[g.screenWidth,"x",g.screenHeight]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Viewport"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[g.viewportWidth,"x",g.viewportHeight]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Pixel Ratio"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[g.devicePixelRatio,"x"]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Touch"}),$.jsx("span",{style:{...Bv.deviceInfoValue,color:g.touchSupport?"#22c55e":"#94a3b8"},children:g.touchSupport?"✅ Suportado":"❌ Não"})]})]}),$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"🎤 Mídia"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Audio Inputs"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.mediaDevices.audioInputs})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Audio Outputs"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.mediaDevices.audioOutputs})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Video Inputs"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.mediaDevices.videoInputs})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Mic Permission"}),$.jsx("span",{style:{...Bv.deviceInfoValue,color:"granted"===g.permissions.microphone?"#22c55e":"#f59e0b"},children:g.permissions.microphone||"unknown"})]})]}),g.connection&&$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"📶 Conexão"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Type"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.type||"-"})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Effective"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.effectiveType||"-"})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Downlink"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.downlink?`${g.connection.downlink} Mbps`:"-"})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"RTT"}),$.jsx("span",{style:Bv.deviceInfoValue,children:g.connection.rtt?`${g.connection.rtt}ms`:"-"})]})]}),g.memory&&$.jsxs("div",{style:Bv.deviceInfoCard,children:[$.jsx("div",{style:Bv.deviceInfoTitle,children:"💾 Memória"}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Heap Used"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[Math.round((g.memory.usedJSHeapSize||0)/1024/1024)," MB"]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Heap Total"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[Math.round((g.memory.totalJSHeapSize||0)/1024/1024)," MB"]})]}),$.jsxs("div",{style:Bv.deviceInfoRow,children:[$.jsx("span",{style:Bv.deviceInfoLabel,children:"Heap Limit"}),$.jsxs("span",{style:Bv.deviceInfoValue,children:[Math.round((g.memory.jsHeapSizeLimit||0)/1024/1024)," MB"]})]})]})]}),"stats"===a&&$.jsxs($.Fragment,{children:[$.jsxs("div",{style:Bv.stats,children:[$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:Bv.statValue,children:n.length}),$.jsx("div",{style:Bv.statLabel,children:"Total Logs"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#ef4444"},children:S.byLevel.error||0}),$.jsx("div",{style:Bv.statLabel,children:"Erros"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#f59e0b"},children:S.byLevel.warn||0}),$.jsx("div",{style:Bv.statLabel,children:"Warnings"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#22c55e"},children:S.networkSuccess}),$.jsx("div",{style:Bv.statLabel,children:"Requests OK"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsx("div",{style:{...Bv.statValue,color:"#ef4444"},children:S.networkError}),$.jsx("div",{style:Bv.statLabel,children:"Requests Failed"})]}),$.jsxs("div",{style:Bv.statCard,children:[$.jsxs("div",{style:Bv.statValue,children:[S.avgDuration,"ms"]}),$.jsx("div",{style:Bv.statLabel,children:"Avg Response Time"})]})]}),$.jsxs("div",{style:{padding:"16px"},children:[$.jsx("h3",{style:{color:"#94a3b8",marginBottom:"12px"},children:"Logs por Categoria"}),$.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:Object.entries(S.byCategory).sort((e,t)=>t[1]-e[1]).map(([e,t])=>$.jsxs("span",{style:{padding:"6px 12px",backgroundColor:"#1e293b",borderRadius:"6px",fontSize:"11px"},children:[e,": ",$.jsx("strong",{children:t})]},e))})]})]})]}),y&&$.jsx("div",{style:Bv.copySuccess,children:"✅ Logs copiados para a área de transferência!"})]})}function Wv({notice:e,onDismiss:n,onRecheck:r,onHeightChange:i}){const o=t.useRef(null),a=null!==e;if(t.useLayoutEffect(()=>{const e=o.current;if(!i)return;if(!e)return void i(0);const t=()=>i(e.offsetHeight);if(t(),"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect(),i(0)}},[a,i]),!e)return null;const d="call"===e.source||"session"===e.source;return $.jsxs("div",{ref:o,className:`dialer-notice ${e.level}`,role:"error"===e.level?"alert":"status","data-code":e.code,children:[$.jsx("i",{className:`fas ${"error"===e.level?"fa-circle-exclamation":"fa-triangle-exclamation"} dialer-notice-icon`,"aria-hidden":"true"}),$.jsxs("div",{className:"dialer-notice-body",children:[$.jsx("strong",{className:"dialer-notice-title",children:e.title}),$.jsx("span",{className:"dialer-notice-detail",children:e.detail}),e.action&&$.jsx("span",{className:"dialer-notice-action",children:e.action}),"device"===e.source&&r&&$.jsx("button",{type:"button",className:"dialer-notice-btn",onClick:r,children:"Verificar de novo"})]}),d&&n&&$.jsx("button",{type:"button",className:"dialer-notice-close",onClick:n,"aria-label":"Fechar aviso",children:$.jsx("i",{className:"fas fa-xmark","aria-hidden":"true"})})]})}const Gv={raiva:"raiva",irritacao:"irritação",frustracao:"frustração",desconfianca:"desconfiança",impaciencia:"impaciência",confusao:"confusão",nervosismo:"nervosismo",surpresa:"surpresa",desanimo:"desânimo",cansaco:"cansaço",interesse:"interesse",entusiasmo:"entusiasmo",satisfacao:"satisfação",alivio:"alívio",neutro:"neutro"},Vv={aberto:"cliente aberto",neutro:"cliente neutro",resistente:"cliente resistente",hostil:"cliente hostil",indefinido:"lendo a conversa"},Kv={agent:"Você",customer:"Cliente",mixed:""};function Yv(e,t=2){return(e.emotions??[]).filter(e=>"neutro"!==e.label&&e.intensity>=.3).slice(0,t)}function Xv({maxLines:e=4}){const n=t.useContext(Du);return n?$.jsx(Jv,{client:n,maxLines:e}):null}function Jv({client:e,maxLines:t}){const{segments:n,insight:r,status:i}=function(e){return Mu(e).transcript}(e),o="running"===(null==i?void 0:i.live);if(0===n.length&&!r&&!o)return null;const a=n.slice(-t);return $.jsxs("div",{className:"live-captions",id:"liveCaptions","aria-live":"polite",children:[r&&$.jsxs("div",{className:`live-insight stance-${r.customer.stance}`,id:"liveInsight",title:r.summary,children:[$.jsx("span",{className:"live-insight-stance",children:Vv[r.customer.stance]??r.customer.stance}),$.jsxs("span",{className:"live-insight-interest",children:["interesse ",Math.round(r.customer.interest),"%"]}),r.nextMove&&$.jsx("span",{className:"live-insight-next",children:r.nextMove})]}),a.length>0?$.jsx("ul",{className:"live-caption-list",children:a.map(e=>$.jsxs("li",{className:`live-caption ${e.speaker}${e.interim?" interim":""}${e.refined?" refined":""}`,children:[$.jsx("span",{className:"live-caption-speaker",children:Kv[e.speaker]}),$.jsx("span",{className:"live-caption-text",children:e.text}),Yv(e).map(e=>$.jsxs("span",{className:"live-caption-emotion"+("context"===e.source?" ctx":""),title:e.evidence??"",children:[Gv[e.label]??e.label," ",Math.round(100*e.intensity),"%"]},e.label))]},e.id))}):$.jsx("div",{className:"live-caption-waiting",children:"Ouvindo a conversa…"})]})}function Zv(e={}){const n=Xu(),r=Zu(),[i,o]=t.useState(null),[a,d]=t.useState(null),[s,l]=t.useState(null),[u,c]=t.useState(null),f=t.useRef(null),h=e.callFailureTtlMs??2e4,p=t.useCallback(async()=>{if(!1===e.checkDevices)return;const t=await Lp();o(t)},[e.checkDevices]);t.useEffect(()=>{var t;if(!1===e.checkDevices)return;let n=!1;const r=async()=>{const e=await Lp();n||o(e)};r();const i="undefined"!=typeof navigator?navigator.mediaDevices:void 0,a=()=>{r()};return null==(t=null==i?void 0:i.addEventListener)||t.call(i,"devicechange",a),()=>{var e;n=!0,null==(e=null==i?void 0:i.removeEventListener)||e.call(i,"devicechange",a)}},[e.checkDevices]),ac("userSessionDropped",e=>{d((null==e?void 0:e.originator)??"unknown")}),t.useEffect(()=>{if(!(null==r?void 0:r.on))return;const e=e=>{var t;const n=(null==e?void 0:e.failure)??(null==(t=r.toCallData)?void 0:t.call(r).failure)??null;l(n??{cause:null}),c(null),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>l(null),h)};return r.on("failed",e),()=>{var t;null==(t=r.off)||t.call(r,"failed",e)}},[r,h]),t.useEffect(()=>{var e,t;if("manualCallFailed"!==(null==n?void 0:n.state))return;const r=(null==(t=null==(e=n.call)?void 0:e.toCallData)?void 0:t.call(e).failure)??null;l(e=>e??r??{cause:null}),c(null)},[n]),t.useEffect(()=>{"callInProgress"!==(null==n?void 0:n.state)&&"manualCallRinging"!==(null==n?void 0:n.state)&&"callRinging"!==(null==n?void 0:n.state)||l(null),"idle"!==(null==n?void 0:n.state)&&"onBreak"!==(null==n?void 0:n.state)||d(null)},[null==n?void 0:n.state]),t.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const m=function(e){if(e.sessionDrop)return Bp(e.sessionDrop);if("startupError"===e.operatorState){if("missingAudioPermissions"===e.startupError&&e.deviceIssue){const t=e.deviceIssue.action??"";return{...e.deviceIssue,action:/recarregue a página/i.test(t)?t:`${t} Depois, recarregue a página para o discador iniciar.`.trim()}}return Up(e.startupError)}return e.deviceIssue?e.deviceIssue:"manualCallFailed"===e.operatorState||e.callFailure?Hp(e.callFailure):"offline"===e.operatorState?{level:"error",source:"offline",code:"offline",title:"Discador desconectado do Callix",detail:"O atendimento está offline: sem internet, sem microfone ou o Callix derrubou a conexão.",action:"Confira a internet e o microfone; o discador tenta reconectar sozinho. Se não voltar, recarregue a página."}:null}({deviceIssue:i,operatorState:(null==n?void 0:n.state)??null,startupError:"startupError"===(null==n?void 0:n.state)?n.error??null:null,sessionDrop:a,callFailure:s});return{notice:m&&m.code!==u?m:null,deviceIssue:i,dismiss:t.useCallback(()=>{m&&("call"===m.source?l(null):"session"===m.source?d(null):c(m.code))},[m]),recheckDevices:p}}const Qv=16,ey="callix_dialer_form_scale",ty=100,ny="flex flex-shrink-0 items-center justify-center rounded-md transition hover:bg-black hover:bg-opacity-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",ry="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function iy(e,t,n){return Math.min(Math.max(e,t),n)}function oy(e){if(!Number.isFinite(e))return ty;return iy(10*Math.round(e/10),70,180)}function ay(){if("undefined"==typeof window)return ty;try{const e=window.localStorage.getItem(ey);return null===e||""===e.trim()?ty:oy(Number(e))}catch{return ty}}function dy(){if("undefined"==typeof CSS||"function"!=typeof CSS.supports)return!0;try{if(!CSS.supports("zoom","1.5"))return!1}catch{return!0}const e="undefined"!=typeof navigator?/\bFirefox\/(\d+)/.exec(navigator.userAgent):null;return!(e&&Number(e[1])<131)}function sy(){return"undefined"==typeof window?{width:1024,height:768}:{width:window.innerWidth,height:window.innerHeight}}function ly(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${n}:${r.toString().padStart(2,"0")}`}function uy({isOpen:e,campaignCallInfo:r,campaignContactPhoneId:i,callDuration:o,isCallActive:a,onClose:d,portalTarget:s}){const l=t.useRef(null),u=t.useRef({pointerId:null,offsetX:0,offsetY:0}),c=t.useRef(!1),f=t.useRef(!1),h=t.useRef(null),p=t.useId(),[m,g]=t.useState({x:100,y:100}),[v,y]=t.useState(!1),[b,x]=t.useState(sy),w=t.useMemo(dy,[]),[_,C]=t.useState(ay),[S,E]=t.useState(""),N=w?_/100:1,T=t.useRef(N);T.current=N;const[A,O]=t.useState(null),[I,k]=t.useState(!1),[j,R]=t.useState(null),[P,D]=t.useState({key:null,n:0}),L=null==r?void 0:r.campaignContact,M=t.useMemo(()=>Xp(r,i),[r,i]),U=M?Yp(M):null,F=t.useRef(M);F.current=M;const B=t.useRef(null),q=t.useCallback(()=>{var e;const t=null==(e=l.current)?void 0:e.getBoundingClientRect(),n=T.current;return{width:t&&t.width>0?t.width:520*n,height:t&&t.height>0?t.height:600*n}},[]),z=t.useCallback(e=>{if("undefined"==typeof window)return e;const{width:t,height:n}=q(),r=Math.max(16,window.innerWidth-t-Qv),i=Math.max(16,window.innerHeight-n-Qv);return{x:iy(e.x,16,r),y:iy(e.y,16,i)}},[q]);ry(()=>{if(e&&"undefined"!=typeof window){x(sy());const{width:e,height:t}=q(),n=(window.innerWidth-e)/2,r=(window.innerHeight-t)/2;g(z({x:n,y:r}))}},[e,q,z]),t.useEffect(()=>{if(!e||"undefined"==typeof window)return;const t=()=>{x(sy()),g(e=>z(e))};return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t)}},[e,z]);const H=t.useCallback(()=>{g(e=>{const t=z(e);return t.x===e.x&&t.y===e.y?e:t})},[z]);t.useEffect(()=>{e&&H()},[e,_,H]),t.useEffect(()=>{const t=l.current;if(!e||!t||"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(()=>H());return n.observe(t),()=>n.disconnect()},[e,H]),t.useEffect(()=>{const e=F.current;if(!e||!U)return O(null),R(null),void k(!1);let t=!1,n=null;return k(!0),R(null),Qp(e,{force:P.key===U&&P.n>0}).then(e=>{t||(console.log("[DraggableClientInfoModal] ✅ Formulário carregado:",e.valuesSource,e.layoutSource,e.fields.length,"campos",e.partial?"(parcial)":""),O(e),k(!1),e.partial&&B.current!==U&&(B.current=U,n=setTimeout(()=>D(e=>({key:U,n:e.n+1})),3e3)))}).catch(e=>{t||(console.error("[DraggableClientInfoModal] ❌ Erro ao buscar o formulário:",e),O(null),R(e instanceof Error?e.message:"Erro ao buscar dados do contato"),k(!1))}),()=>{t=!0,n&&clearTimeout(n)}},[U,P]),t.useEffect(()=>{if(!v)return;const e=e=>{if(u.current.pointerId!==e.pointerId)return;c.current=!0;const{width:t,height:n}=q(),r=e.clientX-u.current.offsetX,i=e.clientY-u.current.offsetY,o="undefined"!=typeof window?window.innerWidth:0,a="undefined"!=typeof window?window.innerHeight:0,d=o-t-Qv,s=a-n-Qv,l=Math.max(Qv,d),f=Math.max(Qv,s);g({x:iy(r,Qv,l),y:iy(i,Qv,f)})},t=e=>{u.current.pointerId===e.pointerId&&(y(!1),u.current={pointerId:null,offsetX:0,offsetY:0})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[v,q]);const W=t.useCallback(e=>{if(0!==e.button&&"touch"!==e.pointerType)return;if(e.target instanceof Element&&e.target.closest("button"))return;const t=l.current;if(!t)return;e.preventDefault();const n=e.currentTarget;if("function"==typeof n.setPointerCapture)try{n.setPointerCapture(e.pointerId)}catch{}const r=t.getBoundingClientRect();u.current={pointerId:e.pointerId,offsetX:e.clientX-r.left,offsetY:e.clientY-r.top},c.current=!1,y(!0)},[]),G=t.useCallback(()=>{!a&&d&&d()},[a,d]),V=t.useCallback(()=>{D(e=>({key:U,n:e.n+1}))},[U]),K=t.useCallback(e=>{const t=oy(e);return C(t),function(e){try{window.localStorage.setItem(ey,String(e))}catch{}}(t),t},[]),Y=_>70,X=_<180,J=t.useCallback(()=>{Y&&E(`Tamanho do formulário: ${K(_-10)}%`)},[K,Y,_]),Z=t.useCallback(()=>{X&&E(`Tamanho do formulário: ${K(_+10)}%`)},[K,X,_]),Q=t.useCallback(()=>{K(ty),E("")},[K]);t.useEffect(()=>{if(!e||"undefined"==typeof document)return;const t=l.current,n=document.activeElement;return h.current=n&&n!==document.body?n:null,!t||n&&n!==document.body||t.focus({preventScroll:!0}),()=>{const e=h.current;f.current&&e&&e.isConnected&&e.focus({preventScroll:!0}),f.current=!1}},[e]);const ee=t.useCallback(()=>{f.current=!0},[]),te=t.useCallback(e=>{e.currentTarget.contains(e.relatedTarget)||(f.current=!1)},[]),ne=t.useCallback(e=>{"Escape"!==e.key||a||(e.stopPropagation(),G())},[G,a]);if(!e)return null;const re=(null==A?void 0:A.rows)&&A.rows.length>0?A.rows:[],ie=re.length>0,oe=Boolean(A&&A.fields.length>0),ae=ie||oe,de={zoom:N,width:"520px",maxWidth:`${Math.max(160,Math.floor((b.width-32)/N))}px`,maxHeight:`${Math.max(120,Math.floor((b.height-32)/N))}px`},se=N<1?Math.ceil(28/N):28,le={width:`${se}px`,height:`${se}px`},ue={height:`${se}px`,minWidth:`${Math.ceil(48/Math.min(N,1))}px`},ce=$.jsx("div",{ref:l,role:"dialog","aria-labelledby":p,tabIndex:-1,onKeyDown:ne,onFocus:ee,onBlur:te,className:Gh`fixed z-[9999] overflow-hidden rounded-xl border border-gray-300 bg-white text-gray-900 shadow-2xl focus:outline-none`,style:{left:`${m.x}px`,top:`${m.y}px`,maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 32px)"},children:$.jsxs("div",{"data-testid":"campaign-form-scaled","data-scale":w?_:ty,className:Gh`flex flex-col`,style:de,children:[$.jsxs("div",{onPointerDown:W,className:Gh`flex flex-wrap cursor-move select-none items-center gap-2 border-b border-gray-200 bg-gradient-to-r from-blue-600 to-blue-700 px-3 py-2.5 text-white`,style:{touchAction:"none"},children:[$.jsxs("div",{className:Gh`flex min-w-[7rem] flex-1 items-center gap-2`,children:[$.jsx(Fc,{"aria-hidden":!0,className:Gh`h-5 w-5 flex-shrink-0`}),$.jsx("h3",{id:p,className:Gh`truncate text-sm font-bold`,children:"Informações da Campanha"})]}),w&&$.jsxs("div",{role:"group","aria-label":"Tamanho do formulário",className:Gh`ml-auto flex flex-shrink-0 items-center gap-0.5`,children:[$.jsx("button",{type:"button",onClick:J,"aria-disabled":!Y,"aria-label":"Diminuir o tamanho do formulário",title:"Diminuir o formulário e o texto",className:Gh`${ny} ${Y?"":"cursor-not-allowed"}`,style:le,children:$.jsx(Ic,{"aria-hidden":!0,className:Gh`h-4 w-4 ${Y?"":"opacity-40"}`})}),$.jsxs("button",{type:"button",onClick:Q,"aria-label":`Tamanho atual ${_}%. Restaurar o tamanho padrão`,title:"Restaurar o tamanho padrão (100%)",className:Gh`flex-shrink-0 rounded-md px-1 text-center text-xs font-semibold tabular-nums transition hover:bg-black hover:bg-opacity-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white`,style:ue,children:[_,"%"]}),$.jsx("button",{type:"button",onClick:Z,"aria-disabled":!X,"aria-label":"Aumentar o tamanho do formulário",title:"Aumentar o formulário e o texto",className:Gh`${ny} ${X?"":"cursor-not-allowed"}`,style:le,children:$.jsx(Lc,{"aria-hidden":!0,className:Gh`h-4 w-4 ${X?"":"opacity-40"}`})}),$.jsx("span",{role:"status",className:Gh`sr-only`,children:S})]}),$.jsx("button",{type:"button",onClick:G,disabled:a,"aria-label":a?"Aguarde o fim da chamada para fechar":"Fechar",className:Gh`${ny} rounded-full disabled:cursor-not-allowed disabled:opacity-40`,style:le,title:a?"Aguarde o fim da chamada para fechar":"Fechar",children:$.jsx(Wc,{"aria-hidden":!0,className:Gh`h-5 w-5`})})]}),$.jsxs("div",{tabIndex:0,role:"region","aria-label":"Dados do contato",className:Gh`min-h-0 flex-1 space-y-3 overflow-y-auto p-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500`,children:[$.jsxs("div",{className:Gh`grid grid-cols-2 gap-3`,children:[$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-3 py-2`,children:[$.jsx(Cc,{"aria-hidden":!0,className:Gh`h-4 w-4 text-gray-500`}),$.jsxs("div",{children:[$.jsx("p",{className:Gh`text-[10px] text-gray-500 uppercase tracking-wide font-medium`,children:"Duração"}),$.jsx("p",{className:Gh`text-sm font-bold text-gray-800`,children:ly(o)})]})]}),$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-3 py-2`,children:[$.jsx(Fc,{"aria-hidden":!0,className:Gh`h-4 w-4 text-gray-500`}),$.jsxs("div",{className:Gh`min-w-0 flex-1`,children:[$.jsx("p",{className:Gh`text-[10px] text-gray-500 uppercase tracking-wide font-medium`,children:"Cliente"}),$.jsx("p",{className:Gh`truncate text-sm font-bold text-gray-800`,children:(null==L?void 0:L.label)||"N/A"})]})]})]}),I&&$.jsxs("div",{className:Gh`rounded-lg border border-blue-200 bg-blue-50 p-6 text-center`,role:"status",children:[$.jsx("div",{className:Gh`mx-auto mb-2 inline-block h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent`}),$.jsx("p",{className:Gh`text-xs font-medium text-blue-700`,children:"Carregando dados do contato..."})]}),j&&!I&&$.jsx("div",{className:Gh`rounded-lg border border-red-200 bg-red-50 p-3`,children:$.jsxs("div",{className:Gh`flex items-center gap-2`,children:[$.jsx(yc,{"aria-hidden":!0,className:Gh`h-4 w-4 flex-shrink-0 text-red-600`}),$.jsxs("div",{className:Gh`min-w-0 flex-1`,children:[$.jsx("p",{className:Gh`text-xs font-semibold text-red-700`,children:"Erro ao carregar dados"}),$.jsx("p",{className:Gh`text-[10px] text-red-600`,children:j})]}),$.jsx("button",{type:"button",onClick:V,className:Gh`rounded-md border border-red-300 bg-white px-2 py-1 text-[11px] font-semibold text-red-700 transition hover:bg-red-100`,children:"Tentar novamente"})]})}),!I&&!j&&ie&&$.jsx("div",{className:Gh`space-y-2`,children:re.map((e,t)=>{return $.jsx("div",{className:Gh`grid gap-2 ${n=e.length,2===n?"grid-cols-2":3===n?"grid-cols-3":4===n?"grid-cols-4":n>=5?"grid-cols-5":"grid-cols-1"}`,children:e.map((e,n)=>$.jsx(cy,{label:e.label,value:e.value||"-",fullWidth:"100%"===e.width},`${t}-${n}-${e.key}`))},t);var n})}),!I&&!j&&!ie&&oe&&A&&$.jsx("div",{className:Gh`grid grid-cols-2 gap-2`,children:A.fields.map(e=>$.jsx(cy,{label:e.label,value:e.value||"-"},e.key))}),!I&&!j&&!ae&&$.jsxs("div",{className:Gh`flex flex-col items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-4 py-8 text-center`,children:[$.jsx(Fc,{"aria-hidden":!0,className:Gh`mb-2 h-8 w-8 text-gray-400`}),$.jsx("p",{className:Gh`text-sm text-gray-500`,children:"Nenhum dado disponível"})]})]}),a&&$.jsx("div",{className:Gh`border-t border-gray-200 bg-gray-50 px-4 py-2`,children:$.jsx("p",{className:Gh`text-center text-xs text-gray-500`,children:"Aguarde o fim da chamada para fechar"})})]})});return"undefined"!=typeof document?n.createPortal(ce,s??document.body):null}function cy({label:e,value:t,fullWidth:n}){const r=n?"col-span-full":"";return $.jsxs("div",{className:Gh`rounded-lg border border-gray-200 bg-white p-2 ${r}`,children:[$.jsx("p",{className:Gh`mb-0.5 truncate text-[9px] font-semibold uppercase tracking-wide text-gray-500`,children:e}),$.jsx("p",{className:Gh`overflow-hidden break-words text-xs font-semibold text-gray-800`,style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:t})]})}if("undefined"!=typeof window&&!window.__fetchIntercepted__){window.__fetchIntercepted__=!0;const e=window.fetch.bind(window);window.fetch=async function(t,n){const r=`req_${Date.now()}_${Math.random().toString(36).substring(2,8)}`,i="string"==typeof t?t:t instanceof URL?t.href:t.url,o=(null==n?void 0:n.method)||(t instanceof Request?t.method:"GET"),a={};(null==n?void 0:n.headers)&&(n.headers instanceof Headers?n.headers.forEach((e,t)=>{a[t]=t.toLowerCase().includes("token")||t.toLowerCase().includes("auth")?`${e.substring(0,30)}...(${e.length} chars)`:e}):Array.isArray(n.headers)?n.headers.forEach(([e,t])=>{a[e]=e.toLowerCase().includes("token")||e.toLowerCase().includes("auth")?`${t.substring(0,30)}...(${t.length} chars)`:t}):Object.entries(n.headers).forEach(([e,t])=>{a[e]=e.toLowerCase().includes("token")||e.toLowerCase().includes("auth")?`${String(t).substring(0,30)}...(${String(t).length} chars)`:String(t)}));const d=performance.now();if(console.log(`%c[FETCH ${r}] ➡️ ${o} ${i}`,"color: #4CAF50; font-weight: bold"),console.log(`[FETCH ${r}] Headers:`,JSON.stringify(a,null,2)),null==n?void 0:n.body)try{const e="string"==typeof n.body?n.body:JSON.stringify(n.body);console.log(`[FETCH ${r}] Body:`,e.substring(0,500))}catch{console.log(`[FETCH ${r}] Body: [não serializável]`)}console.log(`[FETCH ${r}] credentials: ${(null==n?void 0:n.credentials)||"default"}, mode: ${(null==n?void 0:n.mode)||"default"}`),Pv("network","Request",`➡️ ${o} ${i.substring(0,60)}...`,{requestId:r,method:o,url:i,headers:a,credentials:null==n?void 0:n.credentials});try{const o=await e(t,n),l=performance.now(),u=Math.round(l-d),c={};o.headers.forEach((e,t)=>{c[t]=e});const f=o.ok?"#4CAF50":"#F44336";if(console.log(`%c[FETCH ${r}] ⬅️ ${o.status} ${o.statusText} (${u}ms)`,`color: ${f}; font-weight: bold`),console.log(`[FETCH ${r}] Response Headers:`,JSON.stringify(c,null,2)),Pv(o.ok?"network":"error","Response",`⬅️ ${o.status} ${i.substring(0,40)}... (${u}ms)`,{requestId:r,status:o.status,statusText:o.statusText,duration:u,headers:c}),401===o.status||403===o.status){console.error(`%c[FETCH ${r}] ❌ AUTH ERROR ${o.status}`,"color: #F44336; font-weight: bold; font-size: 14px"),console.error(`[FETCH ${r}] URL completa:`,i),console.error(`[FETCH ${r}] Todos os headers enviados:`,a);try{const e=o.clone(),t=await e.text();console.error(`[FETCH ${r}] Response Body:`,t),Pv("error","AuthError",`❌ ${o.status} - ${t.substring(0,200)}`,{requestId:r,url:i,headers:a,responseBody:t})}catch(s){console.error(`[FETCH ${r}] Não foi possível ler body do erro:`,s)}}return o}catch(l){const e=performance.now(),t=Math.round(e-d);throw console.error(`%c[FETCH ${r}] ❌ NETWORK ERROR (${t}ms)`,"color: #F44336; font-weight: bold"),console.error(`[FETCH ${r}] Error:`,l),Pv("error","NetworkError",`❌ ${i.substring(0,40)}... - ${String(l)}`,{requestId:r,url:i,error:String(l),duration:t}),l}},console.log("%c[FETCH INTERCEPTOR] ✅ Ativo - todas as requisições serão logadas","color: #2196F3; font-weight: bold; font-size: 12px")}function fy(e,t){return tm({values:e},t)}function hy(e){t.useEffect(()=>{if(!document.querySelector('link[data-mobile-dialer-fa="true"]')){const e=document.createElement("link");e.rel="stylesheet",e.href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css",e.dataset.mobileDialerFa="true",document.head.appendChild(e)}},[]);const n=w$(),r=function(e,t){return"compact"===e||"comfortable"===e?e:t.touchLike?"comfortable":"compact"}(e.density,n);return e.isAuthenticated?$.jsx($y,{...e,density:r}):$.jsx(py,{...e,density:r})}function py({username:e,onLogin:n,isLoadingSession:r,sessionError:i,sessionStatus:o,loginConfirmation:a,onCancelLoginConfirmation:d,onTakeOverSession:s,onLogoutAllTabs:l,density:u}){const[c,f]=t.useState(e??""),[h,p]=t.useState(null);t.useEffect(()=>{f(e??"")},[e]);const m=t.useCallback(async e=>{const t=e.trim();if(t){p(null);try{await Promise.resolve(n(t))}catch(r){p("Falha ao autenticar."),console.error("Erro login",r)}}else p("Informe o usuário Callix.")},[n]),g=t.useCallback(()=>m(c),[m,c]),v=Boolean(a)&&!r,y=((null==a?void 0:a.username)||c||e||"").trim();return $.jsx("div",{className:"phone-container","data-density":"compact"===u?"compact":"comfortable",children:$.jsxs("div",{className:"screen dialer-screen login-screen active",id:"dialerScreen",children:[$.jsx("div",{className:"dialer-header",children:$.jsx("div",{className:"status-container",children:$.jsxs("button",{type:"button",className:"status-badge "+(r?"connecting":"available"),children:[$.jsx("span",{className:"status-dot"}),$.jsx("span",{className:"status-text",children:r?"Conectando":"Login"})]})})}),r?$.jsxs("div",{className:"login-loading",role:"status","aria-live":"polite",children:[$.jsx("div",{className:"login-spinner","aria-hidden":"true"}),y&&$.jsx("div",{className:"login-loading-user",children:y}),$.jsx("div",{className:"login-status",children:o||"Conectando..."})]}):v&&a?a.elsewhere?$.jsxs("div",{className:"login-confirm","data-login-state":"elsewhere",children:[$.jsx("div",{className:"login-confirm-label",children:"Discador ativo em outra aba"}),$.jsxs("div",{className:"login-user-chip",children:[$.jsx("i",{className:"fas fa-user-check","aria-hidden":"true"}),$.jsx("span",{children:a.username})]}),i&&$.jsx("div",{className:"input-error",children:i}),$.jsxs("button",{type:"button",className:"login-confirm-btn login-confirm-btn-blue",id:"takeOverBtn",onClick:()=>null==s?void 0:s(),children:[$.jsx("i",{className:"fas fa-arrow-down","aria-hidden":"true"}),$.jsx("span",{children:"Usar o discador nesta aba"})]}),$.jsx("button",{type:"button",className:"login-secondary-btn login-secondary-danger",id:"logoutAllBtn",onClick:()=>null==l?void 0:l(),children:"Sair em todas as abas"}),$.jsx("p",{className:"login-hint",children:"O Callix aceita uma conexão por usuário: você já está conectado em outra aba deste navegador e pode continuar por lá."})]}):$.jsxs("div",{className:"login-confirm","data-login-state":"choose",children:[$.jsx("div",{className:"login-confirm-label",children:"Entrar como"}),$.jsxs("div",{className:"login-user-chip",children:[$.jsx("i",{className:"fas fa-user","aria-hidden":"true"}),$.jsx("span",{children:a.username})]}),i&&$.jsx("div",{className:"input-error",children:i}),!i&&a.note&&$.jsx("div",{className:"login-note",children:a.note}),$.jsxs("button",{type:"button",className:"login-confirm-btn",id:"loginConfirmBtn",onClick:()=>{m(a.username)},children:[$.jsx("i",{className:"fas fa-sign-in-alt","aria-hidden":"true"}),$.jsx("span",{children:"Entrar"})]}),!a.locked&&d&&$.jsx("button",{type:"button",className:"login-secondary-btn",onClick:d,children:"Usar outro usuário"}),$.jsx("p",{className:"login-hint",children:"Ao entrar, todas as abas abertas passam a usar o discador. Vai usar o Callix web? Então não entre aqui: nada é conectado sem a sua confirmação."})]}):$.jsxs($.Fragment,{children:[$.jsx("div",{className:"phone-number-display",children:$.jsx("input",{type:"text",className:"phone-input",placeholder:"Digite seu usuário Callix",value:c,onChange:e=>f(e.target.value),onKeyDown:e=>"Enter"===e.key&&g(),autoCapitalize:"none",autoCorrect:"off",spellCheck:!1})}),h&&$.jsx("div",{className:"input-error",children:h}),i&&$.jsx("div",{className:"input-error",children:i}),$.jsxs("div",{className:"call-actions",children:[$.jsx("div",{className:"empty-space"}),$.jsx("button",{type:"button",className:"call-button",onClick:g,"aria-label":"Entrar",children:$.jsx("i",{className:"fas fa-sign-in-alt"})}),$.jsx("div",{className:"empty-space"})]})]})]})})}function my(e,t){if(!e)return;const n=Object.entries(e),r=t.map(e=>e.toLowerCase());for(const[i,o]of n)if(r.includes(i.toLowerCase()))return o}function gy(e,t){const n=function(e){if(!e)return"";const t=e.trim().split(/\s+/)[0]||"";return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():""}(e);if(!t||"object"!=typeof t||0===Object.keys(t).length)return console.log("[WhatsApp Template] Sem dados de contato, usando mensagem genérica"),`Olá! Aqui é *${n}*, do Grupo Villela. Estou entrando em contato para dar continuidade ao nosso atendimento. Posso ajudar?`;console.log("[WhatsApp Template] Operador:",e,"-> Primeiro nome:",n),console.log("[WhatsApp Template] Campos recebidos:",t),console.log("[WhatsApp Template] Chaves disponíveis:",Object.keys(t));const r=my(t,["DECISOR","SOCIO","NOME","PROSPECT","CLIENTE","CONTATO"]);console.log("[WhatsApp Template] Prospect encontrado:",r);const i=my(t,["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","RAZAO_SOCIAL","COMPANY","NOME_EMPRESA"]);console.log("[WhatsApp Template] Empresa encontrada:",i);const o=my(t,["BENEFICIO","BENEFÍCIO","CAPITAL_RECUPERAR","CAPITAL A RECUPERAR","POTENCIAL","VALOR_RECUPERAR","VALOR RECUPERADO"]);if(console.log("[WhatsApp Template] Potencial encontrado:",o),!r&&!i&&!o)return console.log("[WhatsApp Template] Nenhum campo útil encontrado, usando mensagem genérica"),`Olá! Aqui é *${n}*, do Grupo Villela. Estou entrando em contato para dar continuidade ao nosso atendimento. Posso ajudar?`;let a=`Oi, *${r||"tudo bem"}*. Aqui é *${n}*, do Grupo Villela. Empresa líder no mercado de redução de dívidas e recuperação de capital, com mais de 20 anos de experiência.`;return i&&(a+=`\n\nVimos que a *${i}* tem um débito federal que contém cobranças indevidas.`),o?a+=`\n\nEm uma análise preliminar, verificamos que é possível recuperar para sua empresa um valor aproximado de *${o}*.`:i&&(a+="\n\nEm uma análise preliminar, verificamos que é possível recuperar valores significativos para sua empresa."),a+="\n\nGostaríamos de fazer um *diagnóstico gratuito* para te apresentar os valores reais que a empresa pode economizar. Posso te encaminhar o link para autorização?",a}function $y({username:e,onLogout:n,showClientInfoModal:r=!1,density:i}){var o,a,d,s;const{skipManualQualification:l}=Wy(),[u,c]=t.useState(""),[f,h]=t.useState("dialer"),[p,m]=t.useState(!1),[g,v]=t.useState(!1),[y,b]=t.useState("success"),[x,w]=t.useState(null),[_,C]=t.useState(null),[S,E]=t.useState(0),[N,T]=t.useState(null),[A,O]=t.useState(!1),[I,k]=t.useState(!1);Fv();const[j,R]=t.useState(null),[P,D]=t.useState(null),[L,M]=t.useState(0),[U,F]=t.useState({finalData:{},isLoading:!1,error:null}),[B,q]=t.useState([]),[z,H]=t.useState(!1),[W,G]=t.useState(null),[V,K]=t.useState(""),[Y,X]=t.useState(null),[J,Z]=t.useState(!1),Q=t.useRef(null),ee=t.useRef(0),[te,ne]=t.useState(!1),[re,ie]=t.useState([]),[oe,ae]=t.useState(null),[de,se]=t.useState("default"),[le,ue]=t.useState(null),ce=Yu(),fe=Xu(),he=Zu(),{hangup:pe,answer:me,reject:ge}=nc(),$e=Qu(),ve=ec(),ye=tc(),be=t.useMemo(()=>ve??[],[ve]),xe=t.useMemo(()=>ye??[],[ye]),{makeManualCall:we,finishAfterCall:_e}=Ju(),{goOnBreak:Ce,goOffBreak:Se}=am(),Ee=om(null==ce?void 0:ce.breaks)||[],Ne=om(null==ce?void 0:ce.user),Te="onBreak"===(null==fe?void 0:fe.state),[Ae,Oe]=rc(),Ie=function(){const e=t.useCallback((e="light")=>{if("undefined"==typeof navigator||!("vibrate"in navigator))return;const t=_v[e];try{navigator.vibrate(t)}catch{}},[]),n=t.useCallback(()=>e("light"),[e]),r=t.useCallback(()=>e("medium"),[e]),i=t.useCallback(()=>e("heavy"),[e]),o=t.useCallback(()=>e("selection"),[e]),a=t.useCallback(()=>e("success"),[e]),d=t.useCallback(()=>e("warning"),[e]),s=t.useCallback(()=>e("error"),[e]);return{trigger:e,impactLight:n,impactMedium:r,impactHeavy:i,selectionChanged:o,notificationSuccess:a,notificationWarning:d,notificationError:s}}(),ke=function(e={}){const{enabled:n=!0,volume:r=Ev,duration:i=Sv}=e,o=t.useRef(null),a=t.useRef([]),d=t.useCallback(()=>{var e;if(!n)return null;if(!o.current)try{const e=window.AudioContext||window.webkitAudioContext;e&&(o.current=new e)}catch{return console.warn("[useDTMF] Web Audio API não suportada"),null}return"suspended"===(null==(e=o.current)?void 0:e.state)&&o.current.resume().catch(()=>{}),o.current},[n]),s=t.useCallback(e=>{const t=d();if(!t)return;const n=Cv[e];if(!n)return;const[o,s]=n,l=t.currentTime,u=l+i/1e3;try{const e=t.createOscillator(),n=t.createOscillator(),d=t.createGain(),c=t.createGain();e.type="sine",n.type="sine",e.frequency.setValueAtTime(o,l),n.frequency.setValueAtTime(s,l),d.gain.setValueAtTime(0,l),d.gain.linearRampToValueAtTime(r,l+Nv),d.gain.setValueAtTime(r,u-Nv),d.gain.linearRampToValueAtTime(0,u),c.gain.setValueAtTime(0,l),c.gain.linearRampToValueAtTime(r,l+Nv),c.gain.setValueAtTime(r,u-Nv),c.gain.linearRampToValueAtTime(0,u),e.connect(d),d.connect(t.destination),n.connect(c),c.connect(t.destination),e.start(l),n.start(l),e.stop(u+.01),n.stop(u+.01),a.current.push(e,n),setTimeout(()=>{a.current=a.current.filter(t=>t!==e&&t!==n)},i+50)}catch(c){console.warn("[useDTMF] Erro ao tocar tom:",c)}},[d,i,r]),l=t.useCallback(()=>{a.current.forEach(e=>{try{e.stop()}catch{}}),a.current=[]},[]);return t.useEffect(()=>()=>{l(),o.current&&(o.current.close().catch(()=>{}),o.current=null)},[l]),{play:s,stopAll:l,isSupported:"undefined"!=typeof window&&!(!window.AudioContext&&!window.webkitAudioContext)}}({enabled:!0}),je=t.useRef(""),Re=t.useRef(null),Pe=t.useCallback(e=>!!["*#0000#","*#3284#"].includes(e)&&(Pv("info","Debug","🔓 Código secreto detectado - abrindo painel de debug"),k(!0),c(""),je.current="",!0),[]);t.useEffect(()=>{var e,t;const n=async()=>{try{const t=document.createElement("audio");if(!("setSinkId"in t))return console.log("[MobileDialer] setSinkId não suportado neste navegador"),void ue(!1);let n=!1,r=await navigator.mediaDevices.enumerateDevices(),i=r.filter(e=>"audiooutput"===e.kind);if(!i.some(e=>e.label&&e.label.length>0)&&i.length>0){console.log("[MobileDialer] Labels vazios, solicitando permissão de áudio...");try{const e=await navigator.mediaDevices.getUserMedia({audio:!0});n=!0,e.getTracks().forEach(e=>e.stop()),r=await navigator.mediaDevices.enumerateDevices(),i=r.filter(e=>"audiooutput"===e.kind),console.log("[MobileDialer] Permissão concedida. Dispositivos:",i.length,i)}catch(e){console.log("[MobileDialer] Usuário negou permissão de áudio:",e)}}else n=!0;if(console.log("[MobileDialer] Dispositivos de saída encontrados:",i.length,i),i.length<=1)return console.log("[MobileDialer] Apenas um dispositivo de saída - viva-voz não disponível"),void ue(!1);ie(i);const o=i.find(e=>e.label.toLowerCase().includes("speaker")||e.label.toLowerCase().includes("alto-falante")||e.label.toLowerCase().includes("viva-voz")),a=i.find(e=>"default"===e.deviceId||e.label.toLowerCase().includes("default")||e.label.toLowerCase().includes("earpiece")||e.label.toLowerCase().includes("fone"))||i[0];if(o&&o.deviceId!==(null==a?void 0:a.deviceId))ae(o.deviceId),se((null==a?void 0:a.deviceId)||"default"),ue(!0),console.log("[MobileDialer] Viva-voz disponível:",o.label);else if(i.length>1){const e=i.find(e=>e.deviceId!==(null==a?void 0:a.deviceId));e?(ae(e.deviceId),se((null==a?void 0:a.deviceId)||"default"),ue(!0),console.log("[MobileDialer] Usando dispositivo alternativo para viva-voz:",e.label)):ue(!1)}else ue(!1)}catch(t){console.error("[MobileDialer] Erro ao detectar dispositivos de áudio:",t),ue(!1)}};n();const r=()=>{console.log("[MobileDialer] Mudança de dispositivos detectada"),n()};return null==(t=null==(e=navigator.mediaDevices)?void 0:e.addEventListener)||t.call(e,"devicechange",r),()=>{var e,t;null==(t=null==(e=navigator.mediaDevices)?void 0:e.removeEventListener)||t.call(e,"devicechange",r)}},[]);const De=null==fe?void 0:fe.state,Le=t.useRef(!1);t.useEffect(()=>{if(0===Ee.length||"idle"!==De||Le.current||Te)return;if(!Ce)return;Le.current=!0;const e=Ee.find(e=>5===e.id||e.name.toLowerCase()==="Reunião".toLowerCase());if(e)console.log("[MobileDialer] Operador conectado (idle), entrando em pausa inicial:",e.name),Promise.resolve(Ce(e.id)).then(()=>{console.log("[MobileDialer] Pausa inicial aplicada com sucesso:",e.name),R(e.name),D(Date.now())}).catch(e=>{console.error("[MobileDialer] Falha ao entrar em pausa:",e),Le.current=!1});else{const e=Ee[0];console.log('[MobileDialer] Pausa "Reunião" não encontrada, usando:',e.name),Promise.resolve(Ce(e.id)).then(()=>{console.log("[MobileDialer] Pausa inicial aplicada com sucesso:",e.name),R(e.name),D(Date.now())}).catch(e=>{console.error("[MobileDialer] Falha ao entrar em pausa:",e),Le.current=!1})}},[Ee,De,Te,Ce]),t.useEffect(()=>{console.log("[MobileDialer] Breaks loaded:",Ee),Pv("state","Breaks",`Pausas carregadas: ${Ee.length}`,Ee)},[Ee]),t.useEffect(()=>{console.log("[MobileDialer] Call state changed:",De),Pv("state","CallState",`Estado da chamada: ${De}`,{callState:De,isOnBreak:Te}),"offline"===De&&(console.warn("[MobileDialer] Estado OFFLINE detectado - verifique a conexão"),Pv("warn","Connection","⚠️ Estado OFFLINE detectado"))},[De,Te]),t.useEffect(()=>{$e&&console.log("[MobileDialer] Call info atualizado:",{type:null==$e?void 0:$e.type,info:"campaign"===(null==$e?void 0:$e.type)?{campaign:$e.info.campaign,campaignContact:$e.info.campaignContact}:$e})},[$e]);const Me=t.useMemo(()=>{var e;return"campaign"===(null==$e?void 0:$e.type)?Xp($e.info,(null==(e=null==he?void 0:he.data)?void 0:e.campaignContactPhoneId)??null):null},[$e,he]),Ue=Me?Yp(Me):null,Fe=t.useRef(Me);Fe.current=Me,t.useEffect(()=>{const e=Fe.current;if(!e||!Ue)return void F({finalData:{},isLoading:!1,error:null});let t=!1,n=null;F({finalData:{},isLoading:!0,error:null}),Pv("debug","FetchContact","Buscando formulário do contato",{contactId:e.id,source:e.source});const r=t=>{F({finalData:t.values,isLoading:!1,error:null}),Pv("info","FetchContact",`✅ Formulário: ${t.fields.length} campos (${t.valuesSource}, layout ${t.layoutSource})`,{contactId:e.id,partial:!0===t.partial})};return Qp(e).then(i=>{t||(r(i),i.partial&&(n=setTimeout(()=>{t||Qp(e,{force:!0}).then(e=>{t||r(e)}).catch(()=>{})},3e3)))}).catch(e=>{t||(console.error("[MobileDialer] Erro ao buscar o formulário:",e),F({finalData:{},isLoading:!1,error:e instanceof Error?e.message:"Erro ao buscar dados"}))}),()=>{t=!0,n&&clearTimeout(n)}},[Ue]);const Be=De,{notice:qe,dismiss:ze,recheckDevices:He}=Zv(),[We,Ge]=t.useState(0),Ve="startupError"===Be||"offline"===Be||"device"===(null==qe?void 0:qe.source)||"session"===(null==qe?void 0:qe.source),Ke=!Be||"starting"===Be||"idle"===Be||"manualCallSetup"===Be||"onBreak"===Be,Ye="manualCallSetup"===De||"manualCallRinging"===De||"callRinging"===De,Xe="callInProgress"===De,Je="afterCall"===De,Ze=t.useMemo(()=>$e&&"campaign"===$e.type?$e.info:null,[$e]);t.useEffect(()=>{r&&(Xe||Ye)&&"campaign"===(null==$e?void 0:$e.type)&&O(!0)},[r,Xe,Ye,$e]),t.useEffect(()=>{r&&(Xe||Ye||Je||O(!1))},[r,Xe,Ye,Je]),t.useEffect(()=>{if(!Xe)return void E(0);const e=setInterval(()=>{E(e=>e+1)},1e3);return()=>clearInterval(e)},[Xe]),t.useEffect(()=>{if(!Te||!P)return;const e=setInterval(()=>{const e=Math.floor((Date.now()-P)/1e3);M(e)},1e3);return()=>clearInterval(e)},[Te,P]),t.useEffect(()=>{!Te&&j&&(R(null),D(null),M(0))},[Te,j]),t.useEffect(()=>{const e=e=>{const t=e.detail;(null==t?void 0:t.phone)&&(T(null),c(T$(t.phone).slice(0,32)),h("dialer"),Pv("event","Call",`🖱️ Click-to-call recebido: ${t.phoneDisplay}`,{taskId:t.id,source:t.source}))};return window.addEventListener(_$,e),()=>window.removeEventListener(_$,e)},[]),t.useEffect(()=>{console.log("[MobileDialer] Screen control effect - callState:",De,"isInCall:",Xe,"isConnecting:",Ye,"isAfterCall:",Je),Xe||Ye?h("call"):(Je||Ke||Te)&&h("dialer")},[Xe,Ye,Je,Ke,Te,De]),t.useEffect(()=>{if(Je){console.log("[MobileDialer] 📋 afterCall triggered - callInfo:",JSON.stringify($e,null,2)),console.log("[MobileDialer] 📋 afterCall - callInfo?.type:",null==$e?void 0:$e.type),console.log("[MobileDialer] 📋 afterCall - skipManualQualification:",l),console.log("[MobileDialer] 📋 afterCall - successQualifications:",be.length),console.log("[MobileDialer] 📋 afterCall - discardQualifications:",xe.length);if("campaign"===(null==$e?void 0:$e.type)&&!0===$e.info.campaign.skipCallQualification&&_e)return console.log("[MobileDialer] 🚀 Campanha com skipCallQualification - finalizando automaticamente"),void Promise.resolve(_e({result:"success",qualificationId:void 0}));if("manual"===(null==$e?void 0:$e.type)&&_e)return console.log("[MobileDialer] 🚀 Chamada MANUAL detectada - finalizando automaticamente (chamadas manuais NUNCA exibem qualificação)"),void Promise.resolve(_e({result:"success",qualificationId:void 0}));if(0===be.length&&0===xe.length&&_e)return console.log("[MobileDialer] 🚀 Sem qualificações configuradas - finalizando automaticamente"),void Promise.resolve(_e({result:"success",qualificationId:void 0}));console.log("[MobileDialer] ⚠️ Abrindo modal de qualificação - tipo:",null==$e?void 0:$e.type);const e=be.length>0;b(e?"success":"failure"),w(null),C(null),v(!0)}else v(!1)},[Je,$e,_e,be,xe,l]);const Qe=t.useMemo(()=>c$(u),[u]),et=t.useMemo(()=>{if(/[*#]/.test(u))return null;const e=u.replace(/\D/g,"");if(!e)return null;const t=u$(e);return t&&t!==e&&p$(t)?c$(t):null},[u]),tt=t.useCallback(e=>u$(e),[]),nt=t.useCallback(e=>{if(Ie.impactLight(),ke.play(e),Re.current&&clearTimeout(Re.current),je.current+=e,console.log("[MobileDialer] Sequência atual:",je.current),Pe(je.current))return console.log("[MobileDialer] 🔓 Código secreto detectado!"),void c("");if(je.current.length>20&&(je.current=je.current.slice(-10)),Re.current=setTimeout(()=>{je.current=""},3e3),Xe||Ye){if(he&&"function"==typeof he.sendDtmf)try{he.sendDtmf(e)}catch(t){console.error("Falha ao enviar DTMF",t)}}else c(t=>(t+e).slice(0,32))},[he,Xe,Ye,Ie,ke,Pe]),rt=t.useCallback(()=>{Ie.impactLight(),c(e=>e.slice(0,-1))},[Ie]),it=t.useCallback(async()=>{console.log("[MobileDialer] handleCall triggered, dialValue:",u),Pv("event","Call","📞 Iniciando chamada manual",{dialValue:u});const e=tt(u);if(console.log("[MobileDialer] Sanitized number:",e),!e||!p$(e))return console.log("[MobileDialer] Invalid phone format"),Pv("warn","Call","⚠️ Número inválido",{sanitized:e,isValid:!1}),T("Número inválido. Informe o DDD e o número (fixo com 8 ou celular com 9 dígitos)."),void Ie.notificationError();if(T(null),!we)return console.error("[MobileDialer] makeManualCall is not available"),Pv("error","Call","❌ makeManualCall não disponível"),void T("Função de chamada não disponível.");const t=f$(e)??`+55${e}`;console.log("[MobileDialer] Calling makeManualCall with E.164:",t),Pv("info","Call",`📞 Ligando para ${t}`,{e164Number:t}),Ie.impactMedium();try{we(t),console.log("[MobileDialer] makeManualCall called successfully"),Pv("info","Call","✅ makeManualCall executado com sucesso")}catch(n){console.error("[MobileDialer] Erro ao iniciar chamada manual:",n),Pv("error","Call","❌ Erro ao iniciar chamada",n),T("Erro ao iniciar chamada."),Ie.notificationError()}},[u,we,tt,Ie]),ot=t.useCallback(async()=>{if(pe){Pv("event","Call","📴 Encerrando chamada"),Ie.impactHeavy();try{await pe(),Pv("info","Call","✅ Chamada encerrada")}catch(e){console.error("[MobileDialer] Erro ao desligar",e)}}},[pe,Ie]),at=t.useCallback(()=>{Ie.impactLight(),Oe(!Ae)},[Ae,Oe,Ie]),dt=t.useCallback(()=>{if(Ie.impactLight(),!1===le)return console.warn("[MobileDialer] Viva-voz não suportado neste navegador/dispositivo"),void Ie.notificationWarning();if(!oe||null===le)return console.warn("[MobileDialer] Dispositivos de saída não detectados ainda"),void Ie.notificationWarning();const e=!te,t=e?oe:de;console.log("[MobileDialer] Alternando viva-voz:",e?"LIGADO":"DESLIGADO","Device:",t);try{(null==ce?void 0:ce.audioOutput)?(ce.audioOutput.setAudioOutputDevice(t),ne(e),Ie.notificationSuccess(),console.log("[MobileDialer] Dispositivo de saída alterado com sucesso")):(console.warn("[MobileDialer] audioOutput não disponível no operator"),Ie.notificationError())}catch(n){console.error("[MobileDialer] Erro ao alternar viva-voz:",n),Ie.notificationError()}},[Ie,le,oe,de,te,ce]),st=t.useCallback(async({phone:e,limit:t})=>{const n=null==Ne?void 0:Ne.id;if(!n)throw new Error("Aguardando ID do usuário");const r=new URLSearchParams({agent_id:String(n),limit:String(t)});e&&r.set("phone",e);const i=await fetch(`${Gp}/api/call-history?${r.toString()}`,{method:"GET",headers:Vp(),credentials:"omit"});if(!i.ok)throw new Error(401===i.status||403===i.status?"Sessão expirada. Entre novamente para ver o histórico.":`Erro ${i.status}`);return(await i.json()).items||[]},[null==Ne?void 0:Ne.id]),lt=t.useCallback(async()=>{if(null==Ne?void 0:Ne.id){H(!0),G(null),Q.current=null;try{const e=await st({limit:50});console.log("[MobileDialer] Histórico recebido:",e.length,"registros"),q(e)}catch(e){console.error("[MobileDialer] Erro ao buscar histórico:",e),G(e instanceof Error&&e.message.startsWith("Sessão")?e.message:"Erro ao carregar histórico"),q([])}finally{H(!1)}}else console.log("[MobileDialer] Aguardando ID do usuário para buscar histórico")},[st,null==Ne?void 0:Ne.id]),ut=t.useCallback(async e=>{K(e);const t=iv(e),n=++ee.current;if("empty"===t.kind)return X(null),void Z(!1);Z(!0);try{let e;"phone"===t.kind?e=await st({phone:t.digits,limit:100}):(Q.current||(Q.current=await st({limit:200})),e=Q.current),n===ee.current&&X(e)}catch(r){console.error("[MobileDialer] Erro na busca do histórico:",r),n===ee.current&&X(null)}finally{n===ee.current&&Z(!1)}},[st]),ct=t.useMemo(()=>{const e=iv(V);return"phone"===e.kind?"Busca por número em todo o histórico":"text"===e.kind?Y?"Busca por texto nas últimas 200 chamadas":"Busca por texto nas chamadas carregadas":null},[V,Y]);t.useEffect(()=>{"history"===f&<()},[f,lt]);const ft=t.useCallback(()=>{var t;let n="";"campaign"===(null==$e?void 0:$e.type)&&(null==(t=$e.info.campaignContact)?void 0:t.phoneNumber)?n=$e.info.campaignContact.phoneNumber:u&&(n=u);let r=n.replace(/[^\d+]/g,"");r.startsWith("+")||(r.startsWith("55")||(r="55"+r),r="+"+r);const i=gy((null==Ne?void 0:Ne.name)||e||"",U.finalData),o=encodeURIComponent(i),a=`https://wa.me/${r.replace("+","")}?text=${o}`;console.log("[MobileDialer] Abrindo WhatsApp com template:",a),window.open(a,"_blank")},[$e,u,Ne,e,U.finalData]),ht=t.useCallback(async e=>{if(Ce)try{const t=Ee.find(t=>t.id===e);await Ce(e),Ie.notificationSuccess(),R((null==t?void 0:t.name)??"Em pausa"),D(Date.now()),M(0),m(!1)}catch(t){console.error("Erro ao entrar em pausa",t),Ie.notificationError()}},[Ce,Ee,Ie]),pt=t.useCallback(async()=>{if(Se)try{await Se(),Ie.notificationSuccess(),R(null),D(null),M(0),m(!1)}catch(e){console.error("Erro ao sair de pausa",e),Ie.notificationError()}},[Se,Ie]),mt=t.useCallback(async()=>{if(!_e)return;if(!("success"===y?be:xe).length)return C("Nenhuma qualificação disponível."),void Ie.notificationWarning();if(!x)return C("Selecione uma qualificação."),void Ie.notificationWarning();C(null),Ie.impactMedium();try{await Promise.resolve(_e({result:y,qualificationId:x})),Ie.notificationSuccess(),v(!1)}catch(e){C("Erro ao enviar qualificação."),Ie.notificationError(),console.error("Erro finishAfterCall",e)}},[xe,_e,y,x,be,Ie]),gt=t.useMemo(()=>{var e;return"campaign"===(null==$e?void 0:$e.type)&&(null==(e=$e.info.campaignContact)?void 0:e.phoneNumber)?c$($e.info.campaignContact.phoneNumber):Qe||"(--) ----- ----"},[$e,Qe]),$t=t.useMemo(()=>Ye?"Ligando...":Xe?"Em chamada":Je?"Encerrando...":"manualCallFailed"===Be?"Chamada não concluída":Ve?(null==qe?void 0:qe.title)??"Erro de conexão":Te?"Em pausa":"Disponível",[Be,qe,Je,Ye,Ve,Xe,Te]),vt=t.useMemo(()=>Ve?"error":Te?"paused":"available",[Ve,Te]),yt=t.useMemo(()=>Ve?"device"===(null==qe?void 0:qe.source)?qe.title:"Erro":Te?j||"Em pausa":"Disponível",[qe,Ve,Te,j]),bt=t.useMemo(()=>{const e=Math.floor(L/3600),t=Math.floor(L%3600/60).toString().padStart(2,"0"),n=(L%60).toString().padStart(2,"0");return e>0?`${e}:${t}:${n}`:`${t}:${n}`},[L]),xt=t.useMemo(()=>`${Math.floor(S/60).toString().padStart(2,"0")}:${(S%60).toString().padStart(2,"0")}`,[S]),wt=(e,t)=>$.jsxs("div",{className:"key","data-value":e,onClick:()=>nt(e),role:"button","aria-label":`Tecla ${e}`,children:[$.jsx("span",{className:"number","aria-hidden":"true",children:e}),$.jsx("span",{className:"letters","aria-hidden":"true",children:t||" "})]},e);return I?$.jsx(Hv,{onClose:()=>{k(!1),Pv("info","Debug","🔒 Painel de debug fechado")}}):$.jsxs("div",{className:"phone-container","data-density":"compact"===i?"compact":"comfortable",style:{"--notice-h":`${We}px`},children:[$.jsxs("div",{className:"screen dialer-screen "+("dialer"===f?"active":""),id:"dialerScreen",children:[$.jsxs("div",{className:"dialer-header",children:[$.jsx("div",{className:"status-container",children:$.jsxs("button",{className:`status-badge ${vt}`,id:"statusBadge",children:[$.jsx("span",{className:"status-dot"}),Te?$.jsxs("div",{className:"status-info",children:[$.jsx("span",{className:"status-text",children:yt}),$.jsx("span",{className:"pause-timer",children:bt})]}):$.jsx("span",{className:"status-text",children:yt})]})}),$.jsxs("div",{className:"status-actions",children:[Te?$.jsxs("button",{className:"resume-btn",id:"resumeBtn",onClick:pt,children:[$.jsx("i",{className:"fas fa-play"}),$.jsx("span",{children:"Voltar"})]}):$.jsxs("button",{className:"pause-btn",id:"pauseBtn",onClick:()=>m(!0),children:[$.jsx("i",{className:"fas fa-pause"}),$.jsx("span",{children:"Pausa"})]}),$.jsx("button",{type:"button",className:"logout-btn",id:"logoutBtn",title:"Sair do discador (todas as abas)","aria-label":"Sair do discador",onClick:()=>{("undefined"==typeof window||window.confirm("Sair do discador em todas as abas?"))&&n()},children:$.jsx("i",{className:"fas fa-right-from-bracket"})})]})]}),$.jsx(Wv,{notice:qe,onDismiss:ze,onRecheck:()=>{He()},onHeightChange:Ge}),$.jsx("div",{className:"phone-number-display",children:$.jsx(Q$,{id:"phoneNumber",className:"phone-input",placeholder:"","aria-label":"Número de telefone",value:u,onChange:e=>c(e.slice(0,32)),onSubmit:()=>{it()}})}),et&&$.jsxs("div",{className:"dial-preview",children:["Será discado: ",et]}),$.jsxs("div",{className:"keypad",children:[wt("1",""),wt("2","ABC"),wt("3","DEF"),wt("4","GHI"),wt("5","JKL"),wt("6","MNO"),wt("7","PQRS"),wt("8","TUV"),wt("9","WXYZ"),wt("*",""),wt("0","+"),wt("#","")]}),N&&$.jsx("div",{className:"input-error",children:N}),$.jsxs("div",{className:"call-actions",children:[$.jsx("div",{className:"empty-space"}),$.jsx("button",{className:"call-button",id:"callButton",onClick:it,disabled:!Qe||!Ke,children:$.jsx("i",{className:"fas fa-phone"})}),$.jsx("button",{className:"delete-button",id:"deleteButton",style:{visibility:u?"visible":"hidden"},onClick:rt,children:$.jsx("i",{className:"fas fa-delete-left"})})]})]}),$.jsxs("div",{className:"screen call-screen "+("call"===f?"active":""),id:"callScreen",children:[$.jsxs("div",{className:"call-info",children:[$.jsxs("div",{className:"call-status",children:[$.jsx("span",{className:"operator-badge-small",children:(null==e?void 0:e.slice(0,2).toUpperCase())||"OP"}),Xe?$.jsx("span",{id:"callTimer",children:xt}):$.jsx("span",{id:"callStatus",children:$t})]}),$.jsx("div",{className:"call-number",id:"callNumber",children:gt}),$.jsx("div",{className:"call-location",children:"Brasil"}),"campaign"===(null==$e?void 0:$e.type)&&$.jsx("div",{className:"client-card",id:"clientCard",children:U.isLoading?$.jsxs("div",{className:"client-card-loading",children:[$.jsx("i",{className:"fas fa-spinner fa-spin"}),$.jsx("span",{children:"Carregando dados..."})]}):U.error?$.jsxs("div",{className:"client-card-error",children:[$.jsx("i",{className:"fas fa-exclamation-circle"}),$.jsx("span",{children:U.error})]}):$.jsxs($.Fragment,{children:[$.jsxs("div",{className:"client-card-header",children:[$.jsx("i",{className:"fas fa-user-circle client-avatar"}),$.jsxs("div",{className:"client-main-info",children:[$.jsx("span",{className:"client-name",id:"clientName",children:fy(U.finalData,["DECISOR","NOME","CLIENTE","PROSPECT"])??(null==(o=$e.info.campaignContact)?void 0:o.label)??"--"}),$.jsx("span",{className:"client-company",id:"clientCompany",children:fy(U.finalData,["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","RAZAO_SOCIAL"])??(null==(a=$e.info.campaign)?void 0:a.name)??"--"})]})]}),$.jsx("div",{className:"client-card-divider"}),$.jsxs("div",{className:"client-info-list",children:[$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"Socio"}),$.jsx("span",{className:"client-info-value",children:fy(U.finalData,["SOCIO","PROSPECT","DECISOR","NOME","CLIENTE"])??(null==(d=$e.info.campaignContact)?void 0:d.label)??"--"})]}),$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"Empresa"}),$.jsx("span",{className:"client-info-value",children:fy(U.finalData,["EMPRESA","RAZAO SOCIAL","RAZÃO SOCIAL","RAZAO_SOCIAL","COMPANY"])??"--"})]}),$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"CNPJ"}),$.jsx("span",{className:"client-info-value",children:fy(U.finalData,["CNPJ","CPF_CNPJ","CPF/CNPJ","DOCUMENTO"])??"--"})]}),$.jsxs("div",{className:"client-info-row",children:[$.jsx("span",{className:"client-info-label",children:"Dívida federal ativa"}),$.jsx("span",{className:"client-info-value debt",children:fy(U.finalData,["DIVIDA_ATIVA","DIVIDA ATIVA","DÍVIDA ATIVA","DIVIDA FEDERAL","DÍVIDA FEDERAL ATIVA","VALOR DIVIDA"])??"R$ 0,00"})]})]}),$.jsx("div",{className:"client-card-divider"}),$.jsxs("div",{className:"client-capital-section",children:[$.jsx("span",{className:"client-capital-label",children:"Capital a recuperar"}),$.jsx("span",{className:"client-capital-value",children:fy(U.finalData,["CAPITAL_RECUPERAR","CAPITAL A RECUPERAR","BENEFICIO","BENEFÍCIO","VALOR_TOTAL","VALOR RECUPERADO"])??"R$ 0,00"})]})]})})]}),$.jsx(Xv,{}),$.jsxs("div",{className:"call-controls",children:[$.jsxs("div",{className:"control-row",children:[$.jsxs("button",{className:`control-button ${te?"active":""} ${!1===le?"disabled":""}`,id:"speakerBtn",onClick:dt,disabled:!1===le,title:!1===le?"Viva-voz não suportado neste dispositivo":"",children:[$.jsx("div",{className:"control-icon",children:$.jsx("i",{className:"fas "+(te?"fa-volume-high":"fa-volume-low")})}),$.jsx("span",{children:te?"Viva-voz":"Alto-falante"})]}),$.jsxs("button",{className:"control-button "+(Ae?"active":""),id:"muteBtn",onClick:at,children:[$.jsx("div",{className:"control-icon",children:$.jsx("i",{className:"fas "+(Ae?"fa-microphone-slash":"fa-microphone")})}),$.jsx("span",{children:"Mudo"})]}),$.jsxs("button",{className:"control-button",id:"keypadBtn",onClick:()=>h("incallKeypad"),children:[$.jsx("div",{className:"control-icon",children:$.jsx("i",{className:"fas fa-th"})}),$.jsx("span",{children:"Teclado"})]})]}),$.jsxs("div",{className:"control-row control-row-center",children:[$.jsxs("button",{className:"control-button whatsapp-btn",id:"whatsappBtn",onClick:ft,children:[$.jsx("div",{className:"control-icon whatsapp-icon",children:$.jsx("i",{className:"fab fa-whatsapp"})}),$.jsx("span",{children:"WhatsApp"})]}),$.jsxs("div",{className:"end-call-wrapper",children:[$.jsx("button",{className:"end-call-button",id:"endCallButton",onClick:ot,children:$.jsx("i",{className:"fas fa-phone-slash"})}),$.jsx("span",{className:"end-call-label",children:"Desligar"})]})]})]})]}),$.jsxs("div",{className:"screen incall-keypad-screen "+("incallKeypad"===f?"active":""),id:"incallKeypadScreen",children:[$.jsx("div",{className:"incall-header",children:$.jsx("button",{className:"hide-keypad-btn",id:"hideKeypadBtn",onClick:()=>h("call"),children:$.jsx("span",{children:"Ocultar"})})}),$.jsx("div",{className:"incall-number-display",children:$.jsx("span",{id:"incallPhoneNumber",children:gt})}),$.jsx("div",{className:"keypad incall-keypad",children:["1","2","3","4","5","6","7","8","9","*","0","#"].map(e=>$.jsxs("div",{className:"key incall-key","data-value":e,onClick:()=>nt(e),children:[$.jsx("span",{className:"number",children:e}),$.jsx("span",{className:"letters",children:" "})]},e))}),$.jsx("div",{className:"incall-actions",children:$.jsx("button",{className:"end-call-button",id:"endCallButton2",onClick:ot,children:$.jsx("i",{className:"fas fa-phone-slash"})})})]}),$.jsx("div",{className:"screen call-history-screen "+("history"===f?"active":""),id:"callHistoryScreen",children:$.jsx(wv,{items:Y??B,isLoading:z,error:W,onRefresh:lt,query:V,onQueryChange:ut,isSearching:J,searchHint:ct,onCall:e=>{Ie.impactLight(),c(nv(e)),h("dialer")},onWhatsApp:t=>{Ie.impactLight();const n=`55${nv(t)}`,r=gy((null==Ne?void 0:Ne.name)||e||"",t.fields);window.open(`https://wa.me/${n}?text=${encodeURIComponent(r)}`,"_blank")},apiBaseUrl:Gp,getAuthHeaders:Vp})}),$.jsxs("nav",{className:"bottom-nav "+("call"===f||"incallKeypad"===f?"hidden":""),id:"bottomNav",children:[$.jsxs("div",{className:"nav-item "+("history"===f?"active":""),id:"navCalls",onClick:()=>h("history"),children:[$.jsx("div",{className:"nav-icon",children:$.jsx("i",{className:"fas fa-clock-rotate-left"})}),$.jsx("span",{children:"Recentes"})]}),$.jsxs("div",{className:"nav-item "+("dialer"===f||"call"===f||"incallKeypad"===f?"active":""),id:"navKeypad",onClick:()=>h("dialer"),children:[$.jsx("div",{className:"nav-icon",children:$.jsx("i",{className:"fas fa-th"})}),$.jsx("span",{children:"Teclado"})]})]}),$.jsx("div",{className:"modal-overlay "+(p?"active":""),id:"pauseModal",children:$.jsxs("div",{className:"modal-content",children:[$.jsxs("div",{className:"modal-header",children:[$.jsx("h2",{className:"modal-title",children:"Selecionar Pausa"}),$.jsx("button",{className:"modal-close",id:"closePauseModal",onClick:()=>m(!1),children:$.jsx("i",{className:"fas fa-xmark"})})]}),$.jsxs("div",{className:"pause-options",id:"pauseOptions",children:[Ee.map(e=>$.jsxs("div",{className:"pause-option",onClick:()=>ht(e.id),children:[$.jsx("div",{className:"pause-option-icon",children:$.jsx("i",{className:`fas ${e.icon||"fa-circle-pause"}`})}),$.jsxs("div",{className:"pause-option-info",children:[$.jsx("div",{className:"pause-option-name",children:e.name}),$.jsxs("div",{className:"pause-option-id",children:["ID: ",e.id]})]})]},e.id)),!Ee.length&&$.jsx("div",{className:"history-empty",children:"Nenhuma pausa configurada."})]}),$.jsx("button",{className:"modal-cancel-btn",id:"cancelPauseBtn",onClick:()=>m(!1),children:"Cancelar"})]})}),$.jsx("div",{className:"modal-overlay qualification-modal "+(g?"active":""),id:"qualificationModal",children:$.jsxs("div",{className:"qualification-sheet",children:[$.jsx("div",{className:"sheet-handle"}),$.jsxs("div",{className:"sheet-header",children:[$.jsx("span",{className:"sheet-title",children:"Qualificar Chamada"}),$.jsx("span",{className:"sheet-subtitle",children:"Registre o resultado do atendimento"})]}),$.jsxs("div",{className:"result-segmented",children:[$.jsx("button",{className:"segment "+("success"===y?"active":""),id:"resultSuccess","data-type":"success",onClick:()=>{b("success"),w(null)},children:"Sucesso"}),$.jsx("button",{className:"segment "+("failure"===y?"active":""),id:"resultFailure","data-type":"failure",onClick:()=>{b("failure"),w(null)},children:"Falha"}),$.jsx("div",{className:"segment-indicator"})]}),$.jsx("div",{className:"qualifications-container",children:$.jsxs("div",{className:"qualification-list",id:"qualificationList",children:[("success"===y?be:xe).map(e=>$.jsx("button",{className:"qualification-item "+(x===e.id?"selected":""),onClick:()=>w(e.id),children:$.jsx("span",{children:e.name})},e.id)),!("success"===y?be:xe).length&&$.jsx("div",{className:"history-empty",children:"Nenhuma qualificação configurada."})]})}),_&&$.jsx("div",{className:"input-error",children:_}),$.jsx("div",{className:"sheet-footer",children:$.jsx("button",{className:"confirm-btn",id:"confirmQualificationBtn",onClick:mt,disabled:!x,children:"Confirmar"})})]})}),r&&$.jsx(uy,{isOpen:A,campaignCallInfo:Ze,campaignContactPhoneId:(null==(s=null==he?void 0:he.data)?void 0:s.campaignContactPhoneId)??null,callDuration:S,isCallActive:Xe||Ye,onClose:()=>O(!1)})]})}const vy=16;function yy(e,t,n){return Math.min(Math.max(e,t),n)}function by({isOpen:e,result:r,onChangeResult:i,successQualifications:o,discardQualifications:a,selectedQualificationId:d,onSelectQualification:s,onSubmit:l,isSubmitting:u,errorMessage:c,portalTarget:f=null}){const h=t.useRef(null),p=t.useRef({pointerId:null,offsetX:0,offsetY:0}),m=t.useRef(!1),[g,v]=t.useState({x:100,y:100}),[y,b]=t.useState(!1),x="success"===r?o:a,w=x.length>0,_=t.useCallback(e=>{if("undefined"==typeof window)return e;const t=window.innerWidth,n=window.innerHeight,r=h.current,i=(null==r?void 0:r.offsetWidth)??400,o=(null==r?void 0:r.offsetHeight)??500,a=Math.max(16,t-i-vy),d=Math.max(16,n-o-vy);return{x:yy(e.x,16,a),y:yy(e.y,16,d)}},[]);t.useEffect(()=>{if(e&&"undefined"!=typeof window){const e=h.current,t=(null==e?void 0:e.offsetWidth)??400,n=(null==e?void 0:e.offsetHeight)??500,r=(window.innerWidth-t)/2,i=(window.innerHeight-n)/2;v(_({x:r,y:i}))}},[e,_]),t.useEffect(()=>{if(!e||"undefined"==typeof window)return;const t=()=>{v(e=>_(e))};return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t)}},[e,_]),t.useEffect(()=>{if(!y)return;const e=e=>{var t,n;if(p.current.pointerId!==e.pointerId)return;m.current=!0;const r=(null==(t=h.current)?void 0:t.offsetWidth)??0,i=(null==(n=h.current)?void 0:n.offsetHeight)??0,o=e.clientX-p.current.offsetX,a=e.clientY-p.current.offsetY,d="undefined"!=typeof window?window.innerWidth:0,s="undefined"!=typeof window?window.innerHeight:0,l=d-r-vy,u=s-i-vy,c=Math.max(vy,l),f=Math.max(vy,u);v({x:yy(o,vy,c),y:yy(a,vy,f)})},t=e=>{p.current.pointerId===e.pointerId&&(b(!1),p.current={pointerId:null,offsetX:0,offsetY:0})};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[y]);const C=t.useCallback(e=>{if(0!==e.button&&"touch"!==e.pointerType)return;const t=h.current;if(!t)return;const n=t.getBoundingClientRect();p.current={pointerId:e.pointerId,offsetX:e.clientX-n.left,offsetY:e.clientY-n.top},m.current=!1,b(!0)},[]);if(!e)return null;const S=$.jsxs("div",{ref:h,className:Gh`fixed z-[9999] flex flex-col overflow-hidden rounded-xl border border-slate-300 bg-white shadow-2xl`,style:{left:`${g.x}px`,top:`${g.y}px`,width:"420px",maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 32px)"},children:[$.jsx("div",{onPointerDown:C,className:Gh`flex cursor-move items-center justify-center border-b border-slate-200 bg-gradient-to-r from-indigo-500 to-indigo-600 px-4 py-3 text-white`,children:$.jsx("h3",{className:Gh`text-sm font-bold`,children:"Qualificar Chamada"})}),$.jsxs("div",{className:Gh`flex-1 space-y-4 overflow-y-auto p-5`,children:[$.jsx("div",{className:Gh`text-center`,children:$.jsx("p",{className:Gh`text-sm text-slate-600`,children:"Esta etapa é obrigatória para registrar o desfecho do atendimento."})}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsx("p",{className:Gh`text-sm font-semibold text-slate-700`,children:"Resultado da chamada"}),$.jsxs("div",{className:Gh`grid grid-cols-2 gap-3`,children:[$.jsxs("button",{type:"button",onClick:()=>i("success"),className:Gh`${"success"===r?"border-emerald-500 bg-emerald-50 ring-2 ring-emerald-500":"border-slate-200 bg-white hover:border-emerald-300"} flex flex-col items-center justify-center gap-2 rounded-lg border px-4 py-3 transition`,children:[$.jsx(_c,{className:Gh`h-6 w-6 ${"success"===r?"text-emerald-600":"text-slate-400"}`}),$.jsx("span",{className:Gh`text-sm font-semibold ${"success"===r?"text-emerald-700":"text-slate-600"}`,children:"Sucesso"})]}),$.jsxs("button",{type:"button",onClick:()=>i("failure"),className:Gh`${"failure"===r?"border-rose-500 bg-rose-50 ring-2 ring-rose-500":"border-slate-200 bg-white hover:border-rose-300"} flex flex-col items-center justify-center gap-2 rounded-lg border px-4 py-3 transition`,children:[$.jsx(Hc,{className:Gh`h-6 w-6 ${"failure"===r?"text-rose-600":"text-slate-400"}`}),$.jsx("span",{className:Gh`text-sm font-semibold ${"failure"===r?"text-rose-700":"text-slate-600"}`,children:"Falha"})]})]})]}),$.jsxs("div",{className:Gh`space-y-2`,children:[$.jsx("p",{className:Gh`text-sm font-semibold text-slate-700`,children:"Selecione uma qualificação"}),w?$.jsx("div",{className:Gh`max-h-64 space-y-2 overflow-y-auto rounded-lg border border-slate-200 bg-slate-50 p-2`,children:x.map(e=>{const t=d===e.id;return $.jsx("button",{type:"button",onClick:()=>s(e.id),className:Gh`${t?"border-blue-400 bg-blue-100 ring-2 ring-blue-400":"border-slate-200 bg-white hover:border-blue-300"} w-full rounded-lg border px-4 py-3 text-left transition`,children:$.jsx("p",{className:Gh`text-sm font-semibold ${t?"text-blue-800":"text-slate-800"}`,children:e.name})},e.id)})}):$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700`,children:[$.jsx(yc,{className:Gh`h-5 w-5 flex-shrink-0`}),$.jsx("span",{children:"Nenhuma qualificação disponível para este tipo de resultado."})]})]}),c&&$.jsxs("div",{className:Gh`flex items-center gap-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700`,children:[$.jsx(yc,{className:Gh`h-5 w-5 flex-shrink-0`}),$.jsx("span",{children:c})]})]}),$.jsx("div",{className:Gh`border-t border-slate-200 bg-slate-50 px-5 py-4`,children:$.jsxs("button",{type:"button",onClick:l,disabled:!w||!d||u,className:Gh`flex w-full items-center justify-center gap-2 rounded-lg bg-indigo-600 px-4 py-3 text-sm font-bold text-white shadow-md transition hover:bg-indigo-700 disabled:cursor-not-allowed disabled:opacity-50`,children:[u&&$.jsxs("svg",{className:Gh`h-4 w-4 animate-spin text-white`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[$.jsx("circle",{className:Gh`opacity-25`,cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),$.jsx("path",{className:Gh`opacity-75`,fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u?"Enviando...":"Confirmar Qualificação"]})})]});return"undefined"!=typeof document?n.createPortal(S,f??document.body):null}function xy({variant:e="default",portalTarget:t,isAuthenticated:n,mode:r,...i}){const o="min"===e;return"mobile"===e?$.jsx(hy,{isAuthenticated:n,showClientInfoModal:"inline"===r,...i}):n&&o?$.jsx(wy,{portalTarget:t,...i}):$.jsx(M$,{variant:e,portalTarget:t,isAuthenticated:n,...i})}function wy({username:e,onLogin:n,onLogout:r,isLoadingSession:i,sessionError:o,portalTarget:a}){var d;const{skipManualQualification:s}=Wy(),l=Xu(),u=Qu(),c=Zu(),f=ec(),h=tc(),p=t.useMemo(()=>f??[],[f]),m=t.useMemo(()=>h??[],[h]),{finishAfterCall:g}=Ju(),[v,y]=t.useState(!1),[b,x]=t.useState(!1),[w,_]=t.useState(0),[C,S]=t.useState("success"),[E,N]=t.useState(null),[T,A]=t.useState(!1),[O,I]=t.useState(null),k=null==l?void 0:l.state,j="callInProgress"===k,R="manualCallSetup"===k||("manualCallRinging"===k||"callRinging"===k),P="afterCall"===k;t.useEffect(()=>{if(!j)return void _(0);const e=setInterval(()=>{_(e=>e+1)},1e3);return()=>clearInterval(e)},[j]),t.useEffect(()=>{(j||R)&&"campaign"===(null==u?void 0:u.type)&&y(!0)},[j,R,u]),t.useEffect(()=>{if(P){if("campaign"===(null==u?void 0:u.type)&&!0===u.info.campaign.skipCallQualification&&g)return void Promise.resolve(g({result:"success",qualificationId:void 0}));if("manual"===(null==u?void 0:u.type)&&g)return console.log("[InlineDialer] 🚀 Chamada MANUAL detectada - finalizando automaticamente (chamadas manuais NUNCA exibem qualificação)"),void Promise.resolve(g({result:"success",qualificationId:void 0}));if(0===p.length&&0===m.length&&g)return console.log("[InlineDialer] 🚀 Sem qualificações configuradas - finalizando automaticamente"),void Promise.resolve(g({result:"success",qualificationId:void 0}));const e=p.length>0;S(e?"success":"failure"),N(null),I(null),x(!0)}else x(!1)},[P,u,g,p,m,s]),t.useEffect(()=>{j||R||P||y(!1)},[j,R,P]);const D=t.useMemo(()=>u&&"campaign"===u.type?u.info:null,[u]);return $.jsxs($.Fragment,{children:[$.jsx("style",{dangerouslySetInnerHTML:{__html:'\n /* Container externo do HTML - SEM padding/border para não vazar */\n #dialer-inline.callix.mode.min {\n display: block !important;\n width: 100% !important;\n max-width: 100% !important;\n padding: 0 !important;\n border: none !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n\n /* Estilos para modo mini quando Tailwind CDN não processa classes */\n .callix.mode.min {\n display: flex !important;\n flex-direction: column !important;\n gap: 0.75rem !important;\n border-radius: 1rem !important;\n border: 1px solid #e2e8f0 !important;\n background: rgba(255, 255, 255, 0.95) !important;\n padding: 0.75rem !important;\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;\n color: #1e293b !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n }\n\n /* Visor de número - fonte menor para caber todos os dígitos */\n .callix.mode.min [class*="truncate"] {\n font-size: 0.875rem !important; /* text-sm */\n line-height: 1.25rem !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n }\n\n /* Botões do modo mini */\n .callix.mode.min button {\n cursor: pointer !important;\n transition: all 0.2s ease !important;\n }\n \n .callix.mode.min button:disabled {\n cursor: not-allowed !important;\n opacity: 0.6 !important;\n }\n\n /* Grid do teclado numérico */\n .callix.mode.min [class*="grid-cols-3"] {\n display: grid !important;\n grid-template-columns: repeat(3, minmax(0, 1fr)) !important;\n gap: 0.5rem !important;\n }\n\n /* Botões do teclado */\n .callix.mode.min [class*="grid-cols-3"] button {\n display: flex !important;\n height: 3rem !important;\n flex-direction: column !important;\n align-items: center !important;\n justify-content: center !important;\n border-radius: 0.5rem !important;\n border: 1px solid #e2e8f0 !important;\n background: white !important;\n font-size: 1rem !important;\n font-weight: 600 !important;\n color: #1e293b !important;\n box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;\n }\n\n .callix.mode.min [class*="grid-cols-3"] button:hover:not(:disabled) {\n border-color: #cbd5e1 !important;\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;\n }\n\n .callix.mode.min [class*="grid-cols-3"] button:active:not(:disabled) {\n transform: scale(0.95) !important;\n }\n\n /* Botão principal de Ligar/Encerrar */\n .callix.mode.min > button[class*="bg-emerald"],\n .callix.mode.min > button[class*="bg-rose"] {\n display: flex !important;\n height: 2.75rem !important;\n width: 100% !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 0.5rem !important;\n border-radius: 0.75rem !important;\n font-size: 0.875rem !important;\n font-weight: 700 !important;\n color: white !important;\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;\n border: none !important;\n }\n\n .callix.mode.min > button[class*="bg-emerald"] {\n background: #10b981 !important;\n }\n\n .callix.mode.min > button[class*="bg-emerald"]:hover:not(:disabled) {\n background: #059669 !important;\n }\n\n .callix.mode.min > button[class*="bg-rose"] {\n background: #f43f5e !important;\n }\n\n .callix.mode.min > button[class*="bg-rose"]:hover:not(:disabled) {\n background: #e11d48 !important;\n }\n '}}),$.jsx(M$,{isAuthenticated:!0,username:e,onLogin:n,onLogout:r,isLoadingSession:i,sessionError:o,variant:"min"}),$.jsx(uy,{isOpen:v,campaignCallInfo:D,campaignContactPhoneId:(null==(d=null==c?void 0:c.data)?void 0:d.campaignContactPhoneId)??null,callDuration:w,isCallActive:j||R,onClose:()=>y(!1),portalTarget:a}),$.jsx(by,{isOpen:b,result:C,onChangeResult:S,successQualifications:p,discardQualifications:m,selectedQualificationId:E,onSelectQualification:N,onSubmit:async()=>{if(("success"===C?p:m).length)if(E)if("function"==typeof g){A(!0),I(null);try{await Promise.resolve(g({result:C,qualificationId:E})),x(!1)}catch(e){I("Erro ao enviar qualificacao."),console.error("Erro ao finalizar afterCall:",e)}finally{A(!1)}}else I("Não foi possível enviar a qualificação.");else I("Selecione uma qualificação para finalizar.");else I("Nenhuma qualificação configurada para este resultado.")},isSubmitting:T,errorMessage:O})]})}function _y(e){return`callix_dialer_${e}_leader`}const Cy="callix_dialer_tab_role";function Sy(){const e=void 0!==globalThis.crypto?globalThis.crypto:void 0;return e&&"randomUUID"in e?e.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10)}function Ey(e){if("undefined"==typeof BroadcastChannel)return null;try{return new BroadcastChannel(e)}catch{return null}}function Ny(){try{return"undefined"!=typeof localStorage?localStorage:null}catch{return null}}class Ty{constructor(e){this.listeners=new Set,this.storageListener=null,this.closed=!1,this.username=e.username,this.tabId=e.tabId??Sy(),this.status=e.status,this.storage=void 0===e.storage?Ny():e.storage;const t=e.channelFactory??Ey;if(this.channel=t(`callix-dialer:${this.username.trim().toLowerCase()}`),this.channel)this.channel.onmessage=e=>this.receive(e.data);else if("undefined"!=typeof window&&this.storage){const e=this.fallbackKey();this.storageListener=t=>{if(t.key===e&&t.newValue)try{const e=JSON.parse(t.newValue);this.receive(e.message)}catch{}},window.addEventListener("storage",this.storageListener)}}fallbackKey(){return`callix_dialer_${this.username}_bus`}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(this.closed)return;const t={...e,from:this.tabId};if(this.channel)try{this.channel.postMessage(t)}catch{}else if(this.storage)try{this.storage.setItem(this.fallbackKey(),JSON.stringify({nonce:Math.random(),at:Date.now(),message:t}))}catch{}}receive(e){if(this.closed||!e||"object"!=typeof e)return;const t=e;if("string"==typeof t.type&&"string"==typeof t.from&&t.from!==this.tabId){if("ping"===t.type){const e=this.status();this.post({type:"pong",role:e.role,authenticated:e.authenticated})}for(const e of this.listeners)e(t)}}probe(e=600){return new Promise(t=>{const n=new Map,r=this.on(e=>{"pong"===e.type&&n.set(e.from,{tabId:e.from,role:e.role,authenticated:e.authenticated})});this.post({type:"ping"}),setTimeout(()=>{r(),t([...n.values()])},e)})}close(){if(this.closed=!0,this.listeners.clear(),this.channel){this.channel.onmessage=null;try{this.channel.close()}catch{}}this.storageListener&&"undefined"!=typeof window&&(window.removeEventListener("storage",this.storageListener),this.storageListener=null)}}function Ay(e){return e.find(e=>"leader"===e.role&&e.authenticated)??null}function Oy(e,t=Ny(),n=Date.now()){if(!t)return null;try{const r=t.getItem(_y(e));if(!r)return null;const i=JSON.parse(r);return"string"!=typeof i.tabId||"number"!=typeof i.at||n-i.at>9e3?null:{tabId:i.tabId,at:i.at}}catch{return null}}function Iy(e,t,n=Ny(),r=Date.now()){if(!n)return!0;const i=Oy(e,n,r);if(i&&i.tabId!==t)return!1;try{n.setItem(_y(e),JSON.stringify({tabId:t,at:r}))}catch{}return!0}function ky(e,t,n=Ny()){if(n)try{const r=n.getItem(_y(e));if(!r)return;JSON.parse(r).tabId===t&&n.removeItem(_y(e))}catch{}}function jy(){try{return"undefined"!=typeof sessionStorage?sessionStorage:null}catch{return null}}function Ry(e,t,n=jy()){if(n)try{n.setItem(Cy,JSON.stringify({username:e,role:t,at:Date.now()}))}catch{}}function Py(e=jy()){if(e)try{e.removeItem(Cy)}catch{}}const Dy=new Set(["STORE_NOT_CONFIGURED","SERVER_NOT_CONFIGURED"]),Ly=new Set(["manualCallSetup","manualCallRinging","callInProgress","afterCall"]);function My(e){return e?{"Content-Type":"application/json","x-session-token":e,Authorization:`Bearer ${e}`}:Vp()}const Uy=e=>new Promise(t=>setTimeout(t,e));function Fy({enabled:e=!0,pollIntervalMs:n,sessionToken:r,onTask:i}){const o=Xu(),{makeManualCall:a}=Ju(),d=t.useRef(null==o?void 0:o.state);d.current=null==o?void 0:o.state;const s=t.useRef(a);s.current=a;const l=t.useRef(i);l.current=i;const u=t.useRef(null),c=t.useRef(null);return t.useEffect(()=>{var e;null==(e=c.current)||e.call(c)},[null==o?void 0:o.state]),t.useEffect(()=>{if(!e)return;let t=!1,i=!1,o=0,a=0,f="normal",h=!1,p=45e3,m=Math.max(1e3,n??4e3);const g={apiBaseUrl:Gp,headers:My(r)},$=()=>{if("notConfigured"===f)return 3e5;const e=Math.max(1e3,Math.floor(p/2)),t=Math.min(m,e);if("backoff"===f)return Math.min(t*2**a,6e4);const n=Math.min(3*t,e);return S$(C$(d.current))?t:n},v=()=>{var e;return null==(e=u.current)?void 0:e.setInterval($())};c.current=v;const y=async e=>{for(let r=0;r<3;r++){try{const t=await N$({...g,...e});if(t.ok)return!0;if(!(t.status>=500||408===t.status||429===t.status))return console.warn("[ClickToCall] confirmação recusada pelo servidor:",t.status,t.code??"","(tarefa",e.taskId,")"),!1}catch(n){console.warn("[ClickToCall] confirmação falhou (tentativa",r+1,"):",n instanceof Error?n.message:n)}if(t||2===r)break;await Uy(1500*(r+1))}return console.error("[ClickToCall] não foi possível confirmar a tarefa",e.taskId,"; o servidor a marcará como não confirmada"),!1},b=async e=>{var n;const r=d.current;if(o=Date.now()+6e3,!S$(C$(r)))return console.warn("[ClickToCall] tarefa",e.id,"recebida com operador ocupado (",r,"): devolvendo à fila"),void(await y({taskId:e.id,status:"failed",error:`Operador indisponível (${r??"desconhecido"})`,retry:!0}));console.log("[ClickToCall] 🖱️ ligação pedida pela API:",e.phoneDisplay,"(tarefa",e.id,")");try{window.dispatchEvent(new CustomEvent(_$,{detail:e}))}catch(a){console.warn("[ClickToCall] falha ao notificar o discador:",a)}try{null==(n=l.current)||n.call(l,e)}catch(a){console.warn("[ClickToCall] onTask lançou erro:",a)}try{s.current(e.phone)}catch(a){const t=a instanceof Error?a.message:String(a);return console.error("[ClickToCall] makeManualCall falhou:",t),void(await y({taskId:e.id,status:"failed",error:t,retry:!1}))}const i=await new Promise(e=>{const n=Date.now()+4e3,r=()=>{if(t)return e("disposed");const i=d.current;return i&&Ly.has(i)?e("started"):"manualCallFailed"===i?e("manual_failed"):"callRinging"===i||"offline"===C$(i)?e("interrupted"):Date.now()>=n?e("not_started"):void setTimeout(r,100)};r()});switch(i){case"started":return void(await y({taskId:e.id,status:"calling"}));case"manual_failed":return console.error("[ClickToCall] o SDK não conseguiu completar a chamada manual"),void(await y({taskId:e.id,status:"failed",error:"Chamada manual falhou no SDK",retry:!1}));case"interrupted":return console.warn("[ClickToCall] chamada manual não aconteceu (estado",d.current,"): devolvendo à fila"),void(await y({taskId:e.id,status:"failed",error:`Discador interrompido (${d.current??"desconhecido"})`,retry:!0}));case"disposed":return void(await y({taskId:e.id,status:"failed",error:"Discador encerrado durante a discagem",retry:!0}));default:{const t=`SDK não iniciou a chamada (estado continua ${d.current??"desconhecido"})`;console.error("[ClickToCall]",t),await y({taskId:e.id,status:"failed",error:t,retry:!1})}}},x=async()=>{if(!t&&!i){i=!0;try{const r=d.current,i=S$(C$(r))&&Date.now()>=o;let s;try{s=await async function(e){const{signal:t,clear:n}=E$(e.signal);try{const n=await fetch(`${e.apiBaseUrl}/api/click-to-call/poll`,{method:"POST",headers:e.headers,body:JSON.stringify({state:e.state??null,claim:e.claim}),credentials:"omit",signal:t});if(!n.ok){let e=null;try{const t=await n.json();e="string"==typeof(null==t?void 0:t.error)?t.error:null}catch{}return{ok:!1,status:n.status,code:e}}const r=await n.json();return{ok:!0,presence:r.presence??"unknown",task:r.task&&"object"==typeof r.task&&"string"==typeof r.task.phone?r.task:null,pollIntervalMs:"number"==typeof r.pollIntervalMs?r.pollIntervalMs:0,presenceTtlSeconds:"number"==typeof r.presenceTtlSeconds&&r.presenceTtlSeconds>0?r.presenceTtlSeconds:45}}finally{n()}}({...g,state:r,claim:i})}catch(e){s={ok:!1,status:0,code:e instanceof Error&&"AbortError"===e.name?"TIMEOUT":"NETWORK"}}if(t)return void(s.ok&&s.task&&await y({taskId:s.task.id,status:"failed",error:"Discador encerrado antes de discar",retry:!0}));if(!s.ok){a+=1;const e=null!==s.code&&Dy.has(s.code);return f=e?"notConfigured":"backoff",e?h||(h=!0,console.warn("[ClickToCall] backend sem click-to-call configurado (",s.code,"); nova tentativa em 5 min")):1===a&&console.warn("[ClickToCall] polling falhou (HTTP",s.status,s.code??"","); aplicando backoff"),void v()}if("normal"!==f&&(f="normal",a=0),p=1e3*s.presenceTtlSeconds,void 0===n&&s.pollIntervalMs>0&&(m=Math.max(1e3,s.pollIntervalMs)),v(),s.task)try{await b(s.task)}catch(e){console.error("[ClickToCall] erro ao tratar a tarefa",s.task.id,":",e instanceof Error?e.message:e)}}finally{i=!1}}},w=function(e,t){let n=Math.max(250,Math.round(t)),r=null,i=null,o=null,a=!1;const d=()=>{a||(r&&clearInterval(r),r=setInterval(e,n))};try{"undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL&&URL.createObjectURL?(o=URL.createObjectURL(new Blob(["\nlet timer = null;\nself.onmessage = (event) => {\n const interval = Number(event && event.data && event.data.interval) || 0;\n if (timer) { clearInterval(timer); timer = null; }\n if (interval > 0) { timer = setInterval(() => self.postMessage('tick'), interval); }\n};\n"],{type:"application/javascript"})),i=new Worker(o),i.onmessage=()=>{a||e()},i.onerror=()=>{null==i||i.terminate(),i=null,d()},i.postMessage({interval:n})):d()}catch{i=null,d()}return{setInterval(e){if(a)return;const t=Math.max(250,Math.round(e));t!==n&&(n=t,i?i.postMessage({interval:n}):d())},stop(){a=!0,i&&(i.terminate(),i=null),o&&(URL.revokeObjectURL(o),o=null),r&&(clearInterval(r),r=null)}}}(()=>{x()},$());return u.current=w,x(),()=>{t=!0,w.stop(),u.current===w&&(u.current=null),c.current===v&&(c.current=null),function(e){try{fetch(`${e.apiBaseUrl}/api/click-to-call/poll`,{method:"POST",headers:e.headers,body:JSON.stringify({state:"offline",claim:!1}),credentials:"omit",keepalive:!0}).catch(()=>{})}catch{}}(g)}},[e,n,r]),null}const By="2.7.0";let qy=null;function zy(){return new Promise(e=>{if(!qy)return console.log("[Callix Dialer] 📭 Nenhum WebSocket SIP ativo para fechar"),void e();if(qy.readyState===WebSocket.CLOSED||qy.readyState===WebSocket.CLOSING)return console.log("[Callix Dialer] 📭 WebSocket SIP já está fechando/fechado"),qy=null,void e();console.log("[Callix Dialer] 🔌 Fechando WebSocket SIP existente...");const t=qy;!function(e){if(e.readyState===WebSocket.OPEN)try{console.log("[Callix Dialer] 📤 Tentando enviar sinalização de fechamento...");const t=e;t._ua&&"function"==typeof t._ua.stop?(console.log("[Callix Dialer] 🔌 Encontrado UA, chamando stop()..."),t._ua.stop()):t._connection&&"function"==typeof t._connection.close&&(console.log("[Callix Dialer] 🔌 Fechando conexão interna..."),t._connection.close())}catch(t){console.warn("[Callix Dialer] ⚠️ Não foi possível enviar UNREGISTER:",t)}}(t);const n=setTimeout(()=>{console.log("[Callix Dialer] ⏱️ Timeout ao fechar WebSocket, continuando...");try{t.close(1e3,"Force close after timeout")}catch{}e()},3e3);t.addEventListener("close",()=>{clearTimeout(n),console.log("[Callix Dialer] ✅ WebSocket SIP fechado com sucesso"),e()},{once:!0}),setTimeout(()=>{t.close(1e3,"Page reload - cleaning up SIP connection")},500)})}!function(){if("undefined"==typeof window)return;if(window.__callixWsInterceptorSetup)return;window.__callixWsInterceptorSetup=!0;const e=window.WebSocket;window.WebSocket=function(t,n){const r=new e(t,n);return"string"==typeof t&&t.includes("callix")&&t.includes("/ws")&&(console.log("[Callix Dialer] 🔌 WebSocket SIP detectado:",t),qy=r,r.addEventListener("message",e=>{if("string"==typeof e.data&&e.data.includes("Call-ID:")){const t=e.data.match(/Call-ID:\s*([^\r\n]+)/i);t&&t[1].trim()}}),r.addEventListener("close",()=>{console.log("[Callix Dialer] 🔌 WebSocket SIP fechado"),qy===r&&(qy=null)})),r},Object.assign(window.WebSocket,{CONNECTING:e.CONNECTING,OPEN:e.OPEN,CLOSING:e.CLOSING,CLOSED:e.CLOSED}),console.log("[Callix Dialer] ✅ WebSocket interceptor configurado")}(),"undefined"!=typeof window&&(window.__callixUnloadSetup||(window.__callixUnloadSetup=!0,window.addEventListener("beforeunload",()=>{console.log("[Callix Dialer] 🚪 Página fechando, limpando WebSocket SIP..."),qy&&qy.readyState===WebSocket.OPEN&&qy.close(1e3,"Page unload")}),window.addEventListener("pagehide",()=>{qy&&qy.readyState===WebSocket.OPEN&&qy.close(1e3,"Page hide")}),console.log("[Callix Dialer] ✅ Page unload cleanup configurado"))),function(){if("undefined"==typeof document)return;if(document.querySelector('meta[name="format-detection"]'))return;const e=document.createElement("meta");e.name="format-detection",e.content="telephone=no, date=no, email=no, address=no",document.head.appendChild(e),console.log("[Callix Dialer] ✅ iOS format-detection meta tag adicionada")}();const Hy=t.createContext(null);function Wy(){const e=t.useContext(Hy);return e||{skipManualQualification:!1}}const Gy=t.forwardRef(function({children:e,onSessionDropped:n},r){const i=Yu(),o=Ju(),a=Xu(),d=t.useRef(n);d.current=n,ac("userSessionDropped",e=>{var t;const n=(null==e?void 0:e.originator)??null;null==(t=d.current)||t.call(d,n,Bp(n))});const s="startupError"===(null==a?void 0:a.state)?a.error??null:null;t.useEffect(()=>{var e;"userIsAlreadyConnectedOnAnotherDevice"===s&&(null==(e=d.current)||e.call(d,"anotherDevice",Up(s)))},[s]),t.useImperativeHandle(r,()=>({goOffline:()=>{console.log("[Callix Dialer] 📴 Chamando goOffline() para enviar SIP UNREGISTER...");try{o.goOffline(),console.log("[Callix Dialer] ✅ goOffline() chamado com sucesso")}catch(e){console.error("[Callix Dialer] ❌ Erro ao chamar goOffline():",e)}},stop:()=>{console.log("[Callix Dialer] 🛑 Chamando stop() no CallOperator...");try{i.stop(),console.log("[Callix Dialer] ✅ stop() chamado com sucesso")}catch(e){console.error("[Callix Dialer] ❌ Erro ao chamar stop():",e)}}}),[i,o]);const l=t.useRef(o);return l.current=o,t.useEffect(()=>()=>{console.log("[Callix Dialer] 🔌 SdkCleanupManager desmontando, chamando goOffline()...");try{l.current.goOffline()}catch(e){console.warn("[Callix Dialer] ⚠️ Erro no cleanup automático:",e)}},[]),$.jsx($.Fragment,{children:e})});class Vy{constructor(e){this.root=null,this.container=null,this.options=e}init(){try{if("string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container,!this.container)throw new Error(`Container não encontrado: ${this.options.container}`);const e=function(e){const t={},n=e.getAttribute("data-callix-engine-url")??e.dataset.callixEngineUrl;n&&n.trim()&&(t.engineUrl=n.trim());const r=e.getAttribute("data-callix-engine-token")??e.dataset.callixEngineToken;r&&r.trim()&&(t.engineToken=r.trim());const i=e.getAttribute("data-callix-mode")||e.dataset.callixMode||e.dataset.mode,o=e.getAttribute("data-callix-username")||e.dataset.callixUsername||e.dataset.username,a=Array.from(e.classList),d=a.map(e=>e.toLowerCase()),s=d.includes("callix"),l=i?i.toLowerCase():void 0;if("min"===l||"mini"===l?t.uiVariant="min":"mobile"===l?t.uiVariant="mobile":"default"===l||"floating"===l||"full"===l||"inline"===l?t.uiVariant="default":s&&(d.includes("mode-min")||d.includes("mode-mini")||d.includes("mode")&&d.includes("min"))&&(t.uiVariant="min"),!t.presetUsername&&o&&(t.presetUsername=o.trim()),!t.presetUsername)for(const h of a){const e=h.match(/(?:user|username|callix-user)[-_:]([A-Za-z0-9.@_-]+)/i);if(e){t.presetUsername=e[1];break}}t.presetUsername&&(t.presetUsername=t.presetUsername.trim());const u=e.getAttribute("data-callix-auto-login")??e.dataset.callixAutoLogin??e.dataset.autoLogin;null!=u&&(t.autoLogin=["true","1","yes",""].includes(u.trim().toLowerCase()));const c=function(e){const t=(e??"").trim().toLowerCase();return"compact"===t||"compacta"===t||"compacto"===t?"compact":"comfortable"===t||"confortavel"===t||"confortável"===t||"touch"===t?"comfortable":"auto"===t?"auto":void 0}(e.getAttribute("data-callix-density")??e.dataset.callixDensity);c&&(t.density=c);const f=e.getAttribute("data-callix-click-to-call")??e.dataset.callixClickToCall;return null!=f&&(t.clickToCall=!["false","0","no","off"].includes(f.trim().toLowerCase())),t}(this.container);!this.options.uiVariant&&e.uiVariant&&(this.options.uiVariant=e.uiVariant),!this.options.presetUsername&&e.presetUsername&&(this.options.presetUsername=e.presetUsername),void 0===this.options.autoLogin&&void 0!==e.autoLogin&&(this.options.autoLogin=e.autoLogin),void 0===this.options.density&&void 0!==e.density&&(this.options.density=e.density),void 0===this.options.clickToCall&&void 0!==e.clickToCall&&(this.options.clickToCall=e.clickToCall),!this.options.engineUrl&&e.engineUrl&&(this.options.engineUrl=e.engineUrl),!this.options.engineToken&&e.engineToken&&(this.options.engineToken=e.engineToken),this.root=x.createRoot(this.container),this.root.render($.jsx(t.StrictMode,{children:$.jsx(Jy,{options:this.options,containerEl:this.container})})),this.options.onReady&&this.options.onReady()}catch(e){this.options.onError?this.options.onError(e):console.error("[Callix Dialer] Erro ao inicializar:",e)}}destroy(){this.root&&(this.root.unmount(),this.root=null)}}const Ky=e=>({SESSION_TOKEN:`callix_dialer_${e}_session_token`,DOMAIN:`callix_dialer_${e}_domain`,TIMESTAMP:`callix_dialer_${e}_timestamp`,SKIP_MANUAL_QUALIFICATION:`callix_dialer_${e}_skip_manual_qualification`}),Yy="callix_dialer_last_username";function Xy(e){try{return localStorage.getItem(Ky(e).SESSION_TOKEN)}catch{return null}}function Jy({options:e,containerEl:n}){const[r,i]=t.useState(null),[o,a]=t.useState(!1),[d,s]=t.useState(!1),[l,u]=t.useState(null),[c,f]=t.useState(null),[h,p]=t.useState(null),[m,g]=t.useState(!0),[v,y]=t.useState(!1),[b,x]=t.useState(null),w=t.useRef(null),[_,C]=t.useState(()=>Date.now()),[S,E]=t.useState(!1),N=e.presetUsername?e.presetUsername.trim():null,T=e.uiVariant??"default",A=t.useMemo(()=>e.portalTarget??n??null,[e.portalTarget,n]),O=t.useRef("");O.current||(O.current=Sy());const[I,k]=t.useState(null),j=t.useRef(null);j.current=I;const[R,P]=t.useState(!1),[D,L]=t.useState(null),[M,U]=t.useState(!1),F=t.useRef(null),B=t.useRef(null),q=t.useRef(!1);q.current=o;const z=t.useRef(!1);z.current=d;const H=t.useRef(!1),W=t.useRef(async()=>{}),G=t.useRef(async()=>{}),V=t.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=null)},[]);t.useEffect(()=>{e.autoLogin&&console.info("[Callix Dialer] autoLogin: desde a 2.7.0 o widget não cria sessão sem confirmação; ele entra sozinho só quando já existe uma conexão ativa deste usuário (outra aba ou o motor).")},[e.autoLogin]);const K=t.useRef({apiUrl:e.apiUrl||"/api/user-sdk-session",token:null});t.useEffect(()=>{K.current.token=c},[c]);const Y=Boolean(e.engineUrl),X=t.useRef(Y);X.current=Y;const J=t.useRef(null),Z=t.useCallback(t=>{const n=J.current;if(n&&n.agentId===t)return n.connect(),n;null==n||n.close();const r=new Pu({url:e.engineUrl??"",token:e.engineToken??"",agentId:t,label:"Discador",log:e=>console.log("[Callix Dialer/motor]",e)});return r.onSessionLost(e=>{const t=Bp(e.originator);u(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`),a(!1),f(null),L(null)}),r.connect(),J.current=r,r},[e.engineUrl,e.engineToken]);t.useEffect(()=>()=>{var e;null==(e=J.current)||e.close(),J.current=null},[]),t.useEffect(()=>{let e=!1;const t=()=>{var t;if(X.current||e)return;e=!0,setTimeout(()=>{e=!1},2e3);const{apiUrl:n,token:r}=K.current;if("leader"===j.current&&(null==(t=F.current)||t.post({type:"leaving"}),F.current&&ky(F.current.username,O.current)),r){const e=JSON.stringify({logout:!0}),t=`${n}?logout=true`;if(navigator.sendBeacon){const n=new Blob([e],{type:"application/json"});navigator.sendBeacon(t,n),console.log("[Callix Dialer] Logout enviado via sendBeacon")}else fetch(n,{method:"DELETE",headers:{Authorization:`Bearer ${r}`},keepalive:!0}).catch(()=>{})}};return window.addEventListener("beforeunload",t),window.addEventListener("pagehide",t),()=>{window.removeEventListener("beforeunload",t),window.removeEventListener("pagehide",t)}},[]),t.useEffect(()=>{if("undefined"!=typeof window)try{const e=localStorage.getItem(Yy);if(!e)return console.log("[Callix Dialer] Nenhum username salvo, aguardando login manual"),void g(!1);if(N&&e!==N)return console.log("[Callix Dialer] Ignorando sessao salva por mismatch com preset:",e,"!=",N),void g(!1);console.log("[Callix Dialer] Username encontrado, irá fazer novo login:",e),i(e);const t=Ky(e),n=localStorage.getItem(t.SKIP_MANUAL_QUALIFICATION);n&&y("true"===n)}catch(e){console.error("[Callix Dialer] Erro ao verificar sessão:",e)}finally{g(!1)}else g(!1)},[N]),t.useEffect(()=>{N&&r!==N&&i(N)},[N,r]);const Q=t.useCallback(()=>e.domain||new URL(e.apiUrl||"/api/user-sdk-session",window.location.href).host,[e.domain,e.apiUrl]),ee=t.useCallback(async(e,t,n)=>{if(n){const r=await async function(e,t){var n,r;try{const i=await fetch(`https://${e}/sdk/v1/client/user-service/config`,{headers:{Authorization:`Bearer ${t}`},credentials:"omit"});if(!i.ok)return null;const o=await i.json();return!0===(null==(r=null==(n=null==o?void 0:o.service)?void 0:n.outboundOptions)?void 0:r.skipQualification)}catch{return null}}(t,n);if(null!==r){y(r);try{localStorage.setItem(Ky(e).SKIP_MANUAL_QUALIFICATION,String(r))}catch{}}}try{if(localStorage.setItem(Yy,e),n){const r=Ky(e);localStorage.setItem(r.SESSION_TOKEN,n),localStorage.setItem(r.DOMAIN,t),localStorage.setItem(r.TIMESTAMP,Date.now().toString())}}catch{}f(n),p(t),i(e),a(!0),u(null),L(null),C(Date.now())},[]),te=t.useCallback(async e=>{s(!0),u(null),x("Entrando na sessão do motor...");try{await ee(e,Q(),Xy(e)),console.log("[Callix Dialer] Conectado ao motor como",e)}catch(t){console.error("[Callix Dialer] Erro ao entrar na sessão do motor:",t),u(t instanceof Error?t.message:"Erro ao conectar ao motor")}finally{s(!1),x(null)}},[ee,Q]);t.useEffect(()=>{if(!Y||!r||m)return;const e=r,t=Z(e);U(!t.getState().view);const n=setTimeout(()=>U(!1),15e3);let i=!1;const o=()=>{const{view:n,sessionLost:r}=t.getState();if(!n)return;U(!1),"stopped"!==n.engine&&"crashed"!==n.engine||(H.current=!1);!(("running"===n.engine||"starting"===n.engine)&&!r)||H.current||q.current||z.current||i?"stopped"===n.engine&&q.current&&!z.current&&(console.log("[Callix Dialer] o motor desligou (Sair em outra aba ou servidor reiniciado); voltando à tela de login"),a(!1),f(null),p(null),L("O discador foi encerrado em outra aba ou o motor foi reiniciado.")):(i=!0,console.log("[Callix Dialer] o motor já segura a sessão deste agente; entrando por aqui também"),te(e).finally(()=>{i=!1}))};o();const d=t.subscribe(o);return()=>{d(),clearTimeout(n)}},[Y,r,m,Z,te]);const ne=t.useRef(null);t.useEffect(()=>{if(Y||!r)return void P(!0);P(!1);const e=r,t=new Ty({username:e,tabId:O.current,status:()=>({role:j.current,authenticated:q.current})});F.current=t;const n=()=>{V(),B.current=setTimeout(()=>{if(B.current=null,"member"!==j.current||q.current||z.current)return;const n=Oy(e);n&&n.tabId!==O.current||Iy(e,O.current)&&(t.post({type:"claim"}),console.log("[Callix Dialer] a aba com o discador fechou; esta aba assume a conexão"),W.current(e))},function(e=Math.random()){return 3e3+Math.floor(600*e)}())};ne.current=n;const i=t.on(t=>{switch(t.type){case"login":case"claim":V(),q.current||"leader"===j.current||(k("member"),Ry(e,"member"),L(null),u(null),P(!0));break;case"leaving":"member"!==j.current||q.current||n();break;case"takeover":"leader"===j.current&&(console.log("[Callix Dialer] outra aba pediu o discador; soltando a conexão"),G.current({broadcast:!1,keepDecision:!0}));break;case"logout":V(),G.current({broadcast:!1}),L("Você saiu do discador em outra aba.");break;case"dropped":{V(),ky(e,O.current),k(null),Py();const n=Bp(t.originator);u(`${n.title}: ${n.detail}${n.action?` ${n.action}`:""}`);break}}});return()=>{i(),t.close(),V(),ne.current=null,F.current===t&&(F.current=null),P(!1)}},[Y,r,V]),t.useEffect(()=>{if(Y||!r||o||R||m||d)return;const e=F.current;if(!e)return;const t=r,n=function(e,t=jy()){if(!t)return null;try{const n=t.getItem(Cy);if(!n)return null;const r=JSON.parse(n);return r.username!==e?null:"leader"===r.role||"member"===r.role?r.role:null}catch{return null}}(t);if("leader"===n)return V(),P(!0),void(Iy(t,O.current)?(e.post({type:"claim"}),console.log("[Callix Dialer] esta aba segurava o discador antes de recarregar; reconectando"),W.current(t)):(k("member"),Ry(t,"member")));let i=!1;return e.probe().then(e=>{var r;if(i)return;P(!0);const o=Oy(t);Ay(e)||o&&o.tabId!==O.current||"member"===n&&function(e){return e.some(e=>null!==e.role)}(e)?(k("member"),Ry(t,"member")):"member"===n?(k("member"),null==(r=ne.current)||r.call(ne)):(k(null),Py())}),()=>{i=!0}},[Y,r,o,R,m,d,V]),t.useEffect(()=>{if(Y||"leader"!==I||!r)return;const e=r;Iy(e,O.current);const t=setInterval(()=>Iy(e,O.current),3e3);return()=>clearInterval(t)},[Y,I,r]),t.useEffect(()=>{if(Y||"member"!==I||!r)return;const e=r,t=()=>{if("visible"!==document.visibilityState||B.current)return;const t=F.current;t&&t.probe().then(t=>{var n;"member"!==j.current||q.current||B.current||Ay(t)||Oy(e)||(console.log("[Callix Dialer] a aba com o discador não responde; esta aba vai assumir"),null==(n=ne.current)||n.call(ne))})};return document.addEventListener("visibilitychange",t),window.addEventListener("focus",t),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}},[Y,I,r]);const re=t.useCallback(async t=>{var n,r,d,l;if(s(!0),u(null),x("Preparando login..."),console.log("[Callix Dialer] 🚀 handleLogin iniciado para usuário:",t),e.engineUrl){const n=e.apiUrl||"/api/user-sdk-session";try{x("Conectando ao motor..."),H.current=!1;const e=Z(t),r=await e.waitForView(15e3),i=Q(),o=("running"===r.engine||"starting"===r.engine)&&!r.sessionLost;let a=null;if(o)a=Xy(t),console.log("[Callix Dialer] motor já tem a sessão do agente; entrando sem novo login");else{x("Autenticando no Callix...");const r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t}),credentials:"same-origin"});if(!r.ok){const e=await r.json().catch(()=>({error:"Erro desconhecido"}));throw new Error(e.error||`Falha na autenticação: ${r.status}`)}a=(await r.json()).userSessionToken,e.setSession({domain:i,userSessionToken:a}),x("Subindo o motor...")}await ee(t,i,a),console.log("[Callix Dialer] Conectado ao motor como",t)}catch(g){console.error("[Callix Dialer] Erro ao entrar pelo motor:",g),u(g instanceof Error?g.message:"Erro ao conectar ao motor"),a(!1),f(null)}finally{s(!1),x(null)}return}if(!Iy(t,O.current))return console.log("[Callix Dialer] outra aba já segura a conexão deste usuário; esta aba vira membro"),k("member"),Ry(t,"member"),P(!0),i(t),s(!1),void x(null);null==(n=F.current)||n.post({type:"claim"}),V(),k("leader"),Ry(t,"leader");const h=e.apiUrl||"/api/user-sdk-session";let m;if("undefined"!=typeof window)try{const e=Ky(t);m=localStorage.getItem(e.SESSION_TOKEN)||void 0,console.log("[Callix Dialer] 🔍 Token anterior no localStorage:",m?"ENCONTRADO":"NÃO ENCONTRADO")}catch(g){console.warn("[Callix Dialer] Erro ao buscar token anterior:",g)}if(m){x("Encerrando sessão anterior..."),console.log("[Callix Dialer] 🔌 Token anterior encontrado, fazendo logout no servidor...");try{const e=await fetch(h,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${m}`,"x-session-token":m},credentials:"same-origin"});console.log("[Callix Dialer] 📡 Resposta do logout:",e.status),e.ok?console.log("[Callix Dialer] ✅ Logout no servidor concluído"):console.log("[Callix Dialer] ⚠️ Logout retornou status:",e.status)}catch($){console.warn("[Callix Dialer] ⚠️ Erro no logout (pode ser sessão expirada):",$)}x("Aguardando liberação da sessão anterior..."),console.log("[Callix Dialer] ⏳ Aguardando Kamailio processar unregister (5 segundos)..."),await new Promise(e=>setTimeout(e,5e3)),console.log("[Callix Dialer] ✅ Período de espera concluído")}if("undefined"!=typeof window)try{const e=Ky(t);localStorage.removeItem(e.SESSION_TOKEN),localStorage.removeItem(e.TIMESTAMP),console.log("[Callix Dialer] 🗑️ Token antigo removido do localStorage")}catch(g){console.warn("[Callix Dialer] Erro ao limpar localStorage:",g)}x("Fechando conexão anterior..."),console.log("[Callix Dialer] 🔌 Verificando WebSocket SIP local..."),await zy(),(o||c)&&(console.log("[Callix Dialer] 🔌 Preparando para fechar conexão SIP local..."),w.current&&(console.log("[Callix Dialer] 📴 Chamando goOffline() via cleanupRef..."),w.current.goOffline(),await new Promise(e=>setTimeout(e,500)),console.log("[Callix Dialer] 🛑 Chamando stop() via cleanupRef..."),w.current.stop(),await new Promise(e=>setTimeout(e,500))),console.log("[Callix Dialer] ⏳ Desmontando CallixClientProvider..."),a(!1),f(null),E(!0),await new Promise(e=>setTimeout(e,1e3)),E(!1),console.log("[Callix Dialer] ✅ SDK desmontado"));try{x("Autenticando no Callix..."),console.log("[Callix Dialer] 🔐 Criando nova sessão no servidor...");const n=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,previousToken:m}),credentials:"same-origin"});if(!n.ok){const e=await n.json().catch(()=>({error:"Erro desconhecido"}));throw new Error(e.error||`Falha na autenticação: ${n.status}`)}const o=await n.json(),s=e.domain||o.domain||"villelabrasil.callix.com.br";f(o.userSessionToken),p(s),i(t),a(!0),u(null),C(Date.now()),console.log("[Callix Dialer] Nova providerKey gerada para forçar recriação do SDK"),L(null),P(!0),null==(r=F.current)||r.post({type:"login"});try{const e=`https://${s}/sdk/v1/client/user-service/config`;x("Carregando configurações..."),console.log("[Callix Dialer] 🔍 Buscando configuração do serviço:",e);const n=await fetch(e,{headers:{Authorization:`Bearer ${o.userSessionToken}`},credentials:"omit"});if(console.log("[Callix Dialer] 📡 Resposta da config:",n.status),n.ok){const e=await n.json();console.log("[Callix Dialer] 📦 Dados da config recebidos:",JSON.stringify(e,null,2));const r=!0===(null==(l=null==(d=null==e?void 0:e.service)?void 0:d.outboundOptions)?void 0:l.skipQualification);if(console.log("[Callix Dialer] ✅ skipQualification configurado:",r),y(r),"undefined"!=typeof window){const e=Ky(t);localStorage.setItem(e.SKIP_MANUAL_QUALIFICATION,r.toString()),console.log("[Callix Dialer] 💾 skipQualification salvo no localStorage")}}else{const e=await n.text();console.warn("[Callix Dialer] ⚠️ Erro ao buscar config do serviço:",n.status,e)}}catch(v){console.error("[Callix Dialer] ❌ Erro ao buscar config do serviço:",v)}if("undefined"!=typeof window)try{const e=Ky(t);localStorage.setItem(Yy,t),localStorage.setItem(e.SESSION_TOKEN,o.userSessionToken),localStorage.setItem(e.DOMAIN,s),localStorage.setItem(e.TIMESTAMP,Date.now().toString()),console.log("[Callix Dialer] Sessão salva no localStorage")}catch(g){console.warn("[Callix Dialer] Não foi possível salvar sessão:",g)}x("Conectando ao discador..."),console.log("[Callix Dialer] Autenticado com sucesso:",t)}catch(g){console.error("[Callix Dialer] Erro ao autenticar:",g),u(g instanceof Error?g.message:"Erro ao autenticar"),a(!1),f(null),ky(t,O.current),k(null),Py()}finally{s(!1),x(null)}},[e.apiUrl,e.domain,e.engineUrl,o,c,Z,ee,Q,V]);t.useEffect(()=>{W.current=re},[re]);const ie=t.useCallback(async t=>{var n,o;const d=!1!==(null==t?void 0:t.broadcast),s=!0===(null==t?void 0:t.keepDecision),l=r;if(V(),e.engineUrl?q.current&&(H.current=!0,null==(n=J.current)||n.command({name:"logoff"})):(d&&(null==(o=F.current)||o.post({type:"logout"})),w.current&&(console.log("[Callix Dialer] 📴 Logout: Chamando goOffline()..."),w.current.goOffline(),await new Promise(e=>setTimeout(e,500)),console.log("[Callix Dialer] 🛑 Logout: Chamando stop()..."),w.current.stop(),await new Promise(e=>setTimeout(e,500))),l&&ky(l,O.current)),a(!1),f(null),p(null),u(null),s)return k("member"),void(l&&Ry(l,"member"));if(k(null),Py(),i(N??null),"undefined"!=typeof window&&l)try{const e=Ky(l);localStorage.removeItem(Yy),localStorage.removeItem(e.SESSION_TOKEN),localStorage.removeItem(e.DOMAIN),localStorage.removeItem(e.TIMESTAMP),console.log("[Callix Dialer] Sessão removida do localStorage")}catch(c){console.warn("[Callix Dialer] Não foi possível limpar sessão:",c)}},[r,N,e.engineUrl,V]);t.useEffect(()=>{G.current=ie},[ie]);const oe=t.useCallback(async()=>{const e=r,t=F.current;if(!e||!t)return;s(!0),u(null),x("Trazendo o discador para esta aba..."),t.post({type:"takeover"}),await new Promise(e=>setTimeout(e,1500));const n=Oy(e);if(n&&n.tabId!==O.current)return console.log("[Callix Dialer] a outra aba não soltou a conexão; continuando como membro"),s(!1),void x(null);await W.current(e)},[r]),ae=t.useCallback(()=>{G.current()},[]),de=t.useCallback((e,t)=>{var n;r&&ky(r,O.current),null==(n=F.current)||n.post({type:"dropped",originator:e}),k(null),Py(),u(`${t.title}: ${t.detail}${t.action?` ${t.action}`:""}`),a(!1),f(null),p(null)},[r]),se=Boolean(r)&&!o&&(Y?M:!R),le=t.useMemo(()=>o||d||m||S||!r||se?null:{username:r,locked:Boolean(N),elsewhere:!Y&&"member"===I,note:D},[o,d,m,S,r,N,se,Y,I,D]),ue=t.useCallback(()=>{if(i(null),u(null),"undefined"!=typeof window)try{localStorage.removeItem(Yy)}catch{}},[]),ce="inline"===e.mode||"mobile"===T?xy:M$,fe=e.mode,he=!1===(pe=e.clickToCall)?{enabled:!1}:!0===pe||null==pe?{enabled:!0}:{...pe,enabled:!1!==pe.enabled};var pe;return S?$.jsx(Hy.Provider,{value:{skipManualQualification:v},children:$.jsx(ce,{isAuthenticated:!1,username:r,onLogin:re,onLogout:ie,isLoadingSession:!0,sessionError:null,sessionStatus:"Encerrando sessão anterior...",variant:T,portalTarget:A,density:e.density,mode:fe})}):o&&(Y||c&&h)?Y&&J.current?$.jsx(Hy.Provider,{value:{skipManualQualification:v},children:$.jsxs(Lu,{client:J.current,children:[$.jsx(ce,{isAuthenticated:o,username:r,onLogin:re,onLogout:ie,isLoadingSession:d,sessionError:l,sessionStatus:b,variant:T,portalTarget:A,density:e.density,mode:fe}),c&&$.jsx(Fy,{enabled:he.enabled,pollIntervalMs:he.pollIntervalMs,sessionToken:c,onTask:he.onTask})]},_)}):c&&h?$.jsx(Hy.Provider,{value:{skipManualQualification:v},children:$.jsx(ku.CallixClientProvider,{domain:h,userSessionToken:c,children:$.jsxs(Gy,{ref:w,onSessionDropped:de,children:[$.jsx(ce,{isAuthenticated:o,username:r,onLogin:re,onLogout:ie,isLoadingSession:d,sessionError:l,sessionStatus:b,variant:T,portalTarget:A,density:e.density,mode:fe}),$.jsx(Fy,{enabled:he.enabled,pollIntervalMs:he.pollIntervalMs,sessionToken:c,onTask:he.onTask})]})},_)}):null:$.jsx(Hy.Provider,{value:{skipManualQualification:v},children:$.jsx(ce,{isAuthenticated:!1,username:r,onLogin:re,onLogout:ie,isLoadingSession:d||m||se,sessionError:l,sessionStatus:b,loginConfirmation:le,onCancelLoginConfirmation:ue,onTakeOverSession:oe,onLogoutAllTabs:ae,variant:T,portalTarget:A,density:e.density,mode:fe})})}function Zy(e){console.log(`[Callix Dialer] 🔧 Widget v${By} inicializando...`);const t=new Vy(e);return t.init(),t}const Qy={CallixDialerWidget:Vy,init:Zy,version:By};"undefined"!=typeof window&&(window.CallixDialer=Qy),e.CallixDialerWidget=Vy,e.WIDGET_VERSION=By,e.default=Qy,e.init=Zy,e.useDialerConfig=Wy,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
26
26
|
//# sourceMappingURL=callix-dialer.umd.js.map
|