@quoreadmin/ui 1.3.35 → 1.3.36

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.
@@ -270,7 +270,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
270
270
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ID]=this[ID]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=vf(s);r[l]||(dce(i,s),r[l]=!0)}return q.isArray(e)?e.forEach(o):o(e),this}};Lr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Lr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),q.freezeMethods(Lr);function p9(t,e){const n=this||Cf,r=e||n,i=Lr.from(r.headers);let o=r.data;return q.forEach(t,function(l){o=l.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function OD(t){return!!(t&&t.__CANCEL__)}function Gc(t,e,n){Be.call(this,t??"canceled",Be.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(Gc,Be,{__CANCEL__:!0});function DD(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Be("Request failed with status code "+n.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function uce(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fce(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(c){const d=Date.now(),u=r[o];s||(s=d),n[i]=c,r[i]=d;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),d-s<e)return;const p=u&&d-u;return p?Math.round(h*1e3/p):void 0}}function hce(t,e){let n=0,r=1e3/e,i,o;const s=(d,u=Date.now())=>{n=u,i=null,o&&(clearTimeout(o),o=null),t(...d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=r?s(d,u):(i=d,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const jg=(t,e,n=3)=>{let r=0;const i=fce(50,250);return hce(o=>{const s=o.loaded,l=o.lengthComputable?o.total:void 0,c=s-r,d=i(c),u=s<=l;r=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-s)/d:void 0,event:o,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(f)},n)},ND=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},xD=t=>(...e)=>q.asap(()=>t(...e)),pce=Zn.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Zn.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Zn.origin),Zn.navigator&&/(msie|trident)/i.test(Zn.navigator.userAgent)):()=>!0,mce=Zn.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),q.isString(r)&&s.push("path="+r),q.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gce(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yce(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function PD(t,e,n){let r=!gce(e);return t&&(r||n==!1)?yce(t,e):e}const BD=t=>t instanceof Lr?{...t}:t;function P0(t,e){e=e||{};const n={};function r(d,u,f,h){return q.isPlainObject(d)&&q.isPlainObject(u)?q.merge.call({caseless:h},d,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function i(d,u,f,h){if(q.isUndefined(u)){if(!q.isUndefined(d))return r(void 0,d,f,h)}else return r(d,u,f,h)}function o(d,u){if(!q.isUndefined(u))return r(void 0,u)}function s(d,u){if(q.isUndefined(u)){if(!q.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function l(d,u,f){if(f in e)return r(d,u);if(f in t)return r(void 0,d)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(d,u,f)=>i(BD(d),BD(u),f,!0)};return q.forEach(Object.keys({...t,...e}),function(u){const f=c[u]||i,h=f(t[u],e[u],u);q.isUndefined(h)&&f!==l||(n[u]=h)}),n}const LD=t=>{const e=P0({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=e;if(e.headers=s=Lr.from(s),e.url=ED(PD(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),q.isFormData(n)){if(Zn.hasStandardBrowserEnv||Zn.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(q.isFunction(n.getHeaders)){const c=n.getHeaders(),d=["content-type","content-length"];Object.entries(c).forEach(([u,f])=>{d.includes(u.toLowerCase())&&s.set(u,f)})}}if(Zn.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(e)),r||r!==!1&&pce(e.url))){const c=i&&o&&mce.read(o);c&&s.set(i,c)}return e},bce=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const i=LD(t);let o=i.data;const s=Lr.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=i,u,f,h,p,g;function b(){p&&p(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function w(){if(!y)return;const k=Lr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:k,config:t,request:y};DD(function(M){n(M),b()},function(M){r(M),b()},A),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(r(new Be("Request aborted",Be.ECONNABORTED,t,y)),y=null)},y.onerror=function(v){const A=v&&v.message?v.message:"Network Error",S=new Be(A,Be.ERR_NETWORK,t,y);S.event=v||null,r(S),y=null},y.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||AD;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new Be(v,A.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,t,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&q.forEach(s.toJSON(),function(v,A){y.setRequestHeader(A,v)}),q.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),l&&l!=="json"&&(y.responseType=i.responseType),d&&([h,g]=jg(d,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,p]=jg(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(u=k=>{y&&(r(!k||k.type?new Gc(null,t,y):k),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const C=uce(i.url);if(C&&Zn.protocols.indexOf(C)===-1){r(new Be("Unsupported protocol "+C+":",Be.ERR_BAD_REQUEST,t));return}y.send(o||null)})},wce=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(d){if(!i){i=!0,l();const u=d instanceof Error?d:this.reason;r.abort(u instanceof Be?u:new Gc(u instanceof Error?u.message:u))}};let s=e&&setTimeout(()=>{s=null,o(new Be(`timeout ${e} of ms exceeded`,Be.ETIMEDOUT))},e);const l=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),t=null)};t.forEach(d=>d.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>q.asap(l),c}},Cce=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},vce=async function*(t,e){for await(const n of kce(t))yield*Cce(n,e)},kce=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},RD=(t,e,n,r)=>{const i=vce(t,e);let o=0,s,l=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await i.next();if(d){l(),c.close();return}let f=u.byteLength;if(n){let h=o+=f;n(h)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},VD=64*1024,{isFunction:Hg}=q,Sce=(({Request:t,Response:e})=>({Request:t,Response:e}))(q.global),{ReadableStream:_D,TextEncoder:$D}=q.global,FD=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ece=t=>{t=q.merge.call({skipUndefined:!0},Sce,t);const{fetch:e,Request:n,Response:r}=t,i=e?Hg(e):typeof fetch=="function",o=Hg(n),s=Hg(r);if(!i)return!1;const l=i&&Hg(_D),c=i&&(typeof $D=="function"?(g=>b=>g.encode(b))(new $D):async g=>new Uint8Array(await new n(g).arrayBuffer())),d=o&&l&&FD(()=>{let g=!1;const b=new n(Zn.origin,{body:new _D,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!b}),u=s&&l&&FD(()=>q.isReadableStream(new r("").body)),f={stream:u&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(b,y)=>{let w=b&&b[g];if(w)return w.call(b);throw new Be(`Response type '${g}' is not supported`,Be.ERR_NOT_SUPPORT,y)})});const h=async g=>{if(g==null)return 0;if(q.isBlob(g))return g.size;if(q.isSpecCompliantForm(g))return(await new n(Zn.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(q.isArrayBufferView(g)||q.isArrayBuffer(g))return g.byteLength;if(q.isURLSearchParams(g)&&(g=g+""),q.isString(g))return(await c(g)).byteLength},p=async(g,b)=>{const y=q.toFiniteNumber(g.getContentLength());return y??h(b)};return async g=>{let{url:b,method:y,data:w,signal:C,cancelToken:k,timeout:v,onDownloadProgress:A,onUploadProgress:S,responseType:M,headers:D,withCredentials:T="same-origin",fetchOptions:N}=LD(g),x=e||fetch;M=M?(M+"").toLowerCase():"text";let L=wce([C,k&&k.toAbortSignal()],v),z=null;const R=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let Z;try{if(S&&d&&y!=="get"&&y!=="head"&&(Z=await p(D,w))!==0){let X=new n(b,{method:"POST",body:w,duplex:"half"}),ee;if(q.isFormData(w)&&(ee=X.headers.get("content-type"))&&D.setContentType(ee),X.body){const[P,$]=ND(Z,jg(xD(S)));w=RD(X.body,VD,P,$)}}q.isString(T)||(T=T?"include":"omit");const U=o&&"credentials"in n.prototype,V={...N,signal:L,method:y.toUpperCase(),headers:D.normalize().toJSON(),body:w,duplex:"half",credentials:U?T:void 0};z=o&&new n(b,V);let Q=await(o?x(z,N):x(b,V));const _=u&&(M==="stream"||M==="response");if(u&&(A||_&&R)){const X={};["status","statusText","headers"].forEach(H=>{X[H]=Q[H]});const ee=q.toFiniteNumber(Q.headers.get("content-length")),[P,$]=A&&ND(ee,jg(xD(A),!0))||[];Q=new r(RD(Q.body,VD,P,()=>{$&&$(),R&&R()}),X)}M=M||"text";let G=await f[q.findKey(f,M)||"text"](Q,g);return!_&&R&&R(),await new Promise((X,ee)=>{DD(X,ee,{data:G,headers:Lr.from(Q.headers),status:Q.status,statusText:Q.statusText,config:g,request:z})})}catch(U){throw R&&R(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,g,z),{cause:U.cause||U}):Be.from(U,U&&U.code,g,z)}}},Mce=new Map,jD=t=>{let e=t?t.env:{};const{fetch:n,Request:r,Response:i}=e,o=[r,i,n];let s=o.length,l=s,c,d,u=Mce;for(;l--;)c=o[l],d=u.get(c),d===void 0&&u.set(c,d=l?new Map:Ece(e)),u=d;return d};jD();const m9={http:W2e,xhr:bce,fetch:{get:jD}};q.forEach(m9,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const HD=t=>`- ${t}`,Ace=t=>q.isFunction(t)||t===null||t===!1,zD={getAdapter:(t,e)=>{t=q.isArray(t)?t:[t];const{length:n}=t;let r,i;const o={};for(let s=0;s<n;s++){r=t[s];let l;if(i=r,!Ace(r)&&(i=m9[(l=String(r)).toLowerCase()],i===void 0))throw new Be(`Unknown adapter '${l}'`);if(i&&(q.isFunction(i)||(i=i.get(e))))break;o[l||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since :
271
271
  `+s.map(HD).join(`
272
272
  `):" "+HD(s[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i},adapters:m9};function g9(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Gc(null,t)}function UD(t){return g9(t),t.headers=Lr.from(t.headers),t.data=p9.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),zD.getAdapter(t.adapter||Cf.adapter,t)(t).then(function(r){return g9(t),r.data=p9.call(t,t.transformResponse,r),r.headers=Lr.from(r.headers),r},function(r){return OD(r)||(g9(t),r&&r.response&&(r.response.data=p9.call(t,t.transformResponse,r.response),r.response.headers=Lr.from(r.response.headers))),Promise.reject(r)})}const ZD="1.12.2",zg={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{zg[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qD={};zg.transitional=function(e,n,r){function i(o,s){return"[Axios v"+ZD+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(e===!1)throw new Be(i(s," has been removed"+(n?" in "+n:"")),Be.ERR_DEPRECATED);return n&&!qD[s]&&(qD[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,l):!0}},zg.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Tce(t,e,n){if(typeof t!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const l=t[o],c=l===void 0||s(l,o,t);if(c!==!0)throw new Be("option "+o+" must be "+c,Be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Be("Unknown option "+o,Be.ERR_BAD_OPTION)}}const Ug={assertOptions:Tce,validators:zg},_o=Ug.validators;let B0=class{constructor(e){this.defaults=e||{},this.interceptors={request:new MD,response:new MD}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
273
- `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=P0(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ug.assertOptions(r,{silentJSONParsing:_o.transitional(_o.boolean),forcedJSONParsing:_o.transitional(_o.boolean),clarifyTimeoutError:_o.transitional(_o.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:Ug.assertOptions(i,{encode:_o.function,serialize:_o.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ug.assertOptions(n,{baseUrl:_o.spelling("baseURL"),withXsrfToken:_o.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&q.merge(o.common,o[n.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Lr.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let u,f=0,h;if(!c){const g=[UD.bind(this),void 0];for(g.unshift(...l),g.push(...d),h=g.length,u=Promise.resolve(n);f<h;)u=u.then(g[f++],g[f++]);return u}h=l.length;let p=n;for(;f<h;){const g=l[f++],b=l[f++];try{p=g(p)}catch(y){b.call(this,y);break}}try{u=UD.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=d.length;f<h;)u=u.then(d[f++],d[f++]);return u}getUri(e){e=P0(this.defaults,e);const n=PD(e.baseURL,e.url,e.allowAbsoluteUrls);return ED(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){B0.prototype[e]=function(n,r){return this.request(P0(r||{},{method:e,url:n,data:(r||{}).data}))}}),q.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,l){return this.request(P0(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}B0.prototype[e]=n(),B0.prototype[e+"Form"]=n(!0)});let Ice=class KP{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,l){r.reason||(r.reason=new Gc(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new KP(function(i){e=i}),cancel:e}}};function Oce(t){return function(n){return t.apply(null,n)}}function Dce(t){return q.isObject(t)&&t.isAxiosError===!0}const y9={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(y9).forEach(([t,e])=>{y9[e]=t});function WD(t){const e=new B0(t),n=cD(B0.prototype.request,e);return q.extend(n,B0.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return WD(P0(t,i))},n}const Mt=WD(Cf);Mt.Axios=B0,Mt.CanceledError=Gc,Mt.CancelToken=Ice,Mt.isCancel=OD,Mt.VERSION=ZD,Mt.toFormData=$g,Mt.AxiosError=Be,Mt.Cancel=Mt.CanceledError,Mt.all=function(e){return Promise.all(e)},Mt.spread=Oce,Mt.isAxiosError=Dce,Mt.mergeConfig=P0,Mt.AxiosHeaders=Lr,Mt.formToJSON=t=>TD(q.isHTMLForm(t)?new FormData(t):t),Mt.getAdapter=zD.getAdapter,Mt.HttpStatusCode=y9,Mt.default=Mt;const{Axios:Ige,AxiosError:Oge,CanceledError:Dge,isCancel:Nge,CancelToken:xge,VERSION:Pge,all:Bge,Cancel:Lge,isAxiosError:Rge,spread:Vge,toFormData:_ge,AxiosHeaders:$ge,HttpStatusCode:Fge,formToJSON:jge,getAdapter:Hge,mergeConfig:zge}=Mt,Nce=a.defineComponent({name:"QDatePicker",components:{DatePicker:N0},props:{id:{type:String,default:""},modelValue:{type:[Date,String,Array],default:""},clearable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},disabledDate:{type:Function,default:()=>{}},disabledBeforeToday:{type:Boolean,default:!1},disabledAfterToday:{type:Boolean,default:!1},format:{type:String,default:""},locale:{type:String,default:"en"},placeholder:{type:String,default:""},range:{type:Boolean,default:!1},size:{type:String,default:"lg"},type:{type:String,default:"date"}},emits:["update:modelValue"],setup(t){const e=a.ref("bottom"),n=a.ref(),r=a.ref(!1),i=a.ref(t.modelValue||""),o=a.computed(()=>t.disabledAfterToday?s:t.disabledBeforeToday?l:t.disabledDate),s=d=>d>new Date,l=d=>{const u=new Date;return u.setHours(0,0,0,0),d<u},c=()=>{const d=document.querySelector(".mx-datepicker-main");d&&(e.value=parseInt(d.style.top)<0?"top":"bottom")};return a.watch(r,async d=>{d?window.addEventListener("scroll",c):window.removeEventListener("scroll",c),await a.nextTick(),c()}),{calendarPosition:e,datePicker:n,isOpen:r,value:i,disabledDates:o,disableDatesAfterToday:s,disableDatesBeforeToday:l,getCalendarPosition:c}}}),xce=a.defineComponent({name:"QTag",components:{},props:{tagClass:{type:String,default:""},bgColor:{type:String,default:"bg-green-0"},textColor:{type:String,default:"text-green-20"},shape:{type:String,default:"square"}},setup(t,{slots:e}){return{hasIcon:!!e.icon}}});function Pce(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["tag flex items-center",[t.tagClass,t.bgColor,t.textColor,"tag-"+t.shape,{"has-icon":t.hasIcon}]])},[t.hasIcon?a.renderSlot(t.$slots,"icon",{key:0},void 0,!0):a.createCommentVNode("",!0),a.renderSlot(t.$slots,"default",{},void 0,!0)],2)}const GD=Me(xce,[["render",Pce],["__scopeId","data-v-1a01844c"]]),Bce=a.defineComponent({name:"QRoomDetailsPopover",components:{QAccordion:$b,QActivityItem:Fb,QCommentSection:yO,QDatePicker:Nce,QDivider:aD,QIcon:ga,QPopover:Km,QTag:GD,QTooltip:l0},props:{id:{type:String,default:""},roomDetails:{type:Object,default:()=>{}},guestDetails:{type:Object,default:()=>{}},propertyId:{type:[Number,String],default:""},propertyTimeZone:{type:String,default:"America/Chicago"},trigger:{type:[Number,String],default:""},comments:{type:Array,default:()=>[]},room:{type:Object,default:()=>{}},showActionMenu:{type:Boolean,default:!0},showActionsLink:{type:Boolean,default:!0},showGuestDetails:{type:Boolean,default:!1},showComments:{type:Boolean,default:!1},showTickets:{type:Boolean,default:!0},showGuestCallback:{type:Boolean,default:!0},showRoomName:{type:Boolean,default:!1},hover:{type:Boolean,default:!1},size:{type:String,default:"md"},open:{type:Boolean,default:!1},align:{type:String,default:"left"},position:{type:String,default:"bottom"},locale:{type:String,default:"en"},pmsBaseUrl:{type:String,default:"",required:!0}},emits:["create:callback","create:todo","refresh:pms","toggle"],setup(t,{emit:e}){var m5,rd;const{t:n}=Wi(),r=a.ref(null),i=a.ref(!1),o=a.ref("left"),s=a.ref([{id:1,label:n("HC_DEPARTMENT")},{id:2,label:n("HC_PERSON")},{id:0,label:n("HC_ANYONE")}]),l=a.ref(""),c=a.ref({checkInDate:new Date,checkOutDate:new Date,guestEmail:"",guestLoyalty:"",guestMood:null,guestName:"",guestPhone:"",inHouse:!!((m5=r.value)!=null&&m5.tokenId)||!1,problem:null,notes:"",tokenId:(rd=r.value)==null?void 0:rd.tokenId}),d=a.ref(250),u=a.ref(290),f=a.ref([]),h=a.ref([]),p=a.ref(!0),g=a.ref(!0),b=a.ref({info:!0,tickets:!0,comments:!0}),y=a.ref(!0),w=a.ref(t.guestDetails),C=a.ref([]),k=a.ref({pms:!1,roomNotices:!1,tickets:!1}),v=a.ref([]),A=a.ref([]),S=a.ref("bottom"),M=a.ref(null),D=a.ref([]),T=a.ref(!1),N=a.ref({assignType:null,department:null,due:new Date,item:null,notes:"",person:null,requestedBy:null}),x=a.ref([{id:0,label:n("HC_STAFF_MEMBER")},{id:1,label:n("HC_HOTEL_GUEST")}]),L=a.ref(!1),z=a.ref(null),R=a.ref({endDate:new Date,issue:null,notes:"",startDate:new Date}),Z=a.ref([]),U=a.ref(!1),V=a.ref([]),Q=a.ref([{label:n("HC_COMPLAINT"),id:"complaint"},{label:n("HC_REQUEST"),id:"request"},{label:n("HC_ROOM_NOTICE"),id:"room_notice"},{label:n("HC_WORK_ORDER"),id:"work_order"}]),_=a.ref(),G=a.ref(null),X=a.ref({assignType:null,department:null,due:new Date,item:null,issue:null,notes:"",person:null,requestedBy:null}),ee=a.ref([]),P=a.computed(()=>{var F;switch((F=r.value.cleaning)==null?void 0:F.name){case"CLEAN":case"INSPECTED":return"CLEAN";case"DIRTY":case"PICKUP":case"OUT OF ORDER":case"OUT OF SERVICE":return"DIRTY";default:return""}}),$=a.computed(()=>P.value==="CLEAN"?"blue-10":P.value==="DIRTY"?"red-10":"gray-30"),H=a.computed(()=>{var F;return n(`HC_${(F=r.value.cleaning)==null?void 0:F.name}`)||""}),j=a.computed(()=>{const F=l.value.toLowerCase();return D.value.filter(le=>le.toLowerCase().match(F))}),te=a.computed(()=>V.value.length?!!V.value.find(le=>le.type==="complaint"):!1),ue=a.computed(()=>V.value.length?!!V.value.find(le=>le.type==="callback"):!1),ie=a.computed(()=>{let F=[];return C.value[0]&&C.value[0].options===void 0?C.value.forEach(le=>{F.push({id:parseInt(le.id),label:le.display_name})}):F=C.value,F}),oe=a.computed(()=>{var F;return((F=r.value.occupancy)==null?void 0:F.name)==="OCCUPIED"}),Ce=a.computed(()=>oe.value&&te.value?"HK_ROOM_STATUS_Occupied_Complaint":"HK_ROOM_STATUS_Occupied"),De=a.computed(()=>{var F;switch((F=z.value)==null?void 0:F.id){case"request":case"work_order":return s.value[0];default:return null}}),We=a.computed(()=>{var F;if(f.value)switch((F=z.value)==null?void 0:F.id){case"request":return f.value.find(le=>parseInt(le.id)===4);case"work_order":return f.value.find(le=>parseInt(le.id)===2);default:return null}return null}),Zt=a.computed(()=>{var F;switch((F=z.value)==null?void 0:F.id){case"request":return x.value[1];case"work_order":return x.value[0];default:return null}}),vn=a.computed(()=>{let F="";if(r.value&&r.value.reservations[0]){const le=Ze.fromISO(r.value.reservations[0].arrivalDate),J=le.toFormat("MMM"),ce=le.day,He=le.year,bo=Ze.fromISO(r.value.reservations[0].departureDate),Vl=bo.toFormat("MMM"),_l=bo.day,hp=bo.year;F+=J+" "+ce,He!==hp&&(F+=", "+He),J===Vl?F+="-"+_l:F+=" - "+Vl+" "+_l,F+=", "+hp}return F}),tn=a.computed(()=>{let F=Z.value;return F=[...new Set(F)],F}),kn=a.computed(()=>{var le;const F=(le=z.value)==null?void 0:le.id;if(!F)return!1;switch(F.value){case"room_notice":return R.value.issue&&R.value.startDate&&R.value.endDate;case"complaint":return c.value.problem&&c.value.guestName&&c.value.guestMood;case"work_order":return X.value.item&&X.value.issue&&X.value.requestedBy&&X.value.due&&(X.value.assignType&&X.value.assignType.id===0||X.value.assignType&&X.value.assignType.id===1&&X.value.department||X.value.assignType&&X.value.assignType.id===2&&X.value.person);case"request":return N.value.item&&N.value.requestedBy&&N.value.due&&(N.value.assignType&&N.value.assignType.id===0||N.value.assignType&&N.value.assignType.id===1&&N.value.department||N.value.assignType&&N.value.assignType.id===2&&N.value.person);default:return!1}}),Fr=()=>{U.value=!1,T.value=!1,i.value=!1,C.value=[],A.value=[],ee.value=[],z.value=null,R.value.issue=null,R.value.startDate=new Date,R.value.endDate=new Date,R.value.notes="",c.value.guestName="",c.value.guestEmail="",c.value.guestPhone="",c.value.guestMood=null,c.value.guestLoyalty="",c.value.problem=null,c.value.checkInDate=new Date,c.value.checkOutDate=new Date,c.value.notes="",X.value.assignType=null,X.value.department=null,X.value.person=null,X.value.due=new Date,X.value.item=null,X.value.issue=null,X.value.notes="",N.value.assignType=null,N.value.department=null,N.value.person=null,N.value.due=new Date,N.value.item=null,N.value.notes=""},is=async()=>{e("create:callback",r.value),e("toggle",!1)},qt=F=>{const le=[];Object.values(F).forEach(J=>{let ce={id:J.id,isPropertyEmployee:J.sender_type==="user",isSent:!!J.sent,isSystemMessage:J.sender_type==="system",message:J.content,timestamp:J.sent||J.created,user:{firstName:"Auto-Reply",icon:"",id:"system-message",initials:"",lastName:"",src:""}};J.sender_type==="user"&&(ce.user.firstName=J.user_first_name,ce.user.lastName=J.user_last_name,ce.user.initials=ce.user.firstName[0]+ce.user.lastName[0]),J.sender_type==="guest"&&(ce.user.firstName=J.guest_first_name,ce.user.lastName=J.guest_last_name),ce.user.initials=ce.user.firstName[0]+ce.user.lastName[0],ce.user.src="",ce.isSystemMessage&&(ce.user.icon="property-fill"),J.sender_id&&(ce.user.id=J.sender_id),le.push(ce)}),F.value=le},Sn=async()=>{t.showComments&&r.value.tokenId},ji=F=>{const le=Ze.utc(),J=new Date(F),ce=Ze.fromJSDate(J),He=le.diff(ce,["years","months","days","hours","minutes"]);if(He.years)return He.years===1?n("HC_ONE_YEAR_AGO"):n("HC_X_YEARS_AGO",{years:He.years});if(He.months)return He.months===1?n("HC_ONE_MONTH_AGO"):n("HC_X_MONTHS_AGO",{months:He.months});if(He.days)return He.days===1?n("HC_ONE_DAY_AGO"):n("HC_X_DAYS_AGO",{days:He.days});if(He.hours)return He.hours===1?n("HC_ONE_HOUR_AGO"):n("HC_X_HOURS_AGO",{hours:He.hours});if(He.minutes)return He.minutes===1?n("HC_ONE_MINUTE_AGO"):n("HC_X_MINUTES_AGO",{minutes:He.minutes});if(He.minutes===0)return n("HC_A_MOMENT_AGO")},jr=async()=>{t.showGuestDetails&&pr(),fi(),mt(),e("refresh:pms",r.value)},pr=async()=>{try{k.value.pms=!0;const F=new AbortController,le=setTimeout(()=>F.abort(),45e3),J=t.pmsBaseUrl;if(!J)throw new Error("PMS base URL is required");const ce={Authorization:"Bearer "+(()=>{var hp;const _l=`; ${document.cookie}`.split("; QV2Auth=");return _l.length===2&&((hp=_l.pop())==null?void 0:hp.split(";").shift())||""})(),"Content-Type":"application/json"},He=await fetch(`${J}/vendors/properties/statuses/${t.propertyId}/rooms`,{method:"GET",headers:ce,signal:F.signal});clearTimeout(le),He.ok||hi(He);const bo=await He.json();M.value=bo.data.pmsRooms,r.value=M.value.find(Vl=>Vl.qv2Rooms.qRoomId===t.room.id),r.value||(r.value=t.room),k.value.pms=!1}catch(F){return k.value.pms=!1,F}},fi=async()=>{try{k.value.roomNotices=!0;const F=await fetch("/api/client/common/getRoomNotices.php?propertyId="+t.propertyId+"&roomIds=["+t.room.id+"]");if(!F.ok)throw new Error(`HTTP error! status: ${F.status}`);const le=await F.json();Z.value=le.notices}catch(F){console.error("Error getting room notices:",F),Z.value=[]}finally{k.value.roomNotices=!1}},rt=async()=>{const F=new FormData;F.append("property_id",t.propertyId),F.append("filter","tasks_new"),await Promise.all([fetch("/api/client/common/getDepartments.php",{method:"POST"}),fetch("/api/client/common/getDepartmentUsersByPropertyId.php",{method:"POST",body:F})]).then(le=>{const J=le[0],ce=le[1];console.log("departmentList:",J),console.log("departmentUsersList:",ce)})},Y=async()=>{try{const F=new FormData;F.append("funcname","get_stay_details"),F.append("token_id",r.value.tokenId);const J=(await Mt.post("/includes/chat_api.php",F)).data.result;if(J!==void 0&&J.error_message)throw new Error(J.error_message);J&&J.user_name&&(c.value.guestName=J.user_name),J&&J.cell_phone&&(c.value.guestPhone=J.cell_phone),J&&J.email&&(c.value.guestEmail=J.email),J&&J.check_in&&(c.value.checkInDate=Ze(J.check_in).toDate()),J&&J.check_out&&(c.value.checkOutDate=Ze(J.check_out).toDate())}catch(F){console.log(F)}},ne=F=>{switch(F){case"complaint":return"red-30";case"hk_request":return"maroon-30";case"callback":return"teal-10";case"workorder":return"orange-20";case"task":return"green-20"}},Ge=F=>{switch(F){case"complaint":return"face-frown";case"hk_request":return"concierge-bell";case"callback":return"phone";case"workorder":return"hammer";case"task":return"check"}},mt=async()=>{try{k.value.tickets=!0;const F=await fetch("/api/client/common/getAllToDos.php?propertyId="+t.propertyId+"&roomIds=["+t.room.id+"]");if(!F.ok)throw new Error(`HTTP error! status: ${F.status}`);const le=await F.json();V.value=le.tickets}catch(F){console.error("Error getting tickets:",F),V.value=[]}finally{k.value.tickets=!1}},hi=async F=>{const le=await F.text();let J;try{J=JSON.parse(le).response}catch{J={code:F.status,message:le}}return J.code===401?(window.location.href="/logout.php?unauthorized=1",{error:J}):J},Ll=F=>{const le=document.querySelectorAll(".pulse");if(le&&le.length){const J=document.getElementById("room-"+r.value.qv2Rooms.qRoomId),ce=J==null?void 0:J.classList;switch(F){case"room_notice":(ce!=null&&ce.contains("roombox_unsel")||ce!=null&&ce.contains("roombox_unsel_active"))&&(J==null||J.classList.remove(),J==null||J.classList.add("roomnoticeroombox_sel"));break;case"complaint":!(ce!=null&&ce.contains("smsroombox_sel"))&&!(ce!=null&&ce.contains("callbackroombox_sel"))&&(J==null||J.classList.remove(),J==null||J.classList.add("complaintsroombox_sel"));break;case"request":!(ce!=null&&ce.contains("smsroombox_sel"))&&!(ce!=null&&ce.contains("callbackroombox_sel"))&&!(ce!=null&&ce.contains("complaintsroombox_sel"))&&(J==null||J.classList.remove(),J==null||J.classList.add("guestrequestroombox_sel"));break;case"work_order":!(ce!=null&&ce.contains("smsroombox_sel"))&&!(ce!=null&&ce.contains("callbackroombox_sel"))&&!(ce!=null&&ce.contains("complaintsroombox_sel"))&&!(ce!=null&&ce.contains("guestrequestroombox_sel"))&&(J==null||J.classList.remove(),J==null||J.classList.add("workordersroombox_sel"));break}setTimeout(()=>{le.forEach(He=>{He.classList.remove("pulse")})},4500)}},ss=()=>{window.location.href="/guest/overview.php"},K=F=>{let le="";switch(F.type){case"complaint":le=`/complaints/complaints_view.php?id=${F.id}`;break;case"request":le=`/tasks/hk_request.php?id=${F.id}`;break;case"satisfaction-call":le=`/tasks/task_callback.php?id=${F.id}`;break;case"work-order":le=`/tasks/workorder.php?id=${F.id}`;break;case"task":le=`/tasks/task.php?id=${F.id}`;break;default:return"#"}window.open(le)},ye=async()=>{var le,J;const F={type:(le=z.value)==null?void 0:le.id,propertyId:t.propertyId,userId:G.value,areaId:r.value.qv2Rooms.qRoomId,areaName:r.value.qv2Rooms.qRoomName};switch((J=z.value)==null?void 0:J.id){case"complaint":F.tokenId=r.value.tokenId,F.problem=c.value.problem.id,F.guestName=c.value.guestName,F.guestPhone=c.value.guestPhone,F.guestEmail=c.value.guestEmail,F.guestLoyalty=c.value.guestLoyalty,F.guestMood=c.value.guestMood.id,F.checkInDate=Ze(c.value.checkInDate).format("YYYY-MM-DD"),F.notes=c.value.notes,F.inHouse="2",F.source="dashboard",e("create:todo",F);break;case"request":F.itemId=N.value.item.id,F.assignType=N.value.assignType.id,F.occupied=N.value.requestedBy.id,F.notes=N.value.notes,F.dueDate=Ze(N.value.due).format("YYYY-MM-DD"),N.value.assignType.id===1&&(F.department=N.value.department.id),N.value.assignType.id===2&&(F.person=N.value.person.id),e("create:todo",F);break;case"room_notice":F.issue=R.value.issue.id,F.startDate=Ze(R.value.startDate).format("YYYY-MM-DD"),F.endDate=Ze(R.value.endDate).format("YYYY-MM-DD"),F.notes=R.value.notes,F.sendPush="1",e("create:todo",F);break;case"work_order":F.itemId=X.value.item.id,F.issueId=X.value.issue.id,F.assignType=X.value.assignType.id,F.occupied=X.value.requestedBy.id,F.notes=X.value.notes,F.dueDate=Ze(X.value.due).format("YYYY-MM-DD"),X.value.assignType.id===1&&(F.department=X.value.department.id),X.value.assignType.id===2&&(F.person=X.value.person.id),e("create:todo",F);break}},Ee=F=>{yo(),U2(),t.hover&&e("toggle",F)},st=F=>{Z2(),l.value=F},Ke=async F=>{if(console.log("selected:",F),z.value=F,C.value=[],R.value.issue=null,c.value.problem=null,X.value.item=null,X.value.issue=null,N.value.item=null,!z.value)return;const le=new FormData;switch(le.append("property_id",t.propertyId),le.append("area_id",r.value.qv2Rooms.qRoomId),F.id){case"complaint":try{r.value.tokenId&&await Y();const J=await fetch("/api/client/common/getComplaintProblemsByPropertyId.php",{method:"POST",body:le});console.log("complaints:",J);const ce=await Mt.post("/api/client/common/getComplaintMoods.php");ce.data.items.forEach(He=>{He.label=He.display_name}),A.value=ce.data.items}catch(J){console.log(J)}break;case"room_notice":try{const J=await fetch("/api/client/common/getRoomNoticeListByPropertyId.php",{method:"POST",body:le});console.log("room notices:",J)}catch(J){console.log(J)}break;case"request":try{N.value.requestedBy=x.value[1],N.value.assignType=s.value[0];const J=await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php",{method:"POST",body:le});console.log("requests:",J),await rt(),N.value.department=f.value.find(ce=>parseInt(ce.id)===4)}catch(J){console.log(J)}break;case"work_order":try{X.value.requestedBy=x.value[0],X.value.assignType=s.value[0];const J=await fetch("/api/client/common/getItemsByRoomId.php",{method:"POST",body:le});console.log("work orders:",J);const ce=[];let He={group:"",options:[]};ce.push({...He}),C.value=ce,await Promise.all([Mt.post("/api/client/common/getWorkOrderIssues.php"),rt()]).then(bo=>{const Vl=bo[0];Vl.data.issues.forEach(_l=>{_l.label=_l.display_name}),ee.value=Vl.data.issues}),X.value.department=f.value.find(bo=>parseInt(bo.id)===2)}catch(J){console.log(J)}break;default:return}},Rn=()=>{U.value=!U.value,i.value=!1},mr=()=>{const F=document.getElementById("comment-field"),le=document.getElementById("hidden-text");F.style.height=(le==null?void 0:le.offsetHeight)+"px"},as=()=>{const F=document.getElementById("comments-container");F==null||F.scroll({top:F.scrollHeight,behavior:"smooth"})},p5=async F=>{if(F&&F.type==="keydown"&&F.preventDefault(),r.value.tokenId&&l.value&&!T.value)try{const le=new FormData;le.append("funcname","send_message_to_guest"),le.append("stay_id",r.value.tokenId),le.append("content",l.value),le.append("sender_id",G.value||"");const J=await Mt.post("/includes/chat_api.php",le);if(J.data.result.error_message)throw new Error(J.data.result.error_message);l.value="",await Sn(),as()}catch(le){console.log(le)}},yo=()=>{var F,le;if(t.align==="left"||t.align==="right"){const J=(F=_.value)==null?void 0:F.getBoundingClientRect().left,ce=window.innerWidth;o.value=ce-J<u.value?"right":"left"}else{const J=(le=_.value)==null?void 0:le.getBoundingClientRect().top,ce=window.innerHeight;o.value=ce-J<d.value?"bottom":"top"}},U2=()=>{var F,le;if(t.position==="top"||t.position==="bottom"){const J=(F=_.value)==null?void 0:F.getBoundingClientRect().top,ce=window.innerHeight;S.value=ce-J<d.value?"top":"bottom"}else{const J=(le=_.value)==null?void 0:le.getBoundingClientRect().left,ce=window.innerWidth;S.value=ce-J<u.value?"left":"right"}},Z2=()=>{var F;T.value=!T.value,T.value?(l.value="",b.value.info=g.value,b.value.tickets=y.value,b.value.comments=p.value,g.value=!1,y.value=!1,(F=document.getElementById("comment-field"))==null||F.focus()):(g.value=b.value.info,y.value=b.value.tickets,p.value=b.value.comments)},Rl=async(F,le)=>{const J=new FormData;if(J.append("property_id",t.propertyId),J.append("room_ids",JSON.stringify([r.value.qv2Rooms.qRoomId])),await mt(),V.value){const ce=[];V.value.forEach(He=>{He.id===F&&He.type===le?ce.unshift({...He,isNew:!0}):ce.push({...He,isNew:!1})}),ce.sort((He,bo)=>He.id===F?-1:bo.id===F?1:0),V.value=[...ce]}};return a.watch(()=>t.open,()=>{t.open&&t.showComments&&v.value.length&&setTimeout(as,500),t.open||Fr()}),a.watch(l,()=>{setTimeout(mr,100)}),a.watch(()=>t.room.id,(F,le)=>{F!==le&&(M.value?(r.value=M.value.find(J=>J.qv2Rooms.qRoomId===t.room.id),r.value||(r.value=t.room)):r.value=t.room,mt(),fi())},{immediate:!0}),a.onMounted(async()=>{var ce;const F=JSON.parse(window.localStorage.getItem("authenticated"));G.value=((ce=F==null?void 0:F.user)==null?void 0:ce.id)||"",t.showGuestDetails?await pr():r.value=t.room,t.size==="sm"&&(d.value=140,u.value=160),t.size==="lg"&&(d.value=250,u.value=440),yo(),U2();const le=[],J=window.localStorage.getItem("quick-replies");J&&JSON.parse(J).forEach(He=>{le.push(He.message)}),D.value=le}),{DateTime:Ze,actionMenuOpen:i,alignment:o,assignTypes:s,comment:l,complaint:c,componentHeight:d,componentWidth:u,departments:f,departmentUsers:h,expandComments:p,expandGuestInfo:g,expandedStates:b,expandTickets:y,guestDetailsData:w,itemOptions:C,loading:k,messages:v,moodOptions:A,pmsData:M,positioning:S,quickReplies:D,quickReplyOpen:T,request:N,requestedByOptions:x,requestLoading:L,requestType:z,roomDetailsData:r,roomNotice:R,roomNotices:Z,showCreateRequest:U,ticketsList:V,todoOptions:Q,trigger:_,userId:G,workOrder:X,workOrderIssues:ee,cleanliness:P,cleanlinessColor:$,cleanlinessTooltipContent:H,filteredReplies:j,hasGuestCallback:ue,hasComplaint:te,itemOptionsList:ie,occupied:oe,occupancyTooltipContent:Ce,selectedAssignType:De,selectedDepartment:We,selectedRequestedBy:Zt,stayDetails:vn,tagsList:tn,validateToDo:kn,closeRequest:Fr,createCallback:is,createMessageList:qt,getChatMessages:Sn,getHowLongAgo:ji,getPMSData:pr,getRoomNotices:fi,getSharedData:rt,getStayDetails:Y,getTicketColor:ne,getTicketIcon:Ge,getTickets:mt,handleFailedResponse:hi,handlePulse:Ll,onClickEditConnectGuest:ss,onClickTicket:K,onCreateRequestSubmit:ye,onHoverToggle:Ee,onSelectQuickReply:st,onSelectToDo:Ke,openRequest:Rn,refreshPMSData:jr,resizeTextarea:mr,scrollToConnectBottom:as,sendChatMessage:p5,setAlignment:yo,setPositioning:U2,toggleQuickReply:Z2,updateTickets:Rl}}}),Lce=["id"],Rce=["id"],Vce=["id"],_ce={class:"flex gap-3"},$ce={key:0,class:"animate-shimmer bg-gray-30 w-3/4 h-6 grow"},Fce={key:0,class:"text-base text-inkwell-30"},jce={key:0},Hce={key:0},zce=["href"],Uce={class:"flex items-start"},Zce={class:"list-unstyled text-xs w-full"},qce={class:"grow"},Wce={class:"grow"},Gce={class:"grow"},Kce={class:"grow"},Yce={class:"position-relative icon-container ml-auto"},Qce={key:0,class:"animate-shimmer bg-gray-10 w-full h-4 my-4"},Xce={key:1,class:"flex flex-wrap items-center mb-3 gap-2"},Jce={key:2,class:"animate-shimmer bg-gray-30 w-full h-4 my-4"},e1e={key:3,class:"flex flex-wrap items-center mb-4"},t1e=["href"],n1e={class:"shrink-0 mr-2 text-xs"},r1e={key:0,class:"animate-shimmer bg-gray-10 w-full h-6"},i1e={key:1,class:"guest-info-container"},o1e={key:0,class:"text-base text-inkwell-30 mb-2"},s1e={key:0,class:"flex text-xs mb-2 stay-details-row"},a1e={class:"text-truncate text-inkwell-0"},l1e={class:"grow text-inkwell-30"},c1e={key:1,class:"flex text-xs mb-2 stay-details-row"},d1e={class:"text-truncate text-inkwell-0"},u1e={class:"grow text-inkwell-30"},f1e={class:"shrink-0 mr-2 text-xs"},h1e={key:0,class:"animate-shimmer bg-gray-30 w-full h-6"},p1e={key:1,class:"open-tickets"},m1e=["id"],g1e={key:2,class:"text-center mx-auto"},y1e={class:"shrink-0 mr-2 text-xs"},b1e={key:0,class:"quick-replies row"},w1e=["onClick"],C1e={key:1,class:"text-inkwell-0 text-xxs text-center"},v1e={class:"relative"},k1e=["innerHTML"],S1e={class:"flex items-center add-ticket-divider"},E1e={class:"grow flex items-center text-sm"},M1e={key:0,class:"grow"},A1e={class:"flex justify-between flex-wrap"},T1e={class:"field"},I1e={key:0,class:"field"},O1e={key:1,class:"field"},D1e={key:2,class:"field"},N1e={key:3,class:"field w-100"},x1e={key:4,class:"field"},P1e={key:5,class:"field w-100"},B1e={key:6,class:"field"},L1e={key:7,class:"field"},R1e={key:8,class:"field"},V1e={key:9,class:"field"},_1e={key:10,class:"field"},$1e={key:11,class:"field"},F1e={key:12,class:"field w-100"},j1e={key:13,class:"field"},H1e={key:14,class:"field"},z1e={key:15,class:"field"},U1e={key:16,class:"field"},Z1e={key:17,class:"field"},q1e={key:18,class:"field"},W1e={key:19,class:"field w-100"},G1e={key:20,class:"field"},K1e={key:21,class:"field"},Y1e={key:22,class:"field"},Q1e={key:23,class:"field"},X1e={key:24,class:"field"},J1e={key:25,class:"field w-100"},ede={class:a.normalizeClass(["actions flex-shrink-0","flex items-center justify-between"])},tde={key:4,class:"animate-shimmer bg-gray-30 w-full h-4 my-4"},nde={key:5,class:"flex items-center mt-0.5"},rde={class:"text-xs text-inkwell-0"};function ide(t,e,n,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-tooltip"),c=a.resolveComponent("q-tag"),d=a.resolveComponent("q-popover"),u=a.resolveComponent("q-divider"),f=a.resolveComponent("q-accordion"),h=a.resolveComponent("q-activity-item"),p=a.resolveComponent("q-input"),g=a.resolveComponent("q-button"),b=a.resolveComponent("q-comment-section"),y=a.resolveComponent("q-select"),w=a.resolveComponent("q-date-picker");return t.showActionMenu||t.showComments||t.showGuestDetails&&t.roomDetailsData.reservations&&t.roomDetailsData.reservations[0]||t.showTickets||t.tagsList.length?(a.openBlock(),a.createElementBlock("div",{key:0,id:t.id?`rdp-${t.id}`:"",class:"room-detail component-container text-inkwell-30",onMouseleave:e[49]||(e[49]=C=>t.onHoverToggle(!1))},[a.createVNode(d,{"model-value":t.open,align:t.alignment,position:t.positioning,size:(!t.showTickets||t.showTickets&&(!t.ticketsList||!t.ticketsList.length))&&!t.showComments&&!t.showActionMenu?"sm":t.size,onClose:e[47]||(e[47]=C=>t.$emit("toggle",!1)),"onUpdate:modelValue":e[48]||(e[48]=C=>t.$emit("toggle",C))},{trigger:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({ref:"trigger",id:t.id?`rdp-${t.id}-trigger`:"",class:"trigger-text"},{[a.toHandlerKey(!t.hover&&"click")]:e[0]||(e[0]=C=>t.$emit("toggle",!t.open))},{[a.toHandlerKey(t.hover&&"mouseover")]:e[1]||(e[1]=C=>t.onHoverToggle(!0))}),[a.renderSlot(t.$slots,"trigger",{},()=>[a.createTextVNode(a.toDisplayString(t.trigger),1)],!0)],16,Rce)]),content:a.withCtx(()=>[a.createElementVNode("div",{id:t.id?`rdp-${t.id}-content`:"",class:"popover-content w-full font-weight-normal cursor-default"},[a.createElementVNode("div",_ce,[t.loading.pms||t.loading.roomNotices?(a.openBlock(),a.createElementBlock("div",$ce)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["flex grow items-center mb-4",{"gap-3":t.showRoomName}])},[t.showRoomName?(a.openBlock(),a.createElementBlock("h2",Fce,[a.createElementVNode("strong",null,a.toDisplayString(t.$t("HC_GUESTROOM"))+" "+a.toDisplayString(t.room.name),1)])):a.createCommentVNode("",!0),(t.occupied||t.cleanliness||t.tagsList.length&&!t.showRoomName)&&t.size!=="sm"?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["flex items-center flex-wrap gap-x-2",{"gap-y-3":!t.showRoomName}])},[t.occupied?(a.openBlock(),a.createBlock(l,{key:0,class:"flex shrink-0 items-center"},{trigger:a.withCtx(()=>[a.createVNode(s,{icon:"user",type:"fill",color:t.occupied&&t.hasComplaint?"red-10":"gray-30",size:"md"},null,8,["color"])]),content:a.withCtx(()=>[t.occupancyTooltipContent?(a.openBlock(),a.createElementBlock("div",jce,a.toDisplayString(t.$t(t.occupancyTooltipContent)),1)):a.createCommentVNode("",!0)]),_:1})):a.createCommentVNode("",!0),t.cleanliness?(a.openBlock(),a.createBlock(l,{key:1,class:"flex shrink-0 items-center"},{trigger:a.withCtx(()=>[a.createVNode(s,{icon:"spray-bottle",type:"fill",color:t.cleanlinessColor,size:"md"},null,8,["color"])]),content:a.withCtx(()=>[t.cleanlinessTooltipContent?(a.openBlock(),a.createElementBlock("div",Hce,a.toDisplayString(t.cleanlinessTooltipContent),1)):a.createCommentVNode("",!0)]),_:1})):a.createCommentVNode("",!0),t.tagsList.length&&!t.showRoomName?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(t.tagsList,C=>(a.openBlock(),a.createElementBlock("a",{key:C,href:typeof C=="object"&&C.id&&C.name?`/roomsbook/notice.php?id=${C.id}`:"",class:"capitalize"},[a.createVNode(c,{class:a.normalizeClass(["!text-xs !leading-4","shrink-0 max-w-[100px] !h-auto","!py-[0.1875rem] !px-[0.4375rem] border","border-orange-10",{pulse:C.isNew}]),"bg-color":"bg-yellow-0","text-color":"text-inkwell-30"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(typeof C=="object"&&C.id&&C.name?C.name:C),1)]),_:2},1032,["class"])],8,zce))),128)):a.createCommentVNode("",!0)],2)):a.createCommentVNode("",!0)],2)),a.createElementVNode("div",Uce,[t.showActionMenu&&(t.showActionsLink||!t.hasGuestCallback&&t.showGuestCallback||t.showComments||t.showGuestDetails)?(a.openBlock(),a.createBlock(d,{key:0,modelValue:t.actionMenuOpen,"onUpdate:modelValue":e[7]||(e[7]=C=>t.actionMenuOpen=C),"has-caret":!1,align:"right",class:"action-menu mr-1",size:"md",onClose:e[8]||(e[8]=C=>t.actionMenuOpen=!1)},{trigger:a.withCtx(()=>[a.createVNode(s,{class:"popover-action rounded-full cursor-pointer",icon:"ellipsis-h",size:"md",type:"fill",onClick:e[2]||(e[2]=C=>t.actionMenuOpen=!t.actionMenuOpen)})]),content:a.withCtx(()=>[a.createElementVNode("ul",Zce,[t.showActionsLink?(a.openBlock(),a.createElementBlock("li",{key:0,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1 mt-2",{"mb-2":!t.showGuestDetails&&(t.hasGuestCallback||!t.showGuestCallback)&&!t.showComments}]),onClick:e[3]||(e[3]=(...C)=>t.openRequest&&t.openRequest(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-1",color:"gray-25",icon:"plus",size:"md",type:""}),a.createElementVNode("div",qce,a.toDisplayString(t.$t("HC_ACTION")),1)],2)):a.createCommentVNode("",!0),!t.hasGuestCallback&&t.showGuestCallback?(a.openBlock(),a.createElementBlock("li",{key:1,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1",{"mb-2":!t.showGuestDetails&&!t.showComments},{"mt-2":!t.showActionsLink}]),onClick:e[4]||(e[4]=(...C)=>t.createCallback&&t.createCallback(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-0.5",color:"gray-25",icon:"phone-plus",size:"md",type:"outline"}),a.createElementVNode("div",Wce,a.toDisplayString(t.$t("HC_GUEST_SATISFACTION_CALL")),1)],2)):a.createCommentVNode("",!0),t.showComments?(a.openBlock(),a.createElementBlock("li",{key:2,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1",{"mb-2":!t.showGuestDetails},{"mt-2":!t.showActionsLink&&(t.hasGuestCallback||!t.showGuestCallback)}]),onClick:e[5]||(e[5]=(...C)=>t.onClickEditConnectGuest&&t.onClickEditConnectGuest(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-1",color:"gray-25",icon:"pencil",size:"md",type:"outline"}),a.createElementVNode("div",Gce,a.toDisplayString(t.$t("HC_EDIT_INFORMATION")),1)],2)):a.createCommentVNode("",!0),t.showGuestDetails?(a.openBlock(),a.createElementBlock("li",{key:3,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1 mb-2",{"mt-2":!t.showActionsLink&&(t.hasGuestCallback||!t.showGuestCallback)&&!t.showComments}]),onClick:e[6]||(e[6]=(...C)=>t.refreshPMSData&&t.refreshPMSData(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-1",color:"gray-25",icon:"refresh",size:"md",type:""}),a.createElementVNode("div",Kce,a.toDisplayString(t.$t("HC_REFRESH_PMS_DATA")),1)],2)):a.createCommentVNode("",!0)])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),a.createElementVNode("div",Yce,[a.createVNode(l,null,{trigger:a.withCtx(()=>[a.createVNode(s,{icon:"close",size:"md",type:"",class:"popover-action rounded-full cursor-pointer p-1",onClick:e[9]||(e[9]=C=>t.$emit("toggle",!1))})]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_CLOSE")),1)]),_:1})])])]),t.loading.pms&&t.size==="sm"?(a.openBlock(),a.createElementBlock("div",Qce)):!t.loading.pms&&(t.occupied||t.cleanliness)&&t.size==="sm"?(a.openBlock(),a.createElementBlock("div",Xce,[t.occupied?(a.openBlock(),a.createBlock(s,{key:0,icon:"user",type:"fill",color:t.occupied&&t.hasComplaint?"red-10":"gray-30",size:"sm"},null,8,["color"])):a.createCommentVNode("",!0),t.cleanliness?(a.openBlock(),a.createBlock(s,{key:1,icon:"spray-bottle",type:"fill",color:t.cleanlinessColor,size:"sm"},null,8,["color"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.loading.roomNotices?(a.openBlock(),a.createElementBlock("div",Jce)):!t.loading.roomNotices&&t.tagsList.length&&t.showRoomName?(a.openBlock(),a.createElementBlock("div",e1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.tagsList,C=>(a.openBlock(),a.createElementBlock("a",{key:C,href:typeof C=="object"&&C.id&&C.name?`/roomsbook/notice.php?id=${C.id}`:"",class:"mr-2 mb-1 capitalize"},[a.createVNode(c,{class:a.normalizeClass(["!text-tiny !leading-4","shrink-0 max-w-[100px] !h-auto","!py-0.5 !px-1.5 border","border-orange-10",{pulse:C.isNew}]),"bg-color":"bg-yellow-0","text-color":"text-inkwell-30"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(typeof C=="object"&&C.id&&C.name?C.name:C),1)]),_:2},1032,["class"])],8,t1e))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["accordions",{closed:t.showCreateRequest}])},[t.showGuestDetails&&t.roomDetailsData.reservations&&t.roomDetailsData.reservations[0]?(a.openBlock(),a.createBlock(f,{key:0,modelValue:t.expandGuestInfo,"onUpdate:modelValue":e[11]||(e[11]=C=>t.expandGuestInfo=C),class:"mb-3","content-class":"!px-0 !pt-3 !pb-0"},{toggle:a.withCtx(()=>[a.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:e[10]||(e[10]=C=>t.expandGuestInfo=!t.expandGuestInfo)},[a.createElementVNode("div",n1e,a.toDisplayString(t.$t("HC_GUEST_INFORMATION")),1),a.createVNode(u,{class:"grow"}),a.createVNode(s,{class:a.normalizeClass(["ml-2 transition-transform",{"rotate-90":t.expandGuestInfo}]),color:"gray-20",icon:"chevron-right",type:""},null,8,["class"])])]),content:a.withCtx(()=>[t.loading.pms?(a.openBlock(),a.createElementBlock("div",r1e)):(a.openBlock(),a.createElementBlock("div",i1e,[t.roomDetailsData.reservations[0].guestName?(a.openBlock(),a.createElementBlock("p",o1e,[a.createElementVNode("strong",null,a.toDisplayString(t.roomDetailsData.reservations[0].guestName),1)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["stay-details-container flex",t.size==="sm"?"flex-col":"flex-row gap-3"])},[t.roomDetailsData.reservations[0].confirmationNumber?(a.openBlock(),a.createElementBlock("div",s1e,[a.createElementVNode("div",a1e,a.toDisplayString(t.$t("HC_RESERVATION"))+": ",1),a.createElementVNode("div",l1e,a.toDisplayString(t.roomDetailsData.reservations[0].confirmationNumber),1)])):a.createCommentVNode("",!0),t.stayDetails?(a.openBlock(),a.createElementBlock("div",c1e,[a.createElementVNode("div",d1e,a.toDisplayString(t.$t("HC_STAY"))+": ",1),a.createElementVNode("div",u1e,a.toDisplayString(t.stayDetails),1)])):a.createCommentVNode("",!0)],2)]))]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),t.showTickets?(a.openBlock(),a.createBlock(f,{key:1,modelValue:t.expandTickets,"onUpdate:modelValue":e[13]||(e[13]=C=>t.expandTickets=C),class:"mb-3","content-class":"!px-0 !pt-3 !pb-0"},{toggle:a.withCtx(()=>[a.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:e[12]||(e[12]=C=>t.expandTickets=!t.expandTickets)},[a.createElementVNode("div",f1e,a.toDisplayString(t.$t("HC_OPEN_TICKETS")),1),a.createVNode(u,{class:"grow"}),a.createVNode(s,{class:a.normalizeClass(["ml-2 transition-transform",{"rotate-90":t.expandTickets}]),color:"gray-20",icon:"chevron-right",type:""},null,8,["class"])])]),content:a.withCtx(()=>[t.loading.tickets?(a.openBlock(),a.createElementBlock("div",h1e)):t.ticketsList.length?(a.openBlock(),a.createElementBlock("ul",p1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.ticketsList,(C,k)=>{var v;return a.openBlock(),a.createElementBlock("li",{key:C.id,id:`open-ticket-${C.id}`},[a.createVNode(h,{class:a.normalizeClass([{"mt-3":k>0,pulse:C.isNew}]),"is-clickable":!0,text:C.name,time:t.getHowLongAgo((v=C.started)==null?void 0:v.dateUtc),type:C.type,onClick:A=>t.onClickTicket(C)},null,8,["class","text","time","type","onClick"])],8,m1e)}),128))])):(a.openBlock(),a.createElementBlock("p",g1e,a.toDisplayString(t.$t("HC_THERE_ARE_NO_OPEN_TICKETS_YET")),1))]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),t.showComments?(a.openBlock(),a.createBlock(f,{key:2,modelValue:t.expandComments,"onUpdate:modelValue":e[16]||(e[16]=C=>t.expandComments=C),class:"messages mb-3","content-class":"!px-0 !pt-3 !pb-0"},{toggle:a.withCtx(()=>[a.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:e[14]||(e[14]=C=>t.expandComments=!t.expandComments)},[a.createElementVNode("div",y1e,a.toDisplayString(t.$t("HC_GUEST_CONNECT")),1),a.createVNode(u,{class:"grow"}),a.createVNode(s,{class:a.normalizeClass(["ml-2 transition-transform",{"rotate-90":t.expandComments}]),color:"gray-20",icon:"chevron-right",type:""},null,8,["class"])])]),content:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["quick-replies-container","flex flex-col",{show:t.quickReplyOpen},{"justify-end":!!t.filteredReplies.length},{"justify-center":!t.filteredReplies.length}])},[t.filteredReplies.length?(a.openBlock(),a.createElementBlock("div",b1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.filteredReplies,C=>(a.openBlock(),a.createElementBlock("div",{key:C,class:a.normalizeClass(["quick-reply text-sm text-inkwell-20",{active:t.comment}]),onClick:k=>t.onSelectQuickReply(C)},[a.createElementVNode("div",null,a.toDisplayString(C),1)],10,w1e))),128))])):(a.openBlock(),a.createElementBlock("div",C1e,a.toDisplayString(t.$t("HC_NO_RESULTS_FOUND_FOR"))+' "'+a.toDisplayString(t.comment)+'". ',1))],2),a.createVNode(b,{comments:t.messages,"show-heading":!1,"show-no-comments":!1},{default:a.withCtx(()=>[a.createElementVNode("div",v1e,[a.createVNode(p,{id:"comment-field",modelValue:t.comment,"onUpdate:modelValue":e[15]||(e[15]=C=>t.comment=C),classes:["text-sm pr-5 py-1",{"border-gray-12":!t.quickReplyOpen},{"border-blue-sky text-blue-sky":t.quickReplyOpen}],icon:t.quickReplyOpen?"search":"",placeholder:t.quickReplyOpen?t.$t("HC_SEARCH_REPLIES"):t.$t("HC_WRITE_A_MESSAGE"),class:"w-100 mr-2",size:"sm",type:"textarea",onKeydown:a.withKeys(t.sendChatMessage,["enter"])},null,8,["modelValue","classes","icon","placeholder","onKeydown"]),a.createElementVNode("div",{id:"hidden-text",class:"text-sm",innerHTML:t.comment},null,8,k1e),a.createVNode(s,{id:"quick-reply-trigger",icon:(t.quickReplyOpen,"comment-lines"),class:"cursor-pointer !absolute mb-1",color:"blue-sky",size:"sm",type:t.quickReplyOpen?"fill":"outline",onClick:t.toggleQuickReply},null,8,["icon","type","onClick"]),a.createVNode(g,{id:"send-comment",disabled:!t.comment||t.quickReplyOpen,class:"!absolute btn-subtle px-2 mr-1 text-sm",size:"sm",onClick:t.sendChatMessage},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_SEND")),1)]),_:1},8,["disabled","onClick"])])]),_:1},8,["comments"])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{id:"add-ticket",class:a.normalizeClass(["add-ticket overflow-hidden",{open:t.showCreateRequest}])},[a.createVNode(u,{class:"text-base section-header mb-3",align:"left",color:"inkwell-30"},{default:a.withCtx(()=>[a.createElementVNode("div",S1e,[a.createElementVNode("div",E1e,a.toDisplayString(t.$t("HC_ACTION")),1)])]),_:1}),a.createElementVNode("form",{class:"flex flex-col",onSubmit:e[46]||(e[46]=a.withModifiers((...C)=>t.onCreateRequestSubmit&&t.onCreateRequestSubmit(...C),["prevent"]))},[t.showCreateRequest?(a.openBlock(),a.createElementBlock("div",M1e,[a.createElementVNode("div",A1e,[a.createElementVNode("div",T1e,[a.createVNode(y,{id:"todo-type",selected:t.requestType,options:t.todoOptions,placeholder:t.$t("HC_ACTION_TYPE"),condensed:"",required:"","onUpdate:modelValue":e[17]||(e[17]=C=>t.onSelectToDo(C))},null,8,["selected","options","placeholder"])]),t.requestType&&t.requestType.id==="room_notice"?(a.openBlock(),a.createElementBlock("div",I1e,[a.createVNode(y,{id:"todo-notice-issue",selected:t.roomNotice.issue,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,placeholder:t.$t("HC_ITEM"),condensed:"",required:"","onUpdate:modelValue":e[18]||(e[18]=C=>t.roomNotice.issue=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="room_notice"&&t.roomNotice.issue?(a.openBlock(),a.createElementBlock("div",O1e,[a.createVNode(w,{id:"todo-notice-start-date",value:t.roomNotice.startDate,"is-today-min":!0,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_START_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[19]||(e[19]=C=>t.roomNotice.startDate=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="room_notice"&&t.roomNotice.issue?(a.openBlock(),a.createElementBlock("div",D1e,[a.createVNode(w,{id:"todo-notice-end-date",value:t.roomNotice.endDate,"is-today-min":!0,"minimum-date":t.$datetime(t.roomNotice.startDate).toDate(),"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_END_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[20]||(e[20]=C=>t.roomNotice.endDate=C)},null,8,["value","minimum-date","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="room_notice"&&t.roomNotice.issue?(a.openBlock(),a.createElementBlock("div",N1e,[a.createVNode(p,{id:"todo-notice-notes",modelValue:t.roomNotice.notes,"onUpdate:modelValue":e[21]||(e[21]=C=>t.roomNotice.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"?(a.openBlock(),a.createElementBlock("div",x1e,[a.createVNode(y,{id:"todo-complaint-problem",selected:t.complaint.problem,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,multiple:!1,placeholder:t.$t("HC_PROBLEM"),condensed:"",required:"","onUpdate:modelValue":e[22]||(e[22]=C=>t.complaint.problem=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",P1e,[a.createVNode(p,{id:"guest-name",modelValue:t.complaint.guestName,"onUpdate:modelValue":e[23]||(e[23]=C=>t.complaint.guestName=C),placeholder:t.$t("HC_GUEST_NAME"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:"",required:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",B1e,[a.createVNode(p,{id:"guest-phone",modelValue:t.complaint.guestPhone,"onUpdate:modelValue":e[24]||(e[24]=C=>t.complaint.guestPhone=C),placeholder:t.$t("HC_GUEST_PHONE_NUMBER"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",L1e,[a.createVNode(p,{id:"guest-email",modelValue:t.complaint.guestEmail,"onUpdate:modelValue":e[25]||(e[25]=C=>t.complaint.guestEmail=C),placeholder:t.$t("HC_GUEST_EMAIL"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",R1e,[a.createVNode(p,{id:"guest-loyalty",modelValue:t.complaint.guestLoyalty,"onUpdate:modelValue":e[26]||(e[26]=C=>t.complaint.guestLoyalty=C),placeholder:t.$t("HC_GUEST_LOYALTY"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",V1e,[a.createVNode(y,{id:"todo-complaint-mood",selected:t.complaint.guestMood,options:t.moodOptions,disabled:!t.moodOptions.length,placeholder:t.$t("HC_GUEST_MOOD"),condensed:"",required:"","onUpdate:modelValue":e[27]||(e[27]=C=>t.complaint.guestMood=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",_1e,[a.createVNode(w,{id:"todo-complaint-check-in",value:t.$datetime(t.complaint.checkInDate).toDate(),"is-today-min":!1,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_CHECK_IN_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[28]||(e[28]=C=>t.complaint.checkInDate=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",$1e,[a.createVNode(w,{id:"todo-complaint-check-out",value:t.$datetime(t.complaint.checkOutDate).toDate(),"is-today-min":!1,"minimum-date":t.$datetime(t.complaint.checkInDate).toDate(),"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_CHECK_OUT_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[29]||(e[29]=C=>t.complaint.checkOutDate=C)},null,8,["value","minimum-date","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",F1e,[a.createVNode(p,{id:"todo-complaint-notes",modelValue:t.complaint.notes,"onUpdate:modelValue":e[30]||(e[30]=C=>t.complaint.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"?(a.openBlock(),a.createElementBlock("div",j1e,[a.createVNode(y,{id:"todo-work-order-item",selected:t.workOrder.item,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,"group-selectable":!1,placeholder:t.$t("HC_ITEM"),"group-label":"group","group-values":"options",condensed:"",required:"","onUpdate:modelValue":e[31]||(e[31]=C=>t.workOrder.item=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item?(a.openBlock(),a.createElementBlock("div",H1e,[a.createVNode(y,{id:"todo-work-order-issue",selected:t.workOrder.issue,options:t.workOrderIssues,disabled:!t.workOrderIssues.length,placeholder:t.$t("HC_ISSUE"),condensed:"",required:"","onUpdate:modelValue":e[32]||(e[32]=C=>t.workOrder.issue=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",z1e,[a.createVNode(y,{id:"todo-work-order-requested-by",selected:t.workOrder.requestedBy,options:t.requestedByOptions,placeholder:t.$t("HC_REQUESTED_BY"),condensed:"",required:"","onUpdate:modelValue":e[33]||(e[33]=C=>t.workOrder.requestedBy=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",U1e,[a.createVNode(y,{id:"todo-work-order-assign-type",selected:t.workOrder.assignType,options:t.assignTypes,placeholder:t.$t("HC_ASSIGN_TYPE"),condensed:"",required:"","onUpdate:modelValue":e[34]||(e[34]=C=>t.workOrder.assignType=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",Z1e,[t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue&&t.workOrder.assignType&&t.workOrder.assignType.id===1?(a.openBlock(),a.createBlock(y,{key:0,id:"todo-work-order-assign-type",selected:t.workOrder.department,options:t.departments,disabled:!t.departments.length,placeholder:t.$t("HC_ASSIGN_TO"),condensed:"",required:"","onUpdate:modelValue":e[35]||(e[35]=C=>t.workOrder.department=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue&&t.workOrder.assignType&&t.workOrder.assignType.id===2?(a.openBlock(),a.createBlock(y,{key:1,id:"todo-work-order-assign-type",selected:t.workOrder.person,options:t.departmentUsers,disabled:!t.departmentUsers.length,"group-selectable":!1,placeholder:t.$t("HC_ASSIGN_TO"),"group-label":"group","group-values":"options",condensed:"",required:"","onUpdate:modelValue":e[36]||(e[36]=C=>t.workOrder.person=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",q1e,[a.createVNode(w,{id:"todo-work-order-due",value:t.$datetime(t.workOrder.due).toDate(),"is-today-min":!0,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_DUE_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[37]||(e[37]=C=>t.workOrder.due=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",W1e,[a.createVNode(p,{id:"todo-work-order-notes",modelValue:t.workOrder.notes,"onUpdate:modelValue":e[38]||(e[38]=C=>t.workOrder.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"?(a.openBlock(),a.createElementBlock("div",G1e,[a.createVNode(y,{id:"todo-request-item",selected:t.request.item,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,placeholder:t.$t("HC_ITEM"),condensed:"",required:"","onUpdate:modelValue":e[39]||(e[39]=C=>t.request.item=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",K1e,[a.createVNode(y,{id:"todo-request-requested-by",selected:t.request.requestedBy,options:t.requestedByOptions,placeholder:t.$t("HC_REQUESTED_BY"),condensed:"",required:"","onUpdate:modelValue":e[40]||(e[40]=C=>t.request.requestedBy=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",Y1e,[a.createVNode(w,{id:"todo-request-due",value:t.$datetime(t.request.due).toDate(),"is-today-min":!0,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_DUE_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[41]||(e[41]=C=>t.request.due=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",Q1e,[a.createVNode(y,{id:"todo-request-assign-type",selected:t.request.assignType,options:t.assignTypes,placeholder:t.$t("HC_ASSIGN_TYPE"),condensed:"",required:"","onUpdate:modelValue":e[42]||(e[42]=C=>t.request.assignType=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",X1e,[t.requestType&&t.requestType.id==="request"&&t.request.item&&t.request.assignType&&t.request.assignType.id===1?(a.openBlock(),a.createBlock(y,{key:0,id:"todo-request-assign-type",selected:t.request.department,options:t.departments,disabled:!t.departments.length,placeholder:t.$t("HC_ASSIGN_TO"),condensed:"",required:"","onUpdate:modelValue":e[43]||(e[43]=C=>t.request.department=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item&&t.request.assignType&&t.request.assignType.id===2?(a.openBlock(),a.createBlock(y,{key:1,id:"todo-request-assign-type",selected:t.request.person,options:t.departmentUsers,disabled:!t.departmentUsers.length,"group-selectable":!1,placeholder:t.$t("HC_ASSIGN_TO"),"group-label":"group","group-values":"options",condensed:"",required:"","onUpdate:modelValue":e[44]||(e[44]=C=>t.request.person=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",J1e,[a.createVNode(p,{id:"todo-request-notes",modelValue:t.request.notes,"onUpdate:modelValue":e[45]||(e[45]=C=>t.request.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",ede,[a.createVNode(g,{status:"secondary",onClick:a.withModifiers(t.closeRequest,["prevent"])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_BACK")),1)]),_:1},8,["onClick"]),a.createVNode(g,{disabled:!t.validateToDo,loading:t.requestLoading,"use-loading-spinner":!0},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_POST")),1)]),_:1},8,["disabled","loading"])])],32)],2),t.loading.pms?(a.openBlock(),a.createElementBlock("div",tde)):!t.loading.pms&&t.roomDetailsData.updatedAt?(a.openBlock(),a.createElementBlock("div",nde,[a.createVNode(s,{class:"flex-shrink-1 mr-2",size:"sm",color:"inkwell-0",icon:"clock-alarm",type:"outline"}),a.createElementVNode("p",rde,a.toDisplayString(t.$t("HC_PMS_UPDATED"))+" "+a.toDisplayString(t.DateTime.fromISO(t.roomDetailsData.updatedAt).toRelative({locale:t.locale})),1)])):a.createCommentVNode("",!0)],8,Vce)]),_:3},8,["model-value","align","position","size"])],40,Lce)):a.createCommentVNode("",!0)}const ode=Me(Bce,[["render",ide],["__scopeId","data-v-8345655c"]]);function b9(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function sde(t){return(...e)=>!t(...e)}function ade(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function lde(t){return t.filter(e=>!e.$isLabel)}function w9(t,e){return n=>n.reduce((r,i)=>i[t]&&i[t].length?(r.push({$groupLabel:i[e],$isLabel:!0}),r.concat(i[t])):r,[])}const KD=(...t)=>e=>t.reduce((n,r)=>r(n),e);var cde={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return b9(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,e,this.label):this.filterOptions(n,e,this.label,this.customLabel):n=this.groupValues?w9(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(sde(this.isSelected)):n,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:t}):n.unshift({isTag:!0,label:t})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,n){return KD(this.filterGroups(e,n,this.groupValues,this.groupLabel,this.customLabel),w9(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return KD(w9(this.groupValues,this.groupLabel),lde)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(b9(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return b9(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(n=>n[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const n=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],r=this.internalValue.filter(i=>n.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",r)}else{const n=e[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,n,r){return e?t.filter(i=>ade(r(i,n),e)).sort((i,o)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,o):r(i,n).length-r(o,n).length):t},filterGroups(t,e,n,r,i){return o=>o.map(s=>{if(!s[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const l=this.filterOptions(s[n],t,e,i);return l.length?{[r]:s[r],[n]:l}:[]})}}},dde={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===e.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},YD={name:"vue-multiselect",mixins:[cde,dde],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}}};const ude=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],fde={ref:"tags",class:"multiselect__tags"},hde={class:"multiselect__tags-wrap"},pde=["textContent"],mde=["onKeypress","onMousedown"],gde=["textContent"],yde={class:"multiselect__spinner"},bde=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],wde=["id","aria-multiselectable"],Cde={key:0},vde={class:"multiselect__option"},kde=["aria-selected","id","role"],Sde=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Ede=["data-select","data-deselect","onMouseenter","onMousedown"],Mde={class:"multiselect__option"},Ade={class:"multiselect__option"};function Tde(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("div",{tabindex:t.searchable?-1:n.tabindex,class:a.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":o.isAbove,"multiselect--has-options-group":o.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=s=>t.activate()),onBlur:e[15]||(e[15]=s=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=a.withKeys(a.withModifiers(s=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=a.withKeys(a.withModifiers(s=>t.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:e[18]||(e[18]=a.withKeys(a.withModifiers(s=>t.addPointerElement(s),["stop","self"]),["enter","tab"])),onKeyup:e[19]||(e[19]=a.withKeys(s=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[a.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[a.createElementVNode("div",{onMousedown:e[0]||(e[0]=a.withModifiers(s=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),a.renderSlot(t.$slots,"clear",{search:t.search}),a.createElementVNode("div",fde,[a.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:o.visibleValues,isOpen:t.isOpen},()=>[a.withDirectives(a.createElementVNode("div",hde,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.visibleValues,(s,l)=>a.renderSlot(t.$slots,"tag",{option:s,search:t.search,remove:t.removeElement},()=>[(a.openBlock(),a.createElementBlock("span",{class:"multiselect__tag",key:l,onMousedown:e[1]||(e[1]=a.withModifiers(()=>{},["prevent"]))},[a.createElementVNode("span",{textContent:a.toDisplayString(t.getOptionLabel(s))},null,8,pde),a.createElementVNode("i",{tabindex:"1",onKeypress:a.withKeys(a.withModifiers(c=>t.removeElement(s),["prevent"]),["enter"]),onMousedown:a.withModifiers(c=>t.removeElement(s),["prevent"]),class:"multiselect__tag-icon"},null,40,mde)],32))])),256))],512),[[a.vShow,o.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>n.limit?a.renderSlot(t.$slots,"limit",{key:0},()=>[a.createElementVNode("strong",{class:"multiselect__strong",textContent:a.toDisplayString(n.limitText(t.internalValue.length-n.limit))},null,8,gde)]):a.createCommentVNode("v-if",!0)]),a.createVNode(a.Transition,{name:"multiselect__loading"},{default:a.withCtx(()=>[a.renderSlot(t.$slots,"loading",{},()=>[a.withDirectives(a.createElementVNode("div",yde,null,512),[[a.vShow,n.loading]])])]),_:3}),t.searchable?(a.openBlock(),a.createElementBlock("input",{key:0,ref:"search",name:n.name,id:t.id,type:"text",autocomplete:"off",spellcheck:n.spellcheck,placeholder:t.placeholder,required:o.isRequired,style:a.normalizeStyle(o.inputStyle),value:t.search,disabled:n.disabled,tabindex:n.tabindex,"aria-label":n.name+"-searchbox",onInput:e[2]||(e[2]=s=>t.updateSearch(s.target.value)),onFocus:e[3]||(e[3]=a.withModifiers(s=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=a.withModifiers(s=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=a.withKeys(s=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=a.withKeys(a.withModifiers(s=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=a.withKeys(a.withModifiers(s=>t.pointerBackward(),["prevent"]),["up"])),e[9]||(e[9]=a.withKeys(a.withModifiers(s=>t.removeLastElement(),["stop"]),["delete"]))],onKeypress:e[8]||(e[8]=a.withKeys(a.withModifiers(s=>t.addPointerElement(s),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,bde)):a.createCommentVNode("v-if",!0),o.isSingleLabelVisible?(a.openBlock(),a.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=a.withModifiers((...s)=>t.toggle&&t.toggle(...s),["prevent"]))},[a.renderSlot(t.$slots,"singleLabel",{option:o.singleValue},()=>[a.createTextVNode(a.toDisplayString(t.currentOptionLabel),1)])],32)):a.createCommentVNode("v-if",!0),o.isPlaceholderVisible?(a.openBlock(),a.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=a.withModifiers((...s)=>t.toggle&&t.toggle(...s),["prevent"]))},[a.renderSlot(t.$slots,"placeholder",{},()=>[a.createTextVNode(a.toDisplayString(t.placeholder),1)])],32)):a.createCommentVNode("v-if",!0)],512),a.createVNode(a.Transition,{name:"multiselect",persisted:""},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"multiselect__content-wrapper",onFocus:e[12]||(e[12]=(...s)=>t.activate&&t.activate(...s)),tabindex:"-1",onMousedown:e[13]||(e[13]=a.withModifiers(()=>{},["prevent"])),style:a.normalizeStyle({maxHeight:t.optimizedHeight+"px"}),ref:"list"},[a.createElementVNode("ul",{class:"multiselect__content",style:a.normalizeStyle(o.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[a.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(a.openBlock(),a.createElementBlock("li",Cde,[a.createElementVNode("span",vde,[a.renderSlot(t.$slots,"maxElements",{},()=>[a.createTextVNode("Maximum of "+a.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):a.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(t.filteredOptions,(s,l)=>(a.openBlock(),a.createElementBlock("li",{class:"multiselect__element",key:l,"aria-selected":t.isSelected(s),id:t.id+"-"+l,role:s&&(s.$isLabel||s.$isDisabled)?null:"option"},[s&&(s.$isLabel||s.$isDisabled)?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass([t.optionHighlight(l,s),"multiselect__option"]),onClick:a.withModifiers(c=>t.select(s),["stop"]),onMouseenter:a.withModifiers(c=>t.pointerSet(l),["self"]),"data-select":s&&s.isTag?t.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[a.renderSlot(t.$slots,"option",{option:s,search:t.search,index:l},()=>[a.createElementVNode("span",null,a.toDisplayString(t.getOptionLabel(s)),1)])],42,Sde)),s&&(s.$isLabel||s.$isDisabled)?(a.openBlock(),a.createElementBlock("span",{key:1,"data-select":t.groupSelect&&o.selectGroupLabelText,"data-deselect":t.groupSelect&&o.deselectGroupLabelText,class:a.normalizeClass([t.groupHighlight(l,s),"multiselect__option"]),onMouseenter:a.withModifiers(c=>t.groupSelect&&t.pointerSet(l),["self"]),onMousedown:a.withModifiers(c=>t.selectGroup(s),["prevent"])},[a.renderSlot(t.$slots,"option",{option:s,search:t.search,index:l},()=>[a.createElementVNode("span",null,a.toDisplayString(t.getOptionLabel(s)),1)])],42,Ede)):a.createCommentVNode("v-if",!0)],8,kde))),128)):a.createCommentVNode("v-if",!0),a.withDirectives(a.createElementVNode("li",null,[a.createElementVNode("span",Mde,[a.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=a.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[a.vShow,n.showNoResults&&t.filteredOptions.length===0&&t.search&&!n.loading]]),a.withDirectives(a.createElementVNode("li",null,[a.createElementVNode("span",Ade,[a.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=a.createTextVNode("List is empty."))])])],512),[[a.vShow,n.showNoOptions&&(t.options.length===0||o.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!n.loading]]),a.renderSlot(t.$slots,"afterList")],12,wde)],36),[[a.vShow,t.isOpen]])]),_:3})],42,ude)}YD.render=Tde;const Ide=a.defineComponent({name:"QSelect",components:{QBadge:cs,VueMultiselect:YD},props:{id:{type:String,default:""},options:{type:[Array,Object],required:!0},modelValue:{type:[String,Number,Array,Object],default:""},trackBy:{type:String,default:"id"},label:{type:String,default:"label"},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},taggable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},filterSortFunction:{type:Function,default:()=>{}},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},groupValues:{type:String,default:""},groupLabel:{type:String,default:""},groupSelectable:{type:Boolean,default:!0},hasCheckboxes:{type:Boolean,default:!1},size:{type:String,default:"lg"},info:{type:String,default:""},allowEmpty:{type:Boolean,default:!0},blockKeys:{type:Array,default:()=>["Delete"]},noResultMessage:{type:String,default:""},selectionControl:{type:Boolean,default:!1},showExpanded:{type:Boolean,default:!1},showPlaceholderImage:{type:Boolean,default:!0},showSelectAll:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:""},expand:{type:Boolean,default:!1},showSelectedCount:{type:Boolean,default:!1},truncateTag:{type:Boolean,default:!1},limitShown:{type:Number,default:null},validationMethod:{type:Function,default:()=>!0},showOptionDescription:{type:Boolean,default:!1},showTags:{type:Boolean,default:!1},openDirection:{type:String,default:"bottom"},useAddTagsOnly:{type:Boolean,default:!1},clearOnSelect:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!1}},emits:["update:model-value"],setup(t,{slots:e,emit:n}){const{t:r}=Wi(),i=a.ref(null),o=a.ref(null),s=a.ref(t.modelValue),l=a.ref(""),c=a.ref(!1),d=a.ref([]),u=a.computed(()=>Array.isArray(t.options)?t.options.length:0),f=a.computed(()=>!!e.action),h=a.computed(()=>t.noResultMessage||r("HC_PRESS_ENTER_TO_CREATE_A_TAG")),p=a.computed(()=>t.tagPlaceholder||r("HC_PRESS_ENTER_TO_CREATE_A_TAG")),g=a.computed(()=>u.value===s.value.length?r("HC_ALL"):s.value.length>1?r("HC_MULTIPLE_SELECTED"):s.value[0].label||s.value[0].name||""),b=a.computed(()=>t.taggable||t.showTags),y=D=>{n("update:model-value",D)},w=D=>{l.value=D},C=async D=>{const T={label:D,name:D,added:!0};if(!t.validationMethod(T)){await a.nextTick(),i.value.search=D;return}d.value.push(T),s.value.push(T)},k=()=>{s.value=[],n("update:model-value",s.value)},v=D=>{typeof D=="number"&&D>=0?s.value.splice(D,1):s.value=[],a.nextTick(()=>{n("update:model-value",s.value)})},A=D=>{t.multiple&&s.value&&D.length===s.value.length&&a.nextTick(()=>{s.value=[],n("update:model-value",s.value)})},S=async()=>{if(c.value||(c.value=!0,d.value=t.options),o.value&&t.searchable){await a.nextTick();const D=o.value.querySelector(".multiselect__content-wrapper"),T=o.value.querySelector(".multiselect__input");T.style.width=D.clientWidth+"px"}},M=async()=>{if(!i.value)return;const D=i.value;s.value=[],t.groupValues?D.filteredOptions.forEach(T=>{s.value.push(T)}):s.value=D.filteredOptions,n("update:model-value",s.value)};return a.watch(()=>t.modelValue,D=>{s.value=D}),a.watch(()=>t.options,D=>{c.value&&(d.value=D)}),{currentSelect:i,search:l,selected:s,isOpened:c,internalOptions:d,hasAction:f,noResultsText:h,noTagFound:p,selectedCount:u,selectedText:g,useTags:b,addTag:C,clearAll:k,onOpen:S,onRemove:A,onUpdateValue:y,removeElement:v,searchChange:w,selectAll:M}}}),Ode=["id"],Dde=["onMousedown"],Nde={key:1,class:"searchable-placeholder"},xde={class:"flex gap-2 px-4 py-3"},Pde={key:0,class:"tag-container"},Bde={key:0},Lde={class:a.normalizeClass(["tag-name text-sm leading-normal pr-2 capitalize"])},Rde={key:1},Vde=["onClick"],_de={key:0,class:"text-blue-20 text-xs count"},$de={key:0,class:"text-inkwell-10 text-right truncate font-normal"},Fde={key:1,class:"text-blue-20 text-xs ml-2"},jde={class:"text-inkwell-40"},Hde={class:"text-inkwell-10 text-right truncate"},zde={key:1,class:"option-selected text-gray-40 truncate"},Ude={key:3,class:"flex w-full justify-between"},Zde={class:"text-inkwell-40 pl-1 text-base font-medium"},qde=["title"],Wde={key:2,class:"option-description text-xs pt-0.5 truncate"};function Gde(t,e,n,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-button"),c=a.resolveComponent("q-badge"),d=a.resolveComponent("vue-multiselect");return a.openBlock(),a.createElementBlock("div",{id:t.id+"-containers",class:"control custom-select",ref:"currentContainer"},[a.createVNode(d,{id:t.id,ref:"currentSelect",modelValue:t.selected,"onUpdate:modelValue":[e[1]||(e[1]=u=>t.selected=u),e[4]||(e[4]=u=>t.onUpdateValue(u))],"filtering-sort-func":t.filterSortFunction,options:t.internalOptions,searchable:t.searchable,multiple:t.multiple,taggable:t.taggable||t.useAddTagsOnly,label:t.label,"track-by":t.trackBy,"group-values":t.groupValues,"group-label":t.groupLabel,"group-select":t.groupSelectable,"block-keys":t.blockKeys,class:a.normalizeClass([{"has-checkboxes":t.hasCheckboxes},{"selection-control":t.selectionControl},{"select-multiple":!!t.multiple},{"select-taggable":!!t.taggable||!!t.showTags||!!t.useAddTagsOnly},{"select-expand":t.expand},{"select-show-count":!!t.showSelectedCount},{"select-search":!!t.search},{"select-searchable":t.searchable},t.searchable?"cursor-text":"cursor-default","q-select rounded","select-"+t.size]),disabled:t.disabled||t.loading,loading:t.loading,"allow-empty":t.allowEmpty,"clear-on-select":t.clearOnSelect,"close-on-select":t.closeOnSelect||!t.hasCheckboxes&&!t.multiple,"show-tags":t.showTags,"tag-placeholder":t.noTagFound,placeholder:t.placeholder,"preserve-search":!0,"reset-after":!1,"max-height":280,"open-direction":t.openDirection,"select-label":"","deselect-label":"","selected-label":"","select-group-label":"","deselect-group-label":"",onOpen:t.onOpen,onRemove:e[2]||(e[2]=u=>t.onRemove(u)),onTag:t.addTag,onSearchChange:e[3]||(e[3]=u=>t.searchChange(u))},a.createSlots({caret:a.withCtx(({toggle:u})=>[a.createElementVNode("div",{class:a.normalizeClass(["h-full w-full","absolute left-0 top-0","z-[1] cursor-pointer","flex justify-end"]),onMousedown:a.withModifiers(u,["prevent"])},[t.loading?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,icon:"chevron-down",type:"line"}))],40,Dde),t.searchable?(a.openBlock(),a.createBlock(s,{key:0,class:"search-icon",color:t.selectionControl?"inkwell-0":"gray-40",icon:"search",type:""},null,8,["color"])):a.createCommentVNode("",!0),t.searchable&&(t.multiple&&!t.selected.length||!t.multiple&&!t.selected)&&!t.selectionControl?(a.openBlock(),a.createElementBlock("div",Nde,a.toDisplayString(t.placeholder),1)):a.createCommentVNode("",!0)]),noResult:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.noResultsText),1)]),singleLabel:a.withCtx(({option:u})=>[u.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:u.icon},null,8,["icon"])):a.createCommentVNode("",!0),u&&t.showPlaceholderImage?a.renderSlot(t.$slots,"optionPrefix",a.normalizeProps(a.mergeProps({key:1},u)),void 0,!0):a.createCommentVNode("",!0),t.selectionControl?a.renderSlot(t.$slots,"controlPlaceholder",{key:2},()=>[a.createTextVNode(a.toDisplayString(t.placeholder),1)],!0):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["option-name",{"text-inkwell-10 text-right truncate":t.selectionControl}])},a.toDisplayString(u.label||u.name||u),3)]),selection:a.withCtx(({values:u,isOpen:f})=>{var h,p,g,b;return[t.useTags?(a.openBlock(),a.createElementBlock("div",Pde,[t.groupValues&&t.options[0][t.groupValues].length===u.length?(a.openBlock(),a.createElementBlock("div",Bde,[a.createElementVNode("div",{class:a.normalizeClass(["multiselect__tag inline-flex items-center justify-center rounded me-2 z-[1]",{"tag-gray":!!t.showTags}])},[a.createElementVNode("span",Lde,a.toDisplayString(t.groupLabel),1),a.createElementVNode("span",{class:"tag-remove cursor-pointer shrink",tabindex:"1",onMousedown:e[0]||(e[0]=a.withModifiers(y=>t.removeElement(t.options[0][t.groupValues]),["prevent","stop"]))},[a.createVNode(s,{icon:"close",color:"white",class:a.normalizeClass(["tag-close flex rounded-full p-1",t.showTags?"bg-inkwell-30":"bg-blue-40"]),type:"line"},null,8,["class"])],32)],2)])):(a.openBlock(),a.createElementBlock("div",Rde,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(!t.expand&&t.limitShown?u.slice(0,t.limitShown):u,(y,w)=>(a.openBlock(),a.createElementBlock("div",{key:w,class:a.normalizeClass(["multiselect__tag !inline-flex items-center justify-center rounded mr-2 z-[1]",{"tag-added":y.added},{"tag-gray":!!t.showTags},y.tagClass?y.tagClass:""])},[y.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:y.icon,class:"tag-icon"},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["tag-name text-sm leading-normal pr-2",{"tag-truncate":t.truncateTag}])},a.toDisplayString(y.label||y.name),3),a.createElementVNode("span",{class:"tag-remove cursor-pointer shrink",tabindex:"1",onClick:C=>t.removeElement(w)},[a.createVNode(s,{icon:"close-thick",color:"white",size:"sm",class:a.normalizeClass(["!p-[0.3rem] tag-close flex rounded-full p-1",y.closeTagClass?y.closeTagClass:t.showTags?"bg-inkwell-30":t.taggable&&y.added?"bg-green-40":"bg-blue-40"]),type:"line"},null,8,["class"])],8,Vde)],2))),128)),!t.expand&&t.showSelectedCount&&t.multiple&&u.length>t.limitShown?(a.openBlock(),a.createElementBlock("span",_de," + "+a.toDisplayString(u.length-t.limitShown)+" more... ",1)):a.createCommentVNode("",!0)]))])):a.createCommentVNode("",!0),!t.showTags&&!t.taggable&&t.multiple&&u.length?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["multiselect__single flex w-full",t.selectionControl?"whitespace-nowrap justify-between":"items-center"])},[a.createElementVNode("span",{class:a.normalizeClass(["option-selected",{capitalize:t.groupValues&&t.options[0][t.groupValues].length===u.length}])},a.toDisplayString(t.selectionControl?t.placeholder:t.groupValues&&t.options[0][t.groupValues].length===u.length?t.groupLabel:u[0].label),3),t.selectionControl?(a.openBlock(),a.createElementBlock("span",$de,a.toDisplayString(t.selectedText),1)):a.createCommentVNode("",!0),t.limitShown&&t.limitShown<u.length&&(!t.groupValues&&u.length!==t.limitShown||t.groupValues&&t.options[0][t.groupValues].length!==u.length)?(a.openBlock(),a.createElementBlock("span",Fde," + "+a.toDisplayString(u.length-t.limitShown)+" more... ",1)):a.createCommentVNode("",!0)],2)):f&&!t.useTags&&!t.multiple?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["multiselect__single flex w-full",t.selectionControl?"justify-between":"items-center"])},[t.selectionControl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("span",jde,a.toDisplayString(t.placeholder||""),1),a.createElementVNode("span",Hde,a.toDisplayString(((h=t.selected)==null?void 0:h.label)||((p=t.selected)==null?void 0:p.name)||""),1)],64)):(a.openBlock(),a.createElementBlock("span",zde,a.toDisplayString(((g=t.selected)==null?void 0:g.label)||((b=t.selected)==null?void 0:b.name)||t.placeholder||""),1))],2)):f&&!t.useTags&&t.multiple&&t.selectionControl?(a.openBlock(),a.createElementBlock("div",Ude,[a.createElementVNode("span",Zde,a.toDisplayString(t.placeholder||""),1)])):a.createCommentVNode("",!0)]}),option:a.withCtx(({option:u,search:f})=>[a.createElementVNode("div",{class:a.normalizeClass(["flex items-center w-full",{"option-search":u.label===f},{"option-disabled":u.isDisabled}]),title:u.label?u.label:""},[t.multiple&&t.hasCheckboxes?(a.openBlock(),a.createBlock(c,{key:0,"has-icon":!0,class:"selected-checkbox mr-2",shape:"square"},{icon:a.withCtx(()=>[a.createVNode(s,{icon:"check",color:"white",type:"line"})]),_:1})):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["option-icon-name flex items-center",!u.$groupLabel&&t.groupLabel?"pl-0":""])},[u.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:u.icon,class:"mr-1"},null,8,["icon"])):a.createCommentVNode("",!0),u?a.renderSlot(t.$slots,"optionPrefix",a.normalizeProps(a.mergeProps({key:1},u)),void 0,!0):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["option-name",[u.optionClass?u.optionClass:""]])},a.toDisplayString(u.$groupLabel||u.label||u.name||u),3),u.description&&t.showOptionDescription?(a.openBlock(),a.createElementBlock("div",Wde,a.toDisplayString(u.description),1)):a.createCommentVNode("",!0),t.multiple&&t.hasCheckboxes?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:3,icon:"check",size:"sm",type:"line",color:"inkwell-30",class:"selected-icon"}))],2)],10,qde)]),_:2},[t.showSelectAll?{name:"beforeList",fn:a.withCtx(()=>[a.createElementVNode("div",xde,[a.createVNode(l,{type:"button",disabled:t.selectedCount===t.selected.length,"no-min-width":!0,class:"!text-sm !font-normal !leading-4",status:"link",onClick:a.withModifiers(t.selectAll,["prevent"])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_SELECT_ALL")),1)]),_:1},8,["disabled","onClick"]),a.createVNode(l,{type:"button",disabled:!t.selected.length,"no-min-width":!0,class:"!text-sm !font-normal !leading-4",status:"link",onClick:a.withModifiers(t.clearAll,["prevent"])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_CLEAR_ALL")),1)]),_:1},8,["disabled","onClick"])])]),key:"0"}:void 0]),1032,["id","modelValue","filtering-sort-func","options","searchable","multiple","taggable","label","track-by","group-values","group-label","group-select","block-keys","class","disabled","loading","allow-empty","clear-on-select","close-on-select","show-tags","tag-placeholder","placeholder","open-direction","onOpen","onTag"])],8,Ode)}const Kde=Me(Ide,[["render",Gde],["__scopeId","data-v-511ba2f9"]]);var pn={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},Zg={AND:"and",OR:"or"};function QD(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Yde(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
273
+ `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=P0(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ug.assertOptions(r,{silentJSONParsing:_o.transitional(_o.boolean),forcedJSONParsing:_o.transitional(_o.boolean),clarifyTimeoutError:_o.transitional(_o.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:Ug.assertOptions(i,{encode:_o.function,serialize:_o.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ug.assertOptions(n,{baseUrl:_o.spelling("baseURL"),withXsrfToken:_o.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&q.merge(o.common,o[n.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Lr.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let u,f=0,h;if(!c){const g=[UD.bind(this),void 0];for(g.unshift(...l),g.push(...d),h=g.length,u=Promise.resolve(n);f<h;)u=u.then(g[f++],g[f++]);return u}h=l.length;let p=n;for(;f<h;){const g=l[f++],b=l[f++];try{p=g(p)}catch(y){b.call(this,y);break}}try{u=UD.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=d.length;f<h;)u=u.then(d[f++],d[f++]);return u}getUri(e){e=P0(this.defaults,e);const n=PD(e.baseURL,e.url,e.allowAbsoluteUrls);return ED(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){B0.prototype[e]=function(n,r){return this.request(P0(r||{},{method:e,url:n,data:(r||{}).data}))}}),q.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,l){return this.request(P0(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}B0.prototype[e]=n(),B0.prototype[e+"Form"]=n(!0)});let Ice=class KP{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,l){r.reason||(r.reason=new Gc(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new KP(function(i){e=i}),cancel:e}}};function Oce(t){return function(n){return t.apply(null,n)}}function Dce(t){return q.isObject(t)&&t.isAxiosError===!0}const y9={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(y9).forEach(([t,e])=>{y9[e]=t});function WD(t){const e=new B0(t),n=cD(B0.prototype.request,e);return q.extend(n,B0.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return WD(P0(t,i))},n}const Mt=WD(Cf);Mt.Axios=B0,Mt.CanceledError=Gc,Mt.CancelToken=Ice,Mt.isCancel=OD,Mt.VERSION=ZD,Mt.toFormData=$g,Mt.AxiosError=Be,Mt.Cancel=Mt.CanceledError,Mt.all=function(e){return Promise.all(e)},Mt.spread=Oce,Mt.isAxiosError=Dce,Mt.mergeConfig=P0,Mt.AxiosHeaders=Lr,Mt.formToJSON=t=>TD(q.isHTMLForm(t)?new FormData(t):t),Mt.getAdapter=zD.getAdapter,Mt.HttpStatusCode=y9,Mt.default=Mt;const{Axios:Ige,AxiosError:Oge,CanceledError:Dge,isCancel:Nge,CancelToken:xge,VERSION:Pge,all:Bge,Cancel:Lge,isAxiosError:Rge,spread:Vge,toFormData:_ge,AxiosHeaders:$ge,HttpStatusCode:Fge,formToJSON:jge,getAdapter:Hge,mergeConfig:zge}=Mt,Nce=a.defineComponent({name:"QDatePicker",components:{DatePicker:N0},props:{id:{type:String,default:""},modelValue:{type:[Date,String,Array],default:""},clearable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},disabledDate:{type:Function,default:()=>{}},disabledBeforeToday:{type:Boolean,default:!1},disabledAfterToday:{type:Boolean,default:!1},format:{type:String,default:""},locale:{type:String,default:"en"},placeholder:{type:String,default:""},range:{type:Boolean,default:!1},size:{type:String,default:"lg"},type:{type:String,default:"date"}},emits:["update:modelValue"],setup(t){const e=a.ref("bottom"),n=a.ref(),r=a.ref(!1),i=a.ref(t.modelValue||""),o=a.computed(()=>t.disabledAfterToday?s:t.disabledBeforeToday?l:t.disabledDate),s=d=>d>new Date,l=d=>{const u=new Date;return u.setHours(0,0,0,0),d<u},c=()=>{const d=document.querySelector(".mx-datepicker-main");d&&(e.value=parseInt(d.style.top)<0?"top":"bottom")};return a.watch(r,async d=>{d?window.addEventListener("scroll",c):window.removeEventListener("scroll",c),await a.nextTick(),c()}),{calendarPosition:e,datePicker:n,isOpen:r,value:i,disabledDates:o,disableDatesAfterToday:s,disableDatesBeforeToday:l,getCalendarPosition:c}}}),xce=a.defineComponent({name:"QTag",components:{},props:{tagClass:{type:String,default:""},bgColor:{type:String,default:"bg-green-0"},textColor:{type:String,default:"text-green-20"},shape:{type:String,default:"square"}},setup(t,{slots:e}){return{hasIcon:!!e.icon}}});function Pce(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["tag flex items-center",[t.tagClass,t.bgColor,t.textColor,"tag-"+t.shape,{"has-icon":t.hasIcon}]])},[t.hasIcon?a.renderSlot(t.$slots,"icon",{key:0},void 0,!0):a.createCommentVNode("",!0),a.renderSlot(t.$slots,"default",{},void 0,!0)],2)}const GD=Me(xce,[["render",Pce],["__scopeId","data-v-1a01844c"]]),Bce=a.defineComponent({name:"QRoomDetailsPopover",components:{QAccordion:$b,QActivityItem:Fb,QCommentSection:yO,QDatePicker:Nce,QDivider:aD,QIcon:ga,QPopover:Km,QTag:GD,QTooltip:l0},props:{id:{type:String,default:""},roomDetails:{type:Object,default:()=>{}},guestDetails:{type:Object,default:()=>{}},propertyId:{type:[Number,String],default:""},propertyTimeZone:{type:String,default:"America/Chicago"},trigger:{type:[Number,String],default:""},comments:{type:Array,default:()=>[]},room:{type:Object,default:()=>{}},showActionMenu:{type:Boolean,default:!0},showActionsLink:{type:Boolean,default:!0},showGuestDetails:{type:Boolean,default:!1},showComments:{type:Boolean,default:!1},showTickets:{type:Boolean,default:!0},showGuestCallback:{type:Boolean,default:!0},showRoomName:{type:Boolean,default:!1},hover:{type:Boolean,default:!1},size:{type:String,default:"md"},open:{type:Boolean,default:!1},align:{type:String,default:"left"},position:{type:String,default:"bottom"},locale:{type:String,default:"en"},pmsBaseUrl:{type:String,default:"",required:!0}},emits:["create:callback","create:todo","refresh:pms","toggle"],setup(t,{emit:e}){var m5,rd;const{t:n}=Wi(),r=a.ref(null),i=a.ref(!1),o=a.ref("left"),s=a.ref([{id:1,label:n("HC_DEPARTMENT")},{id:2,label:n("HC_PERSON")},{id:0,label:n("HC_ANYONE")}]),l=a.ref(""),c=a.ref({checkInDate:new Date,checkOutDate:new Date,guestEmail:"",guestLoyalty:"",guestMood:null,guestName:"",guestPhone:"",inHouse:!!((m5=r.value)!=null&&m5.tokenId)||!1,problem:null,notes:"",tokenId:(rd=r.value)==null?void 0:rd.tokenId}),d=a.ref(250),u=a.ref(290),f=a.ref([]),h=a.ref([]),p=a.ref(!0),g=a.ref(!0),b=a.ref({info:!0,tickets:!0,comments:!0}),y=a.ref(!0),w=a.ref(t.guestDetails),C=a.ref([]),k=a.ref({pms:!1,roomNotices:!1,tickets:!1}),v=a.ref([]),A=a.ref([]),S=a.ref("bottom"),M=a.ref(null),D=a.ref([]),T=a.ref(!1),N=a.ref({assignType:null,department:null,due:new Date,item:null,notes:"",person:null,requestedBy:null}),x=a.ref([{id:0,label:n("HC_STAFF_MEMBER")},{id:1,label:n("HC_HOTEL_GUEST")}]),L=a.ref(!1),z=a.ref(null),R=a.ref({endDate:new Date,issue:null,notes:"",startDate:new Date}),Z=a.ref([]),U=a.ref(!1),V=a.ref([]),Q=a.ref([{label:n("HC_COMPLAINT"),id:"complaint"},{label:n("HC_REQUEST"),id:"request"},{label:n("HC_ROOM_NOTICE"),id:"room_notice"},{label:n("HC_WORK_ORDER"),id:"work_order"}]),_=a.ref(),G=a.ref(null),X=a.ref({assignType:null,department:null,due:new Date,item:null,issue:null,notes:"",person:null,requestedBy:null}),ee=a.ref([]),P=a.computed(()=>{var F;switch((F=r.value.cleaning)==null?void 0:F.name){case"CLEAN":case"INSPECTED":return"CLEAN";case"DIRTY":case"PICKUP":case"OUT OF ORDER":case"OUT OF SERVICE":return"DIRTY";default:return""}}),$=a.computed(()=>P.value==="CLEAN"?"blue-10":P.value==="DIRTY"?"red-10":"gray-30"),H=a.computed(()=>{var F;return n(`HC_${(F=r.value.cleaning)==null?void 0:F.name}`)||""}),j=a.computed(()=>{const F=l.value.toLowerCase();return D.value.filter(le=>le.toLowerCase().match(F))}),te=a.computed(()=>V.value.length?!!V.value.find(le=>le.type==="complaint"):!1),ue=a.computed(()=>V.value.length?!!V.value.find(le=>le.type==="callback"):!1),ie=a.computed(()=>{let F=[];return C.value[0]&&C.value[0].options===void 0?C.value.forEach(le=>{F.push({id:parseInt(le.id),label:le.display_name})}):F=C.value,F}),oe=a.computed(()=>{var F;return((F=r.value.occupancy)==null?void 0:F.name)==="OCCUPIED"}),Ce=a.computed(()=>oe.value&&te.value?"HK_ROOM_STATUS_Occupied_Complaint":"HK_ROOM_STATUS_Occupied"),De=a.computed(()=>{var F;switch((F=z.value)==null?void 0:F.id){case"request":case"work_order":return s.value[0];default:return null}}),We=a.computed(()=>{var F;if(f.value)switch((F=z.value)==null?void 0:F.id){case"request":return f.value.find(le=>parseInt(le.id)===4);case"work_order":return f.value.find(le=>parseInt(le.id)===2);default:return null}return null}),Zt=a.computed(()=>{var F;switch((F=z.value)==null?void 0:F.id){case"request":return x.value[1];case"work_order":return x.value[0];default:return null}}),vn=a.computed(()=>{let F="";if(r.value&&r.value.reservations[0]){const le=Ze.fromISO(r.value.reservations[0].arrivalDate),J=le.toFormat("MMM"),ce=le.day,He=le.year,bo=Ze.fromISO(r.value.reservations[0].departureDate),Vl=bo.toFormat("MMM"),_l=bo.day,hp=bo.year;F+=J+" "+ce,He!==hp&&(F+=", "+He),J===Vl?F+="-"+_l:F+=" - "+Vl+" "+_l,F+=", "+hp}return F}),tn=a.computed(()=>{let F=Z.value;return F=[...new Set(F)],F}),kn=a.computed(()=>{var le;const F=(le=z.value)==null?void 0:le.id;if(!F)return!1;switch(F.value){case"room_notice":return R.value.issue&&R.value.startDate&&R.value.endDate;case"complaint":return c.value.problem&&c.value.guestName&&c.value.guestMood;case"work_order":return X.value.item&&X.value.issue&&X.value.requestedBy&&X.value.due&&(X.value.assignType&&X.value.assignType.id===0||X.value.assignType&&X.value.assignType.id===1&&X.value.department||X.value.assignType&&X.value.assignType.id===2&&X.value.person);case"request":return N.value.item&&N.value.requestedBy&&N.value.due&&(N.value.assignType&&N.value.assignType.id===0||N.value.assignType&&N.value.assignType.id===1&&N.value.department||N.value.assignType&&N.value.assignType.id===2&&N.value.person);default:return!1}}),Fr=()=>{U.value=!1,T.value=!1,i.value=!1,C.value=[],A.value=[],ee.value=[],z.value=null,R.value.issue=null,R.value.startDate=new Date,R.value.endDate=new Date,R.value.notes="",c.value.guestName="",c.value.guestEmail="",c.value.guestPhone="",c.value.guestMood=null,c.value.guestLoyalty="",c.value.problem=null,c.value.checkInDate=new Date,c.value.checkOutDate=new Date,c.value.notes="",X.value.assignType=null,X.value.department=null,X.value.person=null,X.value.due=new Date,X.value.item=null,X.value.issue=null,X.value.notes="",N.value.assignType=null,N.value.department=null,N.value.person=null,N.value.due=new Date,N.value.item=null,N.value.notes=""},is=async()=>{e("create:callback",r.value),e("toggle",!1)},qt=F=>{const le=[];Object.values(F).forEach(J=>{let ce={id:J.id,isPropertyEmployee:J.sender_type==="user",isSent:!!J.sent,isSystemMessage:J.sender_type==="system",message:J.content,timestamp:J.sent||J.created,user:{firstName:"Auto-Reply",icon:"",id:"system-message",initials:"",lastName:"",src:""}};J.sender_type==="user"&&(ce.user.firstName=J.user_first_name,ce.user.lastName=J.user_last_name,ce.user.initials=ce.user.firstName[0]+ce.user.lastName[0]),J.sender_type==="guest"&&(ce.user.firstName=J.guest_first_name,ce.user.lastName=J.guest_last_name),ce.user.initials=ce.user.firstName[0]+ce.user.lastName[0],ce.user.src="",ce.isSystemMessage&&(ce.user.icon="property-fill"),J.sender_id&&(ce.user.id=J.sender_id),le.push(ce)}),F.value=le},Sn=async()=>{t.showComments&&r.value.tokenId},ji=F=>{const le=Ze.utc(),J=new Date(F),ce=Ze.fromJSDate(J),He=le.diff(ce,["years","months","days","hours","minutes"]);if(He.years)return He.years===1?n("HC_ONE_YEAR_AGO"):n("HC_X_YEARS_AGO",{years:He.years});if(He.months)return He.months===1?n("HC_ONE_MONTH_AGO"):n("HC_X_MONTHS_AGO",{months:He.months});if(He.days)return He.days===1?n("HC_ONE_DAY_AGO"):n("HC_X_DAYS_AGO",{days:He.days});if(He.hours)return He.hours===1?n("HC_ONE_HOUR_AGO"):n("HC_X_HOURS_AGO",{hours:He.hours});if(He.minutes)return He.minutes===1?n("HC_ONE_MINUTE_AGO"):n("HC_X_MINUTES_AGO",{minutes:He.minutes});if(He.minutes===0)return n("HC_A_MOMENT_AGO")},jr=async()=>{t.showGuestDetails&&pr(),fi(),mt(),e("refresh:pms",r.value)},pr=async()=>{try{k.value.pms=!0;const F=new AbortController,le=setTimeout(()=>F.abort(),45e3),J=t.pmsBaseUrl;if(!J)throw new Error("PMS base URL is required");const ce={Authorization:"Bearer "+(()=>{var hp;const _l=`; ${document.cookie}`.split("; QV2Auth=");return _l.length===2&&((hp=_l.pop())==null?void 0:hp.split(";").shift())||""})(),"Content-Type":"application/json"},He=await fetch(`${J}/vendors/properties/statuses/${t.propertyId}/rooms`,{method:"GET",headers:ce,signal:F.signal});clearTimeout(le),He.ok||hi(He);const bo=await He.json();M.value=bo.data.pmsRooms,r.value=M.value.find(Vl=>Vl.qv2Rooms.qRoomId===t.room.id),r.value||(r.value=t.room),k.value.pms=!1}catch(F){return k.value.pms=!1,F}},fi=async()=>{try{k.value.roomNotices=!0;const F=await fetch("/api/client/common/getRoomNotices.php?propertyId="+t.propertyId+"&roomIds=["+t.room.id+"]");if(!F.ok)throw new Error(`HTTP error! status: ${F.status}`);const le=await F.json();Z.value=le.notices}catch(F){console.error("Error getting room notices:",F),Z.value=[]}finally{k.value.roomNotices=!1}},rt=async()=>{const F=new FormData;F.append("property_id",t.propertyId),F.append("filter","tasks_new"),await Promise.all([fetch("/api/client/common/getDepartments.php",{method:"POST"}),fetch("/api/client/common/getDepartmentUsersByPropertyId.php",{method:"POST",body:F})]).then(le=>{const J=le[0],ce=le[1];console.log("departmentList:",J),console.log("departmentUsersList:",ce)})},Y=async()=>{try{const F=new FormData;F.append("funcname","get_stay_details"),F.append("token_id",r.value.tokenId);const J=(await Mt.post("/includes/chat_api.php",F)).data.result;if(J!==void 0&&J.error_message)throw new Error(J.error_message);J&&J.user_name&&(c.value.guestName=J.user_name),J&&J.cell_phone&&(c.value.guestPhone=J.cell_phone),J&&J.email&&(c.value.guestEmail=J.email),J&&J.check_in&&(c.value.checkInDate=Ze(J.check_in).toDate()),J&&J.check_out&&(c.value.checkOutDate=Ze(J.check_out).toDate())}catch(F){console.log(F)}},ne=F=>{switch(F){case"complaint":return"red-30";case"hk_request":return"maroon-30";case"callback":return"teal-10";case"workorder":return"orange-20";case"task":return"green-20"}},Ge=F=>{switch(F){case"complaint":return"face-frown";case"hk_request":return"concierge-bell";case"callback":return"phone";case"workorder":return"hammer";case"task":return"check"}},mt=async()=>{try{k.value.tickets=!0;const F=await fetch("/api/client/common/getAllToDos.php?propertyId="+t.propertyId+"&roomIds=["+t.room.id+"]");if(!F.ok)throw new Error(`HTTP error! status: ${F.status}`);const le=await F.json();V.value=le.tickets}catch(F){console.error("Error getting tickets:",F),V.value=[]}finally{k.value.tickets=!1}},hi=async F=>{const le=await F.text();let J;try{J=JSON.parse(le).response}catch{J={code:F.status,message:le}}return J.code===401?(window.location.href="/logout.php?unauthorized=1",{error:J}):J},Ll=F=>{const le=document.querySelectorAll(".pulse");if(le&&le.length){const J=document.getElementById("room-"+r.value.qv2Rooms.qRoomId),ce=J==null?void 0:J.classList;switch(F){case"room_notice":(ce!=null&&ce.contains("roombox_unsel")||ce!=null&&ce.contains("roombox_unsel_active"))&&(J==null||J.classList.remove(),J==null||J.classList.add("roomnoticeroombox_sel"));break;case"complaint":!(ce!=null&&ce.contains("smsroombox_sel"))&&!(ce!=null&&ce.contains("callbackroombox_sel"))&&(J==null||J.classList.remove(),J==null||J.classList.add("complaintsroombox_sel"));break;case"request":!(ce!=null&&ce.contains("smsroombox_sel"))&&!(ce!=null&&ce.contains("callbackroombox_sel"))&&!(ce!=null&&ce.contains("complaintsroombox_sel"))&&(J==null||J.classList.remove(),J==null||J.classList.add("guestrequestroombox_sel"));break;case"work_order":!(ce!=null&&ce.contains("smsroombox_sel"))&&!(ce!=null&&ce.contains("callbackroombox_sel"))&&!(ce!=null&&ce.contains("complaintsroombox_sel"))&&!(ce!=null&&ce.contains("guestrequestroombox_sel"))&&(J==null||J.classList.remove(),J==null||J.classList.add("workordersroombox_sel"));break}setTimeout(()=>{le.forEach(He=>{He.classList.remove("pulse")})},4500)}},ss=()=>{window.location.href="/guest/overview.php"},K=F=>{let le="";switch(F.type){case"complaint":le=`/complaints/complaints_view.php?id=${F.id}`;break;case"request":le=`/tasks/hk_request.php?id=${F.id}`;break;case"satisfaction-call":le=`/tasks/task_callback.php?id=${F.id}`;break;case"work-order":le=`/tasks/workorder.php?id=${F.id}`;break;case"task":le=`/tasks/task.php?id=${F.id}`;break;default:return"#"}window.open(le)},ye=async()=>{var le,J;const F={type:(le=z.value)==null?void 0:le.id,propertyId:t.propertyId,userId:G.value,areaId:r.value.qv2Rooms.qRoomId,areaName:r.value.qv2Rooms.qRoomName};switch((J=z.value)==null?void 0:J.id){case"complaint":F.tokenId=r.value.tokenId,F.problem=c.value.problem.id,F.guestName=c.value.guestName,F.guestPhone=c.value.guestPhone,F.guestEmail=c.value.guestEmail,F.guestLoyalty=c.value.guestLoyalty,F.guestMood=c.value.guestMood.id,F.checkInDate=Ze(c.value.checkInDate).format("YYYY-MM-DD"),F.notes=c.value.notes,F.inHouse="2",F.source="dashboard",e("create:todo",F);break;case"request":F.itemId=N.value.item.id,F.assignType=N.value.assignType.id,F.occupied=N.value.requestedBy.id,F.notes=N.value.notes,F.dueDate=Ze(N.value.due).format("YYYY-MM-DD"),N.value.assignType.id===1&&(F.department=N.value.department.id),N.value.assignType.id===2&&(F.person=N.value.person.id),e("create:todo",F);break;case"room_notice":F.issue=R.value.issue.id,F.startDate=Ze(R.value.startDate).format("YYYY-MM-DD"),F.endDate=Ze(R.value.endDate).format("YYYY-MM-DD"),F.notes=R.value.notes,F.sendPush="1",e("create:todo",F);break;case"work_order":F.itemId=X.value.item.id,F.issueId=X.value.issue.id,F.assignType=X.value.assignType.id,F.occupied=X.value.requestedBy.id,F.notes=X.value.notes,F.dueDate=Ze(X.value.due).format("YYYY-MM-DD"),X.value.assignType.id===1&&(F.department=X.value.department.id),X.value.assignType.id===2&&(F.person=X.value.person.id),e("create:todo",F);break}},Ee=F=>{yo(),U2(),t.hover&&e("toggle",F)},st=F=>{Z2(),l.value=F},Ke=async F=>{if(console.log("selected:",F),z.value=F,C.value=[],R.value.issue=null,c.value.problem=null,X.value.item=null,X.value.issue=null,N.value.item=null,!z.value)return;const le=new FormData;switch(le.append("property_id",t.propertyId),le.append("area_id",r.value.qv2Rooms.qRoomId),F.id){case"complaint":try{r.value.tokenId&&await Y();const J=await fetch("/api/client/common/getComplaintProblemsByPropertyId.php",{method:"POST",body:le});console.log("complaints:",J);const ce=await Mt.post("/api/client/common/getComplaintMoods.php");ce.data.items.forEach(He=>{He.label=He.display_name}),A.value=ce.data.items}catch(J){console.log(J)}break;case"room_notice":try{const J=await fetch("/api/client/common/getRoomNoticeListByPropertyId.php",{method:"POST",body:le});console.log("room notices:",J)}catch(J){console.log(J)}break;case"request":try{N.value.requestedBy=x.value[1],N.value.assignType=s.value[0];const J=await fetch("/api/client/common/getHousekeepingItemsByPropertyId.php",{method:"POST",body:le});console.log("requests:",J),await rt(),N.value.department=f.value.find(ce=>parseInt(ce.id)===4)}catch(J){console.log(J)}break;case"work_order":try{X.value.requestedBy=x.value[0],X.value.assignType=s.value[0];const J=await fetch("/api/client/common/getItemsByRoomId.php",{method:"POST",body:le});console.log("work orders:",J);const ce=[];let He={group:"",options:[]};ce.push({...He}),C.value=ce,await Promise.all([Mt.post("/api/client/common/getWorkOrderIssues.php"),rt()]).then(bo=>{const Vl=bo[0];Vl.data.issues.forEach(_l=>{_l.label=_l.display_name}),ee.value=Vl.data.issues}),X.value.department=f.value.find(bo=>parseInt(bo.id)===2)}catch(J){console.log(J)}break;default:return}},Rn=()=>{U.value=!U.value,i.value=!1},mr=()=>{const F=document.getElementById("comment-field"),le=document.getElementById("hidden-text");F.style.height=(le==null?void 0:le.offsetHeight)+"px"},as=()=>{const F=document.getElementById("comments-container");F==null||F.scroll({top:F.scrollHeight,behavior:"smooth"})},p5=async F=>{if(F&&F.type==="keydown"&&F.preventDefault(),r.value.tokenId&&l.value&&!T.value)try{const le=new FormData;le.append("funcname","send_message_to_guest"),le.append("stay_id",r.value.tokenId),le.append("content",l.value),le.append("sender_id",G.value||"");const J=await Mt.post("/includes/chat_api.php",le);if(J.data.result.error_message)throw new Error(J.data.result.error_message);l.value="",await Sn(),as()}catch(le){console.log(le)}},yo=()=>{var F,le;if(t.align==="left"||t.align==="right"){const J=(F=_.value)==null?void 0:F.getBoundingClientRect().left,ce=window.innerWidth;o.value=ce-J<u.value?"right":"left"}else{const J=(le=_.value)==null?void 0:le.getBoundingClientRect().top,ce=window.innerHeight;o.value=ce-J<d.value?"bottom":"top"}},U2=()=>{var F,le;if(t.position==="top"||t.position==="bottom"){const J=(F=_.value)==null?void 0:F.getBoundingClientRect().top,ce=window.innerHeight;S.value=ce-J<d.value?"top":"bottom"}else{const J=(le=_.value)==null?void 0:le.getBoundingClientRect().left,ce=window.innerWidth;S.value=ce-J<u.value?"left":"right"}},Z2=()=>{var F;T.value=!T.value,T.value?(l.value="",b.value.info=g.value,b.value.tickets=y.value,b.value.comments=p.value,g.value=!1,y.value=!1,(F=document.getElementById("comment-field"))==null||F.focus()):(g.value=b.value.info,y.value=b.value.tickets,p.value=b.value.comments)},Rl=async(F,le)=>{const J=new FormData;if(J.append("property_id",t.propertyId),J.append("room_ids",JSON.stringify([r.value.qv2Rooms.qRoomId])),await mt(),V.value){const ce=[];V.value.forEach(He=>{He.id===F&&He.type===le?ce.unshift({...He,isNew:!0}):ce.push({...He,isNew:!1})}),ce.sort((He,bo)=>He.id===F?-1:bo.id===F?1:0),V.value=[...ce]}};return a.watch(()=>t.open,()=>{t.open&&t.showComments&&v.value.length&&setTimeout(as,500),t.open||Fr()}),a.watch(l,()=>{setTimeout(mr,100)}),a.watch(()=>t.room.id,(F,le)=>{F!==le&&(M.value?(r.value=M.value.find(J=>J.qv2Rooms.qRoomId===t.room.id),r.value||(r.value=t.room)):r.value=t.room,mt(),fi())},{immediate:!0}),a.onMounted(async()=>{var ce;const F=JSON.parse(window.localStorage.getItem("authenticated"));G.value=((ce=F==null?void 0:F.user)==null?void 0:ce.id)||"",t.showGuestDetails?await pr():r.value=t.room,t.size==="sm"&&(d.value=140,u.value=160),t.size==="lg"&&(d.value=250,u.value=440),yo(),U2();const le=[],J=window.localStorage.getItem("quick-replies");J&&JSON.parse(J).forEach(He=>{le.push(He.message)}),D.value=le}),{DateTime:Ze,actionMenuOpen:i,alignment:o,assignTypes:s,comment:l,complaint:c,componentHeight:d,componentWidth:u,departments:f,departmentUsers:h,expandComments:p,expandGuestInfo:g,expandedStates:b,expandTickets:y,guestDetailsData:w,itemOptions:C,loading:k,messages:v,moodOptions:A,pmsData:M,positioning:S,quickReplies:D,quickReplyOpen:T,request:N,requestedByOptions:x,requestLoading:L,requestType:z,roomDetailsData:r,roomNotice:R,roomNotices:Z,showCreateRequest:U,ticketsList:V,todoOptions:Q,trigger:_,userId:G,workOrder:X,workOrderIssues:ee,cleanliness:P,cleanlinessColor:$,cleanlinessTooltipContent:H,filteredReplies:j,hasGuestCallback:ue,hasComplaint:te,itemOptionsList:ie,occupied:oe,occupancyTooltipContent:Ce,selectedAssignType:De,selectedDepartment:We,selectedRequestedBy:Zt,stayDetails:vn,tagsList:tn,validateToDo:kn,closeRequest:Fr,createCallback:is,createMessageList:qt,getChatMessages:Sn,getHowLongAgo:ji,getPMSData:pr,getRoomNotices:fi,getSharedData:rt,getStayDetails:Y,getTicketColor:ne,getTicketIcon:Ge,getTickets:mt,handleFailedResponse:hi,handlePulse:Ll,onClickEditConnectGuest:ss,onClickTicket:K,onCreateRequestSubmit:ye,onHoverToggle:Ee,onSelectQuickReply:st,onSelectToDo:Ke,openRequest:Rn,refreshPMSData:jr,resizeTextarea:mr,scrollToConnectBottom:as,sendChatMessage:p5,setAlignment:yo,setPositioning:U2,toggleQuickReply:Z2,updateTickets:Rl}}}),Lce=["id"],Rce=["id"],Vce=["id"],_ce={class:"flex gap-3"},$ce={key:0,class:"animate-shimmer bg-gray-30 w-3/4 h-6 grow"},Fce={key:0,class:"text-base text-inkwell-30"},jce={key:0},Hce={key:0},zce=["href"],Uce={class:"flex items-start"},Zce={class:"list-unstyled text-xs w-full"},qce={class:"grow"},Wce={class:"grow"},Gce={class:"grow"},Kce={class:"grow"},Yce={class:"position-relative icon-container ml-auto"},Qce={key:0,class:"animate-shimmer bg-gray-10 w-full h-4 my-4"},Xce={key:1,class:"flex flex-wrap items-center mb-3 gap-2"},Jce={key:2,class:"animate-shimmer bg-gray-30 w-full h-4 my-4"},e1e={key:3,class:"flex flex-wrap items-center mb-4"},t1e=["href"],n1e={class:"shrink-0 mr-2 text-xs"},r1e={key:0,class:"animate-shimmer bg-gray-10 w-full h-6"},i1e={key:1,class:"guest-info-container"},o1e={key:0,class:"text-base text-inkwell-30 mb-2"},s1e={key:0,class:"flex text-xs mb-2 stay-details-row"},a1e={class:"text-truncate text-inkwell-0"},l1e={class:"grow text-inkwell-30"},c1e={key:1,class:"flex text-xs mb-2 stay-details-row"},d1e={class:"text-truncate text-inkwell-0"},u1e={class:"grow text-inkwell-30"},f1e={class:"shrink-0 mr-2 text-xs"},h1e={key:0,class:"animate-shimmer bg-gray-30 w-full h-6"},p1e={key:1,class:"open-tickets"},m1e=["id"],g1e={key:2,class:"text-center mx-auto"},y1e={class:"shrink-0 mr-2 text-xs"},b1e={key:0,class:"quick-replies row"},w1e=["onClick"],C1e={key:1,class:"text-inkwell-0 text-xxs text-center"},v1e={class:"relative"},k1e=["innerHTML"],S1e={class:"flex items-center add-ticket-divider"},E1e={class:"grow flex items-center text-sm"},M1e={key:0,class:"grow"},A1e={class:"flex justify-between flex-wrap"},T1e={class:"field"},I1e={key:0,class:"field"},O1e={key:1,class:"field"},D1e={key:2,class:"field"},N1e={key:3,class:"field w-100"},x1e={key:4,class:"field"},P1e={key:5,class:"field w-100"},B1e={key:6,class:"field"},L1e={key:7,class:"field"},R1e={key:8,class:"field"},V1e={key:9,class:"field"},_1e={key:10,class:"field"},$1e={key:11,class:"field"},F1e={key:12,class:"field w-100"},j1e={key:13,class:"field"},H1e={key:14,class:"field"},z1e={key:15,class:"field"},U1e={key:16,class:"field"},Z1e={key:17,class:"field"},q1e={key:18,class:"field"},W1e={key:19,class:"field w-100"},G1e={key:20,class:"field"},K1e={key:21,class:"field"},Y1e={key:22,class:"field"},Q1e={key:23,class:"field"},X1e={key:24,class:"field"},J1e={key:25,class:"field w-100"},ede={class:a.normalizeClass(["actions flex-shrink-0","flex items-center justify-between"])},tde={key:4,class:"animate-shimmer bg-gray-30 w-full h-4 my-4"},nde={key:5,class:"flex items-center mt-0.5"},rde={class:"text-xs text-inkwell-0"};function ide(t,e,n,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-tooltip"),c=a.resolveComponent("q-tag"),d=a.resolveComponent("q-popover"),u=a.resolveComponent("q-divider"),f=a.resolveComponent("q-accordion"),h=a.resolveComponent("q-activity-item"),p=a.resolveComponent("q-input"),g=a.resolveComponent("q-button"),b=a.resolveComponent("q-comment-section"),y=a.resolveComponent("q-select"),w=a.resolveComponent("q-date-picker");return t.showActionMenu||t.showComments||t.showGuestDetails&&t.roomDetailsData.reservations&&t.roomDetailsData.reservations[0]||t.showTickets||t.tagsList.length?(a.openBlock(),a.createElementBlock("div",{key:0,id:t.id?`rdp-${t.id}`:"",class:"room-detail component-container text-inkwell-30",onMouseleave:e[49]||(e[49]=C=>t.onHoverToggle(!1))},[a.createVNode(d,{"model-value":t.open,align:t.alignment,position:t.positioning,size:(!t.showTickets||t.showTickets&&(!t.ticketsList||!t.ticketsList.length))&&!t.showComments&&!t.showActionMenu?"sm":t.size,onClose:e[47]||(e[47]=C=>t.$emit("toggle",!1)),"onUpdate:modelValue":e[48]||(e[48]=C=>t.$emit("toggle",C))},{trigger:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({ref:"trigger",id:t.id?`rdp-${t.id}-trigger`:"",class:"trigger-text"},{[a.toHandlerKey(!t.hover&&"click")]:e[0]||(e[0]=C=>t.$emit("toggle",!t.open))},{[a.toHandlerKey(t.hover&&"mouseover")]:e[1]||(e[1]=C=>t.onHoverToggle(!0))}),[a.renderSlot(t.$slots,"trigger",{},()=>[a.createTextVNode(a.toDisplayString(t.trigger),1)],!0)],16,Rce)]),content:a.withCtx(()=>[a.createElementVNode("div",{id:t.id?`rdp-${t.id}-content`:"",class:"popover-content w-full font-weight-normal cursor-default"},[a.createElementVNode("div",_ce,[t.loading.pms||t.loading.roomNotices?(a.openBlock(),a.createElementBlock("div",$ce)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["flex grow items-center mb-4",{"gap-3":t.showRoomName}])},[t.showRoomName?(a.openBlock(),a.createElementBlock("h2",Fce,[a.createElementVNode("strong",null,a.toDisplayString(t.$t("HC_GUESTROOM"))+" "+a.toDisplayString(t.room.name),1)])):a.createCommentVNode("",!0),(t.occupied||t.cleanliness||t.tagsList.length&&!t.showRoomName)&&t.size!=="sm"?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["flex items-center flex-wrap gap-x-2",{"gap-y-3":!t.showRoomName}])},[t.occupied?(a.openBlock(),a.createBlock(l,{key:0,class:"flex shrink-0 items-center"},{trigger:a.withCtx(()=>[a.createVNode(s,{icon:"user",type:"fill",color:t.occupied&&t.hasComplaint?"red-10":"gray-30",class:"!h-[1.625rem] !w-[1.625rem]",size:"md"},null,8,["color"])]),content:a.withCtx(()=>[t.occupancyTooltipContent?(a.openBlock(),a.createElementBlock("div",jce,a.toDisplayString(t.$t(t.occupancyTooltipContent)),1)):a.createCommentVNode("",!0)]),_:1})):a.createCommentVNode("",!0),t.cleanliness?(a.openBlock(),a.createBlock(l,{key:1,class:"flex shrink-0 items-center"},{trigger:a.withCtx(()=>[a.createVNode(s,{icon:"spray-bottle",type:"fill",color:t.cleanlinessColor,size:"md",class:"mt-[0.0612rem]"},null,8,["color"])]),content:a.withCtx(()=>[t.cleanlinessTooltipContent?(a.openBlock(),a.createElementBlock("div",Hce,a.toDisplayString(t.cleanlinessTooltipContent),1)):a.createCommentVNode("",!0)]),_:1})):a.createCommentVNode("",!0),t.tagsList.length&&!t.showRoomName?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(t.tagsList,C=>(a.openBlock(),a.createElementBlock("a",{key:C,href:typeof C=="object"&&C.id&&C.name?`/roomsbook/notice.php?id=${C.id}`:"",class:"capitalize"},[a.createVNode(c,{class:a.normalizeClass(["!text-xs !leading-4","shrink-0 max-w-[100px] !h-auto","!py-[0.1875rem] !px-[0.4375rem] border","border-orange-10",{pulse:C.isNew}]),"bg-color":"bg-yellow-0","text-color":"text-inkwell-30"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(typeof C=="object"&&C.id&&C.name?C.name:C),1)]),_:2},1032,["class"])],8,zce))),128)):a.createCommentVNode("",!0)],2)):a.createCommentVNode("",!0)],2)),a.createElementVNode("div",Uce,[t.showActionMenu&&(t.showActionsLink||!t.hasGuestCallback&&t.showGuestCallback||t.showComments||t.showGuestDetails)?(a.openBlock(),a.createBlock(d,{key:0,modelValue:t.actionMenuOpen,"onUpdate:modelValue":e[7]||(e[7]=C=>t.actionMenuOpen=C),"has-caret":!1,align:"right",class:"action-menu mr-1",size:"md",onClose:e[8]||(e[8]=C=>t.actionMenuOpen=!1)},{trigger:a.withCtx(()=>[a.createVNode(s,{class:"popover-action rounded-full cursor-pointer",icon:"ellipsis-h",size:"md",type:"fill",onClick:e[2]||(e[2]=C=>t.actionMenuOpen=!t.actionMenuOpen)})]),content:a.withCtx(()=>[a.createElementVNode("ul",Zce,[t.showActionsLink?(a.openBlock(),a.createElementBlock("li",{key:0,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1 mt-2",{"mb-2":!t.showGuestDetails&&(t.hasGuestCallback||!t.showGuestCallback)&&!t.showComments}]),onClick:e[3]||(e[3]=(...C)=>t.openRequest&&t.openRequest(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-1",color:"gray-25",icon:"plus",size:"md",type:""}),a.createElementVNode("div",qce,a.toDisplayString(t.$t("HC_ACTION")),1)],2)):a.createCommentVNode("",!0),!t.hasGuestCallback&&t.showGuestCallback?(a.openBlock(),a.createElementBlock("li",{key:1,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1",{"mb-2":!t.showGuestDetails&&!t.showComments},{"mt-2":!t.showActionsLink}]),onClick:e[4]||(e[4]=(...C)=>t.createCallback&&t.createCallback(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-0.5",color:"gray-25",icon:"phone-plus",size:"md",type:"outline"}),a.createElementVNode("div",Wce,a.toDisplayString(t.$t("HC_GUEST_SATISFACTION_CALL")),1)],2)):a.createCommentVNode("",!0),t.showComments?(a.openBlock(),a.createElementBlock("li",{key:2,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1",{"mb-2":!t.showGuestDetails},{"mt-2":!t.showActionsLink&&(t.hasGuestCallback||!t.showGuestCallback)}]),onClick:e[5]||(e[5]=(...C)=>t.onClickEditConnectGuest&&t.onClickEditConnectGuest(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-1",color:"gray-25",icon:"pencil",size:"md",type:"outline"}),a.createElementVNode("div",Gce,a.toDisplayString(t.$t("HC_EDIT_INFORMATION")),1)],2)):a.createCommentVNode("",!0),t.showGuestDetails?(a.openBlock(),a.createElementBlock("li",{key:3,class:a.normalizeClass(["flex items-center","icon-container cursor-pointer","text-inkwell-30 px-2 py-1 mb-2",{"mt-2":!t.showActionsLink&&(t.hasGuestCallback||!t.showGuestCallback)&&!t.showComments}]),onClick:e[6]||(e[6]=(...C)=>t.refreshPMSData&&t.refreshPMSData(...C))},[a.createVNode(s,{class:"shrink-0 mr-1 p-1",color:"gray-25",icon:"refresh",size:"md",type:""}),a.createElementVNode("div",Kce,a.toDisplayString(t.$t("HC_REFRESH_PMS_DATA")),1)],2)):a.createCommentVNode("",!0)])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),a.createElementVNode("div",Yce,[a.createVNode(l,null,{trigger:a.withCtx(()=>[a.createVNode(s,{icon:"close",size:"md",type:"",class:"popover-action rounded-full cursor-pointer p-1",onClick:e[9]||(e[9]=C=>t.$emit("toggle",!1))})]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_CLOSE")),1)]),_:1})])])]),t.loading.pms&&t.size==="sm"?(a.openBlock(),a.createElementBlock("div",Qce)):!t.loading.pms&&(t.occupied||t.cleanliness)&&t.size==="sm"?(a.openBlock(),a.createElementBlock("div",Xce,[t.occupied?(a.openBlock(),a.createBlock(s,{key:0,icon:"user",type:"fill",color:t.occupied&&t.hasComplaint?"red-10":"gray-30",size:"sm"},null,8,["color"])):a.createCommentVNode("",!0),t.cleanliness?(a.openBlock(),a.createBlock(s,{key:1,icon:"spray-bottle",type:"fill",color:t.cleanlinessColor,size:"sm"},null,8,["color"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.loading.roomNotices?(a.openBlock(),a.createElementBlock("div",Jce)):!t.loading.roomNotices&&t.tagsList.length&&t.showRoomName?(a.openBlock(),a.createElementBlock("div",e1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.tagsList,C=>(a.openBlock(),a.createElementBlock("a",{key:C,href:typeof C=="object"&&C.id&&C.name?`/roomsbook/notice.php?id=${C.id}`:"",class:"mr-2 mb-1 capitalize"},[a.createVNode(c,{class:a.normalizeClass(["!text-tiny !leading-4","shrink-0 max-w-[100px] !h-auto","!py-0.5 !px-1.5 border","border-orange-10",{pulse:C.isNew}]),"bg-color":"bg-yellow-0","text-color":"text-inkwell-30"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(typeof C=="object"&&C.id&&C.name?C.name:C),1)]),_:2},1032,["class"])],8,t1e))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["accordions",{closed:t.showCreateRequest}])},[t.showGuestDetails&&t.roomDetailsData.reservations&&t.roomDetailsData.reservations[0]?(a.openBlock(),a.createBlock(f,{key:0,modelValue:t.expandGuestInfo,"onUpdate:modelValue":e[11]||(e[11]=C=>t.expandGuestInfo=C),class:"mb-3","content-class":"!px-0 !pt-3 !pb-0"},{toggle:a.withCtx(()=>[a.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:e[10]||(e[10]=C=>t.expandGuestInfo=!t.expandGuestInfo)},[a.createElementVNode("div",n1e,a.toDisplayString(t.$t("HC_GUEST_INFORMATION")),1),a.createVNode(u,{class:"grow"}),a.createVNode(s,{class:a.normalizeClass(["ml-2 transition-transform",{"rotate-90":t.expandGuestInfo}]),color:"gray-20",icon:"chevron-right",type:""},null,8,["class"])])]),content:a.withCtx(()=>[t.loading.pms?(a.openBlock(),a.createElementBlock("div",r1e)):(a.openBlock(),a.createElementBlock("div",i1e,[t.roomDetailsData.reservations[0].guestName?(a.openBlock(),a.createElementBlock("p",o1e,[a.createElementVNode("strong",null,a.toDisplayString(t.roomDetailsData.reservations[0].guestName),1)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["stay-details-container flex",t.size==="sm"?"flex-col":"flex-row gap-3"])},[t.roomDetailsData.reservations[0].confirmationNumber?(a.openBlock(),a.createElementBlock("div",s1e,[a.createElementVNode("div",a1e,a.toDisplayString(t.$t("HC_RESERVATION"))+": ",1),a.createElementVNode("div",l1e,a.toDisplayString(t.roomDetailsData.reservations[0].confirmationNumber),1)])):a.createCommentVNode("",!0),t.stayDetails?(a.openBlock(),a.createElementBlock("div",c1e,[a.createElementVNode("div",d1e,a.toDisplayString(t.$t("HC_STAY"))+": ",1),a.createElementVNode("div",u1e,a.toDisplayString(t.stayDetails),1)])):a.createCommentVNode("",!0)],2)]))]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),t.showTickets?(a.openBlock(),a.createBlock(f,{key:1,modelValue:t.expandTickets,"onUpdate:modelValue":e[13]||(e[13]=C=>t.expandTickets=C),class:"mb-3","content-class":"!px-0 !pt-3 !pb-0"},{toggle:a.withCtx(()=>[a.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:e[12]||(e[12]=C=>t.expandTickets=!t.expandTickets)},[a.createElementVNode("div",f1e,a.toDisplayString(t.$t("HC_OPEN_TICKETS")),1),a.createVNode(u,{class:"grow"}),a.createVNode(s,{class:a.normalizeClass(["ml-2 transition-transform",{"rotate-90":t.expandTickets}]),color:"gray-20",icon:"chevron-right",type:""},null,8,["class"])])]),content:a.withCtx(()=>[t.loading.tickets?(a.openBlock(),a.createElementBlock("div",h1e)):t.ticketsList.length?(a.openBlock(),a.createElementBlock("ul",p1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.ticketsList,(C,k)=>{var v;return a.openBlock(),a.createElementBlock("li",{key:C.id,id:`open-ticket-${C.id}`},[a.createVNode(h,{class:a.normalizeClass([{"mt-3":k>0,pulse:C.isNew}]),"is-clickable":!0,text:C.name,time:t.getHowLongAgo((v=C.started)==null?void 0:v.dateUtc),type:C.type,onClick:A=>t.onClickTicket(C)},null,8,["class","text","time","type","onClick"])],8,m1e)}),128))])):(a.openBlock(),a.createElementBlock("p",g1e,a.toDisplayString(t.$t("HC_THERE_ARE_NO_OPEN_TICKETS_YET")),1))]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),t.showComments?(a.openBlock(),a.createBlock(f,{key:2,modelValue:t.expandComments,"onUpdate:modelValue":e[16]||(e[16]=C=>t.expandComments=C),class:"messages mb-3","content-class":"!px-0 !pt-3 !pb-0"},{toggle:a.withCtx(()=>[a.createElementVNode("div",{class:"flex items-center cursor-pointer",onClick:e[14]||(e[14]=C=>t.expandComments=!t.expandComments)},[a.createElementVNode("div",y1e,a.toDisplayString(t.$t("HC_GUEST_CONNECT")),1),a.createVNode(u,{class:"grow"}),a.createVNode(s,{class:a.normalizeClass(["ml-2 transition-transform",{"rotate-90":t.expandComments}]),color:"gray-20",icon:"chevron-right",type:""},null,8,["class"])])]),content:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["quick-replies-container","flex flex-col",{show:t.quickReplyOpen},{"justify-end":!!t.filteredReplies.length},{"justify-center":!t.filteredReplies.length}])},[t.filteredReplies.length?(a.openBlock(),a.createElementBlock("div",b1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.filteredReplies,C=>(a.openBlock(),a.createElementBlock("div",{key:C,class:a.normalizeClass(["quick-reply text-sm text-inkwell-20",{active:t.comment}]),onClick:k=>t.onSelectQuickReply(C)},[a.createElementVNode("div",null,a.toDisplayString(C),1)],10,w1e))),128))])):(a.openBlock(),a.createElementBlock("div",C1e,a.toDisplayString(t.$t("HC_NO_RESULTS_FOUND_FOR"))+' "'+a.toDisplayString(t.comment)+'". ',1))],2),a.createVNode(b,{comments:t.messages,"show-heading":!1,"show-no-comments":!1},{default:a.withCtx(()=>[a.createElementVNode("div",v1e,[a.createVNode(p,{id:"comment-field",modelValue:t.comment,"onUpdate:modelValue":e[15]||(e[15]=C=>t.comment=C),classes:["text-sm pr-5 py-1",{"border-gray-12":!t.quickReplyOpen},{"border-blue-sky text-blue-sky":t.quickReplyOpen}],icon:t.quickReplyOpen?"search":"",placeholder:t.quickReplyOpen?t.$t("HC_SEARCH_REPLIES"):t.$t("HC_WRITE_A_MESSAGE"),class:"w-100 mr-2",size:"sm",type:"textarea",onKeydown:a.withKeys(t.sendChatMessage,["enter"])},null,8,["modelValue","classes","icon","placeholder","onKeydown"]),a.createElementVNode("div",{id:"hidden-text",class:"text-sm",innerHTML:t.comment},null,8,k1e),a.createVNode(s,{id:"quick-reply-trigger",icon:(t.quickReplyOpen,"comment-lines"),class:"cursor-pointer !absolute mb-1",color:"blue-sky",size:"sm",type:t.quickReplyOpen?"fill":"outline",onClick:t.toggleQuickReply},null,8,["icon","type","onClick"]),a.createVNode(g,{id:"send-comment",disabled:!t.comment||t.quickReplyOpen,class:"!absolute btn-subtle px-2 mr-1 text-sm",size:"sm",onClick:t.sendChatMessage},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_SEND")),1)]),_:1},8,["disabled","onClick"])])]),_:1},8,["comments"])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{id:"add-ticket",class:a.normalizeClass(["add-ticket overflow-hidden",{open:t.showCreateRequest}])},[a.createVNode(u,{class:"text-base section-header mb-3",align:"left",color:"inkwell-30"},{default:a.withCtx(()=>[a.createElementVNode("div",S1e,[a.createElementVNode("div",E1e,a.toDisplayString(t.$t("HC_ACTION")),1)])]),_:1}),a.createElementVNode("form",{class:"flex flex-col",onSubmit:e[46]||(e[46]=a.withModifiers((...C)=>t.onCreateRequestSubmit&&t.onCreateRequestSubmit(...C),["prevent"]))},[t.showCreateRequest?(a.openBlock(),a.createElementBlock("div",M1e,[a.createElementVNode("div",A1e,[a.createElementVNode("div",T1e,[a.createVNode(y,{id:"todo-type",selected:t.requestType,options:t.todoOptions,placeholder:t.$t("HC_ACTION_TYPE"),condensed:"",required:"","onUpdate:modelValue":e[17]||(e[17]=C=>t.onSelectToDo(C))},null,8,["selected","options","placeholder"])]),t.requestType&&t.requestType.id==="room_notice"?(a.openBlock(),a.createElementBlock("div",I1e,[a.createVNode(y,{id:"todo-notice-issue",selected:t.roomNotice.issue,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,placeholder:t.$t("HC_ITEM"),condensed:"",required:"","onUpdate:modelValue":e[18]||(e[18]=C=>t.roomNotice.issue=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="room_notice"&&t.roomNotice.issue?(a.openBlock(),a.createElementBlock("div",O1e,[a.createVNode(w,{id:"todo-notice-start-date",value:t.roomNotice.startDate,"is-today-min":!0,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_START_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[19]||(e[19]=C=>t.roomNotice.startDate=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="room_notice"&&t.roomNotice.issue?(a.openBlock(),a.createElementBlock("div",D1e,[a.createVNode(w,{id:"todo-notice-end-date",value:t.roomNotice.endDate,"is-today-min":!0,"minimum-date":t.$datetime(t.roomNotice.startDate).toDate(),"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_END_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[20]||(e[20]=C=>t.roomNotice.endDate=C)},null,8,["value","minimum-date","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="room_notice"&&t.roomNotice.issue?(a.openBlock(),a.createElementBlock("div",N1e,[a.createVNode(p,{id:"todo-notice-notes",modelValue:t.roomNotice.notes,"onUpdate:modelValue":e[21]||(e[21]=C=>t.roomNotice.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"?(a.openBlock(),a.createElementBlock("div",x1e,[a.createVNode(y,{id:"todo-complaint-problem",selected:t.complaint.problem,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,multiple:!1,placeholder:t.$t("HC_PROBLEM"),condensed:"",required:"","onUpdate:modelValue":e[22]||(e[22]=C=>t.complaint.problem=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",P1e,[a.createVNode(p,{id:"guest-name",modelValue:t.complaint.guestName,"onUpdate:modelValue":e[23]||(e[23]=C=>t.complaint.guestName=C),placeholder:t.$t("HC_GUEST_NAME"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:"",required:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",B1e,[a.createVNode(p,{id:"guest-phone",modelValue:t.complaint.guestPhone,"onUpdate:modelValue":e[24]||(e[24]=C=>t.complaint.guestPhone=C),placeholder:t.$t("HC_GUEST_PHONE_NUMBER"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",L1e,[a.createVNode(p,{id:"guest-email",modelValue:t.complaint.guestEmail,"onUpdate:modelValue":e[25]||(e[25]=C=>t.complaint.guestEmail=C),placeholder:t.$t("HC_GUEST_EMAIL"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",R1e,[a.createVNode(p,{id:"guest-loyalty",modelValue:t.complaint.guestLoyalty,"onUpdate:modelValue":e[26]||(e[26]=C=>t.complaint.guestLoyalty=C),placeholder:t.$t("HC_GUEST_LOYALTY"),classes:"text-inkwell-40 border-gray-12 ui-overhaul",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",V1e,[a.createVNode(y,{id:"todo-complaint-mood",selected:t.complaint.guestMood,options:t.moodOptions,disabled:!t.moodOptions.length,placeholder:t.$t("HC_GUEST_MOOD"),condensed:"",required:"","onUpdate:modelValue":e[27]||(e[27]=C=>t.complaint.guestMood=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",_1e,[a.createVNode(w,{id:"todo-complaint-check-in",value:t.$datetime(t.complaint.checkInDate).toDate(),"is-today-min":!1,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_CHECK_IN_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[28]||(e[28]=C=>t.complaint.checkInDate=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",$1e,[a.createVNode(w,{id:"todo-complaint-check-out",value:t.$datetime(t.complaint.checkOutDate).toDate(),"is-today-min":!1,"minimum-date":t.$datetime(t.complaint.checkInDate).toDate(),"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_CHECK_OUT_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[29]||(e[29]=C=>t.complaint.checkOutDate=C)},null,8,["value","minimum-date","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="complaint"&&t.complaint.problem?(a.openBlock(),a.createElementBlock("div",F1e,[a.createVNode(p,{id:"todo-complaint-notes",modelValue:t.complaint.notes,"onUpdate:modelValue":e[30]||(e[30]=C=>t.complaint.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"?(a.openBlock(),a.createElementBlock("div",j1e,[a.createVNode(y,{id:"todo-work-order-item",selected:t.workOrder.item,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,"group-selectable":!1,placeholder:t.$t("HC_ITEM"),"group-label":"group","group-values":"options",condensed:"",required:"","onUpdate:modelValue":e[31]||(e[31]=C=>t.workOrder.item=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item?(a.openBlock(),a.createElementBlock("div",H1e,[a.createVNode(y,{id:"todo-work-order-issue",selected:t.workOrder.issue,options:t.workOrderIssues,disabled:!t.workOrderIssues.length,placeholder:t.$t("HC_ISSUE"),condensed:"",required:"","onUpdate:modelValue":e[32]||(e[32]=C=>t.workOrder.issue=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",z1e,[a.createVNode(y,{id:"todo-work-order-requested-by",selected:t.workOrder.requestedBy,options:t.requestedByOptions,placeholder:t.$t("HC_REQUESTED_BY"),condensed:"",required:"","onUpdate:modelValue":e[33]||(e[33]=C=>t.workOrder.requestedBy=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",U1e,[a.createVNode(y,{id:"todo-work-order-assign-type",selected:t.workOrder.assignType,options:t.assignTypes,placeholder:t.$t("HC_ASSIGN_TYPE"),condensed:"",required:"","onUpdate:modelValue":e[34]||(e[34]=C=>t.workOrder.assignType=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",Z1e,[t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue&&t.workOrder.assignType&&t.workOrder.assignType.id===1?(a.openBlock(),a.createBlock(y,{key:0,id:"todo-work-order-assign-type",selected:t.workOrder.department,options:t.departments,disabled:!t.departments.length,placeholder:t.$t("HC_ASSIGN_TO"),condensed:"",required:"","onUpdate:modelValue":e[35]||(e[35]=C=>t.workOrder.department=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue&&t.workOrder.assignType&&t.workOrder.assignType.id===2?(a.openBlock(),a.createBlock(y,{key:1,id:"todo-work-order-assign-type",selected:t.workOrder.person,options:t.departmentUsers,disabled:!t.departmentUsers.length,"group-selectable":!1,placeholder:t.$t("HC_ASSIGN_TO"),"group-label":"group","group-values":"options",condensed:"",required:"","onUpdate:modelValue":e[36]||(e[36]=C=>t.workOrder.person=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",q1e,[a.createVNode(w,{id:"todo-work-order-due",value:t.$datetime(t.workOrder.due).toDate(),"is-today-min":!0,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_DUE_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[37]||(e[37]=C=>t.workOrder.due=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="work_order"&&t.workOrder.item&&t.workOrder.issue?(a.openBlock(),a.createElementBlock("div",W1e,[a.createVNode(p,{id:"todo-work-order-notes",modelValue:t.workOrder.notes,"onUpdate:modelValue":e[38]||(e[38]=C=>t.workOrder.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"?(a.openBlock(),a.createElementBlock("div",G1e,[a.createVNode(y,{id:"todo-request-item",selected:t.request.item,options:t.itemOptionsList,disabled:!t.itemOptionsList.length,placeholder:t.$t("HC_ITEM"),condensed:"",required:"","onUpdate:modelValue":e[39]||(e[39]=C=>t.request.item=C)},null,8,["selected","options","disabled","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",K1e,[a.createVNode(y,{id:"todo-request-requested-by",selected:t.request.requestedBy,options:t.requestedByOptions,placeholder:t.$t("HC_REQUESTED_BY"),condensed:"",required:"","onUpdate:modelValue":e[40]||(e[40]=C=>t.request.requestedBy=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",Y1e,[a.createVNode(w,{id:"todo-request-due",value:t.$datetime(t.request.due).toDate(),"is-today-min":!0,"property-timezone":t.propertyTimeZone,locale:t.locale,placeholder:t.$t("HC_DUE_DATE"),"calendar-classes":"mt-0",class:"icon-right","input-classes":"datepicker-md text-inkwell-40","wrapper-classes":"ui-overhaul",condensed:"",required:"","onUpdate:modelValue":e[41]||(e[41]=C=>t.request.due=C)},null,8,["value","property-timezone","locale","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",Q1e,[a.createVNode(y,{id:"todo-request-assign-type",selected:t.request.assignType,options:t.assignTypes,placeholder:t.$t("HC_ASSIGN_TYPE"),condensed:"",required:"","onUpdate:modelValue":e[42]||(e[42]=C=>t.request.assignType=C)},null,8,["selected","options","placeholder"])])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",X1e,[t.requestType&&t.requestType.id==="request"&&t.request.item&&t.request.assignType&&t.request.assignType.id===1?(a.openBlock(),a.createBlock(y,{key:0,id:"todo-request-assign-type",selected:t.request.department,options:t.departments,disabled:!t.departments.length,placeholder:t.$t("HC_ASSIGN_TO"),condensed:"",required:"","onUpdate:modelValue":e[43]||(e[43]=C=>t.request.department=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item&&t.request.assignType&&t.request.assignType.id===2?(a.openBlock(),a.createBlock(y,{key:1,id:"todo-request-assign-type",selected:t.request.person,options:t.departmentUsers,disabled:!t.departmentUsers.length,"group-selectable":!1,placeholder:t.$t("HC_ASSIGN_TO"),"group-label":"group","group-values":"options",condensed:"",required:"","onUpdate:modelValue":e[44]||(e[44]=C=>t.request.person=C)},null,8,["selected","options","disabled","placeholder"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.requestType&&t.requestType.id==="request"&&t.request.item?(a.openBlock(),a.createElementBlock("div",J1e,[a.createVNode(p,{id:"todo-request-notes",modelValue:t.request.notes,"onUpdate:modelValue":e[45]||(e[45]=C=>t.request.notes=C),placeholder:t.$t("HC_WRITE_A_MESSAGE"),classes:"text-inkwell-40 border-gray-12 mb-2",type:"textarea",condensed:""},null,8,["modelValue","placeholder"])])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",ede,[a.createVNode(g,{status:"secondary",onClick:a.withModifiers(t.closeRequest,["prevent"])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_BACK")),1)]),_:1},8,["onClick"]),a.createVNode(g,{disabled:!t.validateToDo,loading:t.requestLoading,"use-loading-spinner":!0},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_POST")),1)]),_:1},8,["disabled","loading"])])],32)],2),t.loading.pms?(a.openBlock(),a.createElementBlock("div",tde)):!t.loading.pms&&t.roomDetailsData.updatedAt?(a.openBlock(),a.createElementBlock("div",nde,[a.createVNode(s,{class:"flex-shrink-1 mr-2",size:"sm",color:"inkwell-0",icon:"clock-alarm",type:"outline"}),a.createElementVNode("p",rde,a.toDisplayString(t.$t("HC_PMS_UPDATED"))+" "+a.toDisplayString(t.DateTime.fromISO(t.roomDetailsData.updatedAt).toRelative({locale:t.locale})),1)])):a.createCommentVNode("",!0)],8,Vce)]),_:3},8,["model-value","align","position","size"])],40,Lce)):a.createCommentVNode("",!0)}const ode=Me(Bce,[["render",ide],["__scopeId","data-v-ba64436a"]]);function b9(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function sde(t){return(...e)=>!t(...e)}function ade(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function lde(t){return t.filter(e=>!e.$isLabel)}function w9(t,e){return n=>n.reduce((r,i)=>i[t]&&i[t].length?(r.push({$groupLabel:i[e],$isLabel:!0}),r.concat(i[t])):r,[])}const KD=(...t)=>e=>t.reduce((n,r)=>r(n),e);var cde={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return b9(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,e,this.label):this.filterOptions(n,e,this.label,this.customLabel):n=this.groupValues?w9(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(sde(this.isSelected)):n,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:t}):n.unshift({isTag:!0,label:t})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,n){return KD(this.filterGroups(e,n,this.groupValues,this.groupLabel,this.customLabel),w9(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return KD(w9(this.groupValues,this.groupLabel),lde)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(b9(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return b9(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(n=>n[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const n=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],r=this.internalValue.filter(i=>n.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",r)}else{const n=e[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,n,r){return e?t.filter(i=>ade(r(i,n),e)).sort((i,o)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,o):r(i,n).length-r(o,n).length):t},filterGroups(t,e,n,r,i){return o=>o.map(s=>{if(!s[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const l=this.filterOptions(s[n],t,e,i);return l.length?{[r]:s[r],[n]:l}:[]})}}},dde={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===e.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},YD={name:"vue-multiselect",mixins:[cde,dde],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}}};const ude=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],fde={ref:"tags",class:"multiselect__tags"},hde={class:"multiselect__tags-wrap"},pde=["textContent"],mde=["onKeypress","onMousedown"],gde=["textContent"],yde={class:"multiselect__spinner"},bde=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],wde=["id","aria-multiselectable"],Cde={key:0},vde={class:"multiselect__option"},kde=["aria-selected","id","role"],Sde=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Ede=["data-select","data-deselect","onMouseenter","onMousedown"],Mde={class:"multiselect__option"},Ade={class:"multiselect__option"};function Tde(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("div",{tabindex:t.searchable?-1:n.tabindex,class:a.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":o.isAbove,"multiselect--has-options-group":o.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=s=>t.activate()),onBlur:e[15]||(e[15]=s=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=a.withKeys(a.withModifiers(s=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=a.withKeys(a.withModifiers(s=>t.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:e[18]||(e[18]=a.withKeys(a.withModifiers(s=>t.addPointerElement(s),["stop","self"]),["enter","tab"])),onKeyup:e[19]||(e[19]=a.withKeys(s=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[a.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[a.createElementVNode("div",{onMousedown:e[0]||(e[0]=a.withModifiers(s=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),a.renderSlot(t.$slots,"clear",{search:t.search}),a.createElementVNode("div",fde,[a.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:o.visibleValues,isOpen:t.isOpen},()=>[a.withDirectives(a.createElementVNode("div",hde,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.visibleValues,(s,l)=>a.renderSlot(t.$slots,"tag",{option:s,search:t.search,remove:t.removeElement},()=>[(a.openBlock(),a.createElementBlock("span",{class:"multiselect__tag",key:l,onMousedown:e[1]||(e[1]=a.withModifiers(()=>{},["prevent"]))},[a.createElementVNode("span",{textContent:a.toDisplayString(t.getOptionLabel(s))},null,8,pde),a.createElementVNode("i",{tabindex:"1",onKeypress:a.withKeys(a.withModifiers(c=>t.removeElement(s),["prevent"]),["enter"]),onMousedown:a.withModifiers(c=>t.removeElement(s),["prevent"]),class:"multiselect__tag-icon"},null,40,mde)],32))])),256))],512),[[a.vShow,o.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>n.limit?a.renderSlot(t.$slots,"limit",{key:0},()=>[a.createElementVNode("strong",{class:"multiselect__strong",textContent:a.toDisplayString(n.limitText(t.internalValue.length-n.limit))},null,8,gde)]):a.createCommentVNode("v-if",!0)]),a.createVNode(a.Transition,{name:"multiselect__loading"},{default:a.withCtx(()=>[a.renderSlot(t.$slots,"loading",{},()=>[a.withDirectives(a.createElementVNode("div",yde,null,512),[[a.vShow,n.loading]])])]),_:3}),t.searchable?(a.openBlock(),a.createElementBlock("input",{key:0,ref:"search",name:n.name,id:t.id,type:"text",autocomplete:"off",spellcheck:n.spellcheck,placeholder:t.placeholder,required:o.isRequired,style:a.normalizeStyle(o.inputStyle),value:t.search,disabled:n.disabled,tabindex:n.tabindex,"aria-label":n.name+"-searchbox",onInput:e[2]||(e[2]=s=>t.updateSearch(s.target.value)),onFocus:e[3]||(e[3]=a.withModifiers(s=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=a.withModifiers(s=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=a.withKeys(s=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=a.withKeys(a.withModifiers(s=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=a.withKeys(a.withModifiers(s=>t.pointerBackward(),["prevent"]),["up"])),e[9]||(e[9]=a.withKeys(a.withModifiers(s=>t.removeLastElement(),["stop"]),["delete"]))],onKeypress:e[8]||(e[8]=a.withKeys(a.withModifiers(s=>t.addPointerElement(s),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,bde)):a.createCommentVNode("v-if",!0),o.isSingleLabelVisible?(a.openBlock(),a.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=a.withModifiers((...s)=>t.toggle&&t.toggle(...s),["prevent"]))},[a.renderSlot(t.$slots,"singleLabel",{option:o.singleValue},()=>[a.createTextVNode(a.toDisplayString(t.currentOptionLabel),1)])],32)):a.createCommentVNode("v-if",!0),o.isPlaceholderVisible?(a.openBlock(),a.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=a.withModifiers((...s)=>t.toggle&&t.toggle(...s),["prevent"]))},[a.renderSlot(t.$slots,"placeholder",{},()=>[a.createTextVNode(a.toDisplayString(t.placeholder),1)])],32)):a.createCommentVNode("v-if",!0)],512),a.createVNode(a.Transition,{name:"multiselect",persisted:""},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"multiselect__content-wrapper",onFocus:e[12]||(e[12]=(...s)=>t.activate&&t.activate(...s)),tabindex:"-1",onMousedown:e[13]||(e[13]=a.withModifiers(()=>{},["prevent"])),style:a.normalizeStyle({maxHeight:t.optimizedHeight+"px"}),ref:"list"},[a.createElementVNode("ul",{class:"multiselect__content",style:a.normalizeStyle(o.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[a.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(a.openBlock(),a.createElementBlock("li",Cde,[a.createElementVNode("span",vde,[a.renderSlot(t.$slots,"maxElements",{},()=>[a.createTextVNode("Maximum of "+a.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):a.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(t.filteredOptions,(s,l)=>(a.openBlock(),a.createElementBlock("li",{class:"multiselect__element",key:l,"aria-selected":t.isSelected(s),id:t.id+"-"+l,role:s&&(s.$isLabel||s.$isDisabled)?null:"option"},[s&&(s.$isLabel||s.$isDisabled)?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass([t.optionHighlight(l,s),"multiselect__option"]),onClick:a.withModifiers(c=>t.select(s),["stop"]),onMouseenter:a.withModifiers(c=>t.pointerSet(l),["self"]),"data-select":s&&s.isTag?t.tagPlaceholder:o.selectLabelText,"data-selected":o.selectedLabelText,"data-deselect":o.deselectLabelText},[a.renderSlot(t.$slots,"option",{option:s,search:t.search,index:l},()=>[a.createElementVNode("span",null,a.toDisplayString(t.getOptionLabel(s)),1)])],42,Sde)),s&&(s.$isLabel||s.$isDisabled)?(a.openBlock(),a.createElementBlock("span",{key:1,"data-select":t.groupSelect&&o.selectGroupLabelText,"data-deselect":t.groupSelect&&o.deselectGroupLabelText,class:a.normalizeClass([t.groupHighlight(l,s),"multiselect__option"]),onMouseenter:a.withModifiers(c=>t.groupSelect&&t.pointerSet(l),["self"]),onMousedown:a.withModifiers(c=>t.selectGroup(s),["prevent"])},[a.renderSlot(t.$slots,"option",{option:s,search:t.search,index:l},()=>[a.createElementVNode("span",null,a.toDisplayString(t.getOptionLabel(s)),1)])],42,Ede)):a.createCommentVNode("v-if",!0)],8,kde))),128)):a.createCommentVNode("v-if",!0),a.withDirectives(a.createElementVNode("li",null,[a.createElementVNode("span",Mde,[a.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=a.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[a.vShow,n.showNoResults&&t.filteredOptions.length===0&&t.search&&!n.loading]]),a.withDirectives(a.createElementVNode("li",null,[a.createElementVNode("span",Ade,[a.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=a.createTextVNode("List is empty."))])])],512),[[a.vShow,n.showNoOptions&&(t.options.length===0||o.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!n.loading]]),a.renderSlot(t.$slots,"afterList")],12,wde)],36),[[a.vShow,t.isOpen]])]),_:3})],42,ude)}YD.render=Tde;const Ide=a.defineComponent({name:"QSelect",components:{QBadge:cs,VueMultiselect:YD},props:{id:{type:String,default:""},options:{type:[Array,Object],required:!0},modelValue:{type:[String,Number,Array,Object],default:""},trackBy:{type:String,default:"id"},label:{type:String,default:"label"},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},taggable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},filterSortFunction:{type:Function,default:()=>{}},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},groupValues:{type:String,default:""},groupLabel:{type:String,default:""},groupSelectable:{type:Boolean,default:!0},hasCheckboxes:{type:Boolean,default:!1},size:{type:String,default:"lg"},info:{type:String,default:""},allowEmpty:{type:Boolean,default:!0},blockKeys:{type:Array,default:()=>["Delete"]},noResultMessage:{type:String,default:""},selectionControl:{type:Boolean,default:!1},showExpanded:{type:Boolean,default:!1},showPlaceholderImage:{type:Boolean,default:!0},showSelectAll:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:""},expand:{type:Boolean,default:!1},showSelectedCount:{type:Boolean,default:!1},truncateTag:{type:Boolean,default:!1},limitShown:{type:Number,default:null},validationMethod:{type:Function,default:()=>!0},showOptionDescription:{type:Boolean,default:!1},showTags:{type:Boolean,default:!1},openDirection:{type:String,default:"bottom"},useAddTagsOnly:{type:Boolean,default:!1},clearOnSelect:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!1}},emits:["update:model-value"],setup(t,{slots:e,emit:n}){const{t:r}=Wi(),i=a.ref(null),o=a.ref(null),s=a.ref(t.modelValue),l=a.ref(""),c=a.ref(!1),d=a.ref([]),u=a.computed(()=>Array.isArray(t.options)?t.options.length:0),f=a.computed(()=>!!e.action),h=a.computed(()=>t.noResultMessage||r("HC_PRESS_ENTER_TO_CREATE_A_TAG")),p=a.computed(()=>t.tagPlaceholder||r("HC_PRESS_ENTER_TO_CREATE_A_TAG")),g=a.computed(()=>u.value===s.value.length?r("HC_ALL"):s.value.length>1?r("HC_MULTIPLE_SELECTED"):s.value[0].label||s.value[0].name||""),b=a.computed(()=>t.taggable||t.showTags),y=D=>{n("update:model-value",D)},w=D=>{l.value=D},C=async D=>{const T={label:D,name:D,added:!0};if(!t.validationMethod(T)){await a.nextTick(),i.value.search=D;return}d.value.push(T),s.value.push(T)},k=()=>{s.value=[],n("update:model-value",s.value)},v=D=>{typeof D=="number"&&D>=0?s.value.splice(D,1):s.value=[],a.nextTick(()=>{n("update:model-value",s.value)})},A=D=>{t.multiple&&s.value&&D.length===s.value.length&&a.nextTick(()=>{s.value=[],n("update:model-value",s.value)})},S=async()=>{if(c.value||(c.value=!0,d.value=t.options),o.value&&t.searchable){await a.nextTick();const D=o.value.querySelector(".multiselect__content-wrapper"),T=o.value.querySelector(".multiselect__input");T.style.width=D.clientWidth+"px"}},M=async()=>{if(!i.value)return;const D=i.value;s.value=[],t.groupValues?D.filteredOptions.forEach(T=>{s.value.push(T)}):s.value=D.filteredOptions,n("update:model-value",s.value)};return a.watch(()=>t.modelValue,D=>{s.value=D}),a.watch(()=>t.options,D=>{c.value&&(d.value=D)}),{currentSelect:i,search:l,selected:s,isOpened:c,internalOptions:d,hasAction:f,noResultsText:h,noTagFound:p,selectedCount:u,selectedText:g,useTags:b,addTag:C,clearAll:k,onOpen:S,onRemove:A,onUpdateValue:y,removeElement:v,searchChange:w,selectAll:M}}}),Ode=["id"],Dde=["onMousedown"],Nde={key:1,class:"searchable-placeholder"},xde={class:"flex gap-2 px-4 py-3"},Pde={key:0,class:"tag-container"},Bde={key:0},Lde={class:a.normalizeClass(["tag-name text-sm leading-normal pr-2 capitalize"])},Rde={key:1},Vde=["onClick"],_de={key:0,class:"text-blue-20 text-xs count"},$de={key:0,class:"text-inkwell-10 text-right truncate font-normal"},Fde={key:1,class:"text-blue-20 text-xs ml-2"},jde={class:"text-inkwell-40"},Hde={class:"text-inkwell-10 text-right truncate"},zde={key:1,class:"option-selected text-gray-40 truncate"},Ude={key:3,class:"flex w-full justify-between"},Zde={class:"text-inkwell-40 pl-1 text-base font-medium"},qde=["title"],Wde={key:2,class:"option-description text-xs pt-0.5 truncate"};function Gde(t,e,n,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-button"),c=a.resolveComponent("q-badge"),d=a.resolveComponent("vue-multiselect");return a.openBlock(),a.createElementBlock("div",{id:t.id+"-containers",class:"control custom-select",ref:"currentContainer"},[a.createVNode(d,{id:t.id,ref:"currentSelect",modelValue:t.selected,"onUpdate:modelValue":[e[1]||(e[1]=u=>t.selected=u),e[4]||(e[4]=u=>t.onUpdateValue(u))],"filtering-sort-func":t.filterSortFunction,options:t.internalOptions,searchable:t.searchable,multiple:t.multiple,taggable:t.taggable||t.useAddTagsOnly,label:t.label,"track-by":t.trackBy,"group-values":t.groupValues,"group-label":t.groupLabel,"group-select":t.groupSelectable,"block-keys":t.blockKeys,class:a.normalizeClass([{"has-checkboxes":t.hasCheckboxes},{"selection-control":t.selectionControl},{"select-multiple":!!t.multiple},{"select-taggable":!!t.taggable||!!t.showTags||!!t.useAddTagsOnly},{"select-expand":t.expand},{"select-show-count":!!t.showSelectedCount},{"select-search":!!t.search},{"select-searchable":t.searchable},t.searchable?"cursor-text":"cursor-default","q-select rounded","select-"+t.size]),disabled:t.disabled||t.loading,loading:t.loading,"allow-empty":t.allowEmpty,"clear-on-select":t.clearOnSelect,"close-on-select":t.closeOnSelect||!t.hasCheckboxes&&!t.multiple,"show-tags":t.showTags,"tag-placeholder":t.noTagFound,placeholder:t.placeholder,"preserve-search":!0,"reset-after":!1,"max-height":280,"open-direction":t.openDirection,"select-label":"","deselect-label":"","selected-label":"","select-group-label":"","deselect-group-label":"",onOpen:t.onOpen,onRemove:e[2]||(e[2]=u=>t.onRemove(u)),onTag:t.addTag,onSearchChange:e[3]||(e[3]=u=>t.searchChange(u))},a.createSlots({caret:a.withCtx(({toggle:u})=>[a.createElementVNode("div",{class:a.normalizeClass(["h-full w-full","absolute left-0 top-0","z-[1] cursor-pointer","flex justify-end"]),onMousedown:a.withModifiers(u,["prevent"])},[t.loading?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:0,icon:"chevron-down",type:"line"}))],40,Dde),t.searchable?(a.openBlock(),a.createBlock(s,{key:0,class:"search-icon",color:t.selectionControl?"inkwell-0":"gray-40",icon:"search",type:""},null,8,["color"])):a.createCommentVNode("",!0),t.searchable&&(t.multiple&&!t.selected.length||!t.multiple&&!t.selected)&&!t.selectionControl?(a.openBlock(),a.createElementBlock("div",Nde,a.toDisplayString(t.placeholder),1)):a.createCommentVNode("",!0)]),noResult:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.noResultsText),1)]),singleLabel:a.withCtx(({option:u})=>[u.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:u.icon},null,8,["icon"])):a.createCommentVNode("",!0),u&&t.showPlaceholderImage?a.renderSlot(t.$slots,"optionPrefix",a.normalizeProps(a.mergeProps({key:1},u)),void 0,!0):a.createCommentVNode("",!0),t.selectionControl?a.renderSlot(t.$slots,"controlPlaceholder",{key:2},()=>[a.createTextVNode(a.toDisplayString(t.placeholder),1)],!0):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["option-name",{"text-inkwell-10 text-right truncate":t.selectionControl}])},a.toDisplayString(u.label||u.name||u),3)]),selection:a.withCtx(({values:u,isOpen:f})=>{var h,p,g,b;return[t.useTags?(a.openBlock(),a.createElementBlock("div",Pde,[t.groupValues&&t.options[0][t.groupValues].length===u.length?(a.openBlock(),a.createElementBlock("div",Bde,[a.createElementVNode("div",{class:a.normalizeClass(["multiselect__tag inline-flex items-center justify-center rounded me-2 z-[1]",{"tag-gray":!!t.showTags}])},[a.createElementVNode("span",Lde,a.toDisplayString(t.groupLabel),1),a.createElementVNode("span",{class:"tag-remove cursor-pointer shrink",tabindex:"1",onMousedown:e[0]||(e[0]=a.withModifiers(y=>t.removeElement(t.options[0][t.groupValues]),["prevent","stop"]))},[a.createVNode(s,{icon:"close",color:"white",class:a.normalizeClass(["tag-close flex rounded-full p-1",t.showTags?"bg-inkwell-30":"bg-blue-40"]),type:"line"},null,8,["class"])],32)],2)])):(a.openBlock(),a.createElementBlock("div",Rde,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(!t.expand&&t.limitShown?u.slice(0,t.limitShown):u,(y,w)=>(a.openBlock(),a.createElementBlock("div",{key:w,class:a.normalizeClass(["multiselect__tag !inline-flex items-center justify-center rounded mr-2 z-[1]",{"tag-added":y.added},{"tag-gray":!!t.showTags},y.tagClass?y.tagClass:""])},[y.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:y.icon,class:"tag-icon"},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["tag-name text-sm leading-normal pr-2",{"tag-truncate":t.truncateTag}])},a.toDisplayString(y.label||y.name),3),a.createElementVNode("span",{class:"tag-remove cursor-pointer shrink",tabindex:"1",onClick:C=>t.removeElement(w)},[a.createVNode(s,{icon:"close-thick",color:"white",size:"sm",class:a.normalizeClass(["!p-[0.3rem] tag-close flex rounded-full p-1",y.closeTagClass?y.closeTagClass:t.showTags?"bg-inkwell-30":t.taggable&&y.added?"bg-green-40":"bg-blue-40"]),type:"line"},null,8,["class"])],8,Vde)],2))),128)),!t.expand&&t.showSelectedCount&&t.multiple&&u.length>t.limitShown?(a.openBlock(),a.createElementBlock("span",_de," + "+a.toDisplayString(u.length-t.limitShown)+" more... ",1)):a.createCommentVNode("",!0)]))])):a.createCommentVNode("",!0),!t.showTags&&!t.taggable&&t.multiple&&u.length?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["multiselect__single flex w-full",t.selectionControl?"whitespace-nowrap justify-between":"items-center"])},[a.createElementVNode("span",{class:a.normalizeClass(["option-selected",{capitalize:t.groupValues&&t.options[0][t.groupValues].length===u.length}])},a.toDisplayString(t.selectionControl?t.placeholder:t.groupValues&&t.options[0][t.groupValues].length===u.length?t.groupLabel:u[0].label),3),t.selectionControl?(a.openBlock(),a.createElementBlock("span",$de,a.toDisplayString(t.selectedText),1)):a.createCommentVNode("",!0),t.limitShown&&t.limitShown<u.length&&(!t.groupValues&&u.length!==t.limitShown||t.groupValues&&t.options[0][t.groupValues].length!==u.length)?(a.openBlock(),a.createElementBlock("span",Fde," + "+a.toDisplayString(u.length-t.limitShown)+" more... ",1)):a.createCommentVNode("",!0)],2)):f&&!t.useTags&&!t.multiple?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["multiselect__single flex w-full",t.selectionControl?"justify-between":"items-center"])},[t.selectionControl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("span",jde,a.toDisplayString(t.placeholder||""),1),a.createElementVNode("span",Hde,a.toDisplayString(((h=t.selected)==null?void 0:h.label)||((p=t.selected)==null?void 0:p.name)||""),1)],64)):(a.openBlock(),a.createElementBlock("span",zde,a.toDisplayString(((g=t.selected)==null?void 0:g.label)||((b=t.selected)==null?void 0:b.name)||t.placeholder||""),1))],2)):f&&!t.useTags&&t.multiple&&t.selectionControl?(a.openBlock(),a.createElementBlock("div",Ude,[a.createElementVNode("span",Zde,a.toDisplayString(t.placeholder||""),1)])):a.createCommentVNode("",!0)]}),option:a.withCtx(({option:u,search:f})=>[a.createElementVNode("div",{class:a.normalizeClass(["flex items-center w-full",{"option-search":u.label===f},{"option-disabled":u.isDisabled}]),title:u.label?u.label:""},[t.multiple&&t.hasCheckboxes?(a.openBlock(),a.createBlock(c,{key:0,"has-icon":!0,class:"selected-checkbox mr-2",shape:"square"},{icon:a.withCtx(()=>[a.createVNode(s,{icon:"check",color:"white",type:"line"})]),_:1})):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["option-icon-name flex items-center",!u.$groupLabel&&t.groupLabel?"pl-0":""])},[u.icon?(a.openBlock(),a.createBlock(s,{key:0,icon:u.icon,class:"mr-1"},null,8,["icon"])):a.createCommentVNode("",!0),u?a.renderSlot(t.$slots,"optionPrefix",a.normalizeProps(a.mergeProps({key:1},u)),void 0,!0):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["option-name",[u.optionClass?u.optionClass:""]])},a.toDisplayString(u.$groupLabel||u.label||u.name||u),3),u.description&&t.showOptionDescription?(a.openBlock(),a.createElementBlock("div",Wde,a.toDisplayString(u.description),1)):a.createCommentVNode("",!0),t.multiple&&t.hasCheckboxes?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:3,icon:"check",size:"sm",type:"line",color:"inkwell-30",class:"selected-icon"}))],2)],10,qde)]),_:2},[t.showSelectAll?{name:"beforeList",fn:a.withCtx(()=>[a.createElementVNode("div",xde,[a.createVNode(l,{type:"button",disabled:t.selectedCount===t.selected.length,"no-min-width":!0,class:"!text-sm !font-normal !leading-4",status:"link",onClick:a.withModifiers(t.selectAll,["prevent"])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_SELECT_ALL")),1)]),_:1},8,["disabled","onClick"]),a.createVNode(l,{type:"button",disabled:!t.selected.length,"no-min-width":!0,class:"!text-sm !font-normal !leading-4",status:"link",onClick:a.withModifiers(t.clearAll,["prevent"])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.$t("HC_CLEAR_ALL")),1)]),_:1},8,["disabled","onClick"])])]),key:"0"}:void 0]),1032,["id","modelValue","filtering-sort-func","options","searchable","multiple","taggable","label","track-by","group-values","group-label","group-select","block-keys","class","disabled","loading","allow-empty","clear-on-select","close-on-select","show-tags","tag-placeholder","placeholder","open-direction","onOpen","onTag"])],8,Ode)}const Kde=Me(Ide,[["render",Gde],["__scopeId","data-v-511ba2f9"]]);var pn={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},Zg={AND:"and",OR:"or"};function QD(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Yde(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
274
274
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,l;return{s:function(){n=n.call(t)},n:function(){var d=n.next();return o=d.done,d},e:function(d){s=!0,l=d},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw l}}}}function Yde(t,e){if(t){if(typeof t=="string")return XD(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XD(t,e)}}function XD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var C9={filter:function(e,n,r,i,o){var s=[];if(!e)return s;var l=QD(e),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;if(typeof d=="string"){if(this.filters[i](d,r,o)){s.push(d);continue}}else{var u=QD(n),f;try{for(u.s();!(f=u.n()).done;){var h=f.value,p=W.resolveFieldData(d,h);if(this.filters[i](p,r,o)){s.push(d);break}}}catch(g){u.e(g)}finally{u.f()}}}}catch(g){l.e(g)}finally{l.f()}return s},filters:{startsWith:function(e,n,r){if(n==null||n==="")return!0;if(e==null)return!1;var i=W.removeAccents(n.toString()).toLocaleLowerCase(r),o=W.removeAccents(e.toString()).toLocaleLowerCase(r);return o.slice(0,i.length)===i},contains:function(e,n,r){if(n==null||n==="")return!0;if(e==null)return!1;var i=W.removeAccents(n.toString()).toLocaleLowerCase(r),o=W.removeAccents(e.toString()).toLocaleLowerCase(r);return o.indexOf(i)!==-1},notContains:function(e,n,r){if(n==null||n==="")return!0;if(e==null)return!1;var i=W.removeAccents(n.toString()).toLocaleLowerCase(r),o=W.removeAccents(e.toString()).toLocaleLowerCase(r);return o.indexOf(i)===-1},endsWith:function(e,n,r){if(n==null||n==="")return!0;if(e==null)return!1;var i=W.removeAccents(n.toString()).toLocaleLowerCase(r),o=W.removeAccents(e.toString()).toLocaleLowerCase(r);return o.indexOf(i,o.length-i.length)!==-1},equals:function(e,n,r){return n==null||n===""?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()===n.getTime():W.removeAccents(e.toString()).toLocaleLowerCase(r)==W.removeAccents(n.toString()).toLocaleLowerCase(r)},notEquals:function(e,n,r){return n==null||n===""?!1:e==null?!0:e.getTime&&n.getTime?e.getTime()!==n.getTime():W.removeAccents(e.toString()).toLocaleLowerCase(r)!=W.removeAccents(n.toString()).toLocaleLowerCase(r)},in:function(e,n){if(n==null||n.length===0)return!0;for(var r=0;r<n.length;r++)if(W.equals(e,n[r]))return!0;return!1},between:function(e,n){return n==null||n[0]==null||n[1]==null?!0:e==null?!1:e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1]},lt:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<n.getTime():e<n},lte:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n},gt:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>n.getTime():e>n},gte:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n},dateIs:function(e,n){return n==null?!0:e==null?!1:e.toDateString()===n.toDateString()},dateIsNot:function(e,n){return n==null?!0:e==null?!1:e.toDateString()!==n.toDateString()},dateBefore:function(e,n){return n==null?!0:e==null?!1:e.getTime()<n.getTime()},dateAfter:function(e,n){return n==null?!0:e==null?!1:e.getTime()>n.getTime()}},register:function(e,n){this.filters[e]=n}},JD={name:"ArrowDownIcon",extends:at},Qde=a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z",fill:"currentColor"},null,-1),Xde=[Qde];function Jde(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Xde,16)}JD.render=Jde;var eN={name:"ArrowUpIcon",extends:at},eue=a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z",fill:"currentColor"},null,-1),tue=[eue];function nue(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),tue,16)}eN.render=nue;function kf(t){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kf(t)}function rue(t,e,n){return e=iue(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iue(t){var e=oue(t,"string");return kf(e)=="symbol"?e:String(e)}function oue(t,e){if(kf(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var sue={paginator:function(e){var n=e.instance,r=e.key;return["p-paginator p-component",rue({"p-paginator-default":!n.hasBreakpoints()},"p-paginator-".concat(r),n.hasBreakpoints())]},start:"p-paginator-left-content",end:"p-paginator-right-content",firstPageButton:function(e){var n=e.instance;return["p-paginator-first p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},firstPageIcon:"p-paginator-icon",previousPageButton:function(e){var n=e.instance;return["p-paginator-prev p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},previousPageIcon:"p-paginator-icon",nextPageButton:function(e){var n=e.instance;return["p-paginator-next p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},nextPageIcon:"p-paginator-icon",lastPageButton:function(e){var n=e.instance;return["p-paginator-last p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},lastPageIcon:"p-paginator-icon",pages:"p-paginator-pages",pageButton:function(e){var n=e.props,r=e.pageLink;return["p-paginator-page p-paginator-element p-link",{"p-highlight":r-1===n.page}]},current:"p-paginator-current",rowPerPageDropdown:"p-paginator-rpp-options",jumpToPageDropdown:"p-paginator-page-options",jumpToPageInput:"p-paginator-page-input"},aue=Ft.extend({name:"paginator",classes:sue}),tN={name:"AngleDoubleLeftIcon",extends:at},lue=a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z",fill:"currentColor"},null,-1),cue=[lue];function due(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),cue,16)}tN.render=due;var nN={name:"BlankIcon",extends:at},uue=a.createElementVNode("rect",{width:"1",height:"1",fill:"currentColor","fill-opacity":"0"},null,-1),fue=[uue];function hue(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),fue,16)}nN.render=hue;var rN={name:"SearchIcon",extends:at},pue=a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z",fill:"currentColor"},null,-1),mue=[pue];function gue(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),mue,16)}rN.render=gue;var nl=m_(),yue=`
275
275
  @layer primevue {
276
276
  .p-virtualscroller {