ai12z 3.0.13 → 3.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ai12z-bot_12.cjs.entry.js +1 -1
- package/dist/cjs/{ai12z-search-panel-5fa6b9fc.js → ai12z-search-panel-09f068c9.js} +12 -1
- package/dist/cjs/ai12z-search-panel-09f068c9.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/library.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ai12z-bot/ai12z-bot.js +14 -2
- package/dist/collection/components/ai12z-bot/ai12z-bot.js.map +1 -1
- package/dist/esm/ai12z-bot_12.entry.js +4 -4
- package/dist/esm/{ai12z-inline-search-d046e41f.js → ai12z-inline-search-742ea5aa.js} +3 -3
- package/dist/esm/{ai12z-inline-search-d046e41f.js.map → ai12z-inline-search-742ea5aa.js.map} +1 -1
- package/dist/esm/ai12z-inline-search.entry.js +3 -3
- package/dist/esm/{ai12z-knowledge-box-84c06d7b.js → ai12z-knowledge-box-61edd1b8.js} +2 -2
- package/dist/esm/{ai12z-knowledge-box-84c06d7b.js.map → ai12z-knowledge-box-61edd1b8.js.map} +1 -1
- package/dist/esm/ai12z-knowledge-box.entry.js +2 -2
- package/dist/esm/{ai12z-search-panel-fe7c8f83.js → ai12z-search-panel-295d3991.js} +15 -4
- package/dist/esm/ai12z-search-panel-295d3991.js.map +1 -0
- package/dist/esm/index.js +6 -6
- package/dist/esm/library.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/search-results-page.entry.js +3 -3
- package/dist/esm/{search-results-view-239a5088.js → search-results-view-832ccc50.js} +3 -3
- package/dist/esm/{search-results-view-239a5088.js.map → search-results-view-832ccc50.js.map} +1 -1
- package/dist/esm/{socket-service-a7dc24ef.js → socket-service-9c7e7bfc.js} +2 -2
- package/dist/esm/{socket-service-a7dc24ef.js.map → socket-service-9c7e7bfc.js.map} +1 -1
- package/dist/esm/{utils-76c67168.js → utils-61923ae6.js} +2 -2
- package/dist/esm/{utils-76c67168.js.map → utils-61923ae6.js.map} +1 -1
- package/dist/library/index.esm.js +1 -1
- package/dist/library/library.esm.js +1 -1
- package/dist/library/library.esm.js.map +1 -1
- package/dist/library/p-4a5123de.entry.js +2 -0
- package/dist/library/{p-3d69bc82.js → p-599eee15.js} +2 -2
- package/dist/library/{p-7dfd6e9b.js → p-5c620570.js} +2 -2
- package/dist/library/p-6433707a.entry.js +2 -0
- package/dist/library/{p-95e055ba.entry.js → p-85a3cd8a.entry.js} +2 -2
- package/dist/library/{p-0df5c0b4.js → p-8a001c33.js} +2 -2
- package/dist/library/{p-0df5c0b4.js.map → p-8a001c33.js.map} +1 -1
- package/dist/library/{p-4660d823.js → p-9e3df302.js} +2 -2
- package/dist/library/{p-cfac4c14.js → p-bcf74d74.js} +2 -2
- package/dist/library/{p-75377ae8.js → p-e49a0ab7.js} +2 -2
- package/dist/library/p-eb9ee526.entry.js +2 -0
- package/dist/types/components/ai12z-bot/ai12z-bot.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/ai12z-search-panel-5fa6b9fc.js.map +0 -1
- package/dist/esm/ai12z-search-panel-fe7c8f83.js.map +0 -1
- package/dist/library/p-89e108df.entry.js +0 -2
- package/dist/library/p-b9015ffe.entry.js +0 -2
- package/dist/library/p-f00223ec.entry.js +0 -2
- /package/dist/library/{p-89e108df.entry.js.map → p-4a5123de.entry.js.map} +0 -0
- /package/dist/library/{p-3d69bc82.js.map → p-599eee15.js.map} +0 -0
- /package/dist/library/{p-7dfd6e9b.js.map → p-5c620570.js.map} +0 -0
- /package/dist/library/{p-b9015ffe.entry.js.map → p-6433707a.entry.js.map} +0 -0
- /package/dist/library/{p-95e055ba.entry.js.map → p-85a3cd8a.entry.js.map} +0 -0
- /package/dist/library/{p-4660d823.js.map → p-9e3df302.js.map} +0 -0
- /package/dist/library/{p-cfac4c14.js.map → p-bcf74d74.js.map} +0 -0
- /package/dist/library/{p-75377ae8.js.map → p-e49a0ab7.js.map} +0 -0
- /package/dist/library/{p-f00223ec.entry.js.map → p-eb9ee526.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as t,E as s}from"./p-682c54c0.js";import{l as e,
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{h as t,E as s}from"./p-682c54c0.js";import{l as e,f as i}from"./p-bcf74d74.js";function r(s){let e=s.results||s;let i=s.linkTarget||"_blank";return t("div",{class:"results"},t("ul",{role:"list",class:"cta-search-results"},e===null||e===void 0?void 0:e.map((s=>t("li",{key:s.title,class:"cta-search-results-list"},t("div",{class:"px-4 sm:px-6 lg:px-8"},t("div",{class:"cta-search-container"},t("div",{class:"cta-search-container-two"},t("div",{class:"results-icon"},t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))),t("div",{class:"cta-search-container-three"},t("p",{class:"cta-search-text"},t("a",{href:s.link,target:i},t("span",{class:"cta-search-text-position"}),s.title)),t("p",{class:"cta-search-description"},t("a",{href:s.link,class:"relative truncate hover:underline",target:i},s.description)))),t("div",{class:"cta-search-list-arrow"},t("svg",{class:"h-5 w-5 flex-none text-gray-400",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},t("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"}))))))))))}class c{constructor(t){this.socketId="";this.socket=null;this.mode=s.DATA_MODE;this.mode=t;this.initSocket()}initSocket(){if(!this.socket){let t=i(this.mode);this.socket=e(t,{transports:["websocket"]});this.socket.on("connect",(()=>{var t;this.socketId=(t=this.socket)===null||t===void 0?void 0:t.id;if(this.socketId){c.instances.set(this.socketId,this)}}));this.socket.on("response",(t=>{window.dispatchEvent(new CustomEvent("streamResponse",{detail:t}))}));this.socket.on("end_response",(t=>{window.dispatchEvent(new CustomEvent("endResponse",{detail:t}))}));this.socket.on("close",(()=>{setTimeout((()=>this.initSocket()),3e3)}));this.socket.on("error",(t=>{console.error("WebSocket error:",t)}));this.socket.on("disconnect",(()=>{if(this.socketId){c.instances.delete(this.socketId)}}))}}static createInstance(t){const s=new c(t);return s}static getInstanceById(t){return c.instances.get(t)}getSocket(){return this.socket}getSocketId(){return this.socketId}disconnect(){if(this.socket){this.socket.disconnect();this.socket=null}if(this.socketId){c.instances.delete(this.socketId)}}static disconnectSocketById(t){const s=c.instances.get(t);if(s&&s.socket){s.socket.disconnect();c.instances.delete(t)}else{console.log(`Socket with ID ${t} not found`)}}}c.instances=new Map;export{c as S,r as a};
|
|
2
|
+
//# sourceMappingURL=p-9e3df302.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as t}from"./p-682c54c0.js";const e=Object.create(null);e["open"]="0";e["close"]="1";e["ping"]="2";e["pong"]="3";e["message"]="4";e["upgrade"]="5";e["noop"]="6";const i=Object.create(null);Object.keys(e).forEach((t=>{i[e[t]]=t}));const n={type:"error",data:"parser error"};const s=typeof Blob==="function"||typeof Blob!=="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]";const r=typeof ArrayBuffer==="function";const o=t=>typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer;const a=({type:t,data:i},n,a)=>{if(s&&i instanceof Blob){if(n){return a(i)}else{return h(i,a)}}else if(r&&(i instanceof ArrayBuffer||o(i))){if(n){return a(i)}else{return h(new Blob([i]),a)}}return a(e[t]+(i||""))};const h=(t,e)=>{const i=new FileReader;i.onload=function(){const t=i.result.split(",")[1];e("b"+(t||""))};return i.readAsDataURL(t)};function c(t){if(t instanceof Uint8Array){return t}else if(t instanceof ArrayBuffer){return new Uint8Array(t)}else{return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}}let l;function u(t,e){if(s&&t.data instanceof Blob){return t.data.arrayBuffer().then(c).then(e)}else if(r&&(t.data instanceof ArrayBuffer||o(t.data))){return e(c(t.data))}a(t,false,(t=>{if(!l){l=new TextEncoder}e(l.encode(t))}))}const f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const d=typeof Uint8Array==="undefined"?[]:new Uint8Array(256);for(let t=0;t<f.length;t++){d[f.charCodeAt(t)]=t}const p=t=>{let e=t.length*.75,i=t.length,n,s=0,r,o,a,h;if(t[t.length-1]==="="){e--;if(t[t.length-2]==="="){e--}}const c=new ArrayBuffer(e),l=new Uint8Array(c);for(n=0;n<i;n+=4){r=d[t.charCodeAt(n)];o=d[t.charCodeAt(n+1)];a=d[t.charCodeAt(n+2)];h=d[t.charCodeAt(n+3)];l[s++]=r<<2|o>>4;l[s++]=(o&15)<<4|a>>2;l[s++]=(a&3)<<6|h&63}return c};const b=typeof ArrayBuffer==="function";const g=(t,e)=>{if(typeof t!=="string"){return{type:"message",data:x(t,e)}}const s=t.charAt(0);if(s==="b"){return{type:"message",data:m(t.substring(1),e)}}const r=i[s];if(!r){return n}return t.length>1?{type:i[s],data:t.substring(1)}:{type:i[s]}};const m=(t,e)=>{if(b){const i=p(t);return x(i,e)}else{return{base64:true,data:t}}};const x=(t,e)=>{switch(e){case"blob":if(t instanceof Blob){return t}else{return new Blob([t])}case"arraybuffer":default:if(t instanceof ArrayBuffer){return t}else{return t.buffer}}};const v=String.fromCharCode(30);const y=(t,e)=>{const i=t.length;const n=new Array(i);let s=0;t.forEach(((t,r)=>{a(t,false,(t=>{n[r]=t;if(++s===i){e(n.join(v))}}))}))};const w=(t,e)=>{const i=t.split(v);const n=[];for(let t=0;t<i.length;t++){const s=g(i[t],e);n.push(s);if(s.type==="error"){break}}return n};function k(){return new TransformStream({transform(t,e){u(t,(i=>{const n=i.length;let s;if(n<126){s=new Uint8Array(1);new DataView(s.buffer).setUint8(0,n)}else if(n<65536){s=new Uint8Array(3);const t=new DataView(s.buffer);t.setUint8(0,126);t.setUint16(1,n)}else{s=new Uint8Array(9);const t=new DataView(s.buffer);t.setUint8(0,127);t.setBigUint64(1,BigInt(n))}if(t.data&&typeof t.data!=="string"){s[0]|=128}e.enqueue(s);e.enqueue(i)}))}})}let j;function A(t){return t.reduce(((t,e)=>t+e.length),0)}function E(t,e){if(t[0].length===e){return t.shift()}const i=new Uint8Array(e);let n=0;for(let s=0;s<e;s++){i[s]=t[0][n++];if(n===t[0].length){t.shift();n=0}}if(t.length&&n<t[0].length){t[0]=t[0].slice(n)}return i}function O(t,e){if(!j){j=new TextDecoder}const i=[];let s=0;let r=-1;let o=false;return new TransformStream({transform(a,h){i.push(a);while(true){if(s===0){if(A(i)<1){break}const t=E(i,1);o=(t[0]&128)===128;r=t[0]&127;if(r<126){s=3}else if(r===126){s=1}else{s=2}}else if(s===1){if(A(i)<2){break}const t=E(i,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0);s=3}else if(s===2){if(A(i)<8){break}const t=E(i,8);const e=new DataView(t.buffer,t.byteOffset,t.length);const o=e.getUint32(0);if(o>Math.pow(2,53-32)-1){h.enqueue(n);break}r=o*Math.pow(2,32)+e.getUint32(4);s=3}else{if(A(i)<r){break}const t=E(i,r);h.enqueue(g(o?t:j.decode(t),e));s=0}if(r===0||r>t){h.enqueue(n);break}}}})}const B=4;function T(t){if(t)return C(t)}function C(t){for(var e in T.prototype){t[e]=T.prototype[e]}return t}T.prototype.on=T.prototype.addEventListener=function(t,e){this._callbacks=this._callbacks||{};(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e);return this};T.prototype.once=function(t,e){function i(){this.off(t,i);e.apply(this,arguments)}i.fn=e;this.on(t,i);return this};T.prototype.off=T.prototype.removeListener=T.prototype.removeAllListeners=T.prototype.removeEventListener=function(t,e){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length){delete this._callbacks["$"+t];return this}var n;for(var s=0;s<i.length;s++){n=i[s];if(n===e||n.fn===e){i.splice(s,1);break}}if(i.length===0){delete this._callbacks["$"+t]}return this};T.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=new Array(arguments.length-1),i=this._callbacks["$"+t];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}if(i){i=i.slice(0);for(var n=0,s=i.length;n<s;++n){i[n].apply(this,e)}}return this};T.prototype.emitReserved=T.prototype.emit;T.prototype.listeners=function(t){this._callbacks=this._callbacks||{};return this._callbacks["$"+t]||[]};T.prototype.hasListeners=function(t){return!!this.listeners(t).length};const S=(()=>{if(typeof self!=="undefined"){return self}else if(typeof window!=="undefined"){return window}else{return Function("return this")()}})();function I(t,...e){return e.reduce(((e,i)=>{if(t.hasOwnProperty(i)){e[i]=t[i]}return e}),{})}const P=S.setTimeout;const N=S.clearTimeout;function M(t,e){if(e.useNativeTimers){t.setTimeoutFn=P.bind(S);t.clearTimeoutFn=N.bind(S)}else{t.setTimeoutFn=S.setTimeout.bind(S);t.clearTimeoutFn=S.clearTimeout.bind(S)}}const _=1.33;function U(t){if(typeof t==="string"){return D(t)}return Math.ceil((t.byteLength||t.size)*_)}function D(t){let e=0,i=0;for(let n=0,s=t.length;n<s;n++){e=t.charCodeAt(n);if(e<128){i+=1}else if(e<2048){i+=2}else if(e<55296||e>=57344){i+=3}else{n++;i+=4}}return i}function L(t){let e="";for(let i in t){if(t.hasOwnProperty(i)){if(e.length)e+="&";e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])}}return e}function R(t){let e={};let i=t.split("&");for(let t=0,n=i.length;t<n;t++){let n=i[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}class $ extends Error{constructor(t,e,i){super(t);this.description=e;this.context=i;this.type="TransportError"}}class z extends T{constructor(t){super();this.writable=false;M(this,t);this.opts=t;this.query=t.query;this.socket=t.socket}onError(t,e,i){super.emitReserved("error",new $(t,e,i));return this}open(){this.readyState="opening";this.doOpen();return this}close(){if(this.readyState==="opening"||this.readyState==="open"){this.doClose();this.onClose()}return this}send(t){if(this.readyState==="open"){this.write(t)}}onOpen(){this.readyState="open";this.writable=true;super.emitReserved("open")}onData(t){const e=g(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed";super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){if(this.opts.port&&(this.opts.secure&&Number(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)){return":"+this.opts.port}else{return""}}_query(t){const e=L(t);return e.length?"?"+e:""}}const q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),F=64,K={};let V=0,H=0,X;function J(t){let e="";do{e=q[t%F]+e;t=Math.floor(t/F)}while(t>0);return e}function W(){const t=J(+new Date);if(t!==X)return V=0,X=t;return t+"."+J(V++)}for(;H<F;H++)K[q[H]]=H;let Q=false;try{Q=typeof XMLHttpRequest!=="undefined"&&"withCredentials"in new XMLHttpRequest}catch(t){}const Y=Q;function G(t){const e=t.xdomain;try{if("undefined"!==typeof XMLHttpRequest&&(!e||Y)){return new XMLHttpRequest}}catch(t){}if(!e){try{return new(S[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}function Z(){}function tt(){}const et=function(){const t=new G({xdomain:false});return null!=t.responseType}();class it extends z{constructor(t){super(t);this.polling=false;if(typeof location!=="undefined"){const e="https:"===location.protocol;let i=location.port;if(!i){i=e?"443":"80"}this.xd=typeof location!=="undefined"&&t.hostname!==location.hostname||i!==t.port}const e=t&&t.forceBase64;this.supportsBinary=et&&!e;if(this.opts.withCredentials){this.cookieJar=Z()}}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused";t()};if(this.polling||!this.writable){let t=0;if(this.polling){t++;this.once("pollComplete",(function(){--t||e()}))}if(!this.writable){t++;this.once("drain",(function(){--t||e()}))}}else{e()}}poll(){this.polling=true;this.doPoll();this.emitReserved("poll")}onData(t){const e=t=>{if("opening"===this.readyState&&t.type==="open"){this.onOpen()}if("close"===t.type){this.onClose({description:"transport closed by the server"});return false}this.onPacket(t)};w(t,this.socket.binaryType).forEach(e);if("closed"!==this.readyState){this.polling=false;this.emitReserved("pollComplete");if("open"===this.readyState){this.poll()}}}doClose(){const t=()=>{this.write([{type:"close"}])};if("open"===this.readyState){t()}else{this.once("open",t)}}write(t){this.writable=false;y(t,(t=>{this.doWrite(t,(()=>{this.writable=true;this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http";const e=this.query||{};if(false!==this.opts.timestampRequests){e[this.opts.timestampParam]=W()}if(!this.supportsBinary&&!e.sid){e.b64=1}return this.createUri(t,e)}request(t={}){Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts);return new nt(this.uri(),t)}doWrite(t,e){const i=this.request({method:"POST",data:t});i.on("success",e);i.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this));t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)}));this.pollXhr=t}}class nt extends T{constructor(t,e){super();M(this,e);this.opts=e;this.method=e.method||"GET";this.uri=t;this.data=undefined!==e.data?e.data:null;this.create()}create(){var t;const e=I(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const i=this.xhr=new G(e);try{i.open(this.method,this.uri,true);try{if(this.opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(true);for(let t in this.opts.extraHeaders){if(this.opts.extraHeaders.hasOwnProperty(t)){i.setRequestHeader(t,this.opts.extraHeaders[t])}}}}catch(t){}if("POST"===this.method){try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}}try{i.setRequestHeader("Accept","*/*")}catch(t){}(t=this.opts.cookieJar)===null||t===void 0?void 0:t.addCookies(i);if("withCredentials"in i){i.withCredentials=this.opts.withCredentials}if(this.opts.requestTimeout){i.timeout=this.opts.requestTimeout}i.onreadystatechange=()=>{var t;if(i.readyState===3){(t=this.opts.cookieJar)===null||t===void 0?void 0:t.parseCookies(i)}if(4!==i.readyState)return;if(200===i.status||1223===i.status){this.onLoad()}else{this.setTimeoutFn((()=>{this.onError(typeof i.status==="number"?i.status:0)}),0)}};i.send(this.data)}catch(t){this.setTimeoutFn((()=>{this.onError(t)}),0);return}if(typeof document!=="undefined"){this.index=nt.requestsCount++;nt.requests[this.index]=this}}onError(t){this.emitReserved("error",t,this.xhr);this.cleanup(true)}cleanup(t){if("undefined"===typeof this.xhr||null===this.xhr){return}this.xhr.onreadystatechange=tt;if(t){try{this.xhr.abort()}catch(t){}}if(typeof document!=="undefined"){delete nt.requests[this.index]}this.xhr=null}onLoad(){const t=this.xhr.responseText;if(t!==null){this.emitReserved("data",t);this.emitReserved("success");this.cleanup()}}abort(){this.cleanup()}}nt.requestsCount=0;nt.requests={};if(typeof document!=="undefined"){if(typeof attachEvent==="function"){attachEvent("onunload",st)}else if(typeof addEventListener==="function"){const t="onpagehide"in S?"pagehide":"unload";addEventListener(t,st,false)}}function st(){for(let t in nt.requests){if(nt.requests.hasOwnProperty(t)){nt.requests[t].abort()}}}const rt=(()=>{const t=typeof Promise==="function"&&typeof Promise.resolve==="function";if(t){return t=>Promise.resolve().then(t)}else{return(t,e)=>e(t,0)}})();const ot=S.WebSocket||S.MozWebSocket;const at="arraybuffer";const ht=typeof navigator!=="undefined"&&typeof navigator.product==="string"&&navigator.product.toLowerCase()==="reactnative";class ct extends z{constructor(t){super(t);this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check()){return}const t=this.uri();const e=this.opts.protocols;const i=ht?{}:I(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");if(this.opts.extraHeaders){i.headers=this.opts.extraHeaders}try{this.ws=!ht?e?new ot(t,e):new ot(t):new ot(t,e,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType;this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{if(this.opts.autoUnref){this.ws._socket.unref()}this.onOpen()};this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t});this.ws.onmessage=t=>this.onData(t.data);this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=false;for(let e=0;e<t.length;e++){const i=t[e];const n=e===t.length-1;a(i,this.supportsBinary,(t=>{try{{this.ws.send(t)}}catch(t){}if(n){rt((()=>{this.writable=true;this.emitReserved("drain")}),this.setTimeoutFn)}}))}}doClose(){if(typeof this.ws!=="undefined"){this.ws.close();this.ws=null}}uri(){const t=this.opts.secure?"wss":"ws";const e=this.query||{};if(this.opts.timestampRequests){e[this.opts.timestampParam]=W()}if(!this.supportsBinary){e.b64=1}return this.createUri(t,e)}check(){return!!ot}}class lt extends z{get name(){return"webtransport"}doOpen(){if(typeof WebTransport!=="function"){return}this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]);this.transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)}));this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=O(Number.MAX_SAFE_INTEGER,this.socket.binaryType);const i=t.readable.pipeThrough(e).getReader();const n=k();n.readable.pipeTo(t.writable);this.writer=n.writable.getWriter();const s=()=>{i.read().then((({done:t,value:e})=>{if(t){return}this.onPacket(e);s()})).catch((t=>{}))};s();const r={type:"open"};if(this.query.sid){r.data=`{"sid":"${this.query.sid}"}`}this.writer.write(r).then((()=>this.onOpen()))}))}))}write(t){this.writable=false;for(let e=0;e<t.length;e++){const i=t[e];const n=e===t.length-1;this.writer.write(i).then((()=>{if(n){rt((()=>{this.writable=true;this.emitReserved("drain")}),this.setTimeoutFn)}}))}}doClose(){var t;(t=this.transport)===null||t===void 0?void 0:t.close()}}const ut={websocket:ct,webtransport:lt,polling:it};const ft=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;const dt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pt(t){if(t.length>2e3){throw"URI too long"}const e=t,i=t.indexOf("["),n=t.indexOf("]");if(i!=-1&&n!=-1){t=t.substring(0,i)+t.substring(i,n).replace(/:/g,";")+t.substring(n,t.length)}let s=ft.exec(t||""),r={},o=14;while(o--){r[dt[o]]=s[o]||""}if(i!=-1&&n!=-1){r.source=e;r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":");r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":");r.ipv6uri=true}r.pathNames=bt(r,r["path"]);r.queryKey=gt(r,r["query"]);return r}function bt(t,e){const i=/\/{2,9}/g,n=e.replace(i,"/").split("/");if(e.slice(0,1)=="/"||e.length===0){n.splice(0,1)}if(e.slice(-1)=="/"){n.splice(n.length-1,1)}return n}function gt(t,e){const i={};e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){if(e){i[e]=n}}));return i}class mt extends T{constructor(t,e={}){super();this.binaryType=at;this.writeBuffer=[];if(t&&"object"===typeof t){e=t;t=null}if(t){t=pt(t);e.hostname=t.host;e.secure=t.protocol==="https"||t.protocol==="wss";e.port=t.port;if(t.query)e.query=t.query}else if(e.host){e.hostname=pt(e.host).host}M(this,e);this.secure=null!=e.secure?e.secure:typeof location!=="undefined"&&"https:"===location.protocol;if(e.hostname&&!e.port){e.port=this.secure?"443":"80"}this.hostname=e.hostname||(typeof location!=="undefined"?location.hostname:"localhost");this.port=e.port||(typeof location!=="undefined"&&location.port?location.port:this.secure?"443":"80");this.transports=e.transports||["polling","websocket","webtransport"];this.writeBuffer=[];this.prevBufferLen=0;this.opts=Object.assign({path:"/engine.io",agent:false,withCredentials:false,upgrade:true,timestampParam:"t",rememberUpgrade:false,addTrailingSlash:true,rejectUnauthorized:true,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:false},e);this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":"");if(typeof this.opts.query==="string"){this.opts.query=R(this.opts.query)}this.id=null;this.upgrades=null;this.pingInterval=null;this.pingTimeout=null;this.pingTimeoutTimer=null;if(typeof addEventListener==="function"){if(this.opts.closeOnBeforeunload){this.beforeunloadEventListener=()=>{if(this.transport){this.transport.removeAllListeners();this.transport.close()}};addEventListener("beforeunload",this.beforeunloadEventListener,false)}if(this.hostname!=="localhost"){this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})};addEventListener("offline",this.offlineEventListener,false)}}this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=B;e.transport=t;if(this.id)e.sid=this.id;const i=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new ut[t](i)}open(){let t;if(this.opts.rememberUpgrade&&mt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1){t="websocket"}else if(0===this.transports.length){this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);return}else{t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){this.transports.shift();this.open();return}t.open();this.setTransport(t)}setTransport(t){if(this.transport){this.transport.removeAllListeners()}this.transport=t;t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){let e=this.createTransport(t);let i=false;mt.priorWebsocketSuccess=false;const n=()=>{if(i)return;e.send([{type:"ping",data:"probe"}]);e.once("packet",(t=>{if(i)return;if("pong"===t.type&&"probe"===t.data){this.upgrading=true;this.emitReserved("upgrading",e);if(!e)return;mt.priorWebsocketSuccess="websocket"===e.name;this.transport.pause((()=>{if(i)return;if("closed"===this.readyState)return;c();this.setTransport(e);e.send([{type:"upgrade"}]);this.emitReserved("upgrade",e);e=null;this.upgrading=false;this.flush()}))}else{const t=new Error("probe error");t.transport=e.name;this.emitReserved("upgradeError",t)}}))};function s(){if(i)return;i=true;c();e.close();e=null}const r=t=>{const i=new Error("probe error: "+t);i.transport=e.name;s();this.emitReserved("upgradeError",i)};function o(){r("transport closed")}function a(){r("socket closed")}function h(t){if(e&&t.name!==e.name){s()}}const c=()=>{e.removeListener("open",n);e.removeListener("error",r);e.removeListener("close",o);this.off("close",a);this.off("upgrading",h)};e.once("open",n);e.once("error",r);e.once("close",o);this.once("close",a);this.once("upgrading",h);if(this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"){this.setTimeoutFn((()=>{if(!i){e.open()}}),200)}else{e.open()}}onOpen(){this.readyState="open";mt.priorWebsocketSuccess="websocket"===this.transport.name;this.emitReserved("open");this.flush();if("open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++){this.probe(this.upgrades[t])}}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){this.emitReserved("packet",t);this.emitReserved("heartbeat");this.resetPingTimeout();switch(t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong");this.emitReserved("ping");this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data;this.onError(e);break;case"message":this.emitReserved("data",t.data);this.emitReserved("message",t.data);break}}}onHandshake(t){this.emitReserved("handshake",t);this.id=t.sid;this.transport.query.sid=t.sid;this.upgrades=this.filterUpgrades(t.upgrades);this.pingInterval=t.pingInterval;this.pingTimeout=t.pingTimeout;this.maxPayload=t.maxPayload;this.onOpen();if("closed"===this.readyState)return;this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer);this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout);if(this.opts.autoUnref){this.pingTimeoutTimer.unref()}}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;if(0===this.writeBuffer.length){this.emitReserved("drain")}else{this.flush()}}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t);this.prevBufferLen=t.length;this.emitReserved("flush")}}getWritablePackets(){const t=this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1;if(!t){return this.writeBuffer}let e=1;for(let t=0;t<this.writeBuffer.length;t++){const i=this.writeBuffer[t].data;if(i){e+=U(i)}if(t>0&&e>this.maxPayload){return this.writeBuffer.slice(0,t)}e+=2}return this.writeBuffer}write(t,e,i){this.sendPacket("message",t,e,i);return this}send(t,e,i){this.sendPacket("message",t,e,i);return this}sendPacket(t,e,i,n){if("function"===typeof e){n=e;e=undefined}if("function"===typeof i){n=i;i=null}if("closing"===this.readyState||"closed"===this.readyState){return}i=i||{};i.compress=false!==i.compress;const s={type:t,data:e,options:i};this.emitReserved("packetCreate",s);this.writeBuffer.push(s);if(n)this.once("flush",n);this.flush()}close(){const t=()=>{this.onClose("forced close");this.transport.close()};const e=()=>{this.off("upgrade",e);this.off("upgradeError",e);t()};const i=()=>{this.once("upgrade",e);this.once("upgradeError",e)};if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";if(this.writeBuffer.length){this.once("drain",(()=>{if(this.upgrading){i()}else{t()}}))}else if(this.upgrading){i()}else{t()}}return this}onError(t){mt.priorWebsocketSuccess=false;this.emitReserved("error",t);this.onClose("transport error",t)}onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){this.clearTimeoutFn(this.pingTimeoutTimer);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();if(typeof removeEventListener==="function"){removeEventListener("beforeunload",this.beforeunloadEventListener,false);removeEventListener("offline",this.offlineEventListener,false)}this.readyState="closed";this.id=null;this.emitReserved("close",t,e);this.writeBuffer=[];this.prevBufferLen=0}}filterUpgrades(t){const e=[];let i=0;const n=t.length;for(;i<n;i++){if(~this.transports.indexOf(t[i]))e.push(t[i])}return e}}mt.protocol=B;function xt(t,e="",i){let n=t;i=i||typeof location!=="undefined"&&location;if(null==t)t=i.protocol+"//"+i.host;if(typeof t==="string"){if("/"===t.charAt(0)){if("/"===t.charAt(1)){t=i.protocol+t}else{t=i.host+t}}if(!/^(https?|wss?):\/\//.test(t)){if("undefined"!==typeof i){t=i.protocol+"//"+t}else{t="https://"+t}}n=pt(t)}if(!n.port){if(/^(http|ws)$/.test(n.protocol)){n.port="80"}else if(/^(http|ws)s$/.test(n.protocol)){n.port="443"}}n.path=n.path||"/";const s=n.host.indexOf(":")!==-1;const r=s?"["+n.host+"]":n.host;n.id=n.protocol+"://"+r+":"+n.port+e;n.href=n.protocol+"://"+r+(i&&i.port===n.port?"":":"+n.port);return n}const vt=typeof ArrayBuffer==="function";const yt=t=>typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer;const wt=Object.prototype.toString;const kt=typeof Blob==="function"||typeof Blob!=="undefined"&&wt.call(Blob)==="[object BlobConstructor]";const jt=typeof File==="function"||typeof File!=="undefined"&&wt.call(File)==="[object FileConstructor]";function At(t){return vt&&(t instanceof ArrayBuffer||yt(t))||kt&&t instanceof Blob||jt&&t instanceof File}function Et(t,e){if(!t||typeof t!=="object"){return false}if(Array.isArray(t)){for(let e=0,i=t.length;e<i;e++){if(Et(t[e])){return true}}return false}if(At(t)){return true}if(t.toJSON&&typeof t.toJSON==="function"&&arguments.length===1){return Et(t.toJSON(),true)}for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)&&Et(t[e])){return true}}return false}function Ot(t){const e=[];const i=t.data;const n=t;n.data=Bt(i,e);n.attachments=e.length;return{packet:n,buffers:e}}function Bt(t,e){if(!t)return t;if(At(t)){const i={_placeholder:true,num:e.length};e.push(t);return i}else if(Array.isArray(t)){const i=new Array(t.length);for(let n=0;n<t.length;n++){i[n]=Bt(t[n],e)}return i}else if(typeof t==="object"&&!(t instanceof Date)){const i={};for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)){i[n]=Bt(t[n],e)}}return i}return t}function Tt(t,e){t.data=Ct(t.data,e);delete t.attachments;return t}function Ct(t,e){if(!t)return t;if(t&&t._placeholder===true){const i=typeof t.num==="number"&&t.num>=0&&t.num<e.length;if(i){return e[t.num]}else{throw new Error("illegal attachments")}}else if(Array.isArray(t)){for(let i=0;i<t.length;i++){t[i]=Ct(t[i],e)}}else if(typeof t==="object"){for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)){t[i]=Ct(t[i],e)}}}return t}const St=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];const It=5;var Pt;(function(t){t[t["CONNECT"]=0]="CONNECT";t[t["DISCONNECT"]=1]="DISCONNECT";t[t["EVENT"]=2]="EVENT";t[t["ACK"]=3]="ACK";t[t["CONNECT_ERROR"]=4]="CONNECT_ERROR";t[t["BINARY_EVENT"]=5]="BINARY_EVENT";t[t["BINARY_ACK"]=6]="BINARY_ACK"})(Pt||(Pt={}));class Nt{constructor(t){this.replacer=t}encode(t){if(t.type===Pt.EVENT||t.type===Pt.ACK){if(Et(t)){return this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}}return[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;if(t.type===Pt.BINARY_EVENT||t.type===Pt.BINARY_ACK){e+=t.attachments+"-"}if(t.nsp&&"/"!==t.nsp){e+=t.nsp+","}if(null!=t.id){e+=t.id}if(null!=t.data){e+=JSON.stringify(t.data,this.replacer)}return e}encodeAsBinary(t){const e=Ot(t);const i=this.encodeAsString(e.packet);const n=e.buffers;n.unshift(i);return n}}function Mt(t){return Object.prototype.toString.call(t)==="[object Object]"}class _t extends T{constructor(t){super();this.reviver=t}add(t){let e;if(typeof t==="string"){if(this.reconstructor){throw new Error("got plaintext data when reconstructing a packet")}e=this.decodeString(t);const i=e.type===Pt.BINARY_EVENT;if(i||e.type===Pt.BINARY_ACK){e.type=i?Pt.EVENT:Pt.ACK;this.reconstructor=new Ut(e);if(e.attachments===0){super.emitReserved("decoded",e)}}else{super.emitReserved("decoded",e)}}else if(At(t)||t.base64){if(!this.reconstructor){throw new Error("got binary data when not reconstructing a packet")}else{e=this.reconstructor.takeBinaryData(t);if(e){this.reconstructor=null;super.emitReserved("decoded",e)}}}else{throw new Error("Unknown type: "+t)}}decodeString(t){let e=0;const i={type:Number(t.charAt(0))};if(Pt[i.type]===undefined){throw new Error("unknown packet type "+i.type)}if(i.type===Pt.BINARY_EVENT||i.type===Pt.BINARY_ACK){const n=e+1;while(t.charAt(++e)!=="-"&&e!=t.length){}const s=t.substring(n,e);if(s!=Number(s)||t.charAt(e)!=="-"){throw new Error("Illegal attachments")}i.attachments=Number(s)}if("/"===t.charAt(e+1)){const n=e+1;while(++e){const i=t.charAt(e);if(","===i)break;if(e===t.length)break}i.nsp=t.substring(n,e)}else{i.nsp="/"}const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;while(++e){const i=t.charAt(e);if(null==i||Number(i)!=i){--e;break}if(e===t.length)break}i.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(_t.isPayloadValid(i.type,n)){i.data=n}else{throw new Error("invalid payload")}}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return false}}static isPayloadValid(t,e){switch(t){case Pt.CONNECT:return Mt(e);case Pt.DISCONNECT:return e===undefined;case Pt.CONNECT_ERROR:return typeof e==="string"||Mt(e);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]==="number"||typeof e[0]==="string"&&St.indexOf(e[0])===-1);case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){if(this.reconstructor){this.reconstructor.finishedReconstruction();this.reconstructor=null}}}class Ut{constructor(t){this.packet=t;this.buffers=[];this.reconPack=t}takeBinaryData(t){this.buffers.push(t);if(this.buffers.length===this.reconPack.attachments){const t=Tt(this.reconPack,this.buffers);this.finishedReconstruction();return t}return null}finishedReconstruction(){this.reconPack=null;this.buffers=[]}}const Dt=Object.freeze({__proto__:null,protocol:It,get PacketType(){return Pt},Encoder:Nt,Decoder:_t});function Lt(t,e,i){t.on(e,i);return function n(){t.off(e,i)}}const Rt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $t extends T{constructor(t,e,i){super();this.connected=false;this.recovered=false;this.receiveBuffer=[];this.sendBuffer=[];this._queue=[];this._queueSeq=0;this.ids=0;this.acks={};this.flags={};this.io=t;this.nsp=e;if(i&&i.auth){this.auth=i.auth}this._opts=Object.assign({},i);if(this.io._autoConnect)this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Lt(t,"open",this.onopen.bind(this)),Lt(t,"packet",this.onpacket.bind(this)),Lt(t,"error",this.onerror.bind(this)),Lt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){if(this.connected)return this;this.subEvents();if(!this.io["_reconnecting"])this.io.open();if("open"===this.io._readyState)this.onopen();return this}open(){return this.connect()}send(...t){t.unshift("message");this.emit.apply(this,t);return this}emit(t,...e){if(Rt.hasOwnProperty(t)){throw new Error('"'+t.toString()+'" is a reserved event name')}e.unshift(t);if(this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile){this._addToQueue(e);return this}const i={type:Pt.EVENT,data:e};i.options={};i.options.compress=this.flags.compress!==false;if("function"===typeof e[e.length-1]){const t=this.ids++;const n=e.pop();this._registerAckCallback(t,n);i.id=t}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;const s=this.flags.volatile&&(!n||!this.connected);if(s);else if(this.connected){this.notifyOutgoingListeners(i);this.packet(i)}else{this.sendBuffer.push(i)}this.flags={};return this}_registerAckCallback(t,e){var i;const n=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(n===undefined){this.acks[t]=e;return}const s=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++){if(this.sendBuffer[e].id===t){this.sendBuffer.splice(e,1)}}e.call(this,new Error("operation has timed out"))}),n);const r=(...t)=>{this.io.clearTimeoutFn(s);e.apply(this,t)};r.withError=true;this.acks[t]=r}emitWithAck(t,...e){return new Promise(((i,n)=>{const s=(t,e)=>t?n(t):i(e);s.withError=true;e.push(s);this.emit(t,...e)}))}_addToQueue(t){let e;if(typeof t[t.length-1]==="function"){e=t.pop()}const i={id:this._queueSeq++,tryCount:0,pending:false,args:t,flags:Object.assign({fromQueue:true},this.flags)};t.push(((t,...n)=>{if(i!==this._queue[0]){return}const s=t!==null;if(s){if(i.tryCount>this._opts.retries){this._queue.shift();if(e){e(t)}}}else{this._queue.shift();if(e){e(null,...n)}}i.pending=false;return this._drainQueue()}));this._queue.push(i);this._drainQueue()}_drainQueue(t=false){if(!this.connected||this._queue.length===0){return}const e=this._queue[0];if(e.pending&&!t){return}e.pending=true;e.tryCount++;this.flags=e.flags;this.emit.apply(this,e.args)}packet(t){t.nsp=this.nsp;this.io._packet(t)}onopen(){if(typeof this.auth=="function"){this.auth((t=>{this._sendConnectPacket(t)}))}else{this._sendConnectPacket(this.auth)}}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){if(!this.connected){this.emitReserved("connect_error",t)}}onclose(t,e){this.connected=false;delete this.id;this.emitReserved("disconnect",t,e);this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{const e=this.sendBuffer.some((e=>String(e.id)===t));if(!e){const e=this.acks[t];delete this.acks[t];if(e.withError){e.call(this,new Error("socket has been disconnected"))}}}))}onpacket(t){const e=t.nsp===this.nsp;if(!e)return;switch(t.type){case Pt.CONNECT:if(t.data&&t.data.sid){this.onconnect(t.data.sid,t.data.pid)}else{this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"))}break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data;this.emitReserved("connect_error",e);break}}onevent(t){const e=t.data||[];if(null!=t.id){e.push(this.ack(t.id))}if(this.connected){this.emitEvent(e)}else{this.receiveBuffer.push(Object.freeze(e))}}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const i of e){i.apply(this,t)}}super.emit.apply(this,t);if(this._pid&&t.length&&typeof t[t.length-1]==="string"){this._lastOffset=t[t.length-1]}}ack(t){const e=this;let i=false;return function(...n){if(i)return;i=true;e.packet({type:Pt.ACK,id:t,data:n})}}onack(t){const e=this.acks[t.id];if(typeof e!=="function"){return}delete this.acks[t.id];if(e.withError){t.data.unshift(null)}e.apply(this,t.data)}onconnect(t,e){this.id=t;this.recovered=e&&this._pid===e;this._pid=e;this.connected=true;this.emitBuffered();this.emitReserved("connect");this._drainQueue(true)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t)));this.receiveBuffer=[];this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t);this.packet(t)}));this.sendBuffer=[]}ondisconnect(){this.destroy();this.onclose("io server disconnect")}destroy(){if(this.subs){this.subs.forEach((t=>t()));this.subs=undefined}this.io["_destroy"](this)}disconnect(){if(this.connected){this.packet({type:Pt.DISCONNECT})}this.destroy();if(this.connected){this.onclose("io client disconnect")}return this}close(){return this.disconnect()}compress(t){this.flags.compress=t;return this}get volatile(){this.flags.volatile=true;return this}timeout(t){this.flags.timeout=t;return this}onAny(t){this._anyListeners=this._anyListeners||[];this._anyListeners.push(t);return this}prependAny(t){this._anyListeners=this._anyListeners||[];this._anyListeners.unshift(t);return this}offAny(t){if(!this._anyListeners){return this}if(t){const e=this._anyListeners;for(let i=0;i<e.length;i++){if(t===e[i]){e.splice(i,1);return this}}}else{this._anyListeners=[]}return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){this._anyOutgoingListeners=this._anyOutgoingListeners||[];this._anyOutgoingListeners.push(t);return this}prependAnyOutgoing(t){this._anyOutgoingListeners=this._anyOutgoingListeners||[];this._anyOutgoingListeners.unshift(t);return this}offAnyOutgoing(t){if(!this._anyOutgoingListeners){return this}if(t){const e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++){if(t===e[i]){e.splice(i,1);return this}}}else{this._anyOutgoingListeners=[]}return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const i of e){i.apply(this,t.data)}}}}function zt(t){t=t||{};this.ms=t.min||100;this.max=t.max||1e4;this.factor=t.factor||2;this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0;this.attempts=0}zt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random();var i=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};zt.prototype.reset=function(){this.attempts=0};zt.prototype.setMin=function(t){this.ms=t};zt.prototype.setMax=function(t){this.max=t};zt.prototype.setJitter=function(t){this.jitter=t};class qt extends T{constructor(t,e){var i;super();this.nsps={};this.subs=[];if(t&&"object"===typeof t){e=t;t=undefined}e=e||{};e.path=e.path||"/socket.io";this.opts=e;M(this,e);this.reconnection(e.reconnection!==false);this.reconnectionAttempts(e.reconnectionAttempts||Infinity);this.reconnectionDelay(e.reconnectionDelay||1e3);this.reconnectionDelayMax(e.reconnectionDelayMax||5e3);this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5);this.backoff=new zt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()});this.timeout(null==e.timeout?2e4:e.timeout);this._readyState="closed";this.uri=t;const n=e.parser||Dt;this.encoder=new n.Encoder;this.decoder=new n.Decoder;this._autoConnect=e.autoConnect!==false;if(this._autoConnect)this.open()}reconnection(t){if(!arguments.length)return this._reconnection;this._reconnection=!!t;return this}reconnectionAttempts(t){if(t===undefined)return this._reconnectionAttempts;this._reconnectionAttempts=t;return this}reconnectionDelay(t){var e;if(t===undefined)return this._reconnectionDelay;this._reconnectionDelay=t;(e=this.backoff)===null||e===void 0?void 0:e.setMin(t);return this}randomizationFactor(t){var e;if(t===undefined)return this._randomizationFactor;this._randomizationFactor=t;(e=this.backoff)===null||e===void 0?void 0:e.setJitter(t);return this}reconnectionDelayMax(t){var e;if(t===undefined)return this._reconnectionDelayMax;this._reconnectionDelayMax=t;(e=this.backoff)===null||e===void 0?void 0:e.setMax(t);return this}timeout(t){if(!arguments.length)return this._timeout;this._timeout=t;return this}maybeReconnectOnOpen(){if(!this._reconnecting&&this._reconnection&&this.backoff.attempts===0){this.reconnect()}}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new mt(this.uri,this.opts);const e=this.engine;const i=this;this._readyState="opening";this.skipReconnect=false;const n=Lt(e,"open",(function(){i.onopen();t&&t()}));const s=e=>{this.cleanup();this._readyState="closed";this.emitReserved("error",e);if(t){t(e)}else{this.maybeReconnectOnOpen()}};const r=Lt(e,"error",s);if(false!==this._timeout){const t=this._timeout;const i=this.setTimeoutFn((()=>{n();s(new Error("timeout"));e.close()}),t);if(this.opts.autoUnref){i.unref()}this.subs.push((()=>{this.clearTimeoutFn(i)}))}this.subs.push(n);this.subs.push(r);return this}connect(t){return this.open(t)}onopen(){this.cleanup();this._readyState="open";this.emitReserved("open");const t=this.engine;this.subs.push(Lt(t,"ping",this.onping.bind(this)),Lt(t,"data",this.ondata.bind(this)),Lt(t,"error",this.onerror.bind(this)),Lt(t,"close",this.onclose.bind(this)),Lt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){rt((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];if(!i){i=new $t(this,t,e);this.nsps[t]=i}else if(this._autoConnect&&!i.active){i.connect()}return i}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){const e=this.nsps[t];if(e.active){return}}this._close()}_packet(t){const e=this.encoder.encode(t);for(let i=0;i<e.length;i++){this.engine.write(e[i],t.options)}}cleanup(){this.subs.forEach((t=>t()));this.subs.length=0;this.decoder.destroy()}_close(){this.skipReconnect=true;this._reconnecting=false;this.onclose("forced close");if(this.engine)this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup();this.backoff.reset();this._readyState="closed";this.emitReserved("close",t,e);if(this._reconnection&&!this.skipReconnect){this.reconnect()}}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts){this.backoff.reset();this.emitReserved("reconnect_failed");this._reconnecting=false}else{const e=this.backoff.duration();this._reconnecting=true;const i=this.setTimeoutFn((()=>{if(t.skipReconnect)return;this.emitReserved("reconnect_attempt",t.backoff.attempts);if(t.skipReconnect)return;t.open((e=>{if(e){t._reconnecting=false;t.reconnect();this.emitReserved("reconnect_error",e)}else{t.onreconnect()}}))}),e);if(this.opts.autoUnref){i.unref()}this.subs.push((()=>{this.clearTimeoutFn(i)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=false;this.backoff.reset();this.emitReserved("reconnect",t)}}const Ft={};function Kt(t,e){if(typeof t==="object"){e=t;t=undefined}e=e||{};const i=xt(t,e.path||"/socket.io");const n=i.source;const s=i.id;const r=i.path;const o=Ft[s]&&r in Ft[s]["nsps"];const a=e.forceNew||e["force new connection"]||false===e.multiplex||o;let h;if(a){h=new qt(n,e)}else{if(!Ft[s]){Ft[s]=new qt(n,e)}h=Ft[s]}if(i.query&&!e.query){e.query=i.queryKey}return h.socket(i.path,e)}Object.assign(Kt,{Manager:qt,Socket:$t,io:Kt,connect:Kt});let Vt=null;function Ht(e){e=e||t.DATA_MODE;switch(e){case"local":return`http://127.0.0.1:5000`;case"dev":return`https://dev-api.ai12z.net`;default:return`https://api.ai12z.net`}}function Xt(){var t,e;const i={origin:(t=window===null||window===void 0?void 0:window.location)===null||t===void 0?void 0:t.origin,title:document===null||document===void 0?void 0:document.title,userAgent:navigator===null||navigator===void 0?void 0:navigator.userAgent,referrer:document===null||document===void 0?void 0:document.referrer,language:navigator===null||navigator===void 0?void 0:navigator.language,description:(e=document.querySelector('meta[name="description"]'))===null||e===void 0?void 0:e.getAttribute("content")};return i}async function Jt(e,i){var n,s;try{const r={origin:(n=window===null||window===void 0?void 0:window.location)===null||n===void 0?void 0:n.origin,title:document===null||document===void 0?void 0:document.title,userAgent:navigator===null||navigator===void 0?void 0:navigator.userAgent,referrer:document===null||document===void 0?void 0:document.referrer,language:navigator===null||navigator===void 0?void 0:navigator.language,description:(s=document.querySelector('meta[name="description"]'))===null||s===void 0?void 0:s.getAttribute("content")};if(!i.apiKey){i.apiKey=t.DATA_KEY}if(!i.apiKey)throw new Error(`Public Key is required. Please provide using attribute "data-key".`);i=Object.assign(Object.assign({},i),{meta:r});const o=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!o.ok){throw new Error(`HTTP error! status: ${o.status}`)}const a=await o.json();return await a}catch(t){throw t}}async function Wt(t,e,i){if(!i)return[];const n=`${Ht(e)}/bot/search`;const s={apiKey:t,query:i,num_docs:4};return await Jt(n,s)}async function Qt(t,e,i,n){const s=`${Ht(e)}/bot/synthesize`;const r={text:i,apiKey:t,voiceType:n};return await Jt(s,r)}async function Yt(t,e,i,n){const s=`${Ht(e)}/bot/feedback`;const r={apiKey:t,insight_id:i,feedback:n};return await Jt(s,r)}function Gt(t,e=300){let i;return(...n)=>{clearTimeout(i);i=setTimeout((()=>{t.apply(this,n)}),e)}}async function Zt(t,e){if(Vt===null){try{const i=`${Ht(e)}/bot/status`;const n=await Jt(i,{apiKey:t});if(n){Vt=n.enable}}catch(t){Vt=false}}return Vt}function te(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=Math.random()*16|0,i=t=="x"?e:e&3|8;return i.toString(16)}))}function ee(t){const e=new DOMParser;const i=e.parseFromString(t,"text/html");const n=Array.from(i.querySelectorAll("button"));let s=n.map(((t,e)=>{const i=t.id||`button-${e}`;const n=t.textContent||`Button ${e+1}`;t.id=i;const s=t.getAttribute("onclick");t.removeAttribute("onclick");t.setAttribute("data-original-click",s);return{id:i,label:n,onClick:()=>alert(`Button ${i} clicked!`)}}));return{body:i.body.innerHTML,buttons:s}}function ie(e,i){const{configId:n,apiKey:s,configType:r}=e;const o=`${Ht(i)}/bot/config`;if(!e.apiKey){e.apiKey=t.DATA_KEY}const a={configId:n,apiKey:s,configType:r};return Jt(o,a)}function ne(){const t="ai12z-visitorId";let e=localStorage.getItem(t);if(!e){e=se();localStorage.setItem(t,e)}return"ai12z-"+e}function se(){return Date.now()+"-"+Math.random().toString(36).substr(2,9)}function re(t,e){var i,n,s;const r=(n=(i=t.controlData)===null||i===void 0?void 0:i.data.source.carousel)===null||n===void 0?void 0:n.type;const o=document.createElement("item-list");o.carouselType=r;o.inputType=e;o.customTemplate=t.controlData.template;o.customSource=(s=t.controlData)===null||s===void 0?void 0:s.data.source;return o}function oe(t){switch(t){case"list":const t=[{name:"list",content:`{{#each items as |item index|}}\n <div class="carousel-card flex flex-col items-start mb-4 bg-white border h-auto border-gray-200 rounded-lg shadow md:flex-row md:max-w-xl dark:border-gray-700" data-index="{{@index}}">\n <div class="relative carousel-container card-image {{#if (gte item.images.length 1)}}w-full{{else}}w-1/2{{/if}}" data-carousel-id="carousel-{{index}}" id="carousel-{{index}}" data-carousel="slide">\n <div class="relative h-64 overflow-hidden">\n {{#each item.images as |image imageIndex|}} \n <img src="{{this}}" alt="Image for {{../title}}" class="card-image object-cover w-full h-96 md:h-auto md:mt-6 md:ml-2 hidden duration-700 ease-in-out" data-carousel-item id="carousel-{{index}}-item-{{imageIndex}}"/> \n {{/each}}\n </div> \n {{#if (lte item.images.length 3)}} \n {{#if (gte item.images.length 1)}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n {{#each images as |image imageIndex|}}\n <button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide {{@index}}" data-carousel-slide-to="{{index}}" id="carousel-{{index}}-indicator-{{imageIndex}}"></button>\n {{/each}}\n </div>\n {{/if}}\n {{else}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-prev id="carousel-{{index}}-prev"></button>\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-next id="carousel-{{index}}-next"></button>\n </div>\n {{/if}}\n </div>\n \n <div class="flex flex-col justify-between p-4 leading-normal">\n <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"> {{{this.title}}}</h5>\n {{#each subTitle}} \n <p class="font-title text-md md:text-xl">{{this}}</p> \n {{/each}}\n <p class="short-description mb-3 font-normal text-gray-700 dark:text-gray-400">{{{this.shortDescription}}}</p>\n <div class="long-description mb-3 font-normal text-gray-700 dark:text-gray-400 hidden">{{{this.description}}}</div>\n {{#if this.description}}\n <button class="read-more text-blue-500 hover:text-blue-700 underline focus:outline-none" data-index="{{@index}}"> Read More </button>\n {{/if}}\n <div class="flex flex-col items-center my-4">\n {{#each buttons}} \n <button class="card-button list-btn uppercase pt-2 pb-1 px-4 flex-grow hover:bg-gradient-to-t md:flex-none" data-id="{{@index}}" data-url="{{this.url}}" data-type="{{this.type}}">\n {{this.label}}</button>\n {{/each}}\n {{#and ../buttonText formSettings}}\n <button class="card-button list-btn uppercase" data-type="panel">{{../buttonText}}</button>\n {{/and}}\n </div>\n </div>\n</div>\n{{/each}}\n<div class="pagination-controls">\n<button class="prev-btn list-btn" {{#unless hasPrev}}disabled{{/unless}}>Prev</button>\n<span> Page {{getcurrentPage}} of {{getPageCount}} </span>\n<button class="next-btn list-btn" {{#unless hasNext}}disabled{{/unless}}>Next</button>\n</div>`},{name:"detail",content:`<div class="flex flex-col items-center justify-center w-full h-full p-4">\n <div class="w-full md:col-span-2 h-fit">\n <dynamic-form form="{{json form}}" formSettings="{{json formSettings}}" theme="{{json theme}}"/>\n </div> \n <div> \n {{#each buttons}} \n <button class="panel-button list-btn text-white" data-id="{{this.index}}" data-type="{{this.type}}">{{this.label}}</button> \n {{/each}}\n </div>\n </div>`}];return t}}function ae(t){switch(t){case"list":const t=[{name:"list",content:`{{#each items as |item index|}}\n <div class="carousel-card flex flex-col items-start mb-4 bg-white border h-auto border-gray-200 rounded-lg shadow md:flex-row dark:border-gray-700" data-index="{{index}}">\n \n <div class="relative md:w-1/3 carousel-container card-image {{#if (gte item.images.length 1)}}w-full{{else}}w-full md:w-1/2{{/if}}" data-carousel-id="carousel-{{index}}" id="carousel-{{index}}" data-carousel="slide">\n <div class="relative h-64 overflow-hidden">\n {{#each item.images as |image imageIndex|}} \n <img src="{{this}}" alt="Image for {{../title}}" class="card-image object-cover w-full h-96 md:h-auto md:mt-6 md:ml-2 hidden duration-700 ease-in-out" data-carousel-item id="carousel-{{index}}-item-{{imageIndex}}"/> \n {{/each}}\n </div> \n {{#if (lte item.images.length 3)}} \n {{#if (gte item.images.length 1)}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n {{#each images as |image imageIndex|}}\n <button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide {{@index}}" data-carousel-slide-to="{{index}}" id="carousel-{{index}}-indicator-{{imageIndex}}"></button>\n {{/each}}\n </div>\n {{/if}}\n {{else}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-prev id="carousel-{{index}}-prev"></button>\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-next id="carousel-{{index}}-next"></button>\n </div>\n {{/if}}\n </div>\n \n \n \n <div class="flex flex-col justify-between p-4 leading-normal md:w-2/3 card-right">\n <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"> {{{this.title}}}</h5>\n {{#each subTitle}} \n <p class="font-title text-md md:text-xl">{{this}}</p> \n {{/each}}\n <p class="short-description mb-3 font-normal text-gray-700 dark:text-gray-400">{{{this.shortDescription}}}</p>\n <div class="long-description mb-3 font-normal text-gray-700 dark:text-gray-400 hidden">{{{this.description}}}</div>\n {{#if this.description}}\n <a class="read-more text-blue-500 hover:text-blue-700 underline focus:outline-none" data-index="{{@index}}"> Read More </a>\n {{/if}}\n <div class="flex items-center my-4">\n {{#each buttons as |button buttonIndex|}} \n <button class="card-button list-btn uppercase pt-2 pb-1 px-4 flex-grow hover:bg-gradient-to-t md:flex-none" data-id="{{buttonIndex}}" data-url="{{this.url}}" data-type="{{this.type}}">\n {{this.label}}</button>\n {{/each}}\n {{#and ../buttonText formSettings}}\n <button class="card-button list-btn uppercase" data-type="panel">{{../buttonText}}</button>\n {{/and}}\n </div>\n </div>\n</div>\n{{/each}}\n<div class="pagination-controls">\n<button class="prev-btn list-btn" {{#unless hasPrev}}disabled{{/unless}}>Prev</button>\n<span> Page {{getcurrentPage}} of {{getPageCount}} </span>\n<button class="next-btn list-btn" {{#unless hasNext}}disabled{{/unless}}>Next</button>\n</div>\n`},{name:"detail",content:`\n <div class="flex flex-col items-center justify-center w-full h-full p-4">\n <div class="w-full md:col-span-2 h-fit">\n <dynamic-form form="{{json form}}" formSettings="{{json formSettings}}" theme="{{theme}}"/>\n </div> \n <div> \n {{#each buttons}} \n <button class="panel-button list-btn text-white" data-id="{{this.index}}" data-type="{{this.type}}">{{this.label}}</button> \n {{/each}}\n </div>\n </div>`}];return t;case"slider":const e=[{name:"carousel",content:`\n<div id="carouselExample" class="relative w-full" data-carousel="static">\n \n <div class="carousel-box relative bg-white overflow-hidden overflow-y-scroll h-56 rounded-lg md:h-96" style={ overflowY: "scroll", height: "30rem" }>\n {{#each items as |item index|}}\n <div class="carousel-card max-w-sm hidden duration-700 ease-in-out md:max-w-xl" data-carousel-item id="carousel-item-{{index}}" data-index="{{index}}">\n <div class="card-image relative w-full carousel-container" data-carousel-id="carousel-{{index}}" id="carousel-{{index}}" data-carousel="slide">\n <div class="relative h-64 overflow-hidden rounded-lg">\n {{#each item.images as |image imageIndex|}} \n \n <img src="{{this}}" alt="Image for {{../title}}" class="card-image object-cover h-96 hidden duration-700 ease-in-out" data-carousel-item id="carousel-{{index}}-item-{{imageIndex}}"/> \n \n {{/each}}\n </div> \n {{#if (lte item.images.length 3)}} \n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n {{#each images as |image imageIndex|}}\n <button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide {{@index}}" data-carousel-slide-to="{{index}}" id="carousel-{{index}}-indicator-{{imageIndex}}"></button>\n {{/each}}\n </div>\n {{else}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-prev id="carousel-{{index}}-prev"></button>\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-next id="carousel-{{index}}-next"></button>\n </div>\n {{/if}}\n </div> \n \n <div class="p-5">\n <a href="#">\n <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{{{title}}}</h5>\n </a>\n <p class="short-description mb-3 font-normal text-gray-700 dark:text-gray-400">{{{shortDescription}}}</p>\n <div class="long-description mb-3 font-normal text-gray-700 dark:text-gray-400 hidden">{{{description}}}</div>\n {{#if description}}\n <a class="read-more inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">\n Read more\n <svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">\n <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>\n </svg>\n </a>\n {{/if}}\n {{#each buttons}}\n <button class="card-button list-btn uppercase pt-2 pb-1 px-4 flex-grow hover:bg-gradient-to-t md:flex-none" data-index="{{@index}}" data-url="{{this.url}}" data-type="{{this.type}}">{{this.label}}</button>\n {{/each}}\n </div>\n </div>\n {{/each}}\n </div>\n\n <div class="absolute z-30 flex overflow-x-auto -translate-x-1/2 space-x-1 rtl:space-x-reverse bottom-5 left-1/2 scrollbar-visible">\n {{#if (lte items.length 5)}} \n {{#each items}}\n <button\n id="carousel-indicator-{{@index}}"\n type="button"\n class="w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4 rounded-full"\n aria-current="true"\n aria-label="Slide {{@index}}"\n ></button>\n {{/each}}\n {{/if}}\n </div>\n\n \x3c!-- Controls --\x3e\n <button\n type="button"\n class="absolute top-0 left-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"\n id="data-carousel-prev"\n data-carousel-prev\n >\n <span\n class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-blue-600"\n >\n <svg\n aria-hidden="true"\n class="w-6 h-6 text-white"\n fill="none"\n stroke="currentColor"\n viewBox="0 0 24 24"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n stroke-linecap="round"\n stroke-linejoin="round"\n stroke-width="2"\n d="M15 19l-7-7 7-7"\n ></path>\n </svg>\n <span class="sr-only">Previous</span>\n </span>\n </button>\n <button\n type="button"\n class="absolute top-0 right-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"\n id="data-carousel-next"\n data-carousel-next\n >\n <span\n class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-blue-600"\n >\n <svg\n aria-hidden="true"\n class="w-6 h-6 text-white dark:text-gray-800"\n fill="none"\n stroke="currentColor"\n viewBox="0 0 24 24"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n stroke-linecap="round"\n stroke-linejoin="round"\n stroke-width="2"\n d="M9 5l7 7-7 7"\n ></path>\n </svg>\n <span class="sr-only">Next</span>\n </span>\n </button>\n</div>`},{name:"detail",content:`\n <div class="flex flex-col items-center justify-center w-full h-full p-4">\n <div class="w-full md:col-span-2 h-fit">\n <dynamic-form form="{{json form}}" formSettings="{{json formSettings}}" theme="{{theme}}"/>\n </div> \n <div> \n {{#each buttons}} \n <button class="panel-button list-btn text-white" data-id="{{this.index}}" data-type="{{this.type}}">{{this.label}}</button> \n {{/each}}\n </div>\n </div>`}];return e}}function he(t){const e=t.indexOf("[");const i=t.indexOf("]",e);if(e!==-1&&i!==-1){const n=t.substring(0,e);const s=t.substring(e+1,i);let r=t.substring(i+1);r=r.replace("<p></p>","");return{before:n,inside:s,after:r}}else{console.log("No brackets found in the HTML string.");return{before:t,inside:null,after:null}}}export{ne as a,ie as b,re as c,Xt as d,Ht as e,Wt as f,te as g,Zt as h,Yt as i,Qt as j,Gt as k,Kt as l,ae as m,oe as n,he as s,ee as u};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{E as t}from"./p-682c54c0.js";const e=Object.create(null);e["open"]="0";e["close"]="1";e["ping"]="2";e["pong"]="3";e["message"]="4";e["upgrade"]="5";e["noop"]="6";const i=Object.create(null);Object.keys(e).forEach((t=>{i[e[t]]=t}));const n={type:"error",data:"parser error"};const s=typeof Blob==="function"||typeof Blob!=="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]";const r=typeof ArrayBuffer==="function";const o=t=>typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer;const a=({type:t,data:i},n,a)=>{if(s&&i instanceof Blob){if(n){return a(i)}else{return h(i,a)}}else if(r&&(i instanceof ArrayBuffer||o(i))){if(n){return a(i)}else{return h(new Blob([i]),a)}}return a(e[t]+(i||""))};const h=(t,e)=>{const i=new FileReader;i.onload=function(){const t=i.result.split(",")[1];e("b"+(t||""))};return i.readAsDataURL(t)};function c(t){if(t instanceof Uint8Array){return t}else if(t instanceof ArrayBuffer){return new Uint8Array(t)}else{return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}}let l;function u(t,e){if(s&&t.data instanceof Blob){return t.data.arrayBuffer().then(c).then(e)}else if(r&&(t.data instanceof ArrayBuffer||o(t.data))){return e(c(t.data))}a(t,false,(t=>{if(!l){l=new TextEncoder}e(l.encode(t))}))}const f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const d=typeof Uint8Array==="undefined"?[]:new Uint8Array(256);for(let t=0;t<f.length;t++){d[f.charCodeAt(t)]=t}const p=t=>{let e=t.length*.75,i=t.length,n,s=0,r,o,a,h;if(t[t.length-1]==="="){e--;if(t[t.length-2]==="="){e--}}const c=new ArrayBuffer(e),l=new Uint8Array(c);for(n=0;n<i;n+=4){r=d[t.charCodeAt(n)];o=d[t.charCodeAt(n+1)];a=d[t.charCodeAt(n+2)];h=d[t.charCodeAt(n+3)];l[s++]=r<<2|o>>4;l[s++]=(o&15)<<4|a>>2;l[s++]=(a&3)<<6|h&63}return c};const b=typeof ArrayBuffer==="function";const g=(t,e)=>{if(typeof t!=="string"){return{type:"message",data:x(t,e)}}const s=t.charAt(0);if(s==="b"){return{type:"message",data:m(t.substring(1),e)}}const r=i[s];if(!r){return n}return t.length>1?{type:i[s],data:t.substring(1)}:{type:i[s]}};const m=(t,e)=>{if(b){const i=p(t);return x(i,e)}else{return{base64:true,data:t}}};const x=(t,e)=>{switch(e){case"blob":if(t instanceof Blob){return t}else{return new Blob([t])}case"arraybuffer":default:if(t instanceof ArrayBuffer){return t}else{return t.buffer}}};const v=String.fromCharCode(30);const y=(t,e)=>{const i=t.length;const n=new Array(i);let s=0;t.forEach(((t,r)=>{a(t,false,(t=>{n[r]=t;if(++s===i){e(n.join(v))}}))}))};const w=(t,e)=>{const i=t.split(v);const n=[];for(let t=0;t<i.length;t++){const s=g(i[t],e);n.push(s);if(s.type==="error"){break}}return n};function k(){return new TransformStream({transform(t,e){u(t,(i=>{const n=i.length;let s;if(n<126){s=new Uint8Array(1);new DataView(s.buffer).setUint8(0,n)}else if(n<65536){s=new Uint8Array(3);const t=new DataView(s.buffer);t.setUint8(0,126);t.setUint16(1,n)}else{s=new Uint8Array(9);const t=new DataView(s.buffer);t.setUint8(0,127);t.setBigUint64(1,BigInt(n))}if(t.data&&typeof t.data!=="string"){s[0]|=128}e.enqueue(s);e.enqueue(i)}))}})}let j;function A(t){return t.reduce(((t,e)=>t+e.length),0)}function E(t,e){if(t[0].length===e){return t.shift()}const i=new Uint8Array(e);let n=0;for(let s=0;s<e;s++){i[s]=t[0][n++];if(n===t[0].length){t.shift();n=0}}if(t.length&&n<t[0].length){t[0]=t[0].slice(n)}return i}function O(t,e){if(!j){j=new TextDecoder}const i=[];let s=0;let r=-1;let o=false;return new TransformStream({transform(a,h){i.push(a);while(true){if(s===0){if(A(i)<1){break}const t=E(i,1);o=(t[0]&128)===128;r=t[0]&127;if(r<126){s=3}else if(r===126){s=1}else{s=2}}else if(s===1){if(A(i)<2){break}const t=E(i,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0);s=3}else if(s===2){if(A(i)<8){break}const t=E(i,8);const e=new DataView(t.buffer,t.byteOffset,t.length);const o=e.getUint32(0);if(o>Math.pow(2,53-32)-1){h.enqueue(n);break}r=o*Math.pow(2,32)+e.getUint32(4);s=3}else{if(A(i)<r){break}const t=E(i,r);h.enqueue(g(o?t:j.decode(t),e));s=0}if(r===0||r>t){h.enqueue(n);break}}}})}const B=4;function T(t){if(t)return C(t)}function C(t){for(var e in T.prototype){t[e]=T.prototype[e]}return t}T.prototype.on=T.prototype.addEventListener=function(t,e){this._callbacks=this._callbacks||{};(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e);return this};T.prototype.once=function(t,e){function i(){this.off(t,i);e.apply(this,arguments)}i.fn=e;this.on(t,i);return this};T.prototype.off=T.prototype.removeListener=T.prototype.removeAllListeners=T.prototype.removeEventListener=function(t,e){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length){delete this._callbacks["$"+t];return this}var n;for(var s=0;s<i.length;s++){n=i[s];if(n===e||n.fn===e){i.splice(s,1);break}}if(i.length===0){delete this._callbacks["$"+t]}return this};T.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=new Array(arguments.length-1),i=this._callbacks["$"+t];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}if(i){i=i.slice(0);for(var n=0,s=i.length;n<s;++n){i[n].apply(this,e)}}return this};T.prototype.emitReserved=T.prototype.emit;T.prototype.listeners=function(t){this._callbacks=this._callbacks||{};return this._callbacks["$"+t]||[]};T.prototype.hasListeners=function(t){return!!this.listeners(t).length};const S=(()=>{if(typeof self!=="undefined"){return self}else if(typeof window!=="undefined"){return window}else{return Function("return this")()}})();function I(t,...e){return e.reduce(((e,i)=>{if(t.hasOwnProperty(i)){e[i]=t[i]}return e}),{})}const P=S.setTimeout;const N=S.clearTimeout;function M(t,e){if(e.useNativeTimers){t.setTimeoutFn=P.bind(S);t.clearTimeoutFn=N.bind(S)}else{t.setTimeoutFn=S.setTimeout.bind(S);t.clearTimeoutFn=S.clearTimeout.bind(S)}}const _=1.33;function U(t){if(typeof t==="string"){return D(t)}return Math.ceil((t.byteLength||t.size)*_)}function D(t){let e=0,i=0;for(let n=0,s=t.length;n<s;n++){e=t.charCodeAt(n);if(e<128){i+=1}else if(e<2048){i+=2}else if(e<55296||e>=57344){i+=3}else{n++;i+=4}}return i}function L(t){let e="";for(let i in t){if(t.hasOwnProperty(i)){if(e.length)e+="&";e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])}}return e}function R(t){let e={};let i=t.split("&");for(let t=0,n=i.length;t<n;t++){let n=i[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}class $ extends Error{constructor(t,e,i){super(t);this.description=e;this.context=i;this.type="TransportError"}}class z extends T{constructor(t){super();this.writable=false;M(this,t);this.opts=t;this.query=t.query;this.socket=t.socket}onError(t,e,i){super.emitReserved("error",new $(t,e,i));return this}open(){this.readyState="opening";this.doOpen();return this}close(){if(this.readyState==="opening"||this.readyState==="open"){this.doClose();this.onClose()}return this}send(t){if(this.readyState==="open"){this.write(t)}}onOpen(){this.readyState="open";this.writable=true;super.emitReserved("open")}onData(t){const e=g(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed";super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){if(this.opts.port&&(this.opts.secure&&Number(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)){return":"+this.opts.port}else{return""}}_query(t){const e=L(t);return e.length?"?"+e:""}}const q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),F=64,K={};let V=0,H=0,X;function J(t){let e="";do{e=q[t%F]+e;t=Math.floor(t/F)}while(t>0);return e}function W(){const t=J(+new Date);if(t!==X)return V=0,X=t;return t+"."+J(V++)}for(;H<F;H++)K[q[H]]=H;let Q=false;try{Q=typeof XMLHttpRequest!=="undefined"&&"withCredentials"in new XMLHttpRequest}catch(t){}const Y=Q;function G(t){const e=t.xdomain;try{if("undefined"!==typeof XMLHttpRequest&&(!e||Y)){return new XMLHttpRequest}}catch(t){}if(!e){try{return new(S[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}}function Z(){}function tt(){}const et=function(){const t=new G({xdomain:false});return null!=t.responseType}();class it extends z{constructor(t){super(t);this.polling=false;if(typeof location!=="undefined"){const e="https:"===location.protocol;let i=location.port;if(!i){i=e?"443":"80"}this.xd=typeof location!=="undefined"&&t.hostname!==location.hostname||i!==t.port}const e=t&&t.forceBase64;this.supportsBinary=et&&!e;if(this.opts.withCredentials){this.cookieJar=Z()}}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused";t()};if(this.polling||!this.writable){let t=0;if(this.polling){t++;this.once("pollComplete",(function(){--t||e()}))}if(!this.writable){t++;this.once("drain",(function(){--t||e()}))}}else{e()}}poll(){this.polling=true;this.doPoll();this.emitReserved("poll")}onData(t){const e=t=>{if("opening"===this.readyState&&t.type==="open"){this.onOpen()}if("close"===t.type){this.onClose({description:"transport closed by the server"});return false}this.onPacket(t)};w(t,this.socket.binaryType).forEach(e);if("closed"!==this.readyState){this.polling=false;this.emitReserved("pollComplete");if("open"===this.readyState){this.poll()}}}doClose(){const t=()=>{this.write([{type:"close"}])};if("open"===this.readyState){t()}else{this.once("open",t)}}write(t){this.writable=false;y(t,(t=>{this.doWrite(t,(()=>{this.writable=true;this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http";const e=this.query||{};if(false!==this.opts.timestampRequests){e[this.opts.timestampParam]=W()}if(!this.supportsBinary&&!e.sid){e.b64=1}return this.createUri(t,e)}request(t={}){Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts);return new nt(this.uri(),t)}doWrite(t,e){const i=this.request({method:"POST",data:t});i.on("success",e);i.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this));t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)}));this.pollXhr=t}}class nt extends T{constructor(t,e){super();M(this,e);this.opts=e;this.method=e.method||"GET";this.uri=t;this.data=undefined!==e.data?e.data:null;this.create()}create(){var t;const e=I(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const i=this.xhr=new G(e);try{i.open(this.method,this.uri,true);try{if(this.opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(true);for(let t in this.opts.extraHeaders){if(this.opts.extraHeaders.hasOwnProperty(t)){i.setRequestHeader(t,this.opts.extraHeaders[t])}}}}catch(t){}if("POST"===this.method){try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}}try{i.setRequestHeader("Accept","*/*")}catch(t){}(t=this.opts.cookieJar)===null||t===void 0?void 0:t.addCookies(i);if("withCredentials"in i){i.withCredentials=this.opts.withCredentials}if(this.opts.requestTimeout){i.timeout=this.opts.requestTimeout}i.onreadystatechange=()=>{var t;if(i.readyState===3){(t=this.opts.cookieJar)===null||t===void 0?void 0:t.parseCookies(i)}if(4!==i.readyState)return;if(200===i.status||1223===i.status){this.onLoad()}else{this.setTimeoutFn((()=>{this.onError(typeof i.status==="number"?i.status:0)}),0)}};i.send(this.data)}catch(t){this.setTimeoutFn((()=>{this.onError(t)}),0);return}if(typeof document!=="undefined"){this.index=nt.requestsCount++;nt.requests[this.index]=this}}onError(t){this.emitReserved("error",t,this.xhr);this.cleanup(true)}cleanup(t){if("undefined"===typeof this.xhr||null===this.xhr){return}this.xhr.onreadystatechange=tt;if(t){try{this.xhr.abort()}catch(t){}}if(typeof document!=="undefined"){delete nt.requests[this.index]}this.xhr=null}onLoad(){const t=this.xhr.responseText;if(t!==null){this.emitReserved("data",t);this.emitReserved("success");this.cleanup()}}abort(){this.cleanup()}}nt.requestsCount=0;nt.requests={};if(typeof document!=="undefined"){if(typeof attachEvent==="function"){attachEvent("onunload",st)}else if(typeof addEventListener==="function"){const t="onpagehide"in S?"pagehide":"unload";addEventListener(t,st,false)}}function st(){for(let t in nt.requests){if(nt.requests.hasOwnProperty(t)){nt.requests[t].abort()}}}const rt=(()=>{const t=typeof Promise==="function"&&typeof Promise.resolve==="function";if(t){return t=>Promise.resolve().then(t)}else{return(t,e)=>e(t,0)}})();const ot=S.WebSocket||S.MozWebSocket;const at="arraybuffer";const ht=typeof navigator!=="undefined"&&typeof navigator.product==="string"&&navigator.product.toLowerCase()==="reactnative";class ct extends z{constructor(t){super(t);this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check()){return}const t=this.uri();const e=this.opts.protocols;const i=ht?{}:I(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");if(this.opts.extraHeaders){i.headers=this.opts.extraHeaders}try{this.ws=!ht?e?new ot(t,e):new ot(t):new ot(t,e,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType;this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{if(this.opts.autoUnref){this.ws._socket.unref()}this.onOpen()};this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t});this.ws.onmessage=t=>this.onData(t.data);this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=false;for(let e=0;e<t.length;e++){const i=t[e];const n=e===t.length-1;a(i,this.supportsBinary,(t=>{try{{this.ws.send(t)}}catch(t){}if(n){rt((()=>{this.writable=true;this.emitReserved("drain")}),this.setTimeoutFn)}}))}}doClose(){if(typeof this.ws!=="undefined"){this.ws.close();this.ws=null}}uri(){const t=this.opts.secure?"wss":"ws";const e=this.query||{};if(this.opts.timestampRequests){e[this.opts.timestampParam]=W()}if(!this.supportsBinary){e.b64=1}return this.createUri(t,e)}check(){return!!ot}}class lt extends z{get name(){return"webtransport"}doOpen(){if(typeof WebTransport!=="function"){return}this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]);this.transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)}));this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=O(Number.MAX_SAFE_INTEGER,this.socket.binaryType);const i=t.readable.pipeThrough(e).getReader();const n=k();n.readable.pipeTo(t.writable);this.writer=n.writable.getWriter();const s=()=>{i.read().then((({done:t,value:e})=>{if(t){return}this.onPacket(e);s()})).catch((t=>{}))};s();const r={type:"open"};if(this.query.sid){r.data=`{"sid":"${this.query.sid}"}`}this.writer.write(r).then((()=>this.onOpen()))}))}))}write(t){this.writable=false;for(let e=0;e<t.length;e++){const i=t[e];const n=e===t.length-1;this.writer.write(i).then((()=>{if(n){rt((()=>{this.writable=true;this.emitReserved("drain")}),this.setTimeoutFn)}}))}}doClose(){var t;(t=this.transport)===null||t===void 0?void 0:t.close()}}const ut={websocket:ct,webtransport:lt,polling:it};const ft=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;const dt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pt(t){if(t.length>2e3){throw"URI too long"}const e=t,i=t.indexOf("["),n=t.indexOf("]");if(i!=-1&&n!=-1){t=t.substring(0,i)+t.substring(i,n).replace(/:/g,";")+t.substring(n,t.length)}let s=ft.exec(t||""),r={},o=14;while(o--){r[dt[o]]=s[o]||""}if(i!=-1&&n!=-1){r.source=e;r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":");r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":");r.ipv6uri=true}r.pathNames=bt(r,r["path"]);r.queryKey=gt(r,r["query"]);return r}function bt(t,e){const i=/\/{2,9}/g,n=e.replace(i,"/").split("/");if(e.slice(0,1)=="/"||e.length===0){n.splice(0,1)}if(e.slice(-1)=="/"){n.splice(n.length-1,1)}return n}function gt(t,e){const i={};e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){if(e){i[e]=n}}));return i}class mt extends T{constructor(t,e={}){super();this.binaryType=at;this.writeBuffer=[];if(t&&"object"===typeof t){e=t;t=null}if(t){t=pt(t);e.hostname=t.host;e.secure=t.protocol==="https"||t.protocol==="wss";e.port=t.port;if(t.query)e.query=t.query}else if(e.host){e.hostname=pt(e.host).host}M(this,e);this.secure=null!=e.secure?e.secure:typeof location!=="undefined"&&"https:"===location.protocol;if(e.hostname&&!e.port){e.port=this.secure?"443":"80"}this.hostname=e.hostname||(typeof location!=="undefined"?location.hostname:"localhost");this.port=e.port||(typeof location!=="undefined"&&location.port?location.port:this.secure?"443":"80");this.transports=e.transports||["polling","websocket","webtransport"];this.writeBuffer=[];this.prevBufferLen=0;this.opts=Object.assign({path:"/engine.io",agent:false,withCredentials:false,upgrade:true,timestampParam:"t",rememberUpgrade:false,addTrailingSlash:true,rejectUnauthorized:true,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:false},e);this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":"");if(typeof this.opts.query==="string"){this.opts.query=R(this.opts.query)}this.id=null;this.upgrades=null;this.pingInterval=null;this.pingTimeout=null;this.pingTimeoutTimer=null;if(typeof addEventListener==="function"){if(this.opts.closeOnBeforeunload){this.beforeunloadEventListener=()=>{if(this.transport){this.transport.removeAllListeners();this.transport.close()}};addEventListener("beforeunload",this.beforeunloadEventListener,false)}if(this.hostname!=="localhost"){this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})};addEventListener("offline",this.offlineEventListener,false)}}this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=B;e.transport=t;if(this.id)e.sid=this.id;const i=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new ut[t](i)}open(){let t;if(this.opts.rememberUpgrade&&mt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1){t="websocket"}else if(0===this.transports.length){this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);return}else{t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){this.transports.shift();this.open();return}t.open();this.setTransport(t)}setTransport(t){if(this.transport){this.transport.removeAllListeners()}this.transport=t;t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){let e=this.createTransport(t);let i=false;mt.priorWebsocketSuccess=false;const n=()=>{if(i)return;e.send([{type:"ping",data:"probe"}]);e.once("packet",(t=>{if(i)return;if("pong"===t.type&&"probe"===t.data){this.upgrading=true;this.emitReserved("upgrading",e);if(!e)return;mt.priorWebsocketSuccess="websocket"===e.name;this.transport.pause((()=>{if(i)return;if("closed"===this.readyState)return;c();this.setTransport(e);e.send([{type:"upgrade"}]);this.emitReserved("upgrade",e);e=null;this.upgrading=false;this.flush()}))}else{const t=new Error("probe error");t.transport=e.name;this.emitReserved("upgradeError",t)}}))};function s(){if(i)return;i=true;c();e.close();e=null}const r=t=>{const i=new Error("probe error: "+t);i.transport=e.name;s();this.emitReserved("upgradeError",i)};function o(){r("transport closed")}function a(){r("socket closed")}function h(t){if(e&&t.name!==e.name){s()}}const c=()=>{e.removeListener("open",n);e.removeListener("error",r);e.removeListener("close",o);this.off("close",a);this.off("upgrading",h)};e.once("open",n);e.once("error",r);e.once("close",o);this.once("close",a);this.once("upgrading",h);if(this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"){this.setTimeoutFn((()=>{if(!i){e.open()}}),200)}else{e.open()}}onOpen(){this.readyState="open";mt.priorWebsocketSuccess="websocket"===this.transport.name;this.emitReserved("open");this.flush();if("open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++){this.probe(this.upgrades[t])}}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){this.emitReserved("packet",t);this.emitReserved("heartbeat");this.resetPingTimeout();switch(t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong");this.emitReserved("ping");this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data;this.onError(e);break;case"message":this.emitReserved("data",t.data);this.emitReserved("message",t.data);break}}}onHandshake(t){this.emitReserved("handshake",t);this.id=t.sid;this.transport.query.sid=t.sid;this.upgrades=this.filterUpgrades(t.upgrades);this.pingInterval=t.pingInterval;this.pingTimeout=t.pingTimeout;this.maxPayload=t.maxPayload;this.onOpen();if("closed"===this.readyState)return;this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer);this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout);if(this.opts.autoUnref){this.pingTimeoutTimer.unref()}}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;if(0===this.writeBuffer.length){this.emitReserved("drain")}else{this.flush()}}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t);this.prevBufferLen=t.length;this.emitReserved("flush")}}getWritablePackets(){const t=this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1;if(!t){return this.writeBuffer}let e=1;for(let t=0;t<this.writeBuffer.length;t++){const i=this.writeBuffer[t].data;if(i){e+=U(i)}if(t>0&&e>this.maxPayload){return this.writeBuffer.slice(0,t)}e+=2}return this.writeBuffer}write(t,e,i){this.sendPacket("message",t,e,i);return this}send(t,e,i){this.sendPacket("message",t,e,i);return this}sendPacket(t,e,i,n){if("function"===typeof e){n=e;e=undefined}if("function"===typeof i){n=i;i=null}if("closing"===this.readyState||"closed"===this.readyState){return}i=i||{};i.compress=false!==i.compress;const s={type:t,data:e,options:i};this.emitReserved("packetCreate",s);this.writeBuffer.push(s);if(n)this.once("flush",n);this.flush()}close(){const t=()=>{this.onClose("forced close");this.transport.close()};const e=()=>{this.off("upgrade",e);this.off("upgradeError",e);t()};const i=()=>{this.once("upgrade",e);this.once("upgradeError",e)};if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";if(this.writeBuffer.length){this.once("drain",(()=>{if(this.upgrading){i()}else{t()}}))}else if(this.upgrading){i()}else{t()}}return this}onError(t){mt.priorWebsocketSuccess=false;this.emitReserved("error",t);this.onClose("transport error",t)}onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){this.clearTimeoutFn(this.pingTimeoutTimer);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();if(typeof removeEventListener==="function"){removeEventListener("beforeunload",this.beforeunloadEventListener,false);removeEventListener("offline",this.offlineEventListener,false)}this.readyState="closed";this.id=null;this.emitReserved("close",t,e);this.writeBuffer=[];this.prevBufferLen=0}}filterUpgrades(t){const e=[];let i=0;const n=t.length;for(;i<n;i++){if(~this.transports.indexOf(t[i]))e.push(t[i])}return e}}mt.protocol=B;function xt(t,e="",i){let n=t;i=i||typeof location!=="undefined"&&location;if(null==t)t=i.protocol+"//"+i.host;if(typeof t==="string"){if("/"===t.charAt(0)){if("/"===t.charAt(1)){t=i.protocol+t}else{t=i.host+t}}if(!/^(https?|wss?):\/\//.test(t)){if("undefined"!==typeof i){t=i.protocol+"//"+t}else{t="https://"+t}}n=pt(t)}if(!n.port){if(/^(http|ws)$/.test(n.protocol)){n.port="80"}else if(/^(http|ws)s$/.test(n.protocol)){n.port="443"}}n.path=n.path||"/";const s=n.host.indexOf(":")!==-1;const r=s?"["+n.host+"]":n.host;n.id=n.protocol+"://"+r+":"+n.port+e;n.href=n.protocol+"://"+r+(i&&i.port===n.port?"":":"+n.port);return n}const vt=typeof ArrayBuffer==="function";const yt=t=>typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer;const wt=Object.prototype.toString;const kt=typeof Blob==="function"||typeof Blob!=="undefined"&&wt.call(Blob)==="[object BlobConstructor]";const jt=typeof File==="function"||typeof File!=="undefined"&&wt.call(File)==="[object FileConstructor]";function At(t){return vt&&(t instanceof ArrayBuffer||yt(t))||kt&&t instanceof Blob||jt&&t instanceof File}function Et(t,e){if(!t||typeof t!=="object"){return false}if(Array.isArray(t)){for(let e=0,i=t.length;e<i;e++){if(Et(t[e])){return true}}return false}if(At(t)){return true}if(t.toJSON&&typeof t.toJSON==="function"&&arguments.length===1){return Et(t.toJSON(),true)}for(const e in t){if(Object.prototype.hasOwnProperty.call(t,e)&&Et(t[e])){return true}}return false}function Ot(t){const e=[];const i=t.data;const n=t;n.data=Bt(i,e);n.attachments=e.length;return{packet:n,buffers:e}}function Bt(t,e){if(!t)return t;if(At(t)){const i={_placeholder:true,num:e.length};e.push(t);return i}else if(Array.isArray(t)){const i=new Array(t.length);for(let n=0;n<t.length;n++){i[n]=Bt(t[n],e)}return i}else if(typeof t==="object"&&!(t instanceof Date)){const i={};for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)){i[n]=Bt(t[n],e)}}return i}return t}function Tt(t,e){t.data=Ct(t.data,e);delete t.attachments;return t}function Ct(t,e){if(!t)return t;if(t&&t._placeholder===true){const i=typeof t.num==="number"&&t.num>=0&&t.num<e.length;if(i){return e[t.num]}else{throw new Error("illegal attachments")}}else if(Array.isArray(t)){for(let i=0;i<t.length;i++){t[i]=Ct(t[i],e)}}else if(typeof t==="object"){for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)){t[i]=Ct(t[i],e)}}}return t}const St=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];const It=5;var Pt;(function(t){t[t["CONNECT"]=0]="CONNECT";t[t["DISCONNECT"]=1]="DISCONNECT";t[t["EVENT"]=2]="EVENT";t[t["ACK"]=3]="ACK";t[t["CONNECT_ERROR"]=4]="CONNECT_ERROR";t[t["BINARY_EVENT"]=5]="BINARY_EVENT";t[t["BINARY_ACK"]=6]="BINARY_ACK"})(Pt||(Pt={}));class Nt{constructor(t){this.replacer=t}encode(t){if(t.type===Pt.EVENT||t.type===Pt.ACK){if(Et(t)){return this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}}return[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;if(t.type===Pt.BINARY_EVENT||t.type===Pt.BINARY_ACK){e+=t.attachments+"-"}if(t.nsp&&"/"!==t.nsp){e+=t.nsp+","}if(null!=t.id){e+=t.id}if(null!=t.data){e+=JSON.stringify(t.data,this.replacer)}return e}encodeAsBinary(t){const e=Ot(t);const i=this.encodeAsString(e.packet);const n=e.buffers;n.unshift(i);return n}}function Mt(t){return Object.prototype.toString.call(t)==="[object Object]"}class _t extends T{constructor(t){super();this.reviver=t}add(t){let e;if(typeof t==="string"){if(this.reconstructor){throw new Error("got plaintext data when reconstructing a packet")}e=this.decodeString(t);const i=e.type===Pt.BINARY_EVENT;if(i||e.type===Pt.BINARY_ACK){e.type=i?Pt.EVENT:Pt.ACK;this.reconstructor=new Ut(e);if(e.attachments===0){super.emitReserved("decoded",e)}}else{super.emitReserved("decoded",e)}}else if(At(t)||t.base64){if(!this.reconstructor){throw new Error("got binary data when not reconstructing a packet")}else{e=this.reconstructor.takeBinaryData(t);if(e){this.reconstructor=null;super.emitReserved("decoded",e)}}}else{throw new Error("Unknown type: "+t)}}decodeString(t){let e=0;const i={type:Number(t.charAt(0))};if(Pt[i.type]===undefined){throw new Error("unknown packet type "+i.type)}if(i.type===Pt.BINARY_EVENT||i.type===Pt.BINARY_ACK){const n=e+1;while(t.charAt(++e)!=="-"&&e!=t.length){}const s=t.substring(n,e);if(s!=Number(s)||t.charAt(e)!=="-"){throw new Error("Illegal attachments")}i.attachments=Number(s)}if("/"===t.charAt(e+1)){const n=e+1;while(++e){const i=t.charAt(e);if(","===i)break;if(e===t.length)break}i.nsp=t.substring(n,e)}else{i.nsp="/"}const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;while(++e){const i=t.charAt(e);if(null==i||Number(i)!=i){--e;break}if(e===t.length)break}i.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(_t.isPayloadValid(i.type,n)){i.data=n}else{throw new Error("invalid payload")}}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return false}}static isPayloadValid(t,e){switch(t){case Pt.CONNECT:return Mt(e);case Pt.DISCONNECT:return e===undefined;case Pt.CONNECT_ERROR:return typeof e==="string"||Mt(e);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]==="number"||typeof e[0]==="string"&&St.indexOf(e[0])===-1);case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(e)}}destroy(){if(this.reconstructor){this.reconstructor.finishedReconstruction();this.reconstructor=null}}}class Ut{constructor(t){this.packet=t;this.buffers=[];this.reconPack=t}takeBinaryData(t){this.buffers.push(t);if(this.buffers.length===this.reconPack.attachments){const t=Tt(this.reconPack,this.buffers);this.finishedReconstruction();return t}return null}finishedReconstruction(){this.reconPack=null;this.buffers=[]}}const Dt=Object.freeze({__proto__:null,protocol:It,get PacketType(){return Pt},Encoder:Nt,Decoder:_t});function Lt(t,e,i){t.on(e,i);return function n(){t.off(e,i)}}const Rt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $t extends T{constructor(t,e,i){super();this.connected=false;this.recovered=false;this.receiveBuffer=[];this.sendBuffer=[];this._queue=[];this._queueSeq=0;this.ids=0;this.acks={};this.flags={};this.io=t;this.nsp=e;if(i&&i.auth){this.auth=i.auth}this._opts=Object.assign({},i);if(this.io._autoConnect)this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Lt(t,"open",this.onopen.bind(this)),Lt(t,"packet",this.onpacket.bind(this)),Lt(t,"error",this.onerror.bind(this)),Lt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){if(this.connected)return this;this.subEvents();if(!this.io["_reconnecting"])this.io.open();if("open"===this.io._readyState)this.onopen();return this}open(){return this.connect()}send(...t){t.unshift("message");this.emit.apply(this,t);return this}emit(t,...e){if(Rt.hasOwnProperty(t)){throw new Error('"'+t.toString()+'" is a reserved event name')}e.unshift(t);if(this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile){this._addToQueue(e);return this}const i={type:Pt.EVENT,data:e};i.options={};i.options.compress=this.flags.compress!==false;if("function"===typeof e[e.length-1]){const t=this.ids++;const n=e.pop();this._registerAckCallback(t,n);i.id=t}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;const s=this.flags.volatile&&(!n||!this.connected);if(s);else if(this.connected){this.notifyOutgoingListeners(i);this.packet(i)}else{this.sendBuffer.push(i)}this.flags={};return this}_registerAckCallback(t,e){var i;const n=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(n===undefined){this.acks[t]=e;return}const s=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++){if(this.sendBuffer[e].id===t){this.sendBuffer.splice(e,1)}}e.call(this,new Error("operation has timed out"))}),n);const r=(...t)=>{this.io.clearTimeoutFn(s);e.apply(this,t)};r.withError=true;this.acks[t]=r}emitWithAck(t,...e){return new Promise(((i,n)=>{const s=(t,e)=>t?n(t):i(e);s.withError=true;e.push(s);this.emit(t,...e)}))}_addToQueue(t){let e;if(typeof t[t.length-1]==="function"){e=t.pop()}const i={id:this._queueSeq++,tryCount:0,pending:false,args:t,flags:Object.assign({fromQueue:true},this.flags)};t.push(((t,...n)=>{if(i!==this._queue[0]){return}const s=t!==null;if(s){if(i.tryCount>this._opts.retries){this._queue.shift();if(e){e(t)}}}else{this._queue.shift();if(e){e(null,...n)}}i.pending=false;return this._drainQueue()}));this._queue.push(i);this._drainQueue()}_drainQueue(t=false){if(!this.connected||this._queue.length===0){return}const e=this._queue[0];if(e.pending&&!t){return}e.pending=true;e.tryCount++;this.flags=e.flags;this.emit.apply(this,e.args)}packet(t){t.nsp=this.nsp;this.io._packet(t)}onopen(){if(typeof this.auth=="function"){this.auth((t=>{this._sendConnectPacket(t)}))}else{this._sendConnectPacket(this.auth)}}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){if(!this.connected){this.emitReserved("connect_error",t)}}onclose(t,e){this.connected=false;delete this.id;this.emitReserved("disconnect",t,e);this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{const e=this.sendBuffer.some((e=>String(e.id)===t));if(!e){const e=this.acks[t];delete this.acks[t];if(e.withError){e.call(this,new Error("socket has been disconnected"))}}}))}onpacket(t){const e=t.nsp===this.nsp;if(!e)return;switch(t.type){case Pt.CONNECT:if(t.data&&t.data.sid){this.onconnect(t.data.sid,t.data.pid)}else{this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"))}break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data;this.emitReserved("connect_error",e);break}}onevent(t){const e=t.data||[];if(null!=t.id){e.push(this.ack(t.id))}if(this.connected){this.emitEvent(e)}else{this.receiveBuffer.push(Object.freeze(e))}}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const i of e){i.apply(this,t)}}super.emit.apply(this,t);if(this._pid&&t.length&&typeof t[t.length-1]==="string"){this._lastOffset=t[t.length-1]}}ack(t){const e=this;let i=false;return function(...n){if(i)return;i=true;e.packet({type:Pt.ACK,id:t,data:n})}}onack(t){const e=this.acks[t.id];if(typeof e!=="function"){return}delete this.acks[t.id];if(e.withError){t.data.unshift(null)}e.apply(this,t.data)}onconnect(t,e){this.id=t;this.recovered=e&&this._pid===e;this._pid=e;this.connected=true;this.emitBuffered();this.emitReserved("connect");this._drainQueue(true)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t)));this.receiveBuffer=[];this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t);this.packet(t)}));this.sendBuffer=[]}ondisconnect(){this.destroy();this.onclose("io server disconnect")}destroy(){if(this.subs){this.subs.forEach((t=>t()));this.subs=undefined}this.io["_destroy"](this)}disconnect(){if(this.connected){this.packet({type:Pt.DISCONNECT})}this.destroy();if(this.connected){this.onclose("io client disconnect")}return this}close(){return this.disconnect()}compress(t){this.flags.compress=t;return this}get volatile(){this.flags.volatile=true;return this}timeout(t){this.flags.timeout=t;return this}onAny(t){this._anyListeners=this._anyListeners||[];this._anyListeners.push(t);return this}prependAny(t){this._anyListeners=this._anyListeners||[];this._anyListeners.unshift(t);return this}offAny(t){if(!this._anyListeners){return this}if(t){const e=this._anyListeners;for(let i=0;i<e.length;i++){if(t===e[i]){e.splice(i,1);return this}}}else{this._anyListeners=[]}return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){this._anyOutgoingListeners=this._anyOutgoingListeners||[];this._anyOutgoingListeners.push(t);return this}prependAnyOutgoing(t){this._anyOutgoingListeners=this._anyOutgoingListeners||[];this._anyOutgoingListeners.unshift(t);return this}offAnyOutgoing(t){if(!this._anyOutgoingListeners){return this}if(t){const e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++){if(t===e[i]){e.splice(i,1);return this}}}else{this._anyOutgoingListeners=[]}return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const i of e){i.apply(this,t.data)}}}}function zt(t){t=t||{};this.ms=t.min||100;this.max=t.max||1e4;this.factor=t.factor||2;this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0;this.attempts=0}zt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random();var i=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};zt.prototype.reset=function(){this.attempts=0};zt.prototype.setMin=function(t){this.ms=t};zt.prototype.setMax=function(t){this.max=t};zt.prototype.setJitter=function(t){this.jitter=t};class qt extends T{constructor(t,e){var i;super();this.nsps={};this.subs=[];if(t&&"object"===typeof t){e=t;t=undefined}e=e||{};e.path=e.path||"/socket.io";this.opts=e;M(this,e);this.reconnection(e.reconnection!==false);this.reconnectionAttempts(e.reconnectionAttempts||Infinity);this.reconnectionDelay(e.reconnectionDelay||1e3);this.reconnectionDelayMax(e.reconnectionDelayMax||5e3);this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5);this.backoff=new zt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()});this.timeout(null==e.timeout?2e4:e.timeout);this._readyState="closed";this.uri=t;const n=e.parser||Dt;this.encoder=new n.Encoder;this.decoder=new n.Decoder;this._autoConnect=e.autoConnect!==false;if(this._autoConnect)this.open()}reconnection(t){if(!arguments.length)return this._reconnection;this._reconnection=!!t;return this}reconnectionAttempts(t){if(t===undefined)return this._reconnectionAttempts;this._reconnectionAttempts=t;return this}reconnectionDelay(t){var e;if(t===undefined)return this._reconnectionDelay;this._reconnectionDelay=t;(e=this.backoff)===null||e===void 0?void 0:e.setMin(t);return this}randomizationFactor(t){var e;if(t===undefined)return this._randomizationFactor;this._randomizationFactor=t;(e=this.backoff)===null||e===void 0?void 0:e.setJitter(t);return this}reconnectionDelayMax(t){var e;if(t===undefined)return this._reconnectionDelayMax;this._reconnectionDelayMax=t;(e=this.backoff)===null||e===void 0?void 0:e.setMax(t);return this}timeout(t){if(!arguments.length)return this._timeout;this._timeout=t;return this}maybeReconnectOnOpen(){if(!this._reconnecting&&this._reconnection&&this.backoff.attempts===0){this.reconnect()}}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new mt(this.uri,this.opts);const e=this.engine;const i=this;this._readyState="opening";this.skipReconnect=false;const n=Lt(e,"open",(function(){i.onopen();t&&t()}));const s=e=>{this.cleanup();this._readyState="closed";this.emitReserved("error",e);if(t){t(e)}else{this.maybeReconnectOnOpen()}};const r=Lt(e,"error",s);if(false!==this._timeout){const t=this._timeout;const i=this.setTimeoutFn((()=>{n();s(new Error("timeout"));e.close()}),t);if(this.opts.autoUnref){i.unref()}this.subs.push((()=>{this.clearTimeoutFn(i)}))}this.subs.push(n);this.subs.push(r);return this}connect(t){return this.open(t)}onopen(){this.cleanup();this._readyState="open";this.emitReserved("open");const t=this.engine;this.subs.push(Lt(t,"ping",this.onping.bind(this)),Lt(t,"data",this.ondata.bind(this)),Lt(t,"error",this.onerror.bind(this)),Lt(t,"close",this.onclose.bind(this)),Lt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){rt((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];if(!i){i=new $t(this,t,e);this.nsps[t]=i}else if(this._autoConnect&&!i.active){i.connect()}return i}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){const e=this.nsps[t];if(e.active){return}}this._close()}_packet(t){const e=this.encoder.encode(t);for(let i=0;i<e.length;i++){this.engine.write(e[i],t.options)}}cleanup(){this.subs.forEach((t=>t()));this.subs.length=0;this.decoder.destroy()}_close(){this.skipReconnect=true;this._reconnecting=false;this.onclose("forced close");if(this.engine)this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup();this.backoff.reset();this._readyState="closed";this.emitReserved("close",t,e);if(this._reconnection&&!this.skipReconnect){this.reconnect()}}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts){this.backoff.reset();this.emitReserved("reconnect_failed");this._reconnecting=false}else{const e=this.backoff.duration();this._reconnecting=true;const i=this.setTimeoutFn((()=>{if(t.skipReconnect)return;this.emitReserved("reconnect_attempt",t.backoff.attempts);if(t.skipReconnect)return;t.open((e=>{if(e){t._reconnecting=false;t.reconnect();this.emitReserved("reconnect_error",e)}else{t.onreconnect()}}))}),e);if(this.opts.autoUnref){i.unref()}this.subs.push((()=>{this.clearTimeoutFn(i)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=false;this.backoff.reset();this.emitReserved("reconnect",t)}}const Ft={};function Kt(t,e){if(typeof t==="object"){e=t;t=undefined}e=e||{};const i=xt(t,e.path||"/socket.io");const n=i.source;const s=i.id;const r=i.path;const o=Ft[s]&&r in Ft[s]["nsps"];const a=e.forceNew||e["force new connection"]||false===e.multiplex||o;let h;if(a){h=new qt(n,e)}else{if(!Ft[s]){Ft[s]=new qt(n,e)}h=Ft[s]}if(i.query&&!e.query){e.query=i.queryKey}return h.socket(i.path,e)}Object.assign(Kt,{Manager:qt,Socket:$t,io:Kt,connect:Kt});let Vt=null;function Ht(e){e=e||t.DATA_MODE;switch(e){case"local":return`http://127.0.0.1:5000`;case"dev":return`https://dev-api.ai12z.net`;default:return`https://api.ai12z.net`}}function Xt(){var t,e;const i={origin:(t=window===null||window===void 0?void 0:window.location)===null||t===void 0?void 0:t.origin,title:document===null||document===void 0?void 0:document.title,userAgent:navigator===null||navigator===void 0?void 0:navigator.userAgent,referrer:document===null||document===void 0?void 0:document.referrer,language:navigator===null||navigator===void 0?void 0:navigator.language,description:(e=document.querySelector('meta[name="description"]'))===null||e===void 0?void 0:e.getAttribute("content")};return i}async function Jt(e,i){var n,s;try{const r={origin:(n=window===null||window===void 0?void 0:window.location)===null||n===void 0?void 0:n.origin,title:document===null||document===void 0?void 0:document.title,userAgent:navigator===null||navigator===void 0?void 0:navigator.userAgent,referrer:document===null||document===void 0?void 0:document.referrer,language:navigator===null||navigator===void 0?void 0:navigator.language,description:(s=document.querySelector('meta[name="description"]'))===null||s===void 0?void 0:s.getAttribute("content")};if(!i.apiKey){i.apiKey=t.DATA_KEY}if(!i.apiKey)throw new Error(`Public Key is required. Please provide using attribute "data-key".`);i=Object.assign(Object.assign({},i),{meta:r});const o=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!o.ok){throw new Error(`HTTP error! status: ${o.status}`)}const a=await o.json();return await a}catch(t){throw t}}async function Wt(t,e,i){if(!i)return[];const n=`${Ht(e)}/bot/search`;const s={apiKey:t,query:i,num_docs:4};return await Jt(n,s)}async function Qt(t,e,i,n){const s=`${Ht(e)}/bot/synthesize`;const r={text:i,apiKey:t,voiceType:n};return await Jt(s,r)}async function Yt(t,e,i,n){const s=`${Ht(e)}/bot/feedback`;const r={apiKey:t,insight_id:i,feedback:n};return await Jt(s,r)}function Gt(t,e=300){let i;return(...n)=>{clearTimeout(i);i=setTimeout((()=>{t.apply(this,n)}),e)}}async function Zt(t,e){if(Vt===null){try{const i=`${Ht(e)}/bot/status`;const n=await Jt(i,{apiKey:t});if(n){Vt=n.enable}}catch(t){Vt=false}}return Vt}function te(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=Math.random()*16|0,i=t=="x"?e:e&3|8;return i.toString(16)}))}function ee(t){const e=new DOMParser;const i=e.parseFromString(t,"text/html");const n=Array.from(i.querySelectorAll("button"));let s=n.map(((t,e)=>{const i=t.id||`button-${e}`;const n=t.textContent||`Button ${e+1}`;t.id=i;const s=t.getAttribute("onclick");t.removeAttribute("onclick");t.setAttribute("data-original-click",s);return{id:i,label:n,onClick:()=>alert(`Button ${i} clicked!`)}}));return{body:i.body.innerHTML,buttons:s}}function ie(e,i){const{configId:n,apiKey:s,configType:r}=e;const o=`${Ht(i)}/bot/config`;if(!e.apiKey){e.apiKey=t.DATA_KEY}const a={configId:n,apiKey:s,configType:r};return Jt(o,a)}function ne(){const t="ai12z-visitorId";let e=localStorage.getItem(t);if(!e){e=se();localStorage.setItem(t,e)}return"ai12z-"+e}function se(){return Date.now()+"-"+Math.random().toString(36).substr(2,9)}function re(t,e){var i,n,s;const r=(n=(i=t.controlData)===null||i===void 0?void 0:i.data.source.carousel)===null||n===void 0?void 0:n.type;const o=document.createElement("item-list");o.carouselType=r;o.inputType=e;o.customTemplate=t.controlData.template;o.customSource=(s=t.controlData)===null||s===void 0?void 0:s.data.source;return o}function oe(t){switch(t){case"list":const t=[{name:"list",content:`{{#each items as |item index|}}\n <div class="carousel-card flex flex-col items-start mb-4 bg-white border h-auto border-gray-200 rounded-lg shadow md:flex-row md:max-w-xl dark:border-gray-700" data-index="{{@index}}">\n <div class="relative carousel-container card-image {{#if (gte item.images.length 1)}}w-full{{else}}w-1/2{{/if}}" data-carousel-id="carousel-{{index}}" id="carousel-{{index}}" data-carousel="slide">\n <div class="relative h-64 overflow-hidden">\n {{#each item.images as |image imageIndex|}} \n <img src="{{this}}" alt="Image for {{../title}}" class="card-image object-cover w-full h-96 md:h-auto md:mt-6 md:ml-2 hidden duration-700 ease-in-out" data-carousel-item id="carousel-{{index}}-item-{{imageIndex}}"/> \n {{/each}}\n </div> \n {{#if (lte item.images.length 3)}} \n {{#if (gte item.images.length 1)}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n {{#each images as |image imageIndex|}}\n <button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide {{@index}}" data-carousel-slide-to="{{index}}" id="carousel-{{index}}-indicator-{{imageIndex}}"></button>\n {{/each}}\n </div>\n {{/if}}\n {{else}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-prev id="carousel-{{index}}-prev"></button>\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-next id="carousel-{{index}}-next"></button>\n </div>\n {{/if}}\n </div>\n \n <div class="flex flex-col justify-between p-4 leading-normal">\n <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"> {{{this.title}}}</h5>\n {{#each subTitle}} \n <p class="font-title text-md md:text-xl">{{this}}</p> \n {{/each}}\n <p class="short-description mb-3 font-normal text-gray-700 dark:text-gray-400">{{{this.shortDescription}}}</p>\n <div class="long-description mb-3 font-normal text-gray-700 dark:text-gray-400 hidden">{{{this.description}}}</div>\n {{#if this.description}}\n <button class="read-more text-blue-500 hover:text-blue-700 underline focus:outline-none" data-index="{{@index}}"> Read More </button>\n {{/if}}\n <div class="flex flex-col items-center my-4">\n {{#each buttons}} \n <button class="card-button list-btn uppercase pt-2 pb-1 px-4 flex-grow hover:bg-gradient-to-t md:flex-none" data-id="{{@index}}" data-url="{{this.url}}" data-type="{{this.type}}">\n {{this.label}}</button>\n {{/each}}\n {{#and ../buttonText formSettings}}\n <button class="card-button list-btn uppercase" data-type="panel">{{../buttonText}}</button>\n {{/and}}\n </div>\n </div>\n</div>\n{{/each}}\n<div class="pagination-controls">\n<button class="prev-btn list-btn" {{#unless hasPrev}}disabled{{/unless}}>Prev</button>\n<span> Page {{getcurrentPage}} of {{getPageCount}} </span>\n<button class="next-btn list-btn" {{#unless hasNext}}disabled{{/unless}}>Next</button>\n</div>`},{name:"detail",content:`<div class="flex flex-col items-center justify-center w-full h-full p-4">\n <div class="w-full md:col-span-2 h-fit">\n <dynamic-form form="{{json form}}" formSettings="{{json formSettings}}" theme="{{json theme}}"/>\n </div> \n <div> \n {{#each buttons}} \n <button class="panel-button list-btn text-white" data-id="{{this.index}}" data-type="{{this.type}}">{{this.label}}</button> \n {{/each}}\n </div>\n </div>`}];return t}}function ae(t){switch(t){case"list":const t=[{name:"list",content:`{{#each items as |item index|}}\n <div class="carousel-card flex flex-col items-start mb-4 bg-white border h-auto border-gray-200 rounded-lg shadow md:flex-row dark:border-gray-700" data-index="{{index}}">\n \n <div class="relative md:w-1/3 carousel-container card-image {{#if (gte item.images.length 1)}}w-full{{else}}w-full md:w-1/2{{/if}}" data-carousel-id="carousel-{{index}}" id="carousel-{{index}}" data-carousel="slide">\n <div class="relative h-64 overflow-hidden">\n {{#each item.images as |image imageIndex|}} \n <img src="{{this}}" alt="Image for {{../title}}" class="card-image object-cover w-full h-96 md:h-auto md:mt-6 md:ml-2 hidden duration-700 ease-in-out" data-carousel-item id="carousel-{{index}}-item-{{imageIndex}}"/> \n {{/each}}\n </div> \n {{#if (lte item.images.length 3)}} \n {{#if (gte item.images.length 1)}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n {{#each images as |image imageIndex|}}\n <button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide {{@index}}" data-carousel-slide-to="{{index}}" id="carousel-{{index}}-indicator-{{imageIndex}}"></button>\n {{/each}}\n </div>\n {{/if}}\n {{else}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-prev id="carousel-{{index}}-prev"></button>\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-next id="carousel-{{index}}-next"></button>\n </div>\n {{/if}}\n </div>\n \n \n \n <div class="flex flex-col justify-between p-4 leading-normal md:w-2/3 card-right">\n <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white"> {{{this.title}}}</h5>\n {{#each subTitle}} \n <p class="font-title text-md md:text-xl">{{this}}</p> \n {{/each}}\n <p class="short-description mb-3 font-normal text-gray-700 dark:text-gray-400">{{{this.shortDescription}}}</p>\n <div class="long-description mb-3 font-normal text-gray-700 dark:text-gray-400 hidden">{{{this.description}}}</div>\n {{#if this.description}}\n <a class="read-more text-blue-500 hover:text-blue-700 underline focus:outline-none" data-index="{{@index}}"> Read More </a>\n {{/if}}\n <div class="flex items-center my-4">\n {{#each buttons as |button buttonIndex|}} \n <button class="card-button list-btn uppercase pt-2 pb-1 px-4 flex-grow hover:bg-gradient-to-t md:flex-none" data-id="{{buttonIndex}}" data-url="{{this.url}}" data-type="{{this.type}}">\n {{this.label}}</button>\n {{/each}}\n {{#and ../buttonText formSettings}}\n <button class="card-button list-btn uppercase" data-type="panel">{{../buttonText}}</button>\n {{/and}}\n </div>\n </div>\n</div>\n{{/each}}\n<div class="pagination-controls">\n<button class="prev-btn list-btn" {{#unless hasPrev}}disabled{{/unless}}>Prev</button>\n<span> Page {{getcurrentPage}} of {{getPageCount}} </span>\n<button class="next-btn list-btn" {{#unless hasNext}}disabled{{/unless}}>Next</button>\n</div>\n`},{name:"detail",content:`\n <div class="flex flex-col items-center justify-center w-full h-full p-4">\n <div class="w-full md:col-span-2 h-fit">\n <dynamic-form form="{{json form}}" formSettings="{{json formSettings}}" theme="{{theme}}"/>\n </div> \n <div> \n {{#each buttons}} \n <button class="panel-button list-btn text-white" data-id="{{this.index}}" data-type="{{this.type}}">{{this.label}}</button> \n {{/each}}\n </div>\n </div>`}];return t;case"slider":const e=[{name:"carousel",content:`\n<div id="carouselExample" class="relative w-full" data-carousel="static">\n \n <div class="carousel-box relative bg-white overflow-hidden overflow-y-scroll h-56 rounded-lg md:h-96" style={ overflowY: "scroll", height: "30rem" }>\n {{#each items as |item index|}}\n <div class="carousel-card max-w-sm hidden duration-700 ease-in-out md:max-w-xl" data-carousel-item id="carousel-item-{{index}}" data-index="{{index}}">\n <div class="card-image relative w-full carousel-container" data-carousel-id="carousel-{{index}}" id="carousel-{{index}}" data-carousel="slide">\n <div class="relative h-64 overflow-hidden rounded-lg">\n {{#each item.images as |image imageIndex|}} \n \n <img src="{{this}}" alt="Image for {{../title}}" class="card-image object-cover h-96 hidden duration-700 ease-in-out" data-carousel-item id="carousel-{{index}}-item-{{imageIndex}}"/> \n \n {{/each}}\n </div> \n {{#if (lte item.images.length 3)}} \n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n {{#each images as |image imageIndex|}}\n <button type="button" class="w-3 h-3 rounded-full" aria-current="true" aria-label="Slide {{@index}}" data-carousel-slide-to="{{index}}" id="carousel-{{index}}-indicator-{{imageIndex}}"></button>\n {{/each}}\n </div>\n {{else}}\n <div class="absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse">\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-prev id="carousel-{{index}}-prev"></button>\n <button type="button" class="w-3 h-3 rounded-full bg-blue-600" aria-current="true" aria-label="Slide {{@index}}" data-carousel-next id="carousel-{{index}}-next"></button>\n </div>\n {{/if}}\n </div> \n \n <div class="p-5">\n <a href="#">\n <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{{{title}}}</h5>\n </a>\n <p class="short-description mb-3 font-normal text-gray-700 dark:text-gray-400">{{{shortDescription}}}</p>\n <div class="long-description mb-3 font-normal text-gray-700 dark:text-gray-400 hidden">{{{description}}}</div>\n {{#if description}}\n <a class="read-more inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">\n Read more\n <svg class="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">\n <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>\n </svg>\n </a>\n {{/if}}\n {{#each buttons}}\n <button class="card-button list-btn uppercase pt-2 pb-1 px-4 flex-grow hover:bg-gradient-to-t md:flex-none" data-index="{{@index}}" data-url="{{this.url}}" data-type="{{this.type}}">{{this.label}}</button>\n {{/each}}\n </div>\n </div>\n {{/each}}\n </div>\n\n <div class="absolute z-30 flex overflow-x-auto -translate-x-1/2 space-x-1 rtl:space-x-reverse bottom-5 left-1/2 scrollbar-visible">\n {{#if (lte items.length 5)}} \n {{#each items}}\n <button\n id="carousel-indicator-{{@index}}"\n type="button"\n class="w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4 rounded-full"\n aria-current="true"\n aria-label="Slide {{@index}}"\n ></button>\n {{/each}}\n {{/if}}\n </div>\n\n \x3c!-- Controls --\x3e\n <button\n type="button"\n class="absolute top-0 left-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"\n id="data-carousel-prev"\n data-carousel-prev\n >\n <span\n class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-blue-600"\n >\n <svg\n aria-hidden="true"\n class="w-6 h-6 text-white"\n fill="none"\n stroke="currentColor"\n viewBox="0 0 24 24"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n stroke-linecap="round"\n stroke-linejoin="round"\n stroke-width="2"\n d="M15 19l-7-7 7-7"\n ></path>\n </svg>\n <span class="sr-only">Previous</span>\n </span>\n </button>\n <button\n type="button"\n class="absolute top-0 right-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none"\n id="data-carousel-next"\n data-carousel-next\n >\n <span\n class="inline-flex items-center justify-center w-10 h-10 rounded-full bg-blue-600"\n >\n <svg\n aria-hidden="true"\n class="w-6 h-6 text-white dark:text-gray-800"\n fill="none"\n stroke="currentColor"\n viewBox="0 0 24 24"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n stroke-linecap="round"\n stroke-linejoin="round"\n stroke-width="2"\n d="M9 5l7 7-7 7"\n ></path>\n </svg>\n <span class="sr-only">Next</span>\n </span>\n </button>\n</div>`},{name:"detail",content:`\n <div class="flex flex-col items-center justify-center w-full h-full p-4">\n <div class="w-full md:col-span-2 h-fit">\n <dynamic-form form="{{json form}}" formSettings="{{json formSettings}}" theme="{{theme}}"/>\n </div> \n <div> \n {{#each buttons}} \n <button class="panel-button list-btn text-white" data-id="{{this.index}}" data-type="{{this.type}}">{{this.label}}</button> \n {{/each}}\n </div>\n </div>`}];return e}}function he(t){const e=t.indexOf("[");const i=t.indexOf("]",e);if(e!==-1&&i!==-1){const n=t.substring(0,e);const s=t.substring(e+1,i);let r=t.substring(i+1);r=r.replace("<p></p>","");return{before:n,inside:s,after:r}}else{console.log("No brackets found in the HTML string.");return{before:t,inside:null,after:null}}}export{ne as a,ie as b,Zt as c,re as d,Xt as e,Ht as f,te as g,Wt as h,Yt as i,Qt as j,Gt as k,Kt as l,ae as m,oe as n,he as s,ee as u};
|
|
2
|
+
//# sourceMappingURL=p-bcf74d74.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,h as r}from"./p-682c54c0.js";import{g as o,f as s,i as a}from"./p-cfac4c14.js";import{S as i,a as n}from"./p-4660d823.js";const l='/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-bold);font-weight:600}.prose :where(astrong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(blockquotestrong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(theadthstrong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-alpha}.prose :where(ol[type=As]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-alpha}.prose :where(ol[type=as]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-roman}.prose :where(ol[type=Is]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-roman}.prose :where(ol[type=is]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose]*))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose]*))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose]*)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose]*)){border-inline-start-color:var(--tw-prose-quote-borders);border-inline-start-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em;quotes:"\\201C""\\201D""\\2018""\\2019"}.prose :where(blockquotep:first-of-type):not(:where([class~=not-prose],[class~=not-prose]*)):before{content:open-quote}.prose :where(blockquotep:last-of-type):not(:where([class~=not-prose],[class~=not-prose]*)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:2em;margin-top:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose]*)){display:block;margin-bottom:2em;margin-top:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:2em;margin-top:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose]*)){border-radius:.3125rem;box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);color:var(--tw-prose-kbd);font-family:inherit;font-size:.875em;font-weight:500;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose]*)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose]*)):after{content:"`"}.prose :where(acode):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(h1code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(h2code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-size:.875em}.prose :where(h3code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-size:.9em}.prose :where(h4code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(blockquotecode):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(theadthcode):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose]*)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose :where(precode):not(:where([class~=not-prose],[class~=not-prose]*)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(precode):not(:where([class~=not-prose],[class~=not-prose]*)):before{content:none}.prose :where(precode):not(:where([class~=not-prose],[class~=not-prose]*)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose]*)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;text-align:start;width:100%}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose]*)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(theadth):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-weight:600;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em;vertical-align:bottom}.prose :where(tbodytr):not(:where([class~=not-prose],[class~=not-prose]*)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbodytr:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){border-bottom-width:0}.prose :where(tbodytd):not(:where([class~=not-prose],[class~=not-prose]*)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose]*)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoottd):not(:where([class~=not-prose],[class~=not-prose]*)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:0;margin-top:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:.375em}.prose :where(.prose>ul>lip):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em}.prose :where(ulul,ulol,olul,olol):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:.75em;margin-top:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em;margin-top:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(theadth:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:0}.prose :where(theadth:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-end:0}.prose :where(tbodytd,tfoottd):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose :where(tbodytd:first-child,tfoottd:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:0}.prose :where(tbodytd:last-child,tfoottd:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:2em;margin-top:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:0}.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-12{bottom:3rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\\[-2px\\]{bottom:-2px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:1rem}.left-5{left:1.25rem}.left-\\[3px\\]{left:3px}.right-0{right:0}.right-4{right:1rem}.right-7{right:1.75rem}.right-8{right:2rem}.top-0{top:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.m-\\[-1px\\]{margin:-1px}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-3{margin-right:.75rem}.ms-2{margin-inline-start:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-4{margin-top:1rem}.mt-px{margin-top:1px}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.size-10{height:2.5rem;width:2.5rem}.size-6{height:1.5rem;width:1.5rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[1px\\]{height:1px}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-80{max-height:20rem}.min-h-\\[calc\\(100\\%-1px\\)\\]{min-height:calc(100% - 1px)}.min-h-fit{min-height:fit-content}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-11\\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[1px\\]{width:1px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[200px\\]{min-width:200px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-\\[1_1_0\\]{flex:1 1 0}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.translate-y-\\[0\\.5px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[0\\.5px\\]{--tw-translate-y:0.5px}.rotate-45{--tw-rotate:45deg}.rotate-45,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.scale-110,.scale-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-2{column-gap:.5rem}.gap-y-1{row-gap:.25rem}.gap-y-3{row-gap:.75rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-60{--tw-bg-opacity:0.6}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-green-400{--tw-gradient-from:#4ade80 var(--tw-gradient-from-position);--tw-gradient-to:rgba(74,222,128,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\\[10px\\]{padding:10px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pr-\\[14px\\]{padding-right:14px}.pt-2{padding-top:.5rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-bottom{vertical-align:bottom}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-normal{line-height:1.5}.tracking-tight{letter-spacing:-.025em}.text-\\[\\#001E5B\\]{--tw-text-opacity:1;color:rgb(0 30 91/var(--tw-text-opacity))}.text-\\[\\#0344D1\\]{--tw-text-opacity:1;color:rgb(3 68 209/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-slate-900\\/10{--tw-ring-color:rgba(15,23,42,.1)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\\[ko_memo\\:\\"\\+n\\+\\"\\]{ko_memo:"+n+"}.after\\:invisible:after{content:var(--tw-content);visibility:hidden}.after\\:whitespace-pre-wrap:after{content:var(--tw-content);white-space:pre-wrap}.hover\\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.hover\\:bg-indigo-300:hover{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity))}.hover\\:bg-opacity-80:hover{--tw-bg-opacity:0.8}.hover\\:bg-gradient-to-t:hover{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.hover\\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-slate-300:hover{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline:focus{outline-style:solid}.focus\\:outline-2:focus{outline-width:2px}.focus\\:outline-offset-2:focus{outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity))}.focus\\:ring-sky-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-transparent:disabled,.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent}.peer:checked~.peer-checked\\:block{display:block}:is(.dark.dark\\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark.dark\\:bg-blue-600){--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}:is(.dark.dark\\:text-gray-100){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark.dark\\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark.dark\\:text-gray-800){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark.dark\\:text-slate-400){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}:is(.dark.dark\\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark.dark\\:hover\\:bg-blue-700:hover){--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}:is(.dark.dark\\:focus\\:ring-blue-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity))}@media (min-width:640px){.sm\\:h-3{height:.75rem}.sm\\:w-3{width:.75rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\\:right-0{right:0}.md\\:col-span-2{grid-column:span 2/span 2}.md\\:ml-2{margin-left:.5rem}.md\\:mt-6{margin-top:1.5rem}.md\\:block{display:block}.md\\:flex{display:flex}.md\\:grid{display:grid}.md\\:h-4{height:1rem}.md\\:h-96{height:24rem}.md\\:h-auto{height:auto}.md\\:w-1\\/2{width:50%}.md\\:w-1\\/3{width:33.333333%}.md\\:w-2\\/3{width:66.666667%}.md\\:w-4{width:1rem}.md\\:max-w-xl{max-width:36rem}.md\\:flex-none{flex:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:gap-4{gap:1rem}.md\\:gap-x-3{column-gap:.75rem}.md\\:rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.md\\:p-2{padding:.5rem}.md\\:p-2\\.5{padding:.625rem}.md\\:p-4{padding:1rem}.md\\:pl-0{padding-left:0}.md\\:pl-3{padding-left:.75rem}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1024px){.lg\\:px-8{padding-left:2rem;padding-right:2rem}}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl]*){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:space-x-reverse:where([dir=rtl],[dir=rtl]*)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}';const p=l;const d=":host{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-font-size) !important}";const c=d;const h=class{constructor(r){e(this,r);this.stateChanged=t(this,"stateChanged",7);this.startStream=t(this,"startStream",7);this.streamResponse=t(this,"streamResponse",7);this.startInlineResponse=t(this,"startInlineResponse",7);this.endResponse=t(this,"endResponse",7);this.aiMessageId="";this.ctaSettings={};this.imgFiles=[];this.thumbsId="";this.isChat=false;this.isSubmitted=false;this.handleSubmit=async(e,t,r,a,i)=>{var n;e.preventDefault();this.isOpen=true;this.formData=Object.assign(Object.assign({},this.formData),{search:t});this.imgFiles=i;if(!a&&r==="follow-up"){this.conversationHistory=[];this.isChat=false}if(!this.formData.search&&((n=this.formData.search)===null||n===void 0?void 0:n.trim().length)<3&&i&&i.length<1){this.isSubmitted=false;this.stateChanged.emit(false);return}try{let e={answer:"",formModel:null,insight_id:null};if(r==="ask-ai"||this.isChat){this.isChat=true;this.conversationHistory.push({message:this.formData.search,images:i,status:"success",type:"user"});this.aiMessageId=`ai-message-${o()}`;this.thumbsId=o();this.conversationHistory.push({message:`<div class="animate-ping">...</div>`,type:"ai",status:"pending",id:this.aiMessageId});if(i&&i.length>0){this.imgFiles=i}this.conversationHistory.pop();e.answer=e===null||e===void 0?void 0:e.answer;const t={message:e===null||e===void 0?void 0:e.answer,type:"ai",status:"success",insightId:e===null||e===void 0?void 0:e.insight_id,id:this.aiMessageId,thumbsId:this.thumbsId,formModel:e===null||e===void 0?void 0:e.formModel};this.conversationHistory=[...this.conversationHistory,t];this.startStream.emit({search:this.formData.search})}else{if(this.autoSearch){e=await s(this.dataKey,this.dataMode,this.formData.search.trim());this.displaySearchResults(e)}}}catch(e){console.error(e)}finally{this.isSubmitted=false;this.stateChanged.emit(false)}};this.displaySearchResults=e=>{this.searchResults=e.docs||[...[]];this.isSubmitted=false};this.dataMode=undefined;this.dataKey=undefined;this.resultPosition="below";this.autoSearch=true;this.categorize=true;this.formData={search:""};this.conversationHistory=[];this.searchResults=[];this.isOpen=false}componentWillLoad(){this.socketService=i.createInstance(this.dataMode)}surveyHandler(e){if(e.detail.type==="button"){this.handleSubmit(null,e.detail.results,e.detail.type,false,null)}else if(e.detail.type==="carousel"){this.conversationHistory=[...this.conversationHistory,e.detail.results]}else if(e.detail.type==="update"){const t=this.conversationHistory.findIndex((t=>t.id===e.detail.results.id));this.conversationHistory=[...this.conversationHistory.slice(0,t),e.detail.results,...this.conversationHistory.slice(t+1)]}}render(){return r("div",{key:"fd869e6216dbc229158ab810255c2c224716da28",style:{width:"100%"},class:"container flex flex-col"},this.resultPosition==="above"&&r("div",{key:"808679156f6d81f02e5f373f2e78d71229d1d973",class:"custom-results realtive"},!this.isChat&&!this.categorize&&this.isOpen&&r(n,{key:"d1dba0ed45ebcf1c4a83667a32fef03dd5ee6e28",results:this.searchResults}),!this.isChat&&this.categorize&&this.isOpen&&r("ai12z-category",{key:"de742d5e52b7010f8a0b91d71f9d3fe37d36b619",categoryList:this.searchResults,linkTarget:"_blank"})),this.resultPosition==="above"&&r("div",{key:"31919db63c3298e7bbdc0f67a79e39aba1b3a380"},this.isChat&&r("ai12z-chat",{key:"fdbc7c01987a6e2230b5107ce9f81e3f9ca811b6",chats:this.conversationHistory,env:this.dataMode,query:this.formData.search,apiKey:this.dataKey,aiMessageId:this.aiMessageId,imgFiles:this.imgFiles,target:"_blank",voiceType:"default",voice:"Google US English",onFeedback:async e=>{const{feedback:t,insightId:r}=e.detail;a(this.dataKey,this.dataMode,r,t)},componentType:"inline",chatPosition:this.resultPosition,socketIn:this.socketService})),r("div",{key:"efa3dac856ed75e054ac295952eebe6aaf731e92",class:"search-bar"},r("ai12z-input-form",{key:"03d3715554be98947dd74619ab1c2e96eb9daa7f",onAction:async e=>{const{value:t,type:r,followUp:o,imgFiles:s}=e.detail;await this.handleSubmit(e,t,r,o,s)},isChat:this.isChat,placeholder:"AI search",buttonText:"Ask AI",iconSrc:"",followUpLabel:"Do you have a follow up question?",isImageUpload:true,isEnableMic:true,componentType:"inline"})),this.resultPosition==="below"&&r("div",{key:"b04d25f7474a6182546f588c4136c440ef9b3d30",class:"custom-results realtive"},!this.isChat&&!this.categorize&&this.isOpen&&r(n,{key:"b906fa5741e3ab94fcbf63fc1b2f46ef218f731d",results:this.searchResults}),!this.isChat&&this.categorize&&this.isOpen&&r("ai12z-category",{key:"bfec01c28d085e157a8ff4e2278861dc79b754ae",categoryList:this.searchResults,linkTarget:"_blank"})),this.resultPosition==="below"&&r("div",{key:"03e27716c2ac6374beaaf04d397b14e6d4f28af6"},this.isChat&&r("ai12z-chat",{key:"21a5993ebcd323e98e75a075c0e8a878fdc2f645",chats:this.conversationHistory,env:this.dataMode,query:this.formData.search,apiKey:this.dataKey,aiMessageId:this.aiMessageId,imgFiles:this.imgFiles,target:"_blank",voiceType:"default",voice:"Google US English",onFeedback:async e=>{const{feedback:t,insightId:r}=e.detail;a(this.dataKey,this.dataMode,r,t)},componentType:"inline",chatPosition:this.resultPosition,socketIn:this.socketService})))}};h.style=p+c;export{h as A};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,h as r}from"./p-682c54c0.js";import{g as o,h as s,i as a}from"./p-bcf74d74.js";import{S as i,a as n}from"./p-9e3df302.js";const l='/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-bold);font-weight:600}.prose :where(astrong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(blockquotestrong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(theadthstrong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-alpha}.prose :where(ol[type=As]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-alpha}.prose :where(ol[type=as]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-roman}.prose :where(ol[type=Is]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:upper-roman}.prose :where(ol[type=is]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose]*)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose]*))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose]*))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose]*)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose]*)){border-inline-start-color:var(--tw-prose-quote-borders);border-inline-start-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em;quotes:"\\201C""\\201D""\\2018""\\2019"}.prose :where(blockquotep:first-of-type):not(:where([class~=not-prose],[class~=not-prose]*)):before{content:open-quote}.prose :where(blockquotep:last-of-type):not(:where([class~=not-prose],[class~=not-prose]*)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4strong):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:2em;margin-top:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose]*)){display:block;margin-bottom:2em;margin-top:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:2em;margin-top:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose]*)){border-radius:.3125rem;box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);color:var(--tw-prose-kbd);font-family:inherit;font-size:.875em;font-weight:500;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose]*)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose]*)):after{content:"`"}.prose :where(acode):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(h1code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(h2code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-size:.875em}.prose :where(h3code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit;font-size:.9em}.prose :where(h4code):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(blockquotecode):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(theadthcode):not(:where([class~=not-prose],[class~=not-prose]*)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose]*)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose :where(precode):not(:where([class~=not-prose],[class~=not-prose]*)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(precode):not(:where([class~=not-prose],[class~=not-prose]*)):before{content:none}.prose :where(precode):not(:where([class~=not-prose],[class~=not-prose]*)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose]*)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;text-align:start;width:100%}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose]*)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(theadth):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-headings);font-weight:600;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em;vertical-align:bottom}.prose :where(tbodytr):not(:where([class~=not-prose],[class~=not-prose]*)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbodytr:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){border-bottom-width:0}.prose :where(tbodytd):not(:where([class~=not-prose],[class~=not-prose]*)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose]*)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoottd):not(:where([class~=not-prose],[class~=not-prose]*)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose]*)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:0;margin-top:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:.375em}.prose :where(.prose>ul>lip):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em}.prose :where(ulul,ulol,olul,olol):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:.75em;margin-top:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:1.25em;margin-top:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(theadth:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:0}.prose :where(theadth:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-end:0}.prose :where(tbodytd,tfoottd):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose :where(tbodytd:first-child,tfoottd:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-start:0}.prose :where(tbodytd:last-child,tfoottd:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:2em;margin-top:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose]*)){margin-bottom:0}.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-0{bottom:0}.bottom-12{bottom:3rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\\[-2px\\]{bottom:-2px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:1rem}.left-5{left:1.25rem}.left-\\[3px\\]{left:3px}.right-0{right:0}.right-4{right:1rem}.right-7{right:1.75rem}.right-8{right:2rem}.top-0{top:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.m-\\[-1px\\]{margin:-1px}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-1{margin-left:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-3{margin-right:.75rem}.ms-2{margin-inline-start:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-4{margin-top:1rem}.mt-px{margin-top:1px}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.size-10{height:2.5rem;width:2.5rem}.size-6{height:1.5rem;width:1.5rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[1px\\]{height:1px}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-80{max-height:20rem}.min-h-\\[calc\\(100\\%-1px\\)\\]{min-height:calc(100% - 1px)}.min-h-fit{min-height:fit-content}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-11\\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[1px\\]{width:1px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[200px\\]{min-width:200px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-\\[1_1_0\\]{flex:1 1 0}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.translate-y-\\[0\\.5px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[0\\.5px\\]{--tw-translate-y:0.5px}.rotate-45{--tw-rotate:45deg}.rotate-45,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.scale-110,.scale-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-2{column-gap:.5rem}.gap-y-1{row-gap:.25rem}.gap-y-3{row-gap:.75rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-inherit{background-color:inherit}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-60{--tw-bg-opacity:0.6}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-green-400{--tw-gradient-from:#4ade80 var(--tw-gradient-from-position);--tw-gradient-to:rgba(74,222,128,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\\[10px\\]{padding:10px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pr-\\[14px\\]{padding-right:14px}.pt-2{padding-top:.5rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-bottom{vertical-align:bottom}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-normal{line-height:1.5}.tracking-tight{letter-spacing:-.025em}.text-\\[\\#001E5B\\]{--tw-text-opacity:1;color:rgb(0 30 91/var(--tw-text-opacity))}.text-\\[\\#0344D1\\]{--tw-text-opacity:1;color:rgb(3 68 209/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-slate-900\\/10{--tw-ring-color:rgba(15,23,42,.1)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\\[ko_memo\\:\\"\\+n\\+\\"\\]{ko_memo:"+n+"}.after\\:invisible:after{content:var(--tw-content);visibility:hidden}.after\\:whitespace-pre-wrap:after{content:var(--tw-content);white-space:pre-wrap}.hover\\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.hover\\:bg-indigo-300:hover{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity))}.hover\\:bg-opacity-80:hover{--tw-bg-opacity:0.8}.hover\\:bg-gradient-to-t:hover{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.hover\\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-slate-300:hover{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline:focus{outline-style:solid}.focus\\:outline-2:focus{outline-width:2px}.focus\\:outline-offset-2:focus{outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity))}.focus\\:ring-sky-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-transparent:disabled,.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent}.peer:checked~.peer-checked\\:block{display:block}:is(.dark.dark\\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark.dark\\:bg-blue-600){--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}:is(.dark.dark\\:text-gray-100){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark.dark\\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark.dark\\:text-gray-800){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark.dark\\:text-slate-400){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}:is(.dark.dark\\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark.dark\\:hover\\:bg-blue-700:hover){--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}:is(.dark.dark\\:focus\\:ring-blue-800:focus){--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity))}@media (min-width:640px){.sm\\:h-3{height:.75rem}.sm\\:w-3{width:.75rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\\:right-0{right:0}.md\\:col-span-2{grid-column:span 2/span 2}.md\\:ml-2{margin-left:.5rem}.md\\:mt-6{margin-top:1.5rem}.md\\:block{display:block}.md\\:flex{display:flex}.md\\:grid{display:grid}.md\\:h-4{height:1rem}.md\\:h-96{height:24rem}.md\\:h-auto{height:auto}.md\\:w-1\\/2{width:50%}.md\\:w-1\\/3{width:33.333333%}.md\\:w-2\\/3{width:66.666667%}.md\\:w-4{width:1rem}.md\\:max-w-xl{max-width:36rem}.md\\:flex-none{flex:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:gap-4{gap:1rem}.md\\:gap-x-3{column-gap:.75rem}.md\\:rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.md\\:p-2{padding:.5rem}.md\\:p-2\\.5{padding:.625rem}.md\\:p-4{padding:1rem}.md\\:pl-0{padding-left:0}.md\\:pl-3{padding-left:.75rem}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1024px){.lg\\:px-8{padding-left:2rem;padding-right:2rem}}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl]*){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:space-x-reverse:where([dir=rtl],[dir=rtl]*)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}';const p=l;const d=":host{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-font-size) !important}";const c=d;const h=class{constructor(r){e(this,r);this.stateChanged=t(this,"stateChanged",7);this.startStream=t(this,"startStream",7);this.streamResponse=t(this,"streamResponse",7);this.startInlineResponse=t(this,"startInlineResponse",7);this.endResponse=t(this,"endResponse",7);this.aiMessageId="";this.ctaSettings={};this.imgFiles=[];this.thumbsId="";this.isChat=false;this.isSubmitted=false;this.handleSubmit=async(e,t,r,a,i)=>{var n;e.preventDefault();this.isOpen=true;this.formData=Object.assign(Object.assign({},this.formData),{search:t});this.imgFiles=i;if(!a&&r==="follow-up"){this.conversationHistory=[];this.isChat=false}if(!this.formData.search&&((n=this.formData.search)===null||n===void 0?void 0:n.trim().length)<3&&i&&i.length<1){this.isSubmitted=false;this.stateChanged.emit(false);return}try{let e={answer:"",formModel:null,insight_id:null};if(r==="ask-ai"||this.isChat){this.isChat=true;this.conversationHistory.push({message:this.formData.search,images:i,status:"success",type:"user"});this.aiMessageId=`ai-message-${o()}`;this.thumbsId=o();this.conversationHistory.push({message:`<div class="animate-ping">...</div>`,type:"ai",status:"pending",id:this.aiMessageId});if(i&&i.length>0){this.imgFiles=i}this.conversationHistory.pop();e.answer=e===null||e===void 0?void 0:e.answer;const t={message:e===null||e===void 0?void 0:e.answer,type:"ai",status:"success",insightId:e===null||e===void 0?void 0:e.insight_id,id:this.aiMessageId,thumbsId:this.thumbsId,formModel:e===null||e===void 0?void 0:e.formModel};this.conversationHistory=[...this.conversationHistory,t];this.startStream.emit({search:this.formData.search})}else{if(this.autoSearch){e=await s(this.dataKey,this.dataMode,this.formData.search.trim());this.displaySearchResults(e)}}}catch(e){console.error(e)}finally{this.isSubmitted=false;this.stateChanged.emit(false)}};this.displaySearchResults=e=>{this.searchResults=e.docs||[...[]];this.isSubmitted=false};this.dataMode=undefined;this.dataKey=undefined;this.resultPosition="below";this.autoSearch=true;this.categorize=true;this.formData={search:""};this.conversationHistory=[];this.searchResults=[];this.isOpen=false}componentWillLoad(){this.socketService=i.createInstance(this.dataMode)}surveyHandler(e){if(e.detail.type==="button"){this.handleSubmit(null,e.detail.results,e.detail.type,false,null)}else if(e.detail.type==="carousel"){this.conversationHistory=[...this.conversationHistory,e.detail.results]}else if(e.detail.type==="update"){const t=this.conversationHistory.findIndex((t=>t.id===e.detail.results.id));this.conversationHistory=[...this.conversationHistory.slice(0,t),e.detail.results,...this.conversationHistory.slice(t+1)]}}render(){return r("div",{key:"fd869e6216dbc229158ab810255c2c224716da28",style:{width:"100%"},class:"container flex flex-col"},this.resultPosition==="above"&&r("div",{key:"808679156f6d81f02e5f373f2e78d71229d1d973",class:"custom-results realtive"},!this.isChat&&!this.categorize&&this.isOpen&&r(n,{key:"d1dba0ed45ebcf1c4a83667a32fef03dd5ee6e28",results:this.searchResults}),!this.isChat&&this.categorize&&this.isOpen&&r("ai12z-category",{key:"de742d5e52b7010f8a0b91d71f9d3fe37d36b619",categoryList:this.searchResults,linkTarget:"_blank"})),this.resultPosition==="above"&&r("div",{key:"31919db63c3298e7bbdc0f67a79e39aba1b3a380"},this.isChat&&r("ai12z-chat",{key:"fdbc7c01987a6e2230b5107ce9f81e3f9ca811b6",chats:this.conversationHistory,env:this.dataMode,query:this.formData.search,apiKey:this.dataKey,aiMessageId:this.aiMessageId,imgFiles:this.imgFiles,target:"_blank",voiceType:"default",voice:"Google US English",onFeedback:async e=>{const{feedback:t,insightId:r}=e.detail;a(this.dataKey,this.dataMode,r,t)},componentType:"inline",chatPosition:this.resultPosition,socketIn:this.socketService})),r("div",{key:"efa3dac856ed75e054ac295952eebe6aaf731e92",class:"search-bar"},r("ai12z-input-form",{key:"03d3715554be98947dd74619ab1c2e96eb9daa7f",onAction:async e=>{const{value:t,type:r,followUp:o,imgFiles:s}=e.detail;await this.handleSubmit(e,t,r,o,s)},isChat:this.isChat,placeholder:"AI search",buttonText:"Ask AI",iconSrc:"",followUpLabel:"Do you have a follow up question?",isImageUpload:true,isEnableMic:true,componentType:"inline"})),this.resultPosition==="below"&&r("div",{key:"b04d25f7474a6182546f588c4136c440ef9b3d30",class:"custom-results realtive"},!this.isChat&&!this.categorize&&this.isOpen&&r(n,{key:"b906fa5741e3ab94fcbf63fc1b2f46ef218f731d",results:this.searchResults}),!this.isChat&&this.categorize&&this.isOpen&&r("ai12z-category",{key:"bfec01c28d085e157a8ff4e2278861dc79b754ae",categoryList:this.searchResults,linkTarget:"_blank"})),this.resultPosition==="below"&&r("div",{key:"03e27716c2ac6374beaaf04d397b14e6d4f28af6"},this.isChat&&r("ai12z-chat",{key:"21a5993ebcd323e98e75a075c0e8a878fdc2f645",chats:this.conversationHistory,env:this.dataMode,query:this.formData.search,apiKey:this.dataKey,aiMessageId:this.aiMessageId,imgFiles:this.imgFiles,target:"_blank",voiceType:"default",voice:"Google US English",onFeedback:async e=>{const{feedback:t,insightId:r}=e.detail;a(this.dataKey,this.dataMode,r,t)},componentType:"inline",chatPosition:this.resultPosition,socketIn:this.socketService})))}};h.style=p+c;export{h as A};
|
|
2
|
+
//# sourceMappingURL=p-e49a0ab7.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai12z",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.14",
|
|
4
4
|
"description": "ai12z Web Components",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"workbox-build": "^4.3.1"
|
|
70
70
|
},
|
|
71
71
|
"license": "ISC",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "2a85e7644ea079efc188b626549d8c626ee4ca7b"
|
|
73
73
|
}
|