PageSourceSearch

https://balidailytours.com/assets/app-fc44dea2422cfaef9b59b7c164de99d3.js?vsn=d

js balidailytours.com collected 2026-10-09 22:36:17 UTC 447,933 bytes, 109 lines download raw bytes

1(()=>{var If=Object.create;var Qo=Object.defineProperty;var Df=Object.getOwnPropertyDescriptor;var Of=Object.getOwnPropertyNames;var Ff=Object.getPrototypeOf,Nf=Object.prototype.hasOwnProperty;var Bf=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},At=(e,t)=>{for(var r in t)Qo(e,r,{get:t[r],enumerable:!0})},Hf=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Of(t))!Nf.call(e,n)&&n!==r&&Qo(e,n,{get:()=>t[n],enumerable:!(i=Df(t,n))||i.enumerable});return e};var jf=(e,t,r)=>(r=e!=null?If(Ff(e)):{},Hf(t||!e||!e.__esModule?Qo(r,"default",{value:e,enumerable:!0}):r,e));var Qd=Bf((Zd,io)=>{(function(e,t){"use strict";(function(){for(var g=0,v=["ms","moz","webkit","o"],y=0;y<v.length&&!e.requestAnimationFrame;++y)e.requestAnimationFrame=e[v[y]+"RequestAnimationFrame"],e.cancelAnimationFrame=e[v[y]+"CancelAnimationFrame"]||e[v[y]+"CancelRequestAnimationFrame"];e.requestAnimationFrame||(e.requestAnimationFrame=function(E,P){var T=new Date().getTime(),B=Math.max(0,16-(T-g)),I=e.setTimeout(function(){E(T+B)},B);return g=T+B,I}),e.cancelAnimationFrame||(e.cancelAnimationFrame=function(E){clearTimeout(E)})})();var r,i,n,a=null,o=null,d=null,p=function(g,v,y){g.addEventListener?g.addEventListener(v,y,!1):g.attachEvent?g.attachEvent("on"+v,y):g["on"+v]=y},h={autoRun:!0,barThickness:3,barColors:{0:"rgba(26,  188, 156, .9)",".25":"rgba(52,  152, 219, .9)",".50":"rgba(241, 196, 15,  .9)",".75":"rgba(230, 126, 34,  .9)","1.0":"rgba(211, 84,  0,   .9)"},shadowBlur:10,shadowColor:"rgba(0,   0,   0,   .6)",className:null},$=function(){r.width=e.innerWidth,r.height=h.barThickness*5;var g=r.getContext("2d");g.shadowBlur=h.shadowBlur,g.shadowColor=h.shadowColor;var v=g.createLinearGradient(0,0,r.width,0);for(var y in h.barColors)v.addColorStop(y,h.barColors[y]);g.lineWidth=h.barThickness,g.beginPath(),g.moveTo(0,h.barThickness/2),g.lineTo(Math.ceil(i*r.width),h.barThickness/2),g.strokeStyle=v,g.stroke()},b=function(){r=t.createElement("canvas");var g=r.style;g.position="fixed",g.top=g.left=g.right=g.margin=g.padding=0,g.zIndex=100001,g.display="none",h.className&&r.classList.add(h.className),t.body.appendChild(r),p(e,"resize",$)},m={config:function(g){for(var v in g)h.hasOwnProperty(v)&&(h[v]=g[v])},show:function(g){if(!n)if(g){if(d)return;d=setTimeout(()=>m.show(),g)}else n=!0,o!==null&&e.cancelAnimationFrame(o),r||b(),r.style.opacity=1,r.style.display="block",m.progress(0),h.autoRun&&(function v(){a=e.requestAnimationFrame(v),m.progress("+"+.05*Math.pow(1-Math.sqrt(i),2))})()},progress:function(g){return typeof g>"u"||(typeof g=="string"&&(g=(g.indexOf("+")>=0||g.indexOf("-")>=0?i:0)+parseFloat(g)),i=g>1?1:g,$()),i},hide:function(){clearTimeout(d),d=null,n&&(n=!1,a!=null&&(e.cancelAnimationFrame(a),a=null),(function g(){if(m.progress("+.1")>=1&&(r.style.opacity-=.05,r.style.opacity<=.05)){r.style.display="none",o=null;return}o=e.requestAnimationFrame(g)})())}};typeof io=="object"&&typeof io.exports=="object"?io.exports=m:typeof define=="function"&&define.amd?define(function(){return m}):this.topbar=m}).call(Zd,window,document)});(function(){var e=t();function t(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function n(a,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var d=document.createEvent("CustomEvent");return d.initCustomEvent(a,o.bubbles,o.cancelable,o.detail),d}return n.prototype=window.Event.prototype,n}function r(n,a){var o=document.createElement("input");return o.type="hidden",o.name=n,o.value=a,o}function i(n,a){var o=n.getAttribute("data-to"),d=r("_method",n.getAttribute("data-method")),p=r("_csrf_token",n.getAttribute("data-csrf")),h=document.createElement("form"),$=document.createElement("input"),b=n.getAttribute("target");h.method=n.getAttribute("data-method")==="get"?"get":"post",h.action=o,h.style.display="none",b?h.target=b:a&&(h.target="_blank"),h.appendChild(p),h.appendChild(d),document.body.appendChild(h),$.type="submit",h.appendChild($),$.click()}window.addEventListener("click",function(n){var a=n.target;if(!n.defaultPrevented)for(;a&&a.getAttribute;){var o=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!a.dispatchEvent(o))return n.preventDefault(),n.stopImmediatePropagation(),!1;if(a.getAttribute("data-method")&&a.getAttribute("data-to"))return i(a,n.metaKey||n.shiftKey),n.preventDefault(),!1;a=a.parentNode}},!1),window.addEventListener("phoenix.link.click",function(n){var a=n.target.getAttribute("data-confirm");a&&!window.confirm(a)&&n.preventDefault()},!1)})();var ms=e=>typeof e=="function"?e:function(){return e},Uf=typeof self<"u"?self:null,_s=typeof window<"u"?window:null,Gi=Uf||_s||globalThis,zf="2.0.0",Yi={connecting:0,open:1,closing:2,closed:3},Vf=100,qf=1e4,Wf=1e3,pi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},pn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},el={longpoll:"longpoll",websocket:"websocket"},Gf={complete:4}
vendor: 4,526 bytes, line 1
1,tl="base64url.bearer.phx.",Ha=class{constructor(e,t,r,i){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(i=>i.status===e).forEach(i=>i.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.cancelRefEvent(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},ld=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Yf=class{constructor(e,t,r){this.state=pi.closed,this.topic=e,this.params=ms(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ha(this,pn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new ld(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=pi.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=pi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=pi.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=pi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Ha(this,pn.leave,ms({}),this.timeout).send(),this.state=pi.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(pn.reply,(i,n)=>{this.trigger(this.replyEventName(n),i)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(pn.close,e)}onError(e){return this.on(pn.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new Ha(this,e,function(){return t},r);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=pi.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(pn.close,"leave")},r=new Ha(this,pn.leave,ms({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}
vendor: 10,978 bytes, lines 1-2
1isMember(e,t,r,i){return this.topic!==e?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=pi.joining,this.joinPush.resend(e))}trigger(e,t,r,i){let n=this.onMessage(e,t,r,i);if(t&&!n)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(o=>o.event===e);for(let o=0;o<a.length;o++)a[o].callback(n,r,i||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===pi.closed}isErrored(){return this.state===pi.errored}isJoined(){return this.state===pi.joined}isJoining(){return this.state===pi.joining}isLeaving(){return this.state===pi.leaving}},Ua=class{static request(e,t,r,i,n,a,o){if(Gi.XDomainRequest){let d=new Gi.XDomainRequest;return this.xdomainRequest(d,e,t,i,n,a,o)}else if(Gi.XMLHttpRequest){let d=new Gi.XMLHttpRequest;return this.xhrRequest(d,e,t,r,i,n,a,o)}else{if(Gi.fetch&&Gi.AbortController)return this.fetchRequest(e,t,r,i,n,a,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,i,n,a,o){let d={method:e,headers:r,body:i},p=null;if(n){p=new AbortController;let h=setTimeout(()=>p.abort(),n);d.signal=p.signal}return Gi.fetch(t,d).then(h=>h.text()).then(h=>this.parseJSON(h)).then(h=>o&&o(h)).catch(h=>{h.name==="AbortError"&&a?a():o&&o(null)}),p}static xdomainRequest(e,t,r,i,n,a,o){return e.timeout=n,e.open(t,r),e.onload=()=>{let d=this.parseJSON(e.responseText);o&&o(d)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(i),e}static xhrRequest(e,t,r,i,n,a,o,d){e.open(t,r,!0),e.timeout=a;for(let[p,h]of Object.entries(i))e.setRequestHeader(p,h);return e.onerror=()=>d&&d(null),e.onreadystatechange=()=>{if(e.readyState===Gf.complete&&d){let p=this.parseJSON(e.responseText);d(p)}},o&&(e.ontimeout=o),e.send(n),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=t?`${t}[${i}]`:i,a=e[i];typeof a=="object"?r.push(this.serialize(a,n)):r.push(encodeURIComponent(n)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},Jf=e=>{let t="",r=new Uint8Array(e),i=r.byteLength;for(let n=0;n<i;n++)t+=String.fromCharCode(r[n]);return btoa(t)},$s=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(tl)&&(this.authToken=atob(t[1].slice(tl.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Yi.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+el.websocket),"$1/"+el.longpoll)}endpointURL(){return Ua.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Yi.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Yi.open||this.readyState===Yi.connecting}poll(){let e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:i,messages:n}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else r=0;switch(r){case 200:n.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Yi.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=Jf(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;let r=t+Vf,i=e.slice(t,r);this.ajax("POST",{"Content-Type":"application/x-ndjson"},i.join(`
2`),()=>this.ontimeout(),n=>{!n||n.status!==200?(this.awaitingBatchAck=!1,this.onerror(n&&n.status),this.closeAndRetry(1011,"internal server error",!1)):r<e.length?this.batchSend(e,r):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,r){for(let n of this.reqs)n.abort();this.readyState=Yi.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],this.awaitingBatchAck=!1,clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(e,t,r,i,n){let a,o=()=>{this.reqs.delete(a),i()};a=Ua.request(e,this.endpointURL(),t,r,this.timeout,o,d=>{this.reqs.delete(a),this.isActive()&&n(d)}),this.reqs.add(a)}};var ja={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,i,n,a,o]=JSON.parse(e);return t({join_ref:r,ref:i,topic:n,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:i,topic:n,payload:a}=e,o=new TextEncoder,d=o.encode(t),p=o.encode(r),h=o.encode(n),$=o.encode(i);this.assertFieldSize(d.byteLength,"join_ref"),this.assertFieldSize(p.byteLength,"ref"),this.assertFieldSize(h.byteLength,"topic"),this.assertFieldSize($.byteLength,"event");let b=this.META_LENGTH+d.byteLength+p.byteLength+h.byteLength+$.byteLength,m=new ArrayBuffer(this.HEADER_LENGTH+b),g=new Uint8Array(m),v=new DataView(m),y=0;v.setUint8(y++,this.KINDS.push),v.setUint8(y++,d.byteLength),v.setUint8(y++,p.byteLength),v.setUint8(y++,h.byteLength),v.setUint8(y++,$.byteLength),g.set(d,y),y+=d.byteLength,g.set(p,y),y+=p.byteLength,g.set(h,y),y+=h.byteLength,g.set($,y),y+=$.byteLength;var E=new Uint8Array(m.byteLength+a.byteLength);return E.set(g,0),E.set(new Uint8Array(a),m.byteLength),E.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,i);case this.KINDS.reply:return this.decodeReply(e,t,i);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,i)}},decodePush(e,t,r){let i=t.getUint8(1),n=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,d=r.decode(e.slice(o,o+i));o=o+i;let p=r.decode(e.slice(o,o+n));o=o+n;let h=r.decode(e.slice(o,o+a));o=o+a;let $=e.slice(o,e.byteLength);return{join_ref:d,ref:null,topic:p,event:h,payload:$}},decodeReply(e,t,r){let i=t.getUint8(1),n=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),d=this.HEADER_LENGTH+this.META_LENGTH,p=r.decode(e.slice(d,d+i));d=d+i;let h=r.decode(e.slice(d,d+n));d=d+n;let $=r.decode(e.slice(d,d+a));d=d+a;let b=r.decode(e.slice(d,d+o));d=d+o;let m=e.slice(d,e.byteLength),g={status:b,response:m};return{join_ref:p,ref:h,topic:$,event:pn.reply,payload:g}},decodeBroadcast(e,t,r){let i=t.getUint8(1),n=t.getUint8(2),a=this.HEADER_LENGTH+2,o=r.decode(e.slice(a,a+i));a=a+i;let d=r.decode(e.slice(a,a+n));a=a+n;let p=e.slice(a,e.byteLength);return{join_ref:null,ref:null,topic:o,event:d,payload:p}}},cd=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||qf,this.transport=t.transport||Gi.WebSocket||$s,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Gi&&Gi.sessionStorage,this.establishedConnections=0,this.defaultEncoder=ja.encode.bind(ja),this.defaultDecoder=ja.decode.bind(ja),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.transport!==$s?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;_s&&_s.addEventListener&&(_s.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),r=this.connectClock)}),_s.addEventListener("pageshow",i=>{r===this.connectClock&&(r=null,this.connect())}),_s.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=i=>t.rejoinAfterMs?t.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>t.reconnectAfterMs?t.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(i,n,a)=>{console.log(`${i}: ${n}`,a)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ms(t.params||{}),this.endPoint=`${e}/${el.websocket}`,this.vsn=t.vsn||zf,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new ld(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(()=>this.connect())},this.reconnectAfterMs),this.authToken=t.authToken&&ms(t.authToken)}getLongPollTransport(){return $s}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Ua.appendParams(Ua.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ms(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==$s?this.connectWithF
vendor: 4,303 bytes, line 2
2allback($s,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let i=this.onMessage(n=>{n.ref===t&&(this.off([i]),e(Date.now()-r))});return!0}transportName(e){return e===$s?"LongPoll":e.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${tl}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,i=!0,n,a,o=this.transportName(e),d=p=>{this.log("transport",`falling back to ${o}...`,p),this.off([n,a]),i=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return d("memorized");this.fallbackTimer=setTimeout(d,t),a=this.onError(p=>{this.log("transport","error",p),i&&!r&&(clearTimeout(this.fallbackTimer),d(p))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!i){let p=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${p}`,"true"),this.log("transport",`established ${p} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(d,t),this.ping(p=>{this.log("transport","connected to primary after",p),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transportName(this.transport)} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError("heartbeat_timeout"),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Wf,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();let i=this.conn;this.waitForBufferDone(i,()=>{t?i.close(t,r||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Yi.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{});let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError("connection_closed"),this.clearHeartbeats(),!this.closeWasClean&&t!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,r])=>r(e))}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,i])=>{i(e,t,r)}),(t===this.transport||r>0)&&this.triggerChanError("connection_error")}
2triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(pn.error,{source:"transport",reason:e})})}connectionState(){switch(this.conn&&this.conn.readyState){case Yi.connecting:return"connecting";case Yi.open:return"open";case Yi.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new Yf(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:i,ref:n,join_ref:a}=e;this.log("push",`${t} ${r} (${a}, ${n})`,i)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:i,payload:n,ref:a,join_ref:o}=t;a&&a===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${r} ${i} ${a&&"("+a+")"||""}`,n);for(let d=0;d<this.channels.length;d++){let p=this.channels[d];p.isMember(r,i,n,o)&&p.trigger(i,n,a,o)}for(let d=0;d<this.stateChangeCallbacks.message.length;d++){let[,p]=this.stateChangeCallbacks.message[d];p(t)}})}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};var Bd="consecutive-reloads",Xf=10,Kf=5e3,Zf=1e4,Qf=3e4,Hd=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],rl="phx-drop-target-active",Ii="data-phx-component",ks="data-phx-view",il="data-phx-link",eh="track-static",dd="data-phx-link-state",Es="data-phx-ref-loading",xi="data-phx-ref-src",Xt="data-phx-ref-lock",ud="phx-pending-refs",jd="track-uploads",hn="data-phx-upload-ref",xl="data-phx-preflighted-refs",th="data-phx-done-refs",za="drop-target",ul="data-phx-active-refs",Ja="phx:live-file:updated",Ud="data-phx-skip",pl="data-phx-id",pd="data-phx-prune",fd="phx-connected",zn="phx-loading",xs="phx-error",hd="phx-client-error",Zs="phx-server-error",Jn="data-phx-parent-id",bl="data-phx-main",fn="data-phx-root-id",fl="viewport-top",hl="viewport-bottom",rh="viewport-overrun-target",ih="trigger-action",Qa="phx-has-focused",nh=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],zd=["checkbox","radio"],aa="phx-has-submitted",Zi="data-phx-session",oa=`[${Zi}]`,gl="data-phx-sticky",Yn="data-phx-static",vl="data-phx-readonly",ws="data-phx-disabled",gd="disable-with",eo="data-phx-disable-with-restore",Qs="hook",sh="debounce",ah="throttle",to="update",oh="patch-focused",Xa="stream",ea="data-phx-stream",wl="data-phx-portal",Xn="data-phx-teleported",Sn="data-phx-teleported-src",Ka="data-phx-runtime-hook",lh="data-phx-pid",ch="key",Ji="phxPrivate",vd="auto-recover",$d="no-unused-field",Va="phx:live-socket:debug",nl="phx:live-socket:profiling",sl="phx:live-socket:latency-sim",qa="phx:nav-history-position",dh="progress",_d="mounted",md="__phoenix_reload_status__",uh=1,al=3,ph=200,fh=500,hh="phx-",gh=3e4,ta="debounce-trigger",ra="throttled",xd="debounce-prev-key",vh={debounce:300,throttle:300},bd=[Es,xi,Xt],fi="s",ol="r",Or="c",qt="k",Xi="kc",wd="km",yd="e",kd="r",Ed="t",kn="p",b
2s="stream",$h="phx:live-view:diagnostic",_h=1,mh=class{constructor(e,t,r){let{chunk_size:i,chunk_timeout:n}=t;this.liveSocket=r,this.entry=e,this.offset=0,this.chunkSize=i,this.chunkTimeout=n,this.chunkTimer=null,this.errored=!1,this.uploadChannel=r.channel(`lvu:${e.ref}`,{token:e.metadata()})}error(e){this.errored||(this.uploadChannel.leave(),this.errored=!0,this.chunkTimer!=null&&clearTimeout(this.chunkTimer),this.entry.error(e))}upload(){this.uploadChannel.onError(e=>this.error(e)),this.uploadChannel.join().receive("ok",e=>this.readNextChunk()).receive("error",({reason:e})=>this.error(e))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let e=new window.FileReader,t=this.entry.file.slice(this.offset,this.chunkSize+this.offset);e.onload=r=>{if(r.target?.error===null)this.offset+=r.target.result.byteLength,this.pushChunk(r.target.result);else return this.entry.view.logError("upload.read-failed","Read error: "+r.target?.error,{entry:this.entry,offset:this.offset})},e.readAsArrayBuffer(t)}pushChunk(e){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e,this.chunkTimeout).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:t})=>this.error(t))}},Vd=e=>{window.dispatchEvent(new CustomEvent($h,{detail:{version:_h,...e}}))},Ki=(e,t,r,i)=>{console.error&&console.error(t,r),Vd({level:"error",code:e,message:t,metadata:r,...i})},Ad=(e,t)=>{let r;try{r=new URL(e,window.location.href)}catch{throw new Error(`expected ${t} destination to be a valid URL, got: ${e}`)}if(r.origin!==window.location.origin)throw new Error(`cannot ${t} to "${e}" because its origin does not match the current origin "${window.location.origin}". Use window.location directly for cross-origin navigation.`)},An=e=>{let t=typeof e;return t==="number"||t==="string"&&/^(0|[1-9]\d*)$/.test(e)};function xh(e=Ki){let t=new Map,r=document.querySelectorAll("*[id]");for(let i=0,n=r.length;i<n;i++){let a=r[i].id,o=t.get(a);o?e("dom.duplicate-id",`Multiple IDs detected: ${a}. Ensure unique element ids.`,{id:a,elements:[o,r[i]]},{attribution:"app"}):t.set(a,r[i])}}function bh(e,t=Ki){let r=new Set;Object.keys(e).forEach(i=>{let n=document.getElementById(i);n&&n.parentElement&&n.parentElement.getAttribute("phx-update")!=="stream"&&r.add(n.parentElement)}),r.forEach(i=>{let n=i.id;t("dom.invalid-stream-container",`The stream container with id "${n}" is missing the phx-update="stream" attribute. Ensure it is set for streams to work properly.`,{id:n,container:i},{attribution:"app"})})}var wh=(e,t,r,i)=>{e.liveSocket.isDebugEnabled()&&console.log(`${e.id} ${t}: ${r} - `,i)},ia=e=>typeof e=="function"?e:function(){return e},Za=e=>JSON.parse(JSON.stringify(e)),qd=e=>"structuredClone"in window?structuredClone(e):JSON.parse(JSON.stringify(e)),Gn=(e,t,r)=>{let i=e;do{if(i.matches(`[${t}]`)&&!("disabled"in i&&i.disabled))return i;i=i.parentElement}while(i!==null&&i.nodeType===1&&!(r&&r.isSameNode(i)||i.matches(oa)));return null},Vn=e=>e!==null&&typeof e=="object"&&!(e instanceof Array),yh=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Sd=e=>{for(let t in e)return!1;return!0},ys=(e,t)=>e&&t(e),kh=function(e,t,r,i){e.forEach(n=>{new mh(n,r.config,i).upload()})},Eh=e=>{if(e.dataTransfer.types){for(let t=0;t<e.dataTransfer.types.length;t++)if(e.dataTransfer.types[t]==="Files")return!0}return!1},Ah={canPushState(){return typeof history.pushState<"u"},dropLocal(e,t,r){return e.removeItem(this.localKey(t,r))},updateLocal(e,t,r,i,n){let a=this.getLocal(e,t,r),o=this.localKey(t,r),d=a===null?i:n(a);return e.setItem(o,JSON.stringify(d)),d},getLocal(e,t,r){return JSON.parse(e.getItem(this.localKey(t,r)))},updateCurrentState(e){this.canPushState()&&history.replaceState(e(history.state||{}),"",window.location.href)},pushState(e,t,r){if(this.canPushState()){if(r!==window.location.href){if(t.type=="redirect"&&t.scroll){let i=history.state||{};i.scroll=t.scroll,history.replaceState(i,"",window.location.href)}delete t.scroll,history[e+"State"](t,"",r||null),window.requestAnimationFrame(()=>{let i=this.getHashTargetEl(window.location.hash);i?i.scrollIntoView():t.type==="redirect"&&window.scroll(0,0)})}}else r&&this.redirect(r)},setCookie(e,t,r){let i=typeof r=="number"?` max-age=${r};`:"";document.cookie=`${e}=${t};${i} path=/`},getCookie(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${e}s*=s*([^;]*).*$)|^.*$`),"$1")},deleteCookie(e){document.cookie=`${e}=; max-age=-1; path=/`},redirect(e,t=null,r=i=>{window.location.href=i}){t&&this.setCookie("__phoenix_flash__",t,60),r(e)},localKey(e,t){return`${e}-${t}`},getHashTargetEl(e){let t=e.toString().substring(1);if(t!=="")return document.getElementById(t)||document.querySelector(`a[name="${t}"]`)}},ni=Ah,Wn={byId(e){return document.getElementById(e)||Ki("dom.element-not-found",`no id found for ${e}`,{id:e},{attribution:"internal"})},elementFromTarget(e){return e instanceof Node?e.nodeType===Node.ELEMENT_NODE?e:e.parentElement:null},removeClass(e,t){e.classList.remove(t),e.classList.length===0&&e.removeAttribute("class")},all(e,t,r){if(!e)return[];let i=Array.from(e.querySelectorAll(t));
2return r&&i.forEach(r),i},childNodeLength(e){let t=document.createElement("template");return t.innerHTML=e,t.content.childElementCount},isUploadInput(e){return e.type==="file"&&e.getAttribute(hn)!==null},isAutoUpload(e){return e.hasAttribute("data-phx-auto-upload")},findUploadInputs(e){let t=e.id,r=this.all(document,`input[type="file"][${hn}][form="${t}"]`);return this.all(e,`input[type="file"][${hn}]`).concat(r)},findComponent(e,t,r=document){return r.querySelector(`[${ks}="${e}"][${Ii}="${t}"]`)},getComponent(e,t,r=document){let i=this.findComponent(e,t,r);if(!i)throw new Error(`no component found matching viewId ${e} and cid ${t}`);return i},isPhxDestroyed(e){return!!(e.id&&Wn.private(e,"destroyed"))},wantsNewTab(e){let t=e.ctrlKey||e.shiftKey||e.metaKey||e.button&&e.button===1,r=e.target instanceof HTMLAnchorElement&&e.target.hasAttribute("download"),i=e.target.hasAttribute("target")&&e.target.getAttribute("target").toLowerCase()==="_blank",n=e.target.hasAttribute("target")&&!e.target.getAttribute("target").startsWith("_");return t||i||r||n},isUnloadableFormSubmit(e){return e.target&&e.target.getAttribute("method")==="dialog"||e.submitter&&e.submitter.getAttribute("formmethod")==="dialog"?!1:!e.defaultPrevented&&!this.wantsNewTab(e)},isNewPageClick(e,t){let r=e.target instanceof HTMLAnchorElement?e.target.getAttribute("href"):null,i;if(e.defaultPrevented||r===null||this.wantsNewTab(e)||r.startsWith("mailto:")||r.startsWith("tel:")||e.target.isContentEditable)return!1;try{i=new URL(r)}catch{try{i=new URL(r,t)}catch{return!0}}return i.host===t.host&&i.protocol===t.protocol&&i.pathname===t.pathname&&i.search===t.search?i.hash===""&&!i.href.endsWith("#"):i.protocol.startsWith("http")},markPhxChildDestroyed(e){this.isPhxChild(e)&&e.setAttribute(Zi,""),this.putPrivate(e,"destroyed",!0)},findPhxChildrenInFragment(e,t){let r=document.createElement("template");return r.innerHTML=e,this.findPhxChildren(r.content,t)},isIgnored(e,t){return(e.getAttribute(t)||e.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(e,t,r){return e.getAttribute&&r.indexOf(e.getAttribute(t))>=0},findPhxSticky(e){return this.all(e,`[${gl}]`)},findPhxChildren(e,t){return this.all(e,`${oa}[${Jn}="${t}"]`)},findExistingParentCIDs(e,t){let r=new Set,i=new Set;return t.forEach(n=>{this.all(document,`[${ks}="${e}"][${Ii}="${n}"]`).forEach(a=>{r.add(n),this.all(a,`[${ks}="${e}"][${Ii}]`).map(o=>parseInt(o.getAttribute(Ii))).forEach(o=>i.add(o))})}
2),i.forEach(n=>r.delete(n)),r},private(e,t){return e[Ji]&&e[Ji][t]},deletePrivate(e,t){e[Ji]&&delete e[Ji][t]},putPrivate(e,t,r){e[Ji]||(e[Ji]={}),e[Ji][t]=r},updatePrivate(e,t,r,i){let n=this.private(e,t);n===void 0?this.putPrivate(e,t,i(r)):this.putPrivate(e,t,i(n))},syncPendingAttrs(e,t){e.hasAttribute(xi)&&(Hd.forEach(r=>{e.classList.contains(r)&&t.classList.add(r)}),bd.filter(r=>e.hasAttribute(r)).forEach(r=>{t.setAttribute(r,e.getAttribute(r))}))},copyPrivates(e,t){t[Ji]&&(e[Ji]=t[Ji])},putTitle(e){let t=document.querySelector("title");if(t){let{prefix:r,suffix:i,default:n}=t.dataset,a=typeof e!="string"||e.trim()==="";if(a&&typeof n!="string")return;let o=a?n:e;document.title=`${r||""}${o||""}${i||""}`}else document.title=e},debounce(e,t,r,i,n,a,o,d){let p=e.getAttribute(r),h=e.getAttribute(n);p===""&&(p=i),h===""&&(h=a);let $=p||h;switch($){case null:return d();case"blur":this.incCycle(e,"debounce-blur-cycle",()=>{o()&&d()}),this.once(e,"debounce-blur")&&e.addEventListener("blur",()=>this.triggerCycle(e,"debounce-blur-cycle"));return;default:let b=parseInt($),m=()=>h?this.deletePrivate(e,ra):d(),g=this.incCycle(e,ta,m);if(isNaN(b))return Ki("dom.invalid-debounce",`invalid throttle/debounce value: ${$}`,{el:e,value:$},{attribution:"app"});if(h){let y=!1;if(t.type==="keydown"){let E=this.private(e,xd);this.putPrivate(e,xd,t.key),y=E!==t.key}if(!y&&this.private(e,ra))return!1;{d();let E=setTimeout(()=>{o()&&this.triggerCycle(e,ta)},b);this.putPrivate(e,ra,E)}}else setTimeout(()=>{o()&&this.triggerCycle(e,ta,g)},b);let v=e.form;v&&this.once(v,"bind-debounce")&&v.addEventListener("submit",()=>{Array.from(new FormData(v).entries(),([y])=>{let E=v.elements.namedItem(y),P=E instanceof RadioNodeList?E[0]:E;P&&(this.incCycle(P,ta),this.deletePrivate(P,ra))})}),this.once(e,"bind-debounce")&&e.addEventListener("blur",()=>{clearTimeout(this.private(e,ra)),o()&&this.triggerCycle(e,ta)})}},triggerCycle(e,t,r){let[i,n]=this.private(e,t);r||(r=i),r===i&&(this.incCycle(e,t),n())},once(e,t){return this.private(e,t)===!0?!1:(this.putPrivate(e,t,!0),!0)},incCycle(e,t,r=function(){}){let[i]=this.private(e,t)||[0,r];return i++,this.putPrivate(e,t,[i,r]),i},maintainPrivateHooks(e,t,r,i){e.hasAttribute&&e.hasAttribute("data-phx-hook")&&!t.hasAttribute("data-phx-hook")&&t.setAttribute("data-phx-hook",e.getAttribute("data-phx-hook")),t.hasAttribute&&(t.hasAttribute(r)||t.hasAttribute(i))&&t.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},putCustomElHook(e,t){e.isConnected?e.setAttribute("data-phx-hook",""):Ki("hook.non-connected-element",`
3        hook attached to non-connected DOM element
4        ensure you are calling createHook within your connectedCallback. ${e.outerHTML}
5      `,{el:e},{attribution:"app"}),this.putPrivate(e,"custom-el-hook",t)},getCustomElHook(e){return this.private(e,"custom-el-hook")},isUsedInput(e){return e.nodeType===Node.ELEMENT_NODE&&(this.private(e,Qa)||this.private(e,aa))},resetForm(e){Array.from(e.elements).forEach(t=>{this.deletePrivate(t,Qa),this.deletePrivate(t,aa)})},isPhxChild(e){return e.getAttribute&&e.getAttribute(Jn)},isPhxSticky(e){return e.getAttribute&&e.getAttribute(gl)!==null},isChildOfAny(e,t){return!!t.find(r=>r.contains(e))},firstPhxChild(e){return this.isPhxChild(e)?e:this.all(e,`[${Jn}]`)[0]},isPortalTemplate(e){return e.tagName==="TEMPLATE"&&e.hasAttribute(wl)},closestViewEl(e){let t=e.closest(`[${Xn}],${oa}`);return t?t.hasAttribute(Xn)?this.byId(t.getAttribute(Xn)):t.hasAttribute(Zi)?t:null:null},dispatchEvent(e,t,r={}){let i=!0;e.nodeName==="INPUT"&&e.type==="file"&&t==="click"&&(i=!1);let o={bubbles:r.bubbles===void 0?i:!!r.bubbles,cancelable:!0,detail:r.detail||{}},d=t==="click"?new MouseEvent("click",o):new CustomEvent(t,o);return e.dispatchEvent(d)},cloneNode(e,t){if(typeof t>"u")return e.cloneNode(!0);{let r=e.cloneNode(!1);return r.innerHTML=t,r}},mergeAttrs(e,t,r={}){let i=new Set(r.exclude||[]),n=r.isIgnored,a=t.attributes;for(let d=a.length-1;d>=0;d--){let p=a[d].name;if(i.has(p)){if(p==="value"){let h=t.value??t.getAttribute(p);e.value===h&&e.setAttribute("value",t.getAttribute(p))}}else{let h=t.getAttribute(p);e.getAttribute(p)!==h&&(!n||n&&p.startsWith("data-"))&&e.setAttribute(p,h)}}let o=e.attributes;for(let d=o.length-1;d>=0;d--){let p=o[d].name;n?p.startsWith("data-")&&!t.hasAttribute(p)&&!bd.includes(p)&&e.removeAttribute(p):t.hasAttribute(p)||e.removeAttribute(p)}},mergeFocusedInput(e,t){e instanceof HTMLSelectElement||Wn.mergeAttrs(e,t,{exclude:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange(e){return e.setSelectionRange&&(e.type==="text"||e.type==="textarea")},restoreFocus(e,t,r){if(e instanceof HTMLSelectElement&&e.focus(),!Wn.isTextualInput(e))return;e.matches(":focus")||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,r)},isEditableInput(e){return this.isFormAssociated(e)&&!(e instanceof HTMLButtonElement)&&!(e instanceof HTMLInputElement&&e.type==="button")},isFormAssociated(e){if(!(e instanceof HTMLElement))return!1;if(e.localName){let t=customElements.get(e.localName);if(t)return t.formAssociated===!0}return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement},syncAttrsToProps(e){e instanceof HTMLInputElement&&zd.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=e.getAttribute("checked")!==null)},isTextualInput(e){return nh.indexOf(e.type)>=0}
5,isNowTriggerFormExternal(e,t){return e.getAttribute&&e.getAttribute(t)!==null&&document.body.contains(e)},cleanChildNodes(e,t,r=Ki){if(Wn.isPhxUpdate(e,t,["append","prepend",Xa])){let i=[];e.childNodes.forEach(n=>{(!("id"in n)||!n.id)&&(!(n.nodeType===Node.TEXT_NODE&&n.nodeValue&&n.nodeValue.trim()==="")&&n.nodeType!==Node.COMMENT_NODE&&r("dom.invalid-phx-update-child",`only HTML element tags with an id are allowed inside containers with phx-update.
6
7removing illegal node: "${("outerHTML"in n&&n.outerHTML||n.nodeValue||"").trim()}"
8
9`,{container:e,childNode:n,phxUpdate:t},{attribution:"app"}),i.push(n))}),i.forEach(n=>n.remove())}},replaceRootContainer(e,t,r){let i=new Set(["id",Zi,Yn,bl,fn]);if(e.tagName.toLowerCase()===t.toLowerCase())return Array.from(e.attributes).filter(n=>!i.has(n.name.toLowerCase())).forEach(n=>e.removeAttribute(n.name)),Object.keys(r).filter(n=>!i.has(n.toLowerCase())).forEach(n=>e.setAttribute(n,r[n])),e;{let n=document.createElement(t);return Object.keys(r).forEach(a=>n.setAttribute(a,r[a])),i.forEach(a=>{let o=e.getAttribute(a);o!==null&&n.setAttribute(a,o)}),n.innerHTML=e.innerHTML,e.replaceWith(n),n}},getSticky(e,t,r){let i=(Wn.private(e,"sticky")||[]).find(([n])=>t===n);if(i){let[n,a,o]=i;return o}else return typeof r=="function"?r():r},deleteSticky(e,t){this.updatePrivate(e,"sticky",[],r=>r.filter(([i,n])=>i!==t))},putSticky(e,t,r){let i=r(e);this.updatePrivate(e,"sticky",[],n=>{let a=n.findIndex(([o])=>t===o);return a>=0?n[a]=[t,r,i]:n.push([t,r,i]),n})},applyStickyOperations(e){let t=Wn.private(e,"sticky");t&&t.forEach(([r,i,n])=>this.putSticky(e,r,i))},isLocked(e){return e.hasAttribute&&e.hasAttribute(Xt)},attributeIgnored(e,t){return t.some(r=>e.name==r||r==="*"||r.includes("*")&&e.name.match(r)!=null)}},R=Wn,na=class{static isActive(e,t){let r=t._phxRef===void 0,n=e.getAttribute(ul).split(",").indexOf(Tr.genFileRef(t))>=0;return t.size>0&&(r||n)}static isPreflighted(e,t){return e.getAttribute(xl).split(",").indexOf(Tr.genFileRef(t))>=0&&this.isActive(e,t)}static isPreflightInProgress(e){return e._preflightInProgress===!0}static markPreflightInProgress(e){e._preflightInProgress=!0}
9constructor(e,t,r,i){this.ref=Tr.genFileRef(t),this.fileEl=e,this.file=t,this.view=r,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(Ja,this._onElUpdated),this.autoUpload=i}metadata(){return this.meta}progress(e){this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Tr.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(e="failed"){this.fileEl.removeEventListener(Ja,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:e}),this.isAutoUpload()||Tr.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(e){this._onDone=()=>{this.fileEl.removeEventListener(Ja,this._onElUpdated),e()}}onElUpdated(){this.fileEl.getAttribute(ul).split(",").indexOf(this.ref)===-1&&(Tr.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(e){if(this.meta.uploader){let t=e[this.meta.uploader]||this.view.logError("upload.missing-uploader",`no uploader configured for ${this.meta.uploader}`,{uploader:this.meta.uploader,uploaders:e});return{name:this.meta.uploader,callback:t}}else return{name:"channel",callback:kh}}zipPostFlight(e){this.meta=e.entries[this.ref],this.meta||this.view.logError("upload.missing-preflight-response",`no preflight upload response returned with ref ${this.ref}`,{ref:this.ref,input:this.fileEl,response:e},{attribution:"internal"})}},Sh=0,Tr=class $l{static genFileRef(t){let r=t._phxRef;return r!==void 0?r:(t._phxRef=(Sh++).toString(),t._phxRef)}static getEntryDataURL(t,r){let i=this.activeFiles(t).find(n=>this.genFileRef(n)===r);return i?URL.createObjectURL(i):null}static hasUploadsInProgress(t){let r=0;return R.findUploadInputs(t).forEach(i=>{i.getAttribute(xl)!==i.getAttribute(th)&&r++}),r>0}static serializeUploads(t){let r=this.activeFiles(t),i={};return r.forEach(n=>{let a={path:t.name},o=t.getAttribute(hn);i[o]=i[o]||[],a.ref=this.genFileRef(n),a.last_modified=n.lastModified,a.name=n.name||a.ref,a.relative_path=n.webkitRelativePath,a.type=n.type,a.size=n.size,typeof n.meta=="function"&&(a.meta=n.meta()),i[o].push(a)}),i}static clearFiles(t){t.value=null,t.removeAttribute(hn),R.putPrivate(t,"files",[])}static untrackFile(t,r){R.putPrivate(t,"files",R.private(t,"files").filter(i=>!Object.is(i,r)))}static trackFiles(t,r,i){if(t.getAttribute("multiple")!==null){let n=r.filter(a=>!this.activeFiles(t).find(o=>Object.is(o,a)));R.updatePrivate(t,"files",[],a=>a.concat(n)),t.value=""}else i&&i.files.length>0&&(t.files=i.files),R.putPrivate(t,"files",r)}static activeFileInputs(t){let r=R.findUploadInputs(t);return Array.from(r).filter(i=>i.files&&this.activeFiles(i).length>0)}static activeFiles(t){return(R.private(t,"files")||[]).filter(r=>na.isActive(t,r))}static inputsAwaitingPreflight(t){let r=R.findUploadInputs(t);return Array.from(r).filter(i=>this.filesAwaitingPreflight(i).length>0)}static filesAwaitingPreflight(t){return this.activeFiles(t).filter(r=>!na.isPreflighted(t,r)&&!na.isPreflightInProgress(r))}static markPreflightInProgress(t){t.forEach(r=>na.markPreflightInProgress(r.file))}constructor(t,r,i){this.autoUpload=R.isAutoUpload(t),this.view=r,this.onComplete=i,this._entries=Array.from($l.filesAwaitingPreflight(t)||[]).map(n=>new na(t,n,r,this.autoUpload)),$l.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(t,r,i){this._entries=this._entries.map(a=>(a.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(a.zipPostFlight(t),a.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}
9)),a));let n=this._entries.reduce((a,o)=>{if(!o.meta)return a;let{name:d,callback:p}=o.uploader(i.uploaders);return a[d]=a[d]||{callback:p,entries:[]},a[d].entries.push(o),a},{});for(let a in n){let{callback:o,entries:d}=n[a];o(d,r,t,i)}}},Th={anyOf(e,t){return t.some(r=>e instanceof r)},isFocusable(e,t=!1){return e instanceof HTMLAnchorElement&&e.rel!=="ignore"||e instanceof HTMLAreaElement&&e.href!==void 0||!("disabled"in e&&e.disabled)&&this.anyOf(e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||e instanceof HTMLIFrameElement||e instanceof HTMLElement&&e.tabIndex>=0&&e.getAttribute("aria-hidden")!=="true"||!t&&e.getAttribute("tabindex")!==null&&e.getAttribute("aria-hidden")!=="true"},attemptFocus(e,t=!1){if(this.isFocusable(e,t))try{e.focus()}catch{}return!!document.activeElement&&document.activeElement.isSameNode(e)},focusFirstInteractive(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t,!0)||this.focusFirstInteractive(t))return!0;t=t.nextElementSibling}return!1},focusFirst(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t)||this.focusFirst(t))return!0;t=t.nextElementSibling}return!1},focusLast(e){let t=e.lastElementChild;for(;t;){if(this.attemptFocus(t)||this.focusLast(t))return!0;t=t.previousElementSibling}return!1}},hi=Th,Wd=e=>["HTML","BODY"].indexOf(e.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>=0?e:Wd(e.parentElement),Td=e=>e?e.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,yl=e=>e?e.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,kl=e=>e?e.getBoundingClientRect().top:0,Ch=(e,t)=>{let r=e.getBoundingClientRect();return Math.ceil(r.top)>=kl(t)&&Math.floor(r.top)<=yl(t)},Rh=(e,t)=>{let r=e.getBoundingClientRect();return Math.ceil(r.bottom)>=kl(t)&&Math.floor(r.bottom)<=yl(t)},Cd=(e,t)=>{let r=e.getBoundingClientRect();return Math.ceil(r.top)>=kl(t)&&Math.floor(r.top)<=yl(t)},Mh={mounted(){this.scrollContainer=Wd(this.el);let e=Td(this.scrollContainer),t=!1,r=500,i=null,n=this.throttle(r,(d,p)=>{i=()=>!0,this.liveSocket.js().push(this.el,d,{value:{id:p.id,_overran:!0},callback:()=>{i=null}})}),a=this.throttle(r,(d,p)=>{i=()=>p.scrollIntoView({block:"start"}),this.liveSocket.js().push(this.el,d,{value:{id:p.id},callback:()=>{i=null,window.requestAnimationFrame(()=>{Cd(p,this.scrollContainer)||p.scrollIntoView({block:"start"})})}})}),o=this.throttle(r,(d,p)=>{i=()=>p.scrollIntoView({block:"end"}),this.liveSocket.js().push(this.el,d,{value:{id:p.id},callback:()=>{i=null,window.requestAnimationFrame(()=>{Cd(p,this.scrollContainer)||p.scrollIntoView({block:"end"})})}})});this.onScroll=d=>{let p=Td(this.scrollContainer);if(i)return e=p,i();let h=this.findOverrunTarget(),$=this.el.getAttribute(this.liveSocket.binding("viewport-top")),b=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),m=this.el.lastElementChild,g=this.el.firstElementChild,v=p<e,y=p>e;v&&$&&!t&&h.top>=0?(t=!0,n($,g)):y&&t&&h.top<=0&&(t=!1),$&&v&&g&&Ch(g,this.scrollContainer)?a($,g):b&&y&&m&&Rh(m,this.scrollContainer)&&o(b,m),e=p},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},updated(){this.scrollContainer&&!this.scrollContainer.isConnected&&(this.destroyed(),this.mounted())},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(e,t){let r=0,i;return(...n)=>{let a=Date.now(),o=e-(a-r);o<=0||o>e?(i&&(clearTimeout(i),i=null),r=a,t(...n)):i||(i=setTimeout(()=>{r=Date.now(),i=null,t(...n)},o))}},findOverrunTarget(){let e,t=this.el.getAttribute(this.liveSocket.binding(rh));if(t){let r=document.getElementById(t);if(r)e=r.getBoundingClientRect();else throw new Error("did not find element with id "+t)}else e=this.el.getBoundingClientRect();return e}},Ph={activeRefs(){return this.el.getAttribute(ul)},preflightedRefs(){return this.el.getAttribute(xl)},mounted(){this.js().ignoreAttributes(this.el,["value"]),this.preflightedWas=this.preflightedRefs()},updated(){let e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,e===""&&this.__view().cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=""),this.el.dispatchEvent(new CustomEvent(Ja))}},Lh={mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(hn)),this.url=Tr.getEntryDataURL(this.inputEl,this.ref),this.el.src=this.url},destroyed(){URL.revokeObjectURL(this.url)}},Ih={LiveFileUpload:Ph,LiveImgPreview:Lh,FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",e=>{if(!e.relatedTarget||!this.el.contains(e.relatedTarget)){let t=e.target.nextElementSibling;hi.attemptFocus(t)||hi.focusFirst(t)}else hi.focusLast(this.el)}),this.focusEnd.addEventListener("focus",e=>{if(!e.relatedTarget||!this.el.contains(e.relatedTarget)){let t=e.target.previousElementSibling;hi.attemptFocus(t)||hi.focusLast(t)}else hi.focusFirst(this.el)}),this.el.contains(document.activeElement)||(this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&hi.focusFirst(this.el))}},InfiniteScroll:Mh},Dh=Ih,_l=class{static onUnlock(e,t){if(!R.isLocked(e)&&!e.closest(`[${Xt}]`))return t();let r=e.closest(`[${Xt}]`),i=r.closest(`[${Xt}]`).getAttribute(Xt);r.addEventListener(`phx:undo-lock:${i}`,()=>{t()},{once:!0})}constructor(e){this.el=e,this.loadingRef=e.hasAttribute(Es)?parseInt(e.getAttribute(Es),10):null,this.lockRef=e.hasAttribute(Xt)?parseInt(e.getAttribute(Xt),10):null}maybeUndo(e,t,r){if(!this.isWithin(e)){R.updatePrivate(this.el,ud,[],i=>(i.push(e),i));return}this.undoLocks(e,t,r),this.undoLoading(e,t),R.updatePrivate(this.el,ud,[],i=>i.filter(n=>{let a={detail:{ref:n,event:t},bubbles:!0,cancelable:!1};return this.loadingRef&&this.loadingRef>n&&this.el.dispatchEvent(new CustomEvent(`phx:undo-loading:${n}`,a)),this.lockRef&&this.lockRef>n&&this.el.dispatchEvent(new CustomEvent(`phx:undo-lock:${n}`,a)),n>e})),this.isFullyResolvedBy(e)&&this.el.removeAttribute(xi)}isWithin(e){return!(this.loadingRef!==null&&this.loadingRef>e&&this.lockRef!==null&&this.lockRef>e)}undoLocks(e,t,r){if(!this.isLockUndoneBy(e))return;let i=R.private(this.el,Xt);i&&(r(i),R.deletePrivate(this.el,Xt)),this.el.removeAttribute(Xt);let n={detail:{ref:e,event:t},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-lock:${this.lockRef}`,n))}undoLoading(e,t){if(!this.isLoadingUndoneBy(e)){this.canUndoLoading(e)&&this.el.classList.contains("phx-submit-loading")&&this.el.classList.remove("phx-change-loading");return}if(this.canUndoLoading(e)){this.el.removeAttribute(Es);let r=this.el.getAttribute(ws),i=this.el.getAttribute(vl);i!==null&&"readOnly"in this.el&&(this.el.readOnly=i==="true",this.el.removeAttribute(vl)),r!==null&&"disabled"in this.el&&(this.el.disabled=r==="true",this.el.removeAttribute(ws));let n=this.el.getAttribute(eo);n!==null&&(this.el.textContent=n,this.el.removeAttribute(eo));let a={detail:{ref:e,event:t},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-loading:${this.loadingRef}`,a))}
9Hd.forEach(r=>{(r!=="phx-submit-loading"||this.canUndoLoading(e))&&R.removeClass(this.el,r)})}isLoadingUndoneBy(e){return this.loadingRef===null?!1:this.loadingRef<=e}isLockUndoneBy(e){return this.lockRef===null?!1:this.lockRef<=e}isFullyResolvedBy(e){return(this.loadingRef===null||this.loadingRef<=e)&&(this.lockRef===null||this.lockRef<=e)}canUndoLoading(e){return this.lockRef===null||this.lockRef<=e}},Oh=class{constructor(e,t,r){let i=new Set,n=new Set([...t.children].map(o=>o.id)),a=[];Array.from(e.children).forEach(o=>{if(o.id&&(i.add(o.id),n.has(o.id))){let d=o.previousElementSibling&&o.previousElementSibling.id;a.push({elementId:o.id,previousElementId:d})}}),this.containerId=t.id,this.updateType=r,this.elementsToModify=a,this.elementIdsToAdd=[...n].filter(o=>!i.has(o))}perform(){let e=R.byId(this.containerId);e&&(this.elementsToModify.forEach(t=>{t.previousElementId?ys(document.getElementById(t.previousElementId),r=>{ys(document.getElementById(t.elementId),i=>{i.previousElementSibling&&i.previousElementSibling.id==r.id||r.insertAdjacentElement("afterend",i)})}):ys(document.getElementById(t.elementId),r=>{r.previousElementSibling==null||e.insertAdjacentElement("afterbegin",r)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(t=>{ys(document.getElementById(t),r=>e.insertAdjacentElement("afterbegin",r))}))}},Rd=11;function Fh(e,t){var r=t.attributes,i,n,a,o,d;if(!(t.nodeType===Rd||e.nodeType===Rd)){for(var p=r.length-1;p>=0;p--)i=r[p],n=i.name,a=i.namespaceURI,o=i.value,a?(n=i.localName||n,d=e.getAttributeNS(a,n),d!==o&&(i.prefix==="xmlns"&&(n=i.name),e.setAttributeNS(a,n,o))):(d=e.getAttribute(n),d!==o&&e.setAttribute(n,o));for(var h=e.attributes,$=h.length-1;$>=0;$--)i=h[$],n=i.name,a=i.namespaceURI,a?(n=i.localName||n,t.hasAttributeNS(a,n)||e.removeAttributeNS(a,n)):t.hasAttribute(n)||e.removeAttribute(n)}}var Wa,Nh="http://www.w3.org/1999/xhtml",qr=typeof document>"u"?void 0:document,Bh=!!qr&&"content"in qr.createElement("template"),Hh=!!qr&&qr.createRange&&"createContextualFragment"in qr.createRange();function jh(e){var t=qr.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function Uh(e){Wa||(Wa=qr.createRange(),Wa.selectNode(qr.body));var t=Wa.createContextualFragment(e);return t.childNodes[0]}function zh(e){var t=qr.createElement("body");return t.innerHTML=e,t.childNodes[0]}function Vh(e){return e=e.trim(),Bh?jh(e):Hh?Uh(e):zh(e)}function Ga(e,t){var r=e.nodeName,i=t.nodeName,n,a;return r===i?!0:(n=r.charCodeAt(0),a=i.charCodeAt(0),n<=90&&a>=97?r===i.toUpperCase():a<=90&&n>=97?i===r.toUpperCase():!1)}function qh(e,t){return!t||t===Nh?qr.createElement(e):qr.createElementNS(t,e)}function Wh(e,t){for(var r=e.firstChild;r;){var i=r.nextSibling;t.appendChild(r),r=i}return t}function ll(e,t,r){e[r]!==t[r]&&(e[r]=t[r],e[r]?e.setAttribute(r,""):e.removeAttribute(r))}var Md={OPTION:function(e,t){var r=e.parentNode;if(r){var i=r.nodeName.toUpperCase();i==="OPTGROUP"&&(r=r.parentNode,i=r&&r.nodeName.toUpperCase()),i==="SELECT"&&!r.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),r.selectedIndex=-1)}ll(e,t,"selected")},INPUT:function(e,t){ll(e,t,"checked"),ll(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var r=t.value;e.value!==r&&(e.value=r);var i=e.firstChild;if(i){var n=i.nodeValue;if(n==r||!r&&n==e.placeholder)return;i.nodeValue=r}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var r=-1,i=0,n=e.firstChild,a,o;n;)if(o=n.nodeName&&n.nodeName.toUpperCase(),o==="OPTGROUP")a=n,n=a.firstChild,n||(n=a.nextSibling,a=null);else{if(o==="OPTION"){if(n.hasAttribute("selected")){r=i;break}i++}n=n.nextSibling,!n&&a&&(n=a.nextSibling,a=null)}e.selectedIndex=r}}},sa=1,Pd=11,Ld=3,Id=8;function En(){}function Gh(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function Yh(e){return function(r,i,n){if(n||(n={}),typeof i=="string")if(r.nodeName==="#document"||r.nodeName==="HTML"){var a=i;i=qr.createElement("html"),i.innerHTML=a}else if(r.nodeName==="BODY"){var o=i;i=qr.createElement("html"),i.innerHTML=o;var d=i.querySelector("body");d&&(i=d)}else i=Vh(i);else i.nodeType===Pd&&(i=i.firstElementChild);var p=n.getNodeKey||Gh,h=n.onBeforeNodeAdded||En,$=n.onNodeAdded||En,b=n.onBeforeElUpdated||En,m=n.onElUpdated||En,g=n.onBeforeNodeDiscarded||En,v=n.onNodeDiscarded||En,y=n.onBeforeElChildrenUpdated||En,E=n.skipFromChildren||En,P=n.addChild||function(F,V){return F.appendChild(V)},T=n.childrenOnly===!0,B=n.keyedRoot===!0,I=Object.create(null),L=[];function O(F){L.push(F)}function ee(F,V){if(F.nodeType===sa)for(var oe=F.firstChild;oe;){var se=void 0;
9V&&(se=p(oe))?O(se):(v(oe),oe.firstChild&&ee(oe,V)),oe=oe.nextSibling}}function me(F,V,oe){g(F)!==!1&&(V&&V.removeChild(F),v(F),ee(F,oe))}function C(F){if(F.nodeType===sa||F.nodeType===Pd)for(var V=F.firstChild;V;){var oe=p(V);oe&&(I[oe]=V),C(V),V=V.nextSibling}}C(r);function M(F){$(F);for(var V=F.firstChild;V;){var oe=V.nextSibling,se=p(V);if(se){var Z=I[se];Z&&Ga(V,Z)?(V.parentNode.replaceChild(Z,V),fe(Z,V)):M(V)}else M(V);V=oe}}function J(F,V,oe){for(;V;){var se=V.nextSibling;(oe=p(V))?O(oe):me(V,F,!0),V=se}}function fe(F,V,oe){var se=p(V);if(se&&delete I[se],!oe){var Z=b(F,V);if(Z===!1||(Z instanceof HTMLElement&&(F=Z,C(F)),e(F,V),m(F),y(F,V)===!1))return}F.nodeName!=="TEXTAREA"?ue(F,V):Md.TEXTAREA(F,V)}function ue(F,V){var oe=E(F,V),se=V.firstChild,Z=F.firstChild,we,re,U,ce,ge;e:for(;se;){for(ce=se.nextSibling,we=p(se);!oe&&Z;){if(U=Z.nextSibling,se.isSameNode&&se.isSameNode(Z)){se=ce,Z=U;continue e}re=p(Z);var Fe=Z.nodeType,xe=void 0;if(Fe===se.nodeType&&(Fe===sa?(we?we!==re&&((ge=I[we])?U===ge?xe=!1:(F.insertBefore(ge,Z),re?O(re):me(Z,F,!0),Z=ge,re=p(Z)):xe=!1):re&&(xe=!1),xe=xe!==!1&&Ga(Z,se),xe&&fe(Z,se)):(Fe===Ld||Fe==Id)&&(xe=!0,Z.nodeValue!==se.nodeValue&&(Z.nodeValue=se.nodeValue))),xe){se=ce,Z=U;continue e}re?O(re):me(Z,F,!0),Z=U}if(we&&(ge=I[we])&&Ga(ge,se))oe||P(F,ge),fe(ge,se);else{var be=h(se);be!==!1&&(be&&(se=be),se.actualize&&(se=se.actualize(F.ownerDocument||qr)),P(F,se),M(se))}se=ce,Z=U}J(F,Z,re);var Ge=Md[F.nodeName];Ge&&Ge(F,V)}function $e(){for(var F=0,V=L.length;F<V;F++){var oe=I[L[F]];oe&&me(oe,oe.parentNode,!1)}}if(B&&!T){var W=p(r),le=p(i);if((W||le)&&W!==le)return i.actualize&&(i=i.actualize(r.ownerDocument||qr)),v(r),r.parentNode&&r.parentNode.replaceChild(i,r),M(i),ee(r,!1),$e(),i}var de=r,te=de.nodeType,Le=i.nodeType;if(!T){if(te===sa)Le===sa?Ga(r,i)||(v(r),de=Wh(r,qh(i.nodeName,i.namespaceURI))):de=i;else if(te===Ld||te===Id){if(Le===te)return de.nodeValue!==i.nodeValue&&(de.nodeValue=i.nodeValue),de;de=i}}if(de===i)v(r);else{if(i.isSameNode&&i.isSameNode(de))return;fe(de,i,T),$e()}return!T&&de!==r&&r.parentNode&&(de.actualize&&(de=de.actualize(r.ownerDocument||qr)),r.parentNode.replaceChild(de,r)),de}}var Jh=Yh(Fh),ml=Jh,Ya=class{constructor(e,t,r,i,n,a={}){this.view=e,this.liveSocket=e.liveSocket,this.container=t,this.rootID=e.root.id,this.html=r,this.streams=i,this.streamInserts={},this.streamComponentRestore={},this.targetCID=n,this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.targetContainer=n?R.getComponent(this.view.id,n):t,this.beforeUpdatedCallbacks=[],this.afterAddedCallbacks=[],this.afterUpdatedCallbacks=[],this.afterPhxChildAddedCallbacks=[],this.afterDiscardedCallbacks=[],this.afterTransitionsDiscardedCallbacks=[],this.withChildren=a.withChildren||a.undoRef!==void 0||!1,this.undoRef=a.undoRef??null}beforeUpdated(e){this.beforeUpdatedCallbacks.push(e)}afterAdded(e){this.afterAddedCallbacks.push(e)}afterUpdated(e){this.afterUpdatedCallbacks.push(e)}afterPhxChildAdded(e){this.afterPhxChildAddedCallbacks.push(e)}afterDiscarded(e){this.afterDiscardedCallbacks.push(e)}afterTransitionsDiscarded(e){this.afterTransitionsDiscardedCallbacks.push(e)}markPrunableContentForRemoval(){let e=this.liveSocket.binding(to);R.all(this.container,`[${e}=append] > *, [${e}=prepend] > *`,t=>{t.setAttribute(pd,"")})}perform(e){let{view:t,liveSocket:r,html:i,container:n}=this,a=(L,O,ee,me)=>t.logError(L,O,ee,me),o=this.targetContainer;if(this.targetCID){let L=o.closest(`[${Xt}]`);if(L&&!L.isSameNode(o)){let O=R.private(L,Xt);
9if(O&&(o=O.querySelector(`[data-phx-component="${this.targetCID}"]`),!o))return}}let d=r.getActiveElement(),{selectionStart:p,selectionEnd:h}=d&&R.hasSelectionRange(d)?d:{},$=r.binding(to),b=r.binding(fl),m=r.binding(hl),g=r.binding(ih),v=r.binding(oh),y=[],E=[],P=[],T=[],B=null,I=(L,O,ee=this.withChildren)=>{let me={childrenOnly:L.getAttribute(Ii)===null&&!ee,keyedRoot:L.getAttribute(Ii)!=null,getNodeKey:C=>!(C instanceof Element)||R.isPhxDestroyed(C)?null:e?C.id:R.private(C,"clientsideIdAttribute")?C.getAttribute(pl):C.id||C.getAttribute(pl),skipFromChildren:C=>C.getAttribute($)===Xa,addChild:(C,M)=>{let{ref:J,streamAt:fe}=this.getStreamInsert(M);if(J===void 0)return C.appendChild(M);if(this.setStreamRef(M,J),fe===0)C.insertAdjacentElement("afterbegin",M);else if(fe===-1){let ue=C.lastElementChild;if(ue&&!ue.hasAttribute(ea)){let $e=Array.from(C.children).find(W=>!W.hasAttribute(ea));C.insertBefore(M,$e??null)}else C.appendChild(M)}else if(fe>0){let ue=Array.from(C.children)[fe];C.insertBefore(M,ue)}},onBeforeNodeAdded:C=>{if(!(C instanceof Element))return C;if(this.getStreamInsert(C)?.updateOnly&&!this.streamComponentRestore[C.id])return!1;R.maintainPrivateHooks(C,C,b,m);let M=C;return this.streamComponentRestore[C.id]&&(M=this.streamComponentRestore[C.id],delete this.streamComponentRestore[C.id],I(M,C,!0)),M},onNodeAdded:C=>{if(!(C instanceof Element)){y.push(C);return}this.maybeReOrderStream(C,!0),R.isPortalTemplate(C)&&T.push(()=>this.teleport(C,I)),C instanceof HTMLImageElement&&C.srcset?C.srcset=C.srcset:C instanceof HTMLVideoElement&&C.autoplay&&C.play(),R.isNowTriggerFormExternal(C,g)&&(B=C),(R.isPhxChild(C)&&t.ownsElement(C)||R.isPhxSticky(C)&&t.ownsElement(C.parentNode))&&this.trackAfterPhxChildAdded(C),C.nodeName==="SCRIPT"&&C.hasAttribute(Ka)&&this.handleRuntimeHook(C,O),y.push(C)},onNodeDiscarded:C=>this.onNodeDiscarded(C),onBeforeNodeDiscarded:C=>{if(!(C instanceof Element)||C.getAttribute(pd)!==null)return!0;if(C.parentElement!==null&&C.id&&R.isPhxUpdate(C.parentElement,$,[Xa,"append","prepend"])||C.getAttribute(Xn)||this.maybePendingRemove(C)||this.skipCIDSibling(C))return!1;if(R.isPortalTemplate(C)){let M=document.getElementById(C.content.firstElementChild?.id||"");M&&(M.remove(),me.onNodeDiscarded(M),this.view.dropPortalElementId(M.id))}return!0},onElUpdated:C=>{R.isNowTriggerFormExternal(C,g)&&(B=C),E.push(C),this.maybeReOrderStream(C,!1)},onBeforeElUpdated:(C,M)=>{R.syncPendingAttrs(C,M),R.maintainPrivateHooks(C,M,b,m),R.cleanChildNodes(M,$,a);let J=d&&C.isSameNode(d)&&R.isEditableInput(C),fe=J&&this.isChangedSelect(C,M);if(this.skipCIDSibling(M))return this.maybeCloneLockedElement(C,J),this.copyNestedPrivateLock(C,M),this.maybeReOrderStream(C),!1;if(R.isPhxSticky(C))return[Zi,Yn,fn].map(ue=>[ue,C.getAttribute(ue),M.getAttribute(ue)]).forEach(([ue,$e,W])=>{W&&$e!==W&&C.setAttribute(ue,W)}),!1;if(R.isIgnored(C,$)||C.form&&C.form.isSameNode(B))return this.trackBeforeUpdated(C,M),R.mergeAttrs(C,M,{isIgnored:R.isIgnored(C,$)}),E.push(C),R.applyStickyOperations(C),!1;if(C.type==="number"&&C.validity&&C.validity.badInput)return!1;if(C=this.maybeCloneLockedElement(C,J),R.isPhxChild(M)){let ue=C.getAttribute(Zi);return R.mergeAttrs(C,M,{exclude:[Yn]}),ue!==""&&C.setAttribute(Zi,ue),C.setAttribute(fn,this.rootID),R.applyStickyOperations(C),!1}return this.copyNestedPrivateLock(C,M),R.copyPrivates(M,C),R.isPortalTemplate(M)?(T.push(()=>this.teleport(M,I)),C.content.replaceChildren(M.content.cloneNode(!0)),!1):J&&C.type!=="hidden"&&!fe&&!M.hasAttribute(v)?(this.trackBeforeUpdated(C,M),R.mergeFocusedInput(C,M),R.syncAttrsToProps(C),E.push(C),R.applyStickyOperations(C),!1):(fe&&C.blur(),R.isPhxUpdate(M,$,["append","prepend"])&&P.push(new Oh(C,M,M.getAttribute($))),R.syncAttrsToProps(M),R.applyStickyOperations(M),this.trackBeforeUpdated(C,M),C)}};ml(L,O,me)};if(this.trackBeforeUpdated(n,n),r.time("morphdom",()=>{this.streams.forEach(([O,ee,me,C])=>{ee.forEach(([M,J,fe,ue])=>{this.streamInserts[M]={ref:O,streamAt:J,limit:fe,reset:C,updateOnly:ue}}),C!==void 0&&R.all(document,`[${ea}="${O}"]`,M=>{this.removeStreamChildElement(M)}),me.forEach(M=>{let J=document.getElementById(M);J&&this.removeStreamChildElement(J)})}),e&&R.all(this.container,`[${$}=${Xa}]`).filter(O=>
9this.view.ownsElement(O)).forEach(O=>{Array.from(O.children).forEach(ee=>{this.removeStreamChildElement(ee,!0)})}),I(o,i);let L=0;for(;T.length>0&&L<5;){let O=T.slice();T=[],O.forEach(ee=>ee()),L++}this.view.portalElementIds.forEach(O=>{let ee=document.getElementById(O);if(ee){let me=ee.getAttribute(Sn);me&&(document.getElementById(me)||(ee.remove(),this.onNodeDiscarded(ee),this.view.dropPortalElementId(O)))}})}),r.isDebugEnabled()&&(xh(a),bh(this.streamInserts,a),Array.from(document.querySelectorAll("input[name=id]")).forEach(L=>{L instanceof HTMLInputElement&&L.form&&a("dom.form-input-name-id",`Detected an input with name="id" inside a form! This will cause problems when patching the DOM.
10`,{el:L},{attribution:"app"})})),P.length>0&&r.time("post-morph append/prepend restoration",()=>{P.forEach(L=>L.perform())}),r.silenceEvents(()=>R.restoreFocus(d,p,h)),R.dispatchEvent(document,"phx:update"),y.forEach(L=>this.trackAfterAdded(L)),E.forEach(L=>this.trackAfterUpdated(L)),this.transitionPendingRemoves(),B){r.unload();let L=R.private(B,"submitter");if(L&&L.name&&o.contains(L)){let O=document.createElement("input");O.type="hidden";let ee=L.getAttribute("form");ee&&O.setAttribute("form",ee),O.name=L.name,O.value=L.value,L.parentElement.insertBefore(O,L)}Object.getPrototypeOf(B).submit.call(B)}return!0}trackBeforeUpdated(e,t){this.beforeUpdatedCallbacks.forEach(r=>r(e,t))}trackAfterAdded(e){this.afterAddedCallbacks.forEach(t=>t(e))}trackAfterUpdated(e){this.afterUpdatedCallbacks.forEach(t=>t(e))}trackAfterPhxChildAdded(e){this.afterPhxChildAddedCallbacks.forEach(t=>t(e))}trackAfterDiscarded(e){this.afterDiscardedCallbacks.forEach(t=>t(e))}trackAfterTransitionsDiscarded(e){this.afterTransitionsDiscardedCallbacks.forEach(t=>t(e))}onNodeDiscarded(e){(R.isPhxChild(e)||R.isPhxSticky(e))&&this.liveSocket.destroyViewByEl(e),this.trackAfterDiscarded(e)}maybePendingRemove(e){return e.getAttribute&&e.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(e),!0):!1}removeStreamChildElement(e,t=!1){!t&&!this.view.ownsElement(e)||(this.streamInserts[e.id]?(this.streamComponentRestore[e.id]=e,e.remove()):this.maybePendingRemove(e)||(e.remove(),this.onNodeDiscarded(e)))}getStreamInsert(e){return(e.id?this.streamInserts[e.id]:{})||{}}setStreamRef(e,t){R.putSticky(e,ea,r=>r.setAttribute(ea,t))}maybeReOrderStream(e,t=!1){let{ref:r,streamAt:i,reset:n}=this.getStreamInsert(e);if(i!==void 0&&(this.setStreamRef(e,r),!(!n&&!t)&&e.parentElement)){if(i===0)this.moveOrInsertBefore(e.parentElement,e,e.parentElement.firstElementChild);else if(i>0){let a=Array.from(e.parentElement.children),o=a.indexOf(e);if(i>=a.length-1)this.moveOrInsertBefore(e.parentElement,e,null);else{let d=a[i];o>i?this.moveOrInsertBefore(e.parentElement,e,d):this.moveOrInsertBefore(e.parentElement,e,d.nextElementSibling)}}this.maybeLimitStream(e)}}moveOrInsertBefore(e,t,r){if(typeof e.moveBefore=="function")try{e.moveBefore(t,r);return}catch{}e.insertBefore(t,r)}maybeLimitStream(e){let{limit:t}=this.getStreamInsert(e);if(t!==null){let r=Array.from(e.parentElement.children);t<0&&r.length>t*-1?r.slice(0,r.length+t).forEach(i=>this.removeStreamChildElement(i)):t>=0&&r.length>t&&r.slice(t).forEach(i=>this.removeStreamChildElement(i))}}transitionPendingRemoves(){let{pendingRemoves:e,liveSocket:t}=this;e.length>0&&t.transitionRemoves(e,this.view,()=>{e.forEach(r=>{let i=R.firstPhxChild(r);i&&t.destroyViewByEl(i),r.remove()}),this.trackAfterTransitionsDiscarded(e)})}isChangedSelect(e,t){return!(e instanceof HTMLSelectElement)||e.multiple?!1:e.options.length!==t.options.length?!0:(t.value=e.value,!e.isEqualNode(t))}skipCIDSibling(e){return e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(Ud)}maybeCloneLockedElement(e,t){if(!e.hasAttribute(xi))return e;let r=new _l(e);if(!e.hasAttribute(Xt)||this.undoRef!==null&&r.isLockUndoneBy(this.undoRef))return e;R.applyStickyOperations(e);let i=e.hasAttribute(Xt)?R.private(e,Xt)||e.cloneNode(!0):null;return i?(R.putPrivate(e,Xt,i),t?e:i):e}copyNestedPrivateLock(e,t){this.undoRef===null||!R.private(t,Xt)||R.putPrivate(e,Xt,R.private(t,Xt))}indexOf(e,t){return Array.from(e.children).indexOf(t)}teleport(e,t){let r=e.getAttribute(wl),i=document.querySelector(r);if(!i)throw new Error("portal target with selector "+r+" not found");let n=e.content.firstElementChild;if(this.skipCIDSibling(n))return;if(!n?.id)throw new Error("phx-portal template must have a single root element with ID!");let a=document.getElementById(n.id),o;a?(i.contains(a)||i.appendChild(a),o=a):(o=document.createElement(n.tagName),i.appendChild(o)),n.setAttribute(Xn,this.view.id),n.setAttribute(Sn,e.id),t(o,n,!0),n.removeAttribute(Xn),n.removeAttribute(Sn),this.view.pushPortalElementId(n.id)}handleRuntimeHook(e,t){let r=e.getAttribute(Ka),i=e.hasAttribute("nonce")?e.getAttribute("nonce"):null;if(e.hasAttribute("nonce")){let a=document.createElement("template");a.innerHTML=t,i=a.content.querySelector(`script[${Ka}="${CSS.escape(r)}"]`)?.getAttribute("nonce")??null}let n=document.createElement("script");n.textContent=e.textContent,R.mergeAttrs(n,e,{isIgnored:!1}),i&&(n.nonce=i),e.replaceWith(n)}},Xh=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Kh=new Set(["'",'"']),Gd=(e,t,r)=>{let i,n,a,o,d,p,h,$,b=e.match(/^(\s*(?:<!--.*?-->\s*)*)<([^\s\/>]+)/);if(b===null)throw new Error(`malformed html ${e}`);for(i=b[0].length,a=b[1],d=b[2],p=i,i;i<e.length&&e.charAt(i)!==">";i++)if(e.charAt(i)==="="){let v=e.slice(i-3,i)===" id";i++;let y=e.charAt(i);if(Kh.has(y)){let E=i;for(i++,i;i<e.length&&e.charAt(i)!==y;i++);if(v){h=e.slice(E+1,i);break}}}let m=e.length-1;for(n=!1;m>=a.length+d.length;){let v=e.charAt(m);
10if(n)v==="-"&&e.slice(m-3,m)==="<!-"?(n=!1,m-=4):m-=1;else if(v===">"&&e.slice(m-2,m)==="--")n=!0,m-=3;else{if(v===">")break;m-=1}}o=e.slice(m+1,e.length);let g=Object.keys(t).map(v=>t[v]===!0?v:`${v}="${t[v]}"`).join(" ");if(r){let v=h?` id="${h}"`:"";Xh.has(d)?$=`<${d}${v}${g===""?"":" "}${g}/>`:$=`<${d}${v}${g===""?"":" "}${g}></${d}>`}else{let v=e.slice(p,m+1);$=`<${d}${g===""?"":" "}${g}${v}`}return[$,a,o]},ro=class{constructor(e,t){this.html="",this.pending=[]}get length(){let e=this.html.length;for(let t=0;t<this.pending.length;t++)e+=this.pending[t].length;return e}write(e){this.html+=e}toString(){return this.html}beginRoot(){this.pending.push(this.html),this.html=""}endRoot(e,t){let[r,i,n]=Gd(this.html,e,t);this.html=this.pending.pop()+i+r+n}enter(e,t,r){}exit(){}beginKeyedEntry(e){}endKeyedEntry(){}},cl=Symbol("all changed"),Zh=class extends ro{constructor(e,t){super(e,t),this.frames=[],this.cursors=[],this.diff=this.cursorFor(e,t)}static preMerge(e){return qd(e)}cursorFor(e,t){if(e)return t===null?e:e[Or]&&e[Or][t]}onEnter(e){}onExit(e){}currentDiff(){return this.cursors.length>0?this.cursors[this.cursors.length-1]:this.diff}enter(e,t,r){let i=this.diffFor(this.currentDiff(),t),n={node:e,index:t,statics:r,changed:i!==void 0};this.cursors.push(i),this.frames.push(n),this.onEnter(n)}exit(){this.cursors.pop(),this.onExit(this.frames.pop())}beginKeyedEntry(e){this.cursors.push(this.keyedEntry(this.currentDiff(),e))}endKeyedEntry(){this.cursors.pop()}keyedEntry(e,t){let r=this.diffFor(e,qt);if(r===cl||r===void 0)return r;let i=r[t];return Array.isArray(i)?i[1]:typeof i=="number"?void 0:i}diffFor(e,t){if(e!=null)return e===cl||e[fi]!==void 0?cl:e[t]}},Dd=class{static extract(e){let{[kd]:t,[yd]:r,[Ed]:i}=e;return delete e[kd],delete e[yd],delete e[Ed],{diff:e,title:i,reply:t||null,events:r||[]}}constructor(e,t,r=()=>ro){this.viewId=e,this.rendered={},this.magicId=0,this.bufferClass=r,this.initialMerge=!0,this.mergeDiff(t),this.initialMerge=!1}parentViewId(){return this.viewId}toString(e){let{buffer:t,streams:r}=this.recursiveToString(this.rendered,this.rendered[Or],e,!0,{},null);return{buffer:t,streams:r}}recursiveToString(e,t=e[Or],r,i,n,a){r=r?new Set(r):null;let o=this.bufferClass(),[d,p]=this.bufferPreMerge,h=new o(d===o?p:void 0,a),$={buffer:h,components:t,onlyCids:r,streams:new Set};return this.toOutputBuffer(e,null,$,i,n),{buffer:h.toString(),streams:$.streams}}componentCIDs(e){return Object.keys(e[Or]||{}).map(t=>parseInt(t))}isComponentOnlyDiff(e){return e[Or]?Object.keys(e).length===1:!1}getComponent(e,t){return e[Or][t]}resetRender(e){this.rendered[Or][e]&&(this.rendered[Or][e].reset=!0)}mergeDiff(e){let t=this.bufferClass();this.bufferPreMerge=[t,!this.initialMerge&&t.preMerge?t.preMerge(e):void 0];let r=e[Or],i={};if(delete e[Or],this.rendered=this.mutableMerge(this.rendered,e),this.rendered[Or]=this.rendered[Or]||{},r){let n=this.rendered[Or];for(let a in r)r[a]=this.cachedFindComponent(a,r[a],n,r,i);for(let a in r)n[a]=r[a];e[Or]=r}}cachedFindComponent(e,t,r,i,n){if(n[e])return n[e];{let a,o,d=t[fi];if(An(d)){let p;d>0?p=this.cachedFindComponent(d,i[d],r,i,n):p=r[-d],o=p[fi],a=this.cloneMerge(p,t,!0),a[fi]=o}else a=t[fi]!==void 0||r[e]===void 0?t:this.cloneMerge(r[e],t,!1);return n[e]=a,a}}mutableMerge(e,t){return t[fi]!==void 0?t:(this.doMutableMerge(e,t),e)}doMutableMerge(e,t){if(t[qt])this.mergeKeyed(e,t);else for(let r in t){let i=t[r],n=e[r];Vn(i)&&i[fi]===void 0&&Vn(n)?this.doMutableMerge(n,i):e[r]=i}e[ol]&&(e.newRender=!0)}clone(e){return qd(e)}mergeKeyed(e,t){let r=t[qt][wd]&&this.clone(e);if(Object.entries(t[qt]).forEach(([i,n])=>{if(!(i===Xi||i===wd))if(Array.isArray(n)){let[a,o]=n;e[qt][i]=r[qt][a],this.doMutableMerge(e[qt][i],o)}else if(typeof n=="number"){let a=n;e[qt][i]=r[qt][a]}else typeof n=="object"&&(e[qt][i]||(e[qt][i]={}
10),this.doMutableMerge(e[qt][i],n))}),t[qt][Xi]<e[qt][Xi])for(let i=t[qt][Xi];i<e[qt][Xi];i++)delete e[qt][i];e[qt][Xi]=t[qt][Xi],t[bs]&&(e[bs]=t[bs]),t[kn]&&(e[kn]=t[kn])}cloneMerge(e,t,r){let i;if(t[qt])i=this.clone(e),this.mergeKeyed(i,t),r&&this.pruneInternalIds(i);else{i={...e,...t};for(let n in i){let a=t[n],o=e[n];Vn(a)&&a[fi]===void 0&&Vn(o)?i[n]=this.cloneMerge(o,a,r):a===void 0&&Vn(o)&&(i[n]=this.cloneMerge(o,{},r))}}return r?this.deleteInternalIds(i):e[ol]&&(i.newRender=!0),i}pruneInternalIds(e){for(let t in e)Vn(e[t])&&this.pruneInternalIds(e[t]);this.deleteInternalIds(e)}deleteInternalIds(e){delete e.magicId,delete e.newRender}componentToString(e){let{buffer:t,streams:r}=this.recursiveCIDToString(this.rendered[Or],e,null),[i,n,a]=Gd(t,{});return{buffer:i,streams:r}}pruneCIDs(e){e.forEach(t=>delete this.rendered[Or][t])}get(){return this.rendered}isNewFingerprint(e={}){return!!e[fi]}templateStatic(e,t){return typeof e=="number"?t[e]:e}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(e,t,r,i,n={}){if(e[qt])return this.comprehensionToBuffer(e,t,r,i);e[kn]&&(t=e[kn],delete e[kn]);let{[fi]:a}=e;a=this.templateStatic(a,t),e[fi]=a;let o=e[ol];if(o&&r.buffer.beginRoot(),i&&o&&!e.magicId&&(e.newRender=!0,e.magicId=this.nextMagicID()),this.dynamicsToBuffer(e,a,t,r,i),o){let d=!1,p;i||e.magicId?(d=i&&!e.newRender,p={[pl]:e.magicId,...n}):p=n,d&&(p[Ud]=!0),r.buffer.endRoot(p,d),e.newRender=!1}}dynamicsToBuffer(e,t,r,i,n){let a=i.buffer;for(let o=0;o<t.length-1;o++)a.write(t[o]),a.enter(e,o,t),this.dynamicToBuffer(e[o],r,i,n),a.exit();a.write(t[t.length-1])}comprehensionToBuffer(e,t,r,i){let n=t||e[kn],a=this.templateStatic(e[fi],t);e[fi]=a,delete e[kn];for(let o=0;o<e[qt][Xi];o++)r.buffer.beginKeyedEntry(o),this.dynamicsToBuffer(e[qt][o],a,n,r,i),r.buffer.endKeyedEntry();if(e[bs]){let o=e[bs],[d,p,h,$]=o||[null,{},[],null];o!==void 0&&(e[qt][Xi]>0||h.length>0||$)&&(delete e[bs],e[qt]={[Xi]:0},r.streams.add(o))}}dynamicToBuffer(e,t,r,i){if(typeof e=="number"){let{buffer:n,streams:a}=this.recursiveCIDToString(r.components,e,r.onlyCids);r.buffer.write(n),r.streams=new Set([...r.streams,...a])}else Vn(e)?this.toOutputBuffer(e,t,r,i,{}):r.buffer.write(e)}recursiveCIDToString(e,t,r){if(e[t]){let i=e[t],n={[Ii]:t,[ks]:this.viewId},a=r&&!r.has(t);i.newRender=!a,i.magicId=`c${t}-${this.parentViewId()}`;let o=!i.reset,{buffer:d,streams:p}=this.recursiveToString(i,e,r,o,n,t);return delete i.reset,{buffer:d,streams:p}}else throw Ki("render.missing-component",`no component for CID ${t}`,{cid:t,components:e},{viewId:this.viewId,attribution:"internal"}),new Error("Cannot continue render due to missing component: "+t)}},Od=[],Fd=200,Qh={exec(e,t,r,i,n,a){let[o,d]=a||[null,{callback:a&&a.callback}];(Array.isArray(r)?r:typeof r=="string"&&r.startsWith("[")?JSON.parse(r):[[o,d]]).forEach(([h,$])=>{h===o&&($={...d,...$},$.callback=$.callback||d.callback),this.filterToEls(i.liveSocket,n,$).forEach(b=>{this[`exec_${h}`](e,t,r,i,n,b,$)})})},isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length>0)},isInViewport(e){let t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth;return t.right>0&&t.bottom>0&&t.left<i&&t.top<r},exec_exec(e,t,r,i,n,a,{attr:o,to:d}){let p=a.getAttribute(o);if(!p)throw new Error(`expected ${o} to contain JS command on "${d}"`);i.liveSocket.execJS(a,p,t)},exec_dispatch(e,t,r,i,n,a,{event:o,detail:d,bubbles:p,blocking:h}){if(d=d||{},d.dispatcher=n,h){let $=new Promise((b,m)=>{d.done=b});i.liveSocket.asyncTransition($)}R.dispatchEvent(a,o,{detail:d,bubbles:p})},exec_push(e,t,r,i,n,a,o){let{event:d,data:p,target:h,page_loading:$,loading:b,value:m,dispatcher:g,callback:v}=o,y={loading:b,value:m,target:h,page_loading:!!$,originalEvent:e},E=t==="change"&&g?g:n,P=h||E.getAttribute(i.binding("target"))||E,T=(B,I)=>{if(B.isConnected())if(t==="change"){let{newCid:L,_target:O}=o;O=O||(R.isFormAssociated(n)?n.name:void 0),O&&(y._target=O),B.pushInput(n,I,L,d||r,y,v)}else if(t==="submit"){let{submitter:L}=o;B.submitForm(n,I,d||r,L,y,v)}else B.pushEvent(t,n,I,d||r,p,y,v)};o.targetView&&o.targetCtx?T(o.targetView,o.targetCtx):i.withinTargets(P,T)},exec_navigate(e,t,r,i,n,a,{href:o,replace:d}){i.liveSocket.historyRedirect(e,o,d?"replace":"push",null,n)},exec_patch(e,t,r,i,n,a,{href:o,replace:d}){i.liveSocket.pushHistoryPatch(e,o,d?"replace":"push",n)},exec_focus(e,t,r,i,n,a){hi.attemptFocus(a),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>hi.attemptFocus(a))})},exec_focus_first(e,t,r,i,n,a){hi.focusFirstInteractive(a)||hi.focusFirst(a),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>hi.focusFirstInteractive(a)||hi.focusFirst(a))})},exec_push_focus(e,t,r,i,n,a){Od.push(a||n)},exec_pop_focus(e,t,r,i,n,a){let o=Od.pop();o&&(o.focus(),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>o.focus())}))},exec_add_class(e,t,r,i,n,a,{names:o,transition:d,time:p,blocking:h}){this.addOrRemoveClasses(a,o,[],d,p,i,h)},exec_remove_class(e,t,r,i,n,a,{names:o,transition:d,time:p,blocking:h}){this.addOrRemoveClasses(a,[],o,d,p,i,h)},exec_toggle_class(e,t,r,i,n,a,{names:o,transition:d,time:p,blocking:h}){this.toggleClasses(a,o,d,p,i,h)},exec_toggle_attr(e,t,r,i,n,a,{attr:[o,d,p]}){this.toggleAttr(a,o,d,p)},exec_ignore_attrs(e,t,r,i,n,a,{attrs:o}){this.ignoreAttrs(a,o)},exec_transition(e,t,r,i,n,a,{time:o,transition:d,blocking:p}){this.addOrRemoveClasses(a,[],[],d,o,i,p)},exec_toggle(e,t,r,i,n,a,{display:o,ins:d,outs:p,time:h,blocking:$}){this.toggle(t,i,a,o,d,p,h,$)},exec_show(e,t,r,i,n,a,{display:o,transition:d,time:p,blocking:h}){this.show(t,i,a,o,d,p,h)},exec_hide(e,t,r,i,n,a,{display:o,transition:d,time:p,blocking:h}){this.hide(t,i,a,o,d,p,h)},exec_set_attr(e,t,r,i,n,a,{attr:[o,d]}){this.setOrRemoveAttrs(a,[[o,d]],[])},exec_remove_attr(e,t,r,i,n,a,{attr:o}){this.setOrRemoveAttrs(a,[],[o])},ignoreAttrs(e,t){R.putPrivate(e,"JS:ignore_attrs",{apply:(r,i)=>{let n=Array.from(r.attributes),a=n.map(o=>o.name);Array.from(i.attributes).filter(o=>
10!a.includes(o.name)).forEach(o=>{R.attributeIgnored(o,t)&&i.removeAttribute(o.name)}),n.forEach(o=>{R.attributeIgnored(o,t)&&i.setAttribute(o.name,o.value)})}})},onBeforeElUpdated(e,t){let r=R.private(e,"JS:ignore_attrs");r&&r.apply(e,t)},show(e,t,r,i,n,a,o){this.isVisible(r)||this.toggle(e,t,r,i,n,null,a,o)},hide(e,t,r,i,n,a,o){this.isVisible(r)&&this.toggle(e,t,r,i,null,n,a,o)},toggle(e,t,r,i,n,a,o,d){o=o||Fd;let[p,h,$]=n||[[],[],[]],[b,m,g]=a||[[],[],[]];if(p.length>0||b.length>0)if(this.isVisible(r)){let v=()=>{this.addOrRemoveClasses(r,m,p.concat(h).concat($)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(r,b,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(r,g,m))})},y=()=>{this.addOrRemoveClasses(r,[],b.concat(g)),R.putSticky(r,"toggle",E=>E.style.display="none"),r.dispatchEvent(new Event("phx:hide-end"))};r.dispatchEvent(new Event("phx:hide-start")),d===!1?(v(),setTimeout(y,o)):t.transition(o,v,y)}else{if(e==="remove")return;let v=()=>{this.addOrRemoveClasses(r,h,b.concat(m).concat(g));let E=i||this.defaultDisplay(r);window.requestAnimationFrame(()=>{this.addOrRemoveClasses(r,p,[]),window.requestAnimationFrame(()=>{R.putSticky(r,"toggle",P=>P.style.display=E),this.addOrRemoveClasses(r,$,h)})})},y=()=>{this.addOrRemoveClasses(r,[],p.concat($)),r.dispatchEvent(new Event("phx:show-end"))};r.dispatchEvent(new Event("phx:show-start")),d===!1?(v(),setTimeout(y,o)):t.transition(o,v,y)}else this.isVisible(r)?window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("phx:hide-start")),R.putSticky(r,"toggle",v=>v.style.display="none"),r.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("phx:show-start"));let v=i||this.defaultDisplay(r);R.putSticky(r,"toggle",y=>y.style.display=v),r.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(e,t,r,i,n,a){window.requestAnimationFrame(()=>{let[o,d]=R.getSticky(e,"classes",[[],[]]),p=t.filter($=>o.indexOf($)<0&&!e.classList.contains($)),h=t.filter($=>d.indexOf($)<0&&e.classList.contains($));this.addOrRemoveClasses(e,p,h,r,i,n,a)})},toggleAttr(e,t,r,i){e.hasAttribute(t)?i!==void 0?e.getAttribute(t)===r?this.setOrRemoveAttrs(e,[[t,i]],[]):this.setOrRemoveAttrs(e,[[t,r]],[]):this.setOrRemoveAttrs(e,[],[t]):this.setOrRemoveAttrs(e,[[t,r]],[])},addOrRemoveClasses(e,t,r,i,n,a,o){n=n||Fd;let[d,p,h]=i||[[],[],[]];if(d.length>0){let $=()=>{this.addOrRemoveClasses(e,p,[].concat(d).concat(h)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(e,d,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(e,h,p))})},b=()=>this.addOrRemoveClasses(e,t.concat(h),r.concat(d).concat(p));o===!1?($(),setTimeout(b,n)):a.transition(n,$,b);return}window.requestAnimationFrame(()=>{let[$,b]=R.getSticky(e,"classes",[[],[]]),m=t.filter(E=>$.indexOf(E)<0&&!e.classList.contains(E)),g=r.filter(E=>b.indexOf(E)<0&&e.classList.contains(E)),v=$.filter(E=>r.indexOf(E)<0).concat(m),y=b.filter(E=>t.indexOf(E)<0).concat(g);R.putSticky(e,"classes",E=>(E.classList.remove(...y),E.classList.add(...v),[v,y]))})},setOrRemoveAttrs(e,t,r){let[i,n]=R.getSticky(e,"attrs",[[],[]]),a=t.map(([p,h])=>p).concat(r),o=i.filter(([p,h])=>!a.includes(p)).concat(t),d=n.filter(p=>!a.includes(p)).concat(r);t.some(([p,h])=>p==="id"&&e.getAttribute("id")!==h)&&R.putPrivate(e,"clientsideIdAttribute",!0),R.putSticky(e,"attrs",p=>
10(d.forEach(h=>p.removeAttribute(h)),o.forEach(([h,$])=>p.setAttribute(h,$)),[o,d]))},hasAllClasses(e,t){return t.every(r=>e.classList.contains(r))},isToggledOut(e,t){return!this.isVisible(e)||this.hasAllClasses(e,t)},filterToEls(e,t,{to:r}){let i=()=>{if(typeof r=="string")return document.querySelectorAll(r);if(r.closest){let n=t.closest(r.closest);return n?[n]:[]}else if(r.inner)return t.querySelectorAll(r.inner)};return r?e.jsQuerySelectorAll(t,r,i):[t]},defaultDisplay(e){return{tr:"table-row",td:"table-cell"}[e.tagName.toLowerCase()]||"block"},transitionClasses(e){if(!e)return null;let[t,r,i]=Array.isArray(e)?e:[e.split(" "),[],[]];return t=Array.isArray(t)?t:t.split(" "),r=Array.isArray(r)?r:r.split(" "),i=Array.isArray(i)?i:i.split(" "),[t,r,i]}},_t=Qh,Yd=(e,t)=>({exec(r,i){e.execJS(r,i,t)},show(r,i={}){let n=e.owner(r);_t.show(t,n,r,i.display,_t.transitionClasses(i.transition),i.time,i.blocking)},hide(r,i={}){let n=e.owner(r);_t.hide(t,n,r,null,_t.transitionClasses(i.transition),i.time,i.blocking)},toggle(r,i={}){let n=e.owner(r),a=_t.transitionClasses(i.in),o=_t.transitionClasses(i.out);_t.toggle(t,n,r,i.display,a,o,i.time,i.blocking)},addClass(r,i,n={}){let a=Array.isArray(i)?i:i.split(" "),o=e.owner(r);_t.addOrRemoveClasses(r,a,[],_t.transitionClasses(n.transition),n.time,o,n.blocking)},removeClass(r,i,n={}){let a=Array.isArray(i)?i:i.split(" "),o=e.owner(r);_t.addOrRemoveClasses(r,[],a,_t.transitionClasses(n.transition),n.time,o,n.blocking)},toggleClass(r,i,n={}){let a=Array.isArray(i)?i:i.split(" "),o=e.owner(r);_t.toggleClasses(r,a,_t.transitionClasses(n.transition),n.time,o,n.blocking)},transition(r,i,n={}){let a=e.owner(r);_t.addOrRemoveClasses(r,[],[],_t.transitionClasses(i),n.time,a,n.blocking)},setAttribute(r,i,n){_t.setOrRemoveAttrs(r,[[i,n]],[])},removeAttribute(r,i){_t.setOrRemoveAttrs(r,[],[i])},toggleAttribute(r,i,n,a){_t.toggleAttr(r,i,n,a)},push(r,i,n={}){e.withinOwners(r,a=>{let o=n.value||{};delete n.value;let d=new CustomEvent("phx:exec",{detail:{sourceElement:r}});_t.exec(d,t,i,a,r,["push",{data:o,...n}])})},navigate(r,i={}){Ad(r,"navigate");let n=new CustomEvent("phx:exec");e.historyRedirect(n,r,i.replace?"replace":"push",null,null)},patch(r,i={}){Ad(r,"patch");let n=new CustomEvent("phx:exec");e.pushHistoryPatch(n,r,i.replace?"replace":"push",null)},ignoreAttributes(r,i){_t.ignoreAttrs(r,Array.isArray(i)?i:[i])}}),dl="hookId",Nd="deadHook",eg=1,qn=class Jd{get liveSocket(){return this.__liveSocket()}static makeID(){return eg++}static elementID(t){return R.private(t,dl)}static deadHook(t){return R.private(t,Nd)===!0}constructor(t,r,i){if(this.el=r,this.__attachView(t),this.__listeners=new Set,this.__isDisconnected=!1,R.putPrivate(this.el,dl,Jd.makeID()),t&&t.isDead&&R.putPrivate(this.el,Nd,!0),i){let n=new Set(["el","liveSocket","__view","__listeners","__isDisconnected","constructor","js","pushEvent","pushEventTo","handleEvent","removeHandleEvent","upload","uploadTo","__mounted","__updated","__beforeUpdate","__destroyed","__reconnected","__disconnected","__cleanup__"]);for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&(this[o]=i[o],n.has(o)&&console.warn(`Hook object for element #${r.id} overwrites core property '${o}'!`));["mounted","beforeUpdate","updated","destroyed","disconnected","reconnected"].forEach(o=>{i[o]&&typeof i[o]=="function"&&(this[o]=i[o])})}}__attachView(t){t?(this.__view=()=>t,this.__liveSocket=()=>t.liveSocket):(this.__view=()=>{throw new Error(`hook not yet attached to a live view: ${this.el.outerHTML}`)},this.__liveSocket=()=>{throw new Error(`hook not yet attached to a live view: ${this.el.outerHTML}`)})}mounted(){}beforeUpdate(){}updated(){}destroyed(){}disconnected(){}reconnected(){}__mounted(){this.mounted()}__updated(){this.updated()}__beforeUpdate(){this.beforeUpdate()}__destroyed(){this.destroyed(),R.deletePrivate(this.el,dl)}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected()}js(){return{...Yd(this.__view().liveSocket,"hook"),exec:t=>{this.__view().liveSocket.execJS(this.el,t,"hook")}}}pushEvent(t,r,i){let n=this.__view().pushHookEvent(this.el,null,t,r||{});if(i===void 0)return n.then(({reply:a})=>a);n.then(({reply:a,ref:o})=>i(a,o)).catch(()=>{})}pushEventTo(t,r,i,n){if(n===void 0){let a=[];this.__view().withinTargets(t,(d,p)=>{a.push({view:d,targetCtx:p})});let o=a.map(({view:d,targetCtx:p})=>d.pushHookEvent(this.el,p,r,i||{}));return Promise.allSettled(o)}this.__view().withinTargets(t,(a,o)=>{a.pushHookEvent(this.el,o,r,i||{}).then(({reply:d,ref:p})=>n(d,p)).catch(()=>{})})}handleEvent(t,r){let i={event:t,callback:n=>r(n.detail)};return window.addEventListener(`phx:${t}`,i.callback),this.__listeners.add(i),i}removeHandleEvent(t){window.removeEventListener(`phx:${t.event}`,t.callback),this.__listeners.delete(t)}upload(t,r){return this.__view().dispatchUploads(null,t,r)}uploadTo(t,r,i){return this.__view().withinTargets(t,(n,a)=>{n.dispatchUploads(a,r,i)})}
10__cleanup__(){this.__listeners.forEach(t=>this.removeHandleEvent(t))}},tg=(e,t)=>{let r=e.endsWith("[]"),i=r?e.slice(0,-2):e;return i=i.replace(/([^\[\]]+)(\]?$)/,`${t}$1$2`),r&&(i+="[]"),i},rg=class Xd{static closestView(t){let r=t.closest(oa);return r?R.private(r,"view"):null}constructor(t,r,i,n=null,a=null){this.rendered=null,this.isDead=!1,this.liveSocket=r,this.flash=n,this.parent=i,this.root=i?i.root:this,this.el=t;let o=R.private(this.el,"view");if(o!==void 0&&o.isDead!==!0)throw this.logError("view.duplicate-binding",`The DOM element for this view has already been bound to a view.
11
12        An element can only ever be associated with a single view!
13        Please ensure that you are not trying to initialize multiple LiveSockets on the same page.
14        This could happen if you're accidentally trying to render your root layout more than once.
15        Ensure that the template set on the LiveView is different than the root layout.
16      `,{view:o},{attribution:"app"}),new Error("Cannot bind multiple views to the same DOM element.");R.putPrivate(this.el,"view",this),this.id=this.el.id,this.el.setAttribute(fn,this.root.id),this.ref=0,this.lastAckRef=null,this.childJoins=0,this.loaderTimer=null,this.disconnectedTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinAttempts=0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(d){d&&d()},this.stopCallback=function(){},this.pendingJoinOps=[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let d=this.href&&this.expandURL(this.href);return{redirect:this.redirect?d:void 0,url:this.redirect?void 0:d||void 0,params:this.connectParams(a),session:this.getSession(),static:this.getStatic(),flash:this.flash??void 0,sticky:this.el.hasAttribute(gl)}}),this.portalElementIds=new Set}setHref(t){this.href=t}setRedirect(t){this.redirect=!0,this.href=t}isMain(){return this.el.hasAttribute(bl)}connectParams(t){let r=this.liveSocket.params(this.el),i=R.all(document,`[${this.binding(eh)}]`).map(n=>"src"in n&&n.src||"href"in n&&n.href).filter(n=>typeof n=="string");return i.length>0&&(r._track_static=i),r._mounts=this.joinCount,r._mount_attempts=this.joinAttempts,r._live_referer=t??void 0,this.joinAttempts++,r}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Zi)}getStatic(){let t=this.el.getAttribute(Yn);return t===""?null:t}destroy(t=function(){}){this.destroyAllChildren(),this.destroyPortalElements(),this.destroyed=!0,R.deletePrivate(this.el,"view"),delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],this.loaderTimer!=null&&clearTimeout(this.loaderTimer);let r=()=>{t();for(let i in this.viewHooks)this.destroyHook(this.viewHooks[i])};R.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"],{code:"view.child-destroyed"}),this.channel.leave().receive("ok",r).receive("error",r).receive("timeout",r)}setContainerClasses(...t){this.el.classList.remove(fd,zn,xs,hd,Zs),this.el.classList.add(...t)}showLoader(t){if(this.loaderTimer!=null&&clearTimeout(this.loaderTimer),t)this.loaderTimer=setTimeout(()=>this.showLoader(),t);else{for(let r in this.viewHooks)this.viewHooks[r].__disconnected();this.setContainerClasses(zn)}}execAll(t){R.all(this.el,`[${t}]`,r=>this.liveSocket.execJS(r,r.getAttribute(t)))}hideLoader(){this.loaderTimer!=null&&clearTimeout(this.loaderTimer),this.disconnectedTimer!=null&&clearTimeout(this.disconnectedTimer),this.setContainerClasses(fd),this.execAll(this.binding("connected"))}triggerReconnected(){for(let t in this.viewHooks)this.viewHooks[t].__reconnected()}log(t,r,i){this.liveSocket.log(this,t,r,i)}logError(t,r,i,n={attribution:"unknown"}){Ki(t,r,i,{viewId:this.id??this.el.id,...n})}transition(t,r,i=function(){}){this.liveSocket.transition(t,r,i)}withinTargets(t,r,i=document){if(t instanceof HTMLElement||t instanceof SVGElement)return this.liveSocket.owner(t,n=>r(n,t));if(An(t))R.findComponent(this.id,t,i)?r(this,typeof t=="number"?t:parseInt(t)):this.logError("event.missing-component-target",`no component found matching phx-target of ${t}`,{target:t});else{let n=Array.from(i.querySelectorAll(t));n.length===0&&this.logError("event.missing-selector-target",`nothing found matching the phx-target selector "${t}"`,{target:t},{attribution:"app"}
16),n.forEach(a=>this.liveSocket.owner(a,o=>r(o,a)))}}applyDiff(t,r,i){let n=Za(r);this.log(t,()=>["received diff",n],{code:`view.diff-${t}`,metadata:()=>({diff:n})});let{diff:a,reply:o,events:d,title:p}=Dd.extract(r),h=d.reduce((b,m)=>(m.length===3&&m[2]==!0?b.pre.push(m.slice(0,-1)):b.post.push(m),b),{pre:[],post:[]});this.liveSocket.dispatchEvents(h.pre);let $=()=>{i({diff:a,reply:o,events:h.post}),(typeof p=="string"||t=="mount"&&this.isMain())&&window.requestAnimationFrame(()=>R.putTitle(p))};"onDocumentPatch"in this.liveSocket.domCallbacks?this.liveSocket.triggerDOM("onDocumentPatch",[$]):$()}onJoin(t){let{rendered:r,container:i,liveview_version:n,pid:a}=t;if(i){let[o,d]=i;this.el=R.replaceRootContainer(this.el,o,d),R.putPrivate(this.el,"view",this)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),this.isMain()&&window.history.state===null&&ni.pushState("replace",{type:"patch",id:this.id,position:this.liveSocket.currentHistoryPosition}),n!==this.liveSocket.version()&&console.warn(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${n}. To avoid issues, please ensure that your assets use the same version as the server.`),a&&this.el.setAttribute(lh,a),ni.dropLocal(this.liveSocket.localStorage,window.location.pathname,Bd),this.applyDiff("mount",r,({diff:o,events:d})=>{this.rendered=new Dd(this.id,o,()=>this.liveSocket.RenderingBuffer);let[p,h]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.joinAttempts=0,this.maybeRecoverForms(p,()=>{this.onJoinComplete(t,p,h,d)})})}dropPendingRefs(){R.all(document,`[${xi}="${this.refSrc()}"]`,t=>{t.removeAttribute(Es),t.removeAttribute(xi),t.removeAttribute(Xt)})}onJoinComplete({live_patch:t},r,i,n){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(t,r,i,n);R.findPhxChildrenInFragment(r,this.id).filter(o=>{let d=o.id&&this.el.querySelector(`[id="${o.id}"]`),p=d&&d.getAttribute(Yn);return p&&o.setAttribute(Yn,p),d&&d.setAttribute(fn,this.root.id),this.joinChild(o)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(t,r,i,n)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(t,r,i,n)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(t,r,i,n)])}attachTrueDocEl(){let t=R.byId(this.id);if(!t)throw new Error("unable to find root element for view");this.el=t,R.putPrivate(this.el,"view",this),this.el.setAttribute(fn,this.root.id)}execNewMounted(t=document){let r=this.binding(fl),i=this.binding(hl);this.all(t,`[${r}], [${i}]`,n=>{R.maintainPrivateHooks(n,n,r,i),this.maybeAddNewHook(n)}),this.all(t,`[${this.binding(Qs)}], [data-phx-${Qs}]`,n=>{this.maybeAddNewHook(n)}),this.all(t,`[${this.binding(_d)}]`,n=>{this.maybeMounted(n)})}all(t,r,i){R.all(t,r,n=>{this.ownsElement(n)&&i(n)})}applyJoinPatch(t,r,i,n){this.joinCount>1&&this.pendingJoinOps.length&&(this.pendingJoinOps.forEach(o=>typeof o=="function"&&o()),this.pendingJoinOps=[]),this.attachTrueDocEl();let a=new Ya(this,this.el,r,i,null);if(a.markPrunableContentForRemoval(),this.performPatch(a,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(n),this.applyPendingUpdates(),t){let{kind:o,to:d}=t;this.liveSocket.historyPatch(d,o)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(t,r){this.liveSocket.triggerDOM("onBeforeElUpdated",[t,r]);let i=this.getHook(t),n=i&&R.isIgnored(t,this.binding(to));if(i&&!t.isEqualNode(r)&&!(n&&yh(t.dataset,r.dataset)))return i.__beforeUpdate(),i}maybeMounted(t){let r=t.getAttribute(this.binding(_d)),i=r&&R.private(t,"mounted");r&&!i&&(this.liveSocket.execJS(t,r),R.putPrivate(t,"mounted",!0))}maybeAddNewHook(t){let r=this.addHook(t);r&&r.__mounted()}performPatch(t,r,i=!1){let n=[],a=!1,o=new Set;return this.liveSocket.triggerDOM("onPatchStart",[t.targetContainer]),t.afterAdded(d=>{this.liveSocket.triggerDOM("onNodeAdded",[d]);let p=this.binding(fl),h=this.binding(hl);R.maintainPrivateHooks(d,d,p,h),this.maybeAddNewHook(d),d.getAttribute&&this.maybeMounted(d)}),t.afterPhxChildAdded(d=>{R.isPhxSticky(d)?this.liveSocket.joinRootViews():a=!0}),t.beforeUpdated((d,p)=>{this.triggerBeforeUpdateHook(d,p)&&o.add(d.id),_t.onBeforeElUpdated(d,p)}),t.afterUpdated(d=>
16{if(o.has(d.id)){let p=this.getHook(d);p&&p.__updated()}}),t.afterDiscarded(d=>{d.nodeType===Node.ELEMENT_NODE&&n.push(d)}),t.afterTransitionsDiscarded(d=>this.afterElementsRemoved(d,r)),t.perform(i),this.afterElementsRemoved(n,r),this.liveSocket.triggerDOM("onPatchEnd",[t.targetContainer]),a}afterElementsRemoved(t,r){let i=[];t.forEach(n=>{let a=R.all(n,`[${ks}="${this.id}"][${Ii}]`),o=R.all(n,`[${this.binding(Qs)}], [data-phx-hook]`);a.concat(n).forEach(d=>{let p=this.componentID(d);An(p)&&i.indexOf(p)===-1&&d.getAttribute(ks)===this.id&&i.push(p)}),o.concat(n).forEach(d=>{let p=this.getHook(d);p&&this.destroyHook(p)})}),r&&this.maybePushComponentsDestroyed(i)}joinNewChildren(){R.findPhxChildren(document,this.id).forEach(t=>this.joinChild(t))}maybeRecoverForms(t,r){let i=this.binding("change"),n=this.root.formsForRecovery,a=document.createElement("template");if(a.innerHTML=t,!a.content.firstElementChild)return;R.all(a.content,`[${wl}]`).forEach(p=>{p instanceof HTMLTemplateElement&&a.content.firstElementChild?.appendChild(p.content.firstElementChild)});let o=a.content.firstElementChild;o.id=this.id,o.setAttribute(fn,this.root.id),o.setAttribute(Zi,this.getSession()),o.setAttribute(Yn,this.getStatic()??""),this.parent&&o.setAttribute(Jn,this.parent.id),R.putPrivate(o,"view",this);let d=R.all(a.content,"form").filter(p=>p.id&&n[p.id]).filter(p=>!this.pendingForms.has(p.id)).filter(p=>n[p.id].getAttribute(i)===p.getAttribute(i)).map(p=>[n[p.id],p]);if(d.length===0)return r();d.forEach(([p,h],$)=>{this.pendingForms.add(h.id),this.pushFormRecovery(p,h,a.content.firstElementChild,()=>{this.pendingForms.delete(h.id),$===d.length-1&&r()})})}getChildById(t){return this.root.children[this.id][t]}getDescendentByEl(t){return t.id===this.id?this:this.children&&this.children[t.getAttribute(Jn)]?.[t.id]}destroyDescendent(t){for(let r in this.root.children)for(let i in this.root.children[r])if(i===t)return this.root.children[r][i].destroy()}joinChild(t){if(!this.getChildById(t.id)){let i=new Xd(t,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(t){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([t,r])=>{t.isDestroyed()||r()}),this.pendingJoinOps=[]})}update(t,r,i=!1){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return i||this.pendingDiffs.push({diff:t,events:r}),!1;this.rendered.mergeDiff(t);let n=!1;return this.rendered.isComponentOnlyDiff(t)?this.liveSocket.time("component patch complete",()=>{R.findExistingParentCIDs(this.id,this.rendered.componentCIDs(t)).forEach(o=>{this.componentPatch(this.rendered.getComponent(t,o),o)&&(n=!0)})}):Sd(t)||this.liveSocket.time("full patch complete",()=>{let[a,o]=this.renderContainer(t,"update"),d=new Ya(this,this.el,a,o,null);n=this.performPatch(d,!0)}),this.liveSocket.dispatchEvents(r),n&&this.joinNewChildren(),!0}renderContainer(t,r){return this.liveSocket.time(`toString diff (${r})`,()=>{let i=this.el.tagName,n=t?this.rendered.componentCIDs(t):null,{buffer:a,streams:o}=this.rendered.toString(n);return[`<${i}>${a}</${i}>`,o]})}componentPatch(t,r){if(Sd(t))return!1;let{buffer:i,streams:n}=this.rendered.componentToString(r),a=new Ya(this,this.el,i,n,r);return this.performPatch(a,!0)}getHook(t){return this.viewHooks[qn.elementID(t)]}addHook(t){let r=qn.elementID(t);if(!(t.getAttribute&&!this.ownsElement(t)))if(r&&!this.viewHooks[r]){if(qn.deadHook(t))return;let i=R.getCustomElHook(t)||this.logError("hook.custom-element-missing-hook",`no hook found for custom element: ${t.id}`,{el:t},{attribution:"app"});return this.viewHooks[r]=i,i.__attachView(this),i}else{if(r||!t.getAttribute)return;{let i=t.getAttribute(`data-phx-${Qs}`)||t.getAttribute(this.binding(Qs));if(!i)return;let n=this.liveSocket.getHookDefinition(i);if(n){if(!t.id){this.logError("hook.missing-id",`no DOM ID for hook "${i}". Hooks require a unique ID on each element.`,{el:t,hookName:i},{attribution:"app"});return}let a;try{if(typeof n=="function"&&n.prototype instanceof qn)a=new n(this,t);else if(typeof n=="object"&&n!==null)a=new qn(this,t,n);else{this.logError("hook.invalid-definition",`Invalid hook definition for "${i}". Expected a class extending ViewHook or an object definition.`,{el:t,hookName:i},{attribution:"app"});return}}catch(o){let d=o instanceof Error?o.message:String(o);this.logError("hook.creation-failed",`Failed to create hook "${i}": ${d}`,{el:t,hookName:i,error:o},{attribution:"app"});return}return this.viewHooks[qn.elementID(a.el)]=a,a}
16else i!==null&&this.logError("hook.unknown",`unknown hook found for "${i}"`,{el:t,hookName:i},{attribution:"app"})}}}destroyHook(t){let r=qn.elementID(t.el);t.__destroyed(),t.__cleanup__(),delete this.viewHooks[r]}applyPendingUpdates(){this.pendingDiffs=this.pendingDiffs.filter(({diff:t,events:r})=>!this.update(t,r,!0)),this.eachChild(t=>t.applyPendingUpdates())}eachChild(t){let r=this.root.children[this.id]||{};for(let i in r)t(this.getChildById(i))}onChannel(t,r){this.liveSocket.onChannel(this.channel,t,i=>{this.isJoinPending()&&!["redirect","live_redirect"].includes(t)?this.joinCount>1?this.pendingJoinOps.push(()=>r(i)):this.root.pendingJoinOps.push([this,()=>r(i)]):this.liveSocket.requestDOMUpdate(()=>r(i))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",t=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",t,({diff:r,events:i})=>this.update(r,i))})}),this.onChannel("redirect",({to:t,flash:r})=>this.onRedirect({to:t,flash:r})),this.onChannel("live_patch",t=>this.onLivePatch(t)),this.onChannel("live_redirect",t=>this.onLiveRedirect(t)),this.channel.onError(t=>this.onError(t)),this.channel.onClose(t=>this.onClose(t))}destroyAllChildren(){this.eachChild(t=>t.destroy())}onLiveRedirect(t){let{to:r,kind:i,flash:n}=t,a=this.expandURL(r),o=new CustomEvent("phx:server-navigate",{detail:{to:r,kind:i,flash:n}});this.liveSocket.historyRedirect(o,a,i,n)}onLivePatch(t){let{to:r,kind:i}=t;this.href=this.expandURL(r),this.liveSocket.historyPatch(r,i)}expandURL(t){return t.startsWith("/")?`${window.location.protocol}//${window.location.host}${t}`:t}onRedirect({to:t,flash:r,reloadToken:i}){this.liveSocket.redirect(t,r??null,i??null)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(t){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=r=>{r=r||function(){},t?t(this.joinCount,r):r()},this.wrapPush(()=>this.channel.join(),{ok:r=>this.liveSocket.requestDOMUpdate(()=>this.onJoin(r)),error:r=>this.onJoinError(r),timeout:()=>this.onJoinError({reason:"timeout"})})}onJoinError(t){if(t.events&&this.liveSocket.dispatchEvents(t.events),t.reason==="reload"){this.log("error",()=>[`failed mount with ${t.status}. Falling back to page reload`,t],{code:"view.mount-reload",level:"error",metadata:()=>({status:t.status}),context:{attribution:"app"}}),this.onRedirect({to:this.liveSocket.main.href,reloadToken:t.token});return}else if(t.reason==="unauthorized"||t.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",t],{code:"view.unauthorized-live-redirect",level:"error",metadata:()=>({reason:t.reason}),context:{attribution:"app"}}),this.onRedirect({to:this.liveSocket.main.href,flash:this.flash});return}if((t.redirect||t.live_redirect)&&(this.joinPending=!1,this.channel.leave()),t.redirect)return this.onRedirect(t.redirect);if(t.live_redirect)return this.onLiveRedirect(t.live_redirect);let r=t.reason==="timeout",i=r||t.source==="transport"?"network":"app";if(this.log("error",()=>[r?"join timed out":"unable to join",t],{code:r?"view.join-timeout":"view.join-failed",level:"error",metadata:()=>r?{error:t}:{response:t},context:{attribution:i}}),this.isMain())this.displayError([zn,xs,Zs],{unstructuredError:t,errorKind:"server"}),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this);else{this.joinAttempts>=al&&(this.root.displayError([zn,xs,Zs],{unstructuredError:t,errorKind:"server"}),this.log("error",()=>[`giving up trying to mount after ${al} tries`,t],{code:"view.mount-attempts-exhausted",level:"error",metadata:()=>({attempts:al,response:t})}),this.destroy());let n=R.byId(this.el.id);n?(R.mergeAttrs(n,this.el),this.displayError([zn,xs,Zs],{unstructuredError:t,errorKind:"server"}),this.el=n):this.destroy()}}onClose(t){if(!this.isDestroyed()){if(this.isMain()&&this.liveSocket.hasPendingLink()&&t!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),this.liveSocket.isUnloaded()&&this.showLoader(ph)}}onError(t){this.onClose(t),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",t],{code:"view.crashed",level:"error",metadata:()=>({reason:t}),context:{attribution:"app"}}),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([zn,xs,Zs],{unstructuredError:t,errorKind:"server"}):this.displayError([zn,xs,hd],{unstructuredError:t,errorKind:"client"}))}displayError(t,r={}){this.isMain()&&R.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error",...r}}),this.showLoader(),this.setContainerClasses(...t),this.delayedDisconnected()}delayedDisconnected(){this.disconnectedTimer=setTimeout(()=>{this.execAll(this.binding("disconnected"))},this.liveSocket.disconnectedTimeout)}wrapPush(t,r){let i=this.liveSocket.getLatencySim(),n=i?a=>setTimeout(()=>!this.isDestroyed()&&a(),i):a=>!this.isDestroyed()&&a();n(()=>{t().receive("ok",a=>n(()=>r.ok&&r.ok(a))).receive("error",a=>n(()=>r.error&&r.error(a))).receive("timeout",()=>n(()=>r.timeout&&r.timeout()))})}pushWithReply(t,r,i){if(!this.isConnected())return Promise.resolve({type:"error",error:"no connection",context:{attribution:"network"}});let[n,[a],o]=t?t({payload:i}):[null,[],{}],d=this.joinCount,p=function(){};return o.page_loading&&(p=this.liveSocket.withPageLoading({kind:"element",target:a})),typeof i.cid!="number"&&delete i.cid,new Promise(h=>{this.wrapPush(()=>this.channel.push(r,i,gh),{ok:$=>{n!==null&&(this.lastAckRef=n);let b=m=>{$.redirect&&this.onRedirect($.redirect),$.live_patch&&this.onLivePatch($.live_patch),$.live_redirect&&this.onLiveRedirect($.live_redirect),p(),h({type:"ok",resp:$,reply:m,ref:n})};$.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",$.diff,({diff:m,reply:g,events:v})=>{n!==null&&this.undoRefs(n,i.event),this.update(m,v),b(g)})}):(n!==null&&this.undoRefs(n,i.event),b(null))},error:$=>{h({type:"error",error:`failed with reason: ${JSON.stringify($)}`,context:{attribution:"app"}})},timeout:()=>{h({type:"error",error:"push timeout",context:{attribution:"network"}}),this.joinCount===d&&this.liveSocket.reloadWithJitter(this,()=>{this.log("timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"],{code:"view.push-timeout-recovery",level:"error",context:{attribution:"network"}})})}})})}undoRefs(t,r,i){if(!this.isConnected())return;let n=`[${xi}="${this.refSrc()}"]`;i?(i=new Set(i),R.all(document,n,a=>{i&&!i.has(a)||(R.all(a,n,o=>this.undoElRef(o,t,r)),this.undoElRef(a,t,r))})):R.all(document,n,a=>this.undoElRef(a,t,r))}undoElRef(t,r,i){new _l(t).maybeUndo(r,i,a=>{let o=new Ya(this,t,a,new Set,null,{undoRef:r}),d=this.performPatch(o,!0);R.all(t,`[${xi}="${this.refSrc()}"]`,p=>this.undoElRef(p,r,i)),d&&this.joinNewChildren()})}refSrc(){return this.el.id}putRef(t,r,i,n={}){let a=this.ref++,o=this.binding(gd);if(n.loading){let d=R.all(document,n.loading).map(p=>({el:p,lock:!0,loading:!0}));t=t.concat(d)}for(let{el:d,lock:p,loading:h}of t){if(!p&&!h)throw new Error("putRef requires lock or loading");if(d.setAttribute(xi,this.refSrc()),h&&d.setAttribute(Es,a.toString()),p&&d.setAttribute(Xt,a.toString()),!h||n.submitter&&!(d===n.submitter||d===n.form))continue;let $=new Promise(v=>{d.addEventListener(`phx:undo-lock:${a}`,()=>v(g),{once:!0})}),b=new Promise(v=>{d.addEventListener(`phx:undo-loading:${a}`,()=>v(g),{once:!0})});d.classList.add(`phx-${i}-loading`);let m=d.getAttribute(o);m!==null&&(d.getAttribute(eo)||d.setAttribute(eo,d.textContent||""),m!==""&&(d.textContent=m),d.setAttribute(ws,d.getAttribute(ws)||("disabled"in d?String(d.disabled):"")),d.setAttribute("disabled",""));let g={event:r,eventType:i,ref:a,isLoading:h,isLocked:p,lockElements:t.filter(({lock:v})=>v).map(({el:v})=>v),loadingElements:t.filter(({loading:v})=>v).map(({el:v})=>v),unlock:v=>{v=Array.isArray(v)?v:[v],this.undoRefs(a,r,v)},lockComplete:$,loadingComplete:b,lock:v=>new Promise(y=>{if(this.isAcked(a))return y(g);v.setAttribute(Xt,a),v.setAttribute(xi,this.refSrc()),v.addEventListener(`phx:undo-lock:${a}`,()=>y(g),{once:!0})})};n.payload&&(g.payload=n.payload),n.target&&(g.target=n.target),n.originalEvent&&(g.originalEvent=n.originalEvent),d.dispatchEvent(new CustomEvent("phx:push",{detail:g,bubbles:!0,cancelable:!1})),r&&d.dispatchEvent(new CustomEvent(`phx:push:${r}`,{detail:g,bubbles:!0,cancelable:!1}))}return[a,t.map(({el:d})=>d),n]}isAcked(t){return this.lastAckRef!==null&&this.lastAckRef>=t}componentID(t){let r=t.getAttribute&&t.getAttribute(Ii);return r?parseInt(r):null}targetComponentID(t,r,i={}){if(An(r))return r;let n=i.target||t.getAttribute(this.binding("target"));return An(n)?typeof n=="number"?n:parseInt(n):r&&(n!==null||i.target)?this.closestComponentID(r):null}closestComponentID(t){return An(t)?t:t?ys(t.closest(`[${Ii}],[${Sn}]`),r=>{if(r.hasAttribute(Ii))return this.ownsElement(r)&&this.componentID(r);if(r.hasAttribute(Sn)){let i=R.byId(r.getAttribute(Sn));return this.closestComponentID(i)}}):null}pushHookEvent(t,r,i,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",{event:i,payload:n}],{code:"hook.push-disconnected",metadata:()=>({event:i,payload:n}),context:{attribution:"network"}}),Promise.reject(new Error("unable to push hook event. LiveView not connected"));let a=()=>this.putRef([{el:t,loading:!0,lock:!0}],i,"hook",{payload:n,target:r});return this.pushWithReply(a,"event",{type:"hook",event:i,value:n,cid:this.closestComponentID(r)}).then(o=>{if(o.type==="error")throw new Error("Failed to push hook event: "+o.error);return{reply:o.reply,ref:o.ref}})}extractMeta(t,r,i){let n=this.binding("value-");for(let a=0;a<t.attributes.length;a++){r||(r={});let o=t.attributes[a].name;o.startsWith(n)&&(r[o.replace(n,"")]=t.getAttribute(o))}if(t.value!==void 0&&!(t instanceof HTMLFormElement)&&(r||(r={}),r.value=t.value,t.tagName==="INPUT"&&zd.indexOf(t.type)>=0&&!t.checked&&delete r.value),i){r||(r={});for(let a in i)r[a]=i[a]}return r}serializeForm(t,r={},i=[]){let{submitter:n}=r,a;if(n&&n.name){let m=document.createElement("input");m.type="hidden";let g=n.getAttribute("form");
16g&&m.setAttribute("form",g),m.name=n.name,m.value=n.value,n.parentElement.insertBefore(m,n),a=m}let o=new FormData(t),d=[];o.forEach((m,g,v)=>{m instanceof File&&d.push(g)}),d.forEach(m=>o.delete(m));let p=new URLSearchParams,{inputsUnused:h,onlyHiddenInputs:$}=Array.from(t.elements).reduce((m,g)=>{if(!R.isFormAssociated(g))return m;let{inputsUnused:v,onlyHiddenInputs:y}=m,E=g.name;if(!E)return m;v[E]===void 0&&(v[E]=!0),y[E]===void 0&&(y[E]=!0);let P=g.hasAttribute(this.binding($d)),T=R.private(g,Qa)||R.private(g,aa)||P,B=g.type==="hidden";return v[E]=v[E]&&!T,y[E]=y[E]&&B,m},{inputsUnused:{},onlyHiddenInputs:{}}),b=t.hasAttribute(this.binding($d));for(let[m,g]of o.entries())if(i.length===0||i.indexOf(m)>=0){let v=h[m],y=$[m];!b&&v&&!(n&&n.name==m)&&!y&&p.append(tg(m,"_unused_"),""),typeof g=="string"&&p.append(m,g)}return n&&a&&n.parentElement.removeChild(a),p.toString()}pushEvent(t,r,i,n,a,o={},d){this.pushWithReply(p=>this.putRef([{el:r,loading:!0,lock:!0}],n,t,{...o,payload:p?.payload}),"event",{type:t,event:n,value:this.extractMeta(r,a,o.value),cid:this.targetComponentID(r,i,o)}).then(p=>{p.type==="ok"?d&&d(p.reply):this.logError("event.push-failed","Failed to push event",{error:p.error,type:t,phxEvent:n,el:r},p.context)})}pushFileProgress(t,r,i,n=function(){}){this.liveSocket.withinOwners(t.form,(a,o)=>{a.pushWithReply(null,"progress",{event:t.getAttribute(a.binding(dh)),ref:t.getAttribute(hn),entry_ref:r,progress:i,cid:a.targetComponentID(t.form,o)}).then(d=>{d.type==="ok"?n():a.logError("upload.progress-push-failed","Failed to push file progress",{error:d.error,fileEl:t,entryRef:r,progress:i},d.context)})})}pushInput(t,r,i,n,a,o){if(!t.form)throw new Error("form events require the input to be inside a form");let d,p=An(i)?i:this.targetComponentID(t.form,r,a),h=v=>this.putRef([{el:t,loading:!0,lock:!0},{el:t.form,loading:!0,lock:!0}],n,"change",{...a,payload:v?.payload}),$,b=this.extractMeta(t.form,{},a.value),m={};t instanceof HTMLButtonElement&&(m.submitter=t),t.getAttribute(this.binding("change"))?$=this.serializeForm(t.form,m,[t.name]):$=this.serializeForm(t.form,m),R.isUploadInput(t)&&t.files&&t.files.length>0&&Tr.trackFiles(t,Array.from(t.files)),d=Tr.serializeUploads(t);let g={type:"form",event:n,value:$,meta:{_target:a._target||"undefined",...b},uploads:d,cid:p};this.pushWithReply(h,"event",g).then(v=>{v.type==="ok"?R.isUploadInput(t)&&R.isAutoUpload(t)?_l.onUnlock(t,()=>{if(Tr.filesAwaitingPreflight(t).length>0){let[y,E]=h();this.undoRefs(y,n,[t.form]),this.uploadFiles(t.form,n,r,y,p,P=>{o&&o(v.resp),this.triggerAwaitingSubmit(t.form,n),this.undoRefs(y,n)})}}):o&&o(v.resp):this.logError("event.input-push-failed","Failed to push input event",{error:v.error,inputEl:t,phxEvent:n},v.context)})}triggerAwaitingSubmit(t,r){let i=this.getScheduledSubmit(t);if(i){let[n,a,o,d]=i;this.cancelSubmit(t,r),d()}}getScheduledSubmit(t){return this.formSubmits.find(([r,i,n,a])=>r.isSameNode(t))}scheduleSubmit(t,r,i,n){if(this.getScheduledSubmit(t))return!0;this.formSubmits.push([t,r,i,n])}cancelSubmit(t,r){this.formSubmits=this.formSubmits.filter(([i,n,a,o])=>i.isSameNode(t)?(this.undoRefs(n,r),!1):!0)}disableForm(t,r,i={}){let n=v=>!(Gn(v,`${this.binding(to)}=ignore`,v.form)||Gn(v,"data-phx-update=ignore",v.form)),a=v=>v.hasAttribute(this.binding(gd)),o=v=>v.tagName=="BUTTON",d=v=>["INPUT","TEXTAREA"].includes(v.tagName),p=Array.from(t.elements),h=p.filter(a),$=p.filter(o).filter(n),b=p.filter(d).filter(n);$.forEach(v=>{v.setAttribute(ws,v.disabled.toString()),v.disabled=!0}),b.forEach(v=>{v.setAttribute(vl,v.readOnly.toString()),v.readOnly=!0,v instanceof HTMLInputElement&&v.files&&(v.setAttribute(ws,v.disabled.toString()),v.disabled=!0)});let m=h.concat($).concat(b).map(v=>({el:v,loading:!0,lock:!0})),g=[{el:t,loading:!0,lock:!1},...m].reverse();return this.putRef(g,r,"submit",i)}pushFormSubmit(t,r,i,n,a,o){let d=h=>this.disableForm(t,i,{...a,form:t,payload:h?.payload,submitter:n});R.putPrivate(t,"submitter",n);let p=this.targetComponentID(t,r);if(Tr.hasUploadsInProgress(t)){let[h,$]=d(),b=()=>this.pushFormSubmit(t,r,i,n,a,o);return this.scheduleSubmit(t,h,a,b)}
16else if(Tr.inputsAwaitingPreflight(t).length>0){let[h,$]=d(),b=()=>[h,$,a];this.uploadFiles(t,i,r,h,p,m=>{if(Tr.inputsAwaitingPreflight(t).length>0)return this.undoRefs(h,i);let g=this.extractMeta(t,{},a.value),v=this.serializeForm(t,{submitter:n});this.pushWithReply(b,"event",{type:"form",event:i,value:v,meta:g,cid:p}).then(y=>{y.type==="ok"?o(y.resp):this.logError("event.submit-push-failed","Failed to push form submit",{error:y.error,phxEvent:i,formEl:t},y.context)})})}else if(!(t.hasAttribute(xi)&&t.classList.contains("phx-submit-loading"))){let h=this.extractMeta(t,{},a.value),$=this.serializeForm(t,{submitter:n});this.pushWithReply(d,"event",{type:"form",event:i,value:$,meta:h,cid:p}).then(b=>{b.type==="ok"?o(b.resp):this.logError("event.submit-push-failed","Failed to push form submit",{error:b.error,phxEvent:i,formEl:t},b.context)})}}uploadFiles(t,r,i,n,a,o){let d=this.joinCount,p=Tr.activeFileInputs(t),h=p.length;p.forEach($=>{let b=new Tr($,this,()=>{h--,h===0&&o()}),m=b.entries().map(v=>v.toPreflightPayload());if(m.length===0){h--;return}let g={ref:$.getAttribute(hn),entries:m,cid:this.targetComponentID($.form,i)};this.log("upload",()=>["sending preflight request",g],{code:"upload.preflight-request",metadata:()=>({payload:g})}),this.pushWithReply(null,"allow_upload",g).then(v=>{if(v.type==="ok")if(this.log("upload",()=>["got preflight response",v.resp],{code:"upload.preflight-response",metadata:()=>({response:v.resp})}),b.entries().forEach(y=>{v.resp.entries&&!v.resp.entries[y.ref]&&this.handleFailedEntryPreflight(y.ref,"failed preflight",b)}),v.resp.error||Object.keys(v.resp.entries).length===0)this.undoRefs(n,r),(v.resp.error||[]).map(([E,P])=>{this.handleFailedEntryPreflight(E,P,b)});else{let y=E=>{this.channel.onError(()=>{this.joinCount===d&&E()})};b.initAdapterUpload(v.resp,y,this.liveSocket)}else this.logError("upload.push-failed","Failed to push upload",{error:v.error,phxEvent:r,formEl:t},v.context)})})}handleFailedEntryPreflight(t,r,i){if(i.isAutoUpload()){let n=i.entries().find(a=>a.ref===t.toString());n&&n.cancel()}else i.entries().map(n=>n.cancel());this.log("upload",()=>[`error for entry ${t}`,r],{code:"upload.preflight-rejected",metadata:()=>({uploadRef:t,reason:r})})}dispatchUploads(t,r,i){let n=this.targetCtxElement(t)||this.el,a=R.findUploadInputs(n).filter(o=>o.name===r);a.length===0?this.logError("upload.input-not-found",`no live file inputs found matching the name "${r}"`,{name:r},{attribution:"app"}):a.length>1?this.logError("upload.duplicate-input",`duplicate live file inputs found matching the name "${r}"`,{name:r,inputs:a},{attribution:"app"}):R.dispatchEvent(a[0],jd,{detail:{files:i}})}targetCtxElement(t){return An(t)?R.findComponent(this.id,t):t||null}pushFormRecovery(t,r,i,n){let a=this.binding("change"),o=r.getAttribute(this.binding("target"))||r,d=r.getAttribute(this.binding(vd))||r.getAttribute(this.binding("change")),p=Array.from(t.elements).filter(b=>R.isFormAssociated(b)&&b.name&&!b.hasAttribute(a));if(p.length===0){n();return}p.forEach(b=>b.hasAttribute(hn)&&Tr.clearFiles(b));let h=p.find(b=>b.type!=="hidden")||p[0],$=0;this.withinTargets(o,(b,m)=>{let g=this.targetComponentID(r,m);$++;let v=new CustomEvent("phx:form-recovery",{detail:{sourceElement:t}});_t.exec(v,"change",d,this,h,["push",{_target:h.name,targetView:b,targetCtx:m,newCid:g,callback:()=>{$--,$===0&&n()}}])},i)}pushLinkPatch(t,r,i,n){let a=this.liveSocket.setPendingLink(r),o=t.isTrusted&&t.type!=="popstate",d=i?()=>this.putRef([{el:i,loading:o,lock:!0}],null,"click"):null,p=()=>this.liveSocket.redirect(window.location.href,null,null),h=r.startsWith("/")?`${location.protocol}//${location.host}${r}`:r;this.pushWithReply(d,"live_patch",{url:h}).then($=>{$.type==="ok"?this.liveSocket.requestDOMUpdate(()=>{if($.resp.link_redirect)this.liveSocket.replaceMain(r,null,n,a);else{if($.resp.redirect)return;this.liveSocket.commitPendingLink(a)&&(this.href=r),this.applyPendingUpdates(),n&&n(a)}}):p()})}getFormsForRecovery(){if(this.joinCount===0)return{};let t=this.binding("change");return R.all(document,`#${CSS.escape(this.id)} form[${t}], [${Xn}
16="${CSS.escape(this.id)}"] form[${t}]`).filter(r=>r instanceof HTMLFormElement).filter(r=>r.id).filter(r=>r.elements.length>0).filter(r=>r.getAttribute(this.binding(vd))!=="ignore").map(r=>{let i=r.cloneNode(!0);ml(i,r,{onBeforeElUpdated:(a,o)=>(R.copyPrivates(a,o),a.getAttribute("form")===r.id&&a.parentNode?(a.parentNode.removeChild(a),!1):!0)});let n=document.querySelectorAll(`[form="${CSS.escape(r.id)}"]`);return Array.from(n).forEach(a=>{let o=a.cloneNode(!0);ml(o,a),R.copyPrivates(o,a),o.removeAttribute("form"),i.appendChild(o)}),i}).reduce((r,i)=>(r[i.id]=i,r),{})}maybePushComponentsDestroyed(t){let r=t.filter(n=>R.findComponent(this.id,n)===null),i=(n,a)=>{this.isDestroyed()||this.logError("component.destroy-push-failed","Failed to push components destroyed",{error:n.error,cids:a},n.context)};r.length>0&&(r.forEach(n=>this.rendered.resetRender(n)),this.pushWithReply(null,"cids_will_destroy",{cids:r}).then(n=>{n.type==="ok"?this.liveSocket.requestDOMUpdate(()=>{let a=r.filter(o=>R.findComponent(this.id,o)===null);a.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:a}).then(o=>{o.type==="ok"?this.rendered.pruneCIDs(o.resp.cids):i(o,a)})}):i(n,r)}))}ownsElement(t){let r=R.closestViewEl(t);return t.getAttribute(Jn)===this.id||r&&r.id===this.id||!r&&this.isDead}submitForm(t,r,i,n,a={}){R.putPrivate(t,aa,!0),Array.from(t.elements).forEach(d=>R.putPrivate(d,aa,!0)),this.liveSocket.blurActiveElement(),this.pushFormSubmit(t,r,i,n,a,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(t){return this.liveSocket.binding(t)}pushPortalElementId(t){this.portalElementIds.add(t)}dropPortalElementId(t){this.portalElementIds.delete(t)}destroyPortalElements(){this.liveSocket.unloaded||this.portalElementIds.forEach(t=>{let r=document.getElementById(t);r&&r.remove()})}},ig=Object.freeze({RenderingBuffer:ro,ReportingBuffer:Zh});var Kd=class{constructor(e,t,r={}){if(this.unloaded=!1,this.buffers=ig,!t||t.constructor.name==="Object")throw new Error(`
17      a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:
18
19          import {Socket} from "phoenix"
20          import {LiveSocket} from "phoenix_live_view"
21          let liveSocket = new LiveSocket("/live", Socket, {...})
22      `);this.socket=new t(e,r),this.bindingPrefix=r.bindingPrefix||hh,this.params=ia(r.params||{}),this.viewLogger=r.viewLogger,this.metadataCallbacks=r.metadata||{},this.defaults=Object.assign(Za(vh),r.defaults||{}),this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Za(window.location),this.hooks=r.hooks||{},this.uploaders=r.uploaders||{},this.RenderingBuffer=ro,this.loaderTimeout=r.loaderTimeout||uh,this.disconnectedTimeout=r.disconnectedTimeout||fh,this.reloadWithJitterTimer=null,this.maxReloads=r.maxReloads||Xf,this.reloadJitterMin=r.reloadJitterMin||Kf,this.reloadJitterMax=r.reloadJitterMax||Zf,this.failsafeJitter=r.failsafeJitter||Qf,this.localStorage=r.localStorage||window.localStorage,this.sessionStorage=r.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.boundEventNames=new Set,this.blockPhxChangeWhileComposing=r.blockPhxChangeWhileComposing||!1,this.serverCloseRef=null,this.domCallbacks=Object.assign({jsQuerySelectorAll:null,onPatchStart:ia(),onPatchEnd:ia(),onNodeAdded:ia(),onBeforeElUpdated:ia()},r.dom||{}),this.transitions=new ng,this.currentHistoryPosition=parseInt(this.sessionStorage.getItem(qa)||"0")||0,window.addEventListener("pagehide",i=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.2.9"}isProfileEnabled(){return this.sessionStorage.getItem(nl)==="true"}attachDebugBuffer(e){let t=this.RenderingBuffer;return this.RenderingBuffer=e,t}isDebugEnabled(){return this.sessionStorage.getItem(Va)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Va)==="false"}enableDebug(){this.sessionStorage.setItem(Va,"true")}enableProfiling(){this.sessionStorage.setItem(nl,"true")}disableDebug(){this.sessionStorage.setItem(Va,"false")}disableProfiling(){this.sessionStorage.removeItem(nl)}enableLatencySim(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(sl,e.toString())}disableLatencySim(){this.sessionStorage.removeItem(sl)}getLatencySim(){let e=this.sessionStorage.getItem(sl);return e?parseInt(e):null}getSocket(){return this.socket}connect(){let e=window.location.hostname.toLowerCase();(e==="localhost"||e.endsWith(".localhost"))&&!this.isDebugDisabled()&&this.enableDebug();let t=()=>{this.resetReloadStatus(),this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",()=>t())}disconnect(e){this.reloadWithJitterTimer!=null&&clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off([this.serverCloseRef]),this.serverCloseRef=null),this.socket.disconnect(e)}replaceTransport(e){this.reloadWithJitterTimer!=null&&clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(e),this.connect()}execJS(e,t,r=null){let i=new CustomEvent("phx:exec",{detail:{sourceElement:e}});this.owner(e,n=>_t.exec(i,r,t,n,e))}js(){return Yd(this,"js")}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"],{code:"socket.page-navigation-disconnect"}),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(e,t){this.domCallbacks[e](...t)}time(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);let r=t();return console.timeEnd(e),r}
22log(e,t,r,i){let n=this.isDebugEnabled(),a=i?.level??"debug",o=!!i&&(a!=="debug"||n);if(!this.viewLogger&&!n&&!o)return;let[d,p]=r();this.viewLogger?this.viewLogger(e,t,d,p):n&&wh(e,t,d,p),o&&i&&Vd({level:a,code:i.code,message:d,viewId:e.id,metadata:i.metadata?.(),...i.context||{attribution:"unknown"}})}requestDOMUpdate(e){this.transitions.after(e)}asyncTransition(e){this.transitions.addAsyncTransition(e)}transition(e,t,r=function(){}){this.transitions.addTransition(e,t,r)}onChannel(e,t,r){e.on(t,i=>{let n=this.getLatencySim();n?setTimeout(()=>r(i),n):r(i)})}reloadWithJitter(e,t){this.reloadWithJitterTimer!=null&&clearTimeout(this.reloadWithJitterTimer),this.disconnect();let r=this.reloadJitterMin,i=this.reloadJitterMax,n=Math.floor(Math.random()*(i-r+1))+r,a=ni.updateLocal(this.localStorage,window.location.pathname,Bd,0,o=>o+1);a>=this.maxReloads&&(n=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{e.isDestroyed()||e.isConnected()||(e.destroy(),t?t():this.log(e,"join",()=>[`encountered ${a} consecutive reloads`],{code:"view.reload-attempts",metadata:()=>({tries:a})}),a>=this.maxReloads&&this.log(e,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`],{code:"view.reload-failsafe",level:"error",metadata:()=>({tries:a,maxReloads:this.maxReloads})}),this.pendingLink!==null?window.location.href=this.pendingLink:window.location.reload())},n)}getHookDefinition(e){if(e)return this.maybeInternalHook(e)||this.hooks[e]||this.maybeRuntimeHook(e)}maybeInternalHook(e){return e&&e.startsWith("Phoenix.")&&Dh[e.split(".")[1]]}maybeRuntimeHook(e){let t=document.querySelector(`script[${Ka}="${CSS.escape(e)}"]`);if(!t)return;let r=window[`phx_hook_${e}`];if(!r||typeof r!="function"){Ki("hook.runtime-not-function","a runtime hook must be a function",{runtimeHook:t,name:e},{attribution:"app"});return}let i=r();if(i&&(typeof i=="object"||typeof i=="function"))return i;Ki("hook.runtime-invalid-return","runtime hook must return an object with hook callbacks or an instance of ViewHook",{runtimeHook:t,name:e},{attribution:"app"})}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(e){return`${this.getBindingPrefix()}${e}`}channel(e,t){return this.socket.channel(e,t)}joinDeadView(){let e=document.body;if(e&&!this.isPhxView(e)&&!this.isPhxView(document.firstElementChild)){let t=this.newRootView(e);t.setHref(this.getHref()),t.joinDead(),this.main||(this.main=t),window.requestAnimationFrame(()=>{t.execNewMounted(),this.maybeScroll(history.state?.scroll)})}}joinRootViews(){let e=!1;return R.all(document,`${oa}:not([${Jn}])`,t=>{if(!this.getRootById(t.id)){let r=this.newRootView(t);R.isPhxSticky(t)||r.setHref(this.getHref()),r.join(),t.hasAttribute(bl)&&(this.main=r)}e=!0}),e}redirect(e,t,r){r&&ni.setCookie(md,r,60),this.unload(),ni.redirect(e,t)}replaceMain(e,t,r=null,i=this.setPendingLink(e)){if(!this.main)return;let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let a=R.findPhxSticky(document)||[],o=R.all(this.outgoingMainEl,`[${this.binding("remove")}]`).filter(h=>!R.isChildOfAny(h,a)),d=R.cloneNode(this.outgoingMainEl,""),p=this.main;p.showLoader(this.loaderTimeout),p.destroy(),this.main=this.newRootView(d,t,n),this.main.setRedirect(e),this.transitionRemoves(o,p),this.main.join((h,$)=>{h===1&&this.commitPendingLink(i)&&this.requestDOMUpdate(()=>{o.forEach(b=>b.remove()),a.forEach(b=>d.appendChild(b)),this.outgoingMainEl.replaceWith(d),this.outgoingMainEl=null,r&&r(i),$()})})}transitionRemoves(e,t,r){let i=this.binding("remove"),n=a=>{a.preventDefault(),a.stopImmediatePropagation()};e.forEach(a=>{for(let d of this.boundEventNames)a.addEventListener(d,n,!0);let o=new CustomEvent("phx:exec",{detail:{sourceElement:a}});_t.exec(o,"remove",a.getAttribute(i),t,a)}),this.requestDOMUpdate(()=>{e.forEach(a=>{for(let o of this.boundEventNames)a.removeEventListener(o,n,!0)}),r&&r()})}isPhxView(e){return e.getAttribute&&e.getAttribute(Zi)!==null}
22newRootView(e,t,r){let i=new rg(e,this,null,t,r);return this.roots[i.id]=i,i}owner(e,t){let r,i=R.closestViewEl(e);if(i)r=R.private(i,"view");else{if(!e.isConnected)return null;r=this.main}return r&&t?t(r):r}withinOwners(e,t){this.owner(e,r=>t(r,e))}getViewByEl(e){let t=e.getAttribute(fn);return ys(this.getRootById(t),r=>r.getDescendentByEl(e))}getRootById(e){return this.roots[e]}destroyAllViews(){for(let e in this.roots)this.roots[e].destroy(),delete this.roots[e];this.main=null}destroyViewByEl(e){let t=this.getRootById(e.getAttribute(fn));t&&t.id===e.id?(t.destroy(),delete this.roots[t.id]):t&&t.destroyDescendent(e.id)}getActiveElement(){return document.activeElement}dropActiveElement(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive instanceof HTMLElement&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive instanceof HTMLElement&&this.prevActive.blur()}bindTopLevelEvents({dead:e}={}){this.serverCloseRef===null&&(this.serverCloseRef=this.socket.onClose(t=>{if(t&&t.code===1e3&&this.main)return this.reloadWithJitter(this.main)})),!this.boundTopLevelEvents&&(this.boundTopLevelEvents=!0,document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",t=>{t.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),e||this.bindNav(),this.bindClicks(),e||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(t,r,i,n,a,o)=>{let d=n.getAttribute(this.binding(ch)),p=t.key&&t.key.toLowerCase();if(d&&d.toLowerCase()!==p)return;let h={key:t.key,...this.eventMeta(r,t,n)};_t.exec(t,r,a,i,n,["push",{data:h}])}),this.bind({blur:"focusout",focus:"focusin"},(t,r,i,n,a,o)=>{if(!o){let d={...this.eventMeta(r,t,n)};_t.exec(t,r,a,i,n,["push",{data:d}])}}),this.bind({blur:"blur",focus:"focus"},(t,r,i,n,a,o)=>{if(o==="window"){let d=this.eventMeta(r,t,n);_t.exec(t,r,a,i,n,["push",{data:d}])}}),this.on("dragover",t=>t.preventDefault()),this.on("dragenter",t=>{let r=t.target&&R.elementFromTarget(t.target);if(!r)return;let i=Gn(r,this.binding(za));!i||!(i instanceof HTMLElement)||Eh(t)&&this.js().addClass(i,rl)}),this.on("dragleave",t=>{let r=t.target&&R.elementFromTarget(t.target);if(!r)return;let i=Gn(r,this.binding(za));if(!i||!(i instanceof HTMLElement))return;let n=i.getBoundingClientRect();(t.clientX<=n.left||t.clientX>=n.right||t.clientY<=n.top||t.clientY>=n.bottom)&&this.js().removeClass(i,rl)}),this.on("drop",t=>{let r=t.target&&R.elementFromTarget(t.target);if(!r)return;t.preventDefault();let i=Gn(r,this.binding(za));if(!i||!(i instanceof HTMLElement)||(this.js().removeClass(i,rl),!t.dataTransfer))return;let n=i.getAttribute(this.binding(za)),a=n&&document.getElementById(n),o=Array.from(t.dataTransfer.files||[]);!a||!(a instanceof HTMLInputElement)||a.disabled||o.length===0||!(a.files instanceof FileList)||(Tr.trackFiles(a,o,t.dataTransfer),a.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(jd,t=>{let r=t.target&&R.elementFromTarget(t.target);if(!R.isUploadInput(r))return;let i=Array.from(t.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);Tr.trackFiles(r,i),r.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(e,t,r){let i=this.metadataCallbacks[e];return i?i(t,r):{}}setPendingLink(e){return this.linkRef++,this.pendingLink=e,this.resetReloadStatus(),this.linkRef}resetReloadStatus(){ni.deleteCookie(md)}commitPendingLink(e){return this.linkRef!==e?!1:(this.pendingLink!==null&&(this.href=this.pendingLink,this.pendingLink=null),!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(e,t){for(let r in e){let i=e[r];this.on(i,n=>{let a=this.binding(r),o=this.binding(`window-${r}`),d=n.target instanceof Element&&n.target.getAttribute(a);n.target instanceof Element&&(d?this.debounce(n.target,n,i,()=>{this.withinOwners(n.target,p=>{t(n,r,p,n.target,d,null)})}):R.all(document,`[${o}]`,p=>{let h=p.getAttribute(o);this.debounce(p,n,i,()=>{this.withinOwners(p,$=>{t(n,r,$,p,h,"window")})})}))})}}bindClicks(){this.on("mousedown",e=>this.clickStartedAtTarget=e.target),this.bindClick()}bindClick(){let e=this.binding("click");window.addEventListener("click",t=>{let r=t.target&&R.elementFromTarget(t.target);if(!r)return;t.detail===0&&(this.clickStartedAtTarget=r);let i=this.clickStartedAtTarget||r;if(r=Gn(r,e),this.dispatchClickAway(t,i),this.clickStartedAtTarget=null,!r)return;let n=r.getAttribute(e);
22if(!n){R.isNewPageClick(t,window.location)&&this.unload();return}r.getAttribute("href")==="#"&&t.preventDefault(),!r.hasAttribute(xi)&&this.debounce(r,t,"click",()=>{this.withinOwners(r,a=>{_t.exec(t,"click",n,a,r,["push",{data:this.eventMeta("click",t,r)}])})})},!1)}dispatchClickAway(e,t){let r=this.binding("click-away"),i=t.closest(`[${Sn}]`),n=i&&R.byId(i.getAttribute(Sn));R.all(document,`[${r}]`,a=>{let o=t;i&&!i.contains(a)&&(o=n),a.isSameNode(o)||a.contains(o)||!_t.isVisible(t)||this.withinOwners(a,d=>{let p=a.getAttribute(r);_t.isVisible(a)&&_t.isInViewport(a)&&_t.exec(e,"click",p,d,a,["push",{data:this.eventMeta("click",e,e.target)}])})})}bindNav(){if(!ni.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let e=null;window.addEventListener("scroll",t=>{e!=null&&clearTimeout(e),e=setTimeout(()=>{ni.updateCurrentState(r=>Object.assign(r,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",t=>{if(!this.isNewLocation(window.location))return;let{type:r,backType:i,id:n,scroll:a,position:o}=t.state||{},d=window.location.href,p=o>this.currentHistoryPosition,h=p?r:i||r,b={href:d,patch:h==="patch",pop:!0,direction:p?"forward":"backward"};if(!this.dispatchBeforeNavigate(b)){p?history.back():history.forward();return}this.registerNewLocation(window.location),this.currentHistoryPosition=o||0,this.sessionStorage.setItem(qa,this.currentHistoryPosition.toString()),R.dispatchEvent(window,"phx:navigate",{detail:b}),this.requestDOMUpdate(()=>{let m=()=>{this.maybeScroll(a)};this.main&&this.main.isConnected()&&h==="patch"&&n===this.main.id?this.main.pushLinkPatch(t,d,null,m):this.replaceMain(d,null,m)})},!1),window.addEventListener("click",t=>{let r=t.target&&R.elementFromTarget(t.target);if(!r)return;let i=Gn(r,il),n=i&&i.getAttribute(il);if(!n||!this.isConnected()||!this.main||R.wantsNewTab(t))return;let a=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,o=i.getAttribute(dd);if(o!=="replace"&&o!=="push")throw new Error(`expected ${dd} to be "replace" or "push", got: ${o}`);if(n!=="patch"&&n!=="redirect")throw new Error(`expected ${il} to be "patch" or "redirect", got: ${n}`);if(t.preventDefault(),t.stopImmediatePropagation(),this.pendingLink===a)return;let d={href:a,patch:n==="patch",pop:!1,direction:"forward"},p=i.getAttribute(this.binding("click")),h=()=>{p&&this.requestDOMUpdate(()=>this.execJS(i,p,"click"))};if(!this.dispatchBeforeNavigate(d)){h();return}this.requestDOMUpdate(()=>{n==="patch"?this.pushHistoryPatch(t,a,o,i):this.historyRedirect(t,a,o,null,i),h()})},!1)}maybeScroll(e){typeof e=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,e)})}dispatchEvent(e,t={}){R.dispatchEvent(window,`phx:${e}`,{detail:t})}dispatchEvents(e){e.forEach(([t,r])=>this.dispatchEvent(t,r))}withPageLoading(e,t){R.dispatchEvent(window,"phx:page-loading-start",{detail:e});let r=()=>R.dispatchEvent(window,"phx:page-loading-stop",{detail:e});return t?t(r):r}dispatchBeforeNavigate(e){return R.dispatchEvent(window,"phx:before-navigate",{detail:e})}pushHistoryPatch(e,t,r,i){if(!this.isConnected()||!(this.main&&this.main.isMain()))return ni.redirect(t);this.withPageLoading({to:t,kind:"patch"},n=>{this.main.pushLinkPatch(e,t,i,a=>{this.historyPatch(t,r,a),n()})})}historyPatch(e,t,r=this.setPendingLink(e)){this.commitPendingLink(r)&&(this.currentHistoryPosition++,this.sessionStorage.setItem(qa,this.currentHistoryPosition.toString()),ni.updateCurrentState(i=>({...i,backType:"patch"})),ni.pushState(t,{type:"patch",id:this.main.id,position:this.currentHistoryPosition},e),R.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:e,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location))}historyRedirect(e,t,r,i,n){let a=n&&e.isTrusted&&e.type!=="popstate";if(a&&n.classList.add("phx-click-loading"),!this.isConnected()||!(this.main&&this.main.isMain()))return ni.redirect(t,i);if(/^\/$|^\/[^\/]+.*$/.test(t)){let{protocol:d,host:p}=window.location;t=`${d}//${p}${t}`}let o=window.scrollY;this.withPageLoading({to:t,kind:"redirect"},d=>{this.replaceMain(t,i,p=>{p===this.linkRef&&(this.currentHistoryPosition++,this.sessionStorage.setItem(qa,this.currentHistoryPosition.toString()),ni.updateCurrentState(h=>({...h,backType:"redirect"})),ni.pushState(r,{type:"redirect",id:this.main.id,scroll:o,position:this.currentHistoryPosition},t),R.dispatchEvent(window,"phx:navigate",{detail:{href:t,patch:!1,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location)),a&&n.classList.remove("phx-click-loading"),d()})})}registerNewLocation(e){return this.isNewLocation(e)?(this.currentLocation=Za(e),!0):!1}isNewLocation(e){let{pathname:t,search:r}=this.currentLocation;return t+r!==e.pathname+e.search}bindForms(){let e=0,t=!1;this.on("submit",r=>{if(!(r.target instanceof HTMLFormElement))return;let i=r.target.getAttribute(this.binding("submit")),n=r.target.getAttribute(this.binding("change"));!t&&n&&!i&&(t=!0,r.preventDefault(),this.withinOwners(r.target,a=>{a.disableForm(r.target,n),window.requestAnimationFrame(()=>{R.isUnloadableFormSubmit(r)&&this.unload(),r.target.submit()})}))}),this.on("submit",r=>{if(!(r.target instanceof HTMLFormElement))return;let i=r.target.getAttribute(this.binding("submit"));if(!i){R.isUnloadableFormSubmit(r)&&this.unload();return}r.preventDefault(),r.target.disabled=!0,this.withinOwners(r.target,n=>{_t.exec(r,"submit",i,n,r.target,["push",{submitter:r.submitter}])})});for(let r of["change","input"])this.on(r,i=>{if(!R.isFormAssociated(i.target))return;if(i instanceof CustomEvent&&i.target.form===void 0){if(i.detail&&i.detail.dispatcher)throw new Error(`dispatching a custom ${r} event is only supported on input elements inside a form`);return}let n=i.target,a=this.binding("change");if(this.blockPhxChangeWhileComposing&&i instanceof InputEvent&&i.isComposing){let g=`composition-listener-${r}`;R.private(n,g)||(R.putPrivate(n,g,!0),n.addEventListener("compositionend",()=>{n.dispatchEvent(new Event(r,{bubbles:!0})),R.deletePrivate(n,g)},{once:!0}));return}let o=n.getAttribute(a),d=n.form&&n.form.getAttribute(a),p=o||d;if(!p||n.type==="number"&&n.validity&&n.validity.badInput)return;let h=o?n:n.form,$=e;e++;let{at:b,type:m}=R.private(n,"prev-iteration")||{};b===$-1&&r==="change"&&m==="input"||(R.putPrivate(n,"prev-iteration",{at:$,type:r}),this.debounce(n,i,r,()=>{this.withinOwners(h,g=>{R.putPrivate(n,Qa,!0),_t.exec(i,"change",p,g,n,["push",{_target:n.name,dispatcher:h}])})}))});this.on("reset",r=>{let i=r.target;R.resetForm(i);let n=Array.from(i.elements).find(a=>"type"in a&&a.type==="reset");n&&window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}
22debounce(e,t,r,i){if(r==="blur"||r==="focusout")return i();let n=this.binding(sh),a=this.binding(ah),o=this.defaults.debounce.toString(),d=this.defaults.throttle.toString();this.withinOwners(e,p=>{let h=()=>!p.isDestroyed()&&document.body.contains(e);R.debounce(e,t,n,o,a,d,h,()=>{i()})})}silenceEvents(e){this.silenced=!0,e(),this.silenced=!1}on(e,t){this.boundEventNames.add(e),window.addEventListener(e,r=>{this.silenced||t(r)})}jsQuerySelectorAll(e,t,r){let i=this.domCallbacks.jsQuerySelectorAll;return i?i(e,t,r):r()}},ng=class{constructor(){this.transitions=new Set,this.promises=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(e=>{clearTimeout(e),this.transitions.delete(e)}),this.promises.clear(),this.flushPendingOps()}after(e){this.size()===0?e():this.pushPendingOp(e)}addTransition(e,t,r){t();let i=setTimeout(()=>{this.transitions.delete(i),r(),this.flushPendingOps()},e);this.transitions.add(i)}addAsyncTransition(e){this.promises.add(e),e.then(()=>{this.promises.delete(e),this.flushPendingOps()})}pushPendingOp(e){this.pendingOps.push(e)}size(){return this.transitions.size+this.promises.size}flushPendingOps(){if(this.size()>0)return;let e=this.pendingOps.shift();e&&(e(),this.flushPendingOps())}};var Jo=jf(Qd());function El(e){if(!Array.isArray(e.default)||!Array.isArray(e.filenames))return e;let t={},r=Math.min(e.default.length,e.filenames.length);for(let i=0;i<r;i++){let a=e.default[i].default,o=e.filenames[i].replace("../svelte/","").replace(".svelte","");t[o]=a}return t}function eu(e){let t=Uint8Array.from(atob(e),r=>r.charCodeAt(0));return new TextDecoder().decode(t)}var Qi={};var Lt=Symbol("uninitialized"),Fr=Symbol("filename");var no="http://www.w3.org/1999/xhtml",As="http://www.w3.org/2000/svg",Al="http://www.w3.org/1998/Math/MathML";function tu(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=tu(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function ru(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=tu(e))&&(i&&(i+=" "),i+=t);return i}var Di=Array.isArray,iu=Array.prototype.indexOf,Tn=Array.prototype.includes,Ss=Array.from,Sl=Object.keys,Cr=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,so=Object.getOwnPropertyDescriptors,Tl=Object.prototype,nu=Array.prototype,Kn=Object.getPrototypeOf,Cl=Object.isExtensible;var rr=()=>{};function su(e){return e()}function Ts(e){for(var t=0;t<e.length;t++)e[t]()}function la(){var e,t,r=new Promise((i,n)=>{e=i,t=n});return{promise:r,resolve:e,reject:t}}function ca(e){return typeof e=="object"?ru(e):e??""}var au=[...` 	
23\r\f\xA0\v\uFEFF`];function Ml(e,t,r){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),r){for(var n of Object.keys(r))if(r[n])i=i?i+" "+n:n;else if(i.length)for(var a=n.length,o=0;(o=i.indexOf(n,o))>=0;){var d=o+a;(o===0||au.includes(i[o-1]))&&(d===i.length||au.includes(i[d]))?i=(o===0?"":i.substring(0,o))+i.substring(d+1):o=d}}return i===""?null:i}function ou(e,t=!1){var r=t?" !important;":";",i="";for(var n of Object.keys(e)){var a=e[n];a!=null&&a!==""&&(i+=" "+n+": "+a+r)}return i}function Rl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Pl(e,t){if(t){var r="",i,n;if(Array.isArray(t)?(i=t[0],n=t[1]):i=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,o=0,d=!1,p=[];i&&p.push(...Object.keys(i).map(Rl)),n&&p.push(...Object.keys(n).map(Rl));var h=0,$=-1;let y=e.length;for(var b=0;b<y;b++){var m=e[b];if(d?m==="/"&&e[b-1]==="*"&&(d=!1):a?a===m&&(a=!1):m==="/"&&e[b+1]==="*"?d=!0:m==='"'||m==="'"?a=m:m==="("?o++:m===")"&&o--,!d&&a===!1&&o===0){if(m===":"&&$===-1)$=b;else if(m===";"||b===y-1){if($!==-1){var g=Rl(e.substring(h,$).trim());if(!p.includes(g)){m!==";"&&b++;var v=e.substring(h,b).trim();r+=" "+v+";"}}h=b+1,$=-1}}}}return i&&(r+=ou(i)),n&&(r+=ou(n,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}var cu=globalThis.process?.env?.NODE_ENV,j=cu&&!cu.toLowerCase().startsWith("prod");var Rr=Symbol("$state"),da=Symbol("legacy props"),uu=Symbol(""),ao=Symbol("proxy path"),oo=Symbol("attributes"),ua=Symbol("class"),pa=Symbol("style"),fa=Symbol("text"),Cn=Symbol("form reset"),Ll=Symbol("hmr anchor"),en=new class extends 
23Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},lo=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),ha=1,Zn=3,gi=8;function pu(e){if(j){let t=new Error(`invariant_violation
24An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${e}"
25https://svelte.dev/e/invariant_violation`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invariant_violation")}function Cs(e){if(j){let t=new Error(`lifecycle_outside_component
26\`${e}(...)\` can only be used during component initialisation
27https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function hu(){if(j){let e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Il(){if(j){let e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function gu(){if(j){let e=new Error(`derived_references_self
28A derived value cannot reference itself recursively
29https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function Dl(e,t,r){if(j){let i=new Error(`each_key_duplicate
30${r?`Keyed each block has duplicate key \`${r}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
31https://svelte.dev/e/each_key_duplicate`);throw i.name="Svelte error",i}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function vu(e,t,r){if(j){let i=new Error(`each_key_volatile
32Keyed each block has key that is not idempotent \u2014 the key for item at index ${e} was \`${t}\` but is now \`${r}\`. Keys must be the same each time for a given item
33https://svelte.dev/e/each_key_volatile`);throw i.name="Svelte error",i}else throw new Error("https://svelte.dev/e/each_key_volatile")}function $u(e){if(j){let t=new Error(`effect_in_teardown
34\`${e}\` cannot be used inside an effect cleanup function
35https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function _u(){if(j){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function mu(e){if(j){let t=new Error(`effect_orphan
36\`${e}\` can only be used inside an effect (e.g. during component initialisation)
37https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function xu(){if(j){let e=new Error(`effect_update_depth_exceeded
38Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
39https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function bu(){if(j){let e=new Error(`hydration_failed
40Failed to hydrate the application
41https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function wu(e){if(j){let t=new Error(`props_invalid_value
42Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
43https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}
43else throw new Error("https://svelte.dev/e/props_invalid_value")}function yu(e){if(j){let t=new Error(`rune_outside_svelte
44The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
45https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function ku(){if(j){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Eu(){if(j){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Au(){if(j){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Su(){if(j){let e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var bi="font-weight: bold",wi="font-weight: normal";function Tu(e){j?console.warn(`%c[svelte] await_reactivity_loss
46%cDetected reactivity loss when reading \`${e}\`. This happens when state is read in an async function after an earlier \`await\`
47https://svelte.dev/e/await_reactivity_loss`,bi,wi):console.warn("https://svelte.dev/e/await_reactivity_loss")}function Cu(e,t){j?console.warn(`%c[svelte] await_waterfall
48%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
49https://svelte.dev/e/await_waterfall`,bi,wi):console.warn("https://svelte.dev/e/await_waterfall")}function Ru(){j?console.warn(`%c[svelte] derived_inert
50%cReading a derived belonging to a now-destroyed effect may result in stale values
51https://svelte.dev/e/derived_inert`,bi,wi):console.warn("https://svelte.dev/e/derived_inert")}function Mu(e,t,r){j?console.warn(`%c[svelte] hydration_attribute_changed
52%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
53https://svelte.dev/e/hydration_attribute_changed`,bi,wi):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Pu(e){j?console.warn(`%c[svelte] hydration_html_changed
54%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
55https://svelte.dev/e/hydration_html_changed`,bi,wi):console.warn("https://svelte.dev/e/hydration_html_changed")}function Rn(e){j?console.warn(`%c[svelte] hydration_mismatch
56%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
57https://svelte.dev/e/hydration_mismatch`,bi,wi):console.warn("https://svelte.dev/e/hydration_mismatch")}function Lu(){j?console.warn("%c[svelte] invalid_raw_snippet_render\n%cThe `render` function passed to `createRawSnippet` should return HTML for a single element\nhttps://svelte.dev/e/invalid_raw_snippet_render",bi,wi):console.warn("https://svelte.dev/e/invalid_raw_snippet_render")}function Iu(){j?console.warn(`%c[svelte] lifecycle_double_unmount
58%cTried to unmount a component that was not mounted
59https://svelte.dev/e/lifecycle_double_unmount`,bi,wi):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Du(){j?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",bi,wi):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function co(e){j?console.warn(`%c[svelte] state_proxy_equality_mismatch
60%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
61https://svelte.dev/e/state_proxy_equality_mismatch`,bi,wi):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function Ou(){j?console.warn(`%c[svelte] state_proxy_unmount
62%cTried to unmount a state proxy, rather than a component
63https://svelte.dev/e/state_proxy_unmount`,bi,wi):console.warn("https://svelte.dev/e/state_proxy_unmount")}function Fu(){j?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",bi,wi):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var Ae=!1;function pr(e){Ae=e}var We;function mt(e){if(e===null)throw Rn(),Qi;return We=e}function fr(){return mt(xr(We))}function l(e){if(Ae){if(xr(We)!==null)throw Rn(),Qi;We=e}}function Se(e=1){if(Ae){for(var t=e,r=We;t--;)r=xr(r);We=r}}function tn(e=!0){for(var t=0,r=We;;){if(r.nodeType===gi){var i=r.data;if(i==="]"){if(t===0)return r;t-=1}else(i==="["||i==="[!"||i[0]==="["&&!isNaN(Number(i.slice(1))))&&
63(t+=1)}var n=xr(r);e&&r.remove(),r=n}}function ga(e){if(!e||e.nodeType!==gi)throw Rn(),Qi;return e.data}function uo(e){return e===this.v}function po(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function fo(e){return!po(e,this.v)}var ir=!1,rn=!1,Oi=!1;function Nu(){rn=!0}var $a=null;function Wr(e,t){return e.label=t,ho(e.v,t),e}function ho(e,t){return e?.[ao]?.(t),e}function Fi(e){let t=new Error,r=Hu();return r.length===0?null:(r.unshift(`
64`),Cr(t,"stack",{value:r.join(`
65`)}),Cr(t,"name",{value:e}),t)}function Hu(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=new Error().stack;if(Error.stackTraceLimit=e,!t)return[];let r=t.split(`
66`),i=[];for(let n=0;n<r.length;n++){let a=r[n],o=a.replaceAll("\\","/");if(a.trim()!=="Error"){if(a.includes("validate_each_keys"))return[];o.includes("svelte/src/internal")||o.includes("node_modules/.vite")||i.push(a)}}return i}function ju(e,t){if(!j)throw new Error("invariant(...) was not guarded by if (DEV)");e||pu(t)}var it=null;function vn(e){it=e}var Ni=null;function Rs(e){Ni=e}var vi=null;function go(e){vi=e}function Ie(e,t=!1,r){it={p:it,i:!1,c:null,e:null,s:e,x:null,r:Te,l:rn&&!t?{s:null,u:null,$:[]}:null},j&&(it.function=r,vi=r)}function De(e){var t=it,r=t.e;if(r!==null){t.e=null;for(var i of r)Ol(i)}return e!==void 0&&(t.x=e),t.i=!0,it=t.p,j&&(vi=it?.function??null),e??{}}function nn(){return!rn||it!==null&&it.l===null}var es=[];function Uu(){var e=es;es=[],Ts(e)}function hr(e){if(es.length===0&&!ts){var t=es;queueMicrotask(()=>{t===es&&Uu()})}es.push(e)}function zu(){for(;es.length>0;)Uu()}var Fl=new WeakMap;function vo(e){var t=Te;if(t===null)return Je.f|=8388608,e;if(j&&e instanceof Error&&!Fl.has(e)&&Fl.set(e,og(e,t)),(t.f&32768)===0&&(t.f&4)===0)throw j&&!t.parent&&e instanceof Error&&Vu(e),e;Hi(e,t)}function Hi(e,t){if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw j&&e instanceof Error&&Vu(e),e}}function og(e,t){let r=Kr(e,"message");if(!(r&&!r.configurable)){for(var i=ma?"  ":"	",n=`
67${i}in ${t.fn?.name||"<unknown>"}`,a=t.ctx;a!==null;)n+=`
68${i}in ${a.function?.[Fr].split("/").pop()}`,a=a.p;return{message:e.message+`
69${n}
70`,stack:e.stack?.split(`
71`).filter(o=>!o.includes("svelte/src/internal")).join(`
72`)}}}function Vu(e){let t=Fl.get(e);t&&(Cr(e,"message",{value:t.message}),Cr(e,"stack",{value:t.stack}))}var lg=-7169;function St(e,t){e.f=e.f&lg|t}function Ms(e){(e.f&512)!==0||e.deps===null?St(e,1024):St(e,4096)}function qu(e){if(e!==null)for(let t of e)(t.f&2)===0||(t.f&65536)===0||(t.f^=65536,qu(t.deps))}function $o(e,t,r){(e.f&2048)!==0?t.add(e):(e.f&4096)!==0&&r.add(e),qu(e.deps),St(e,1024)}var Ps=[];function Ln(e,t=rr){let r=null,i=new Set;function n(d){if(po(e,d)&&(e=d,r)){let p=!Ps.length;for(let h of i)h[1](),Ps.push(h,e);if(p){for(let h=0;h<Ps.length;h+=2)Ps[h][0](Ps[h+1]);Ps.length=0}}}function a(d){n(d(e))}function o(d,p=rr){let h=[d,p];return i.add(h),i.size===1&&(r=t(n,a)||rr),d(e),()=>{i.delete(h),i.size===0&&r&&(r(),r=null)}}return{set:n,update:a,subscribe:o}}function rs(e){let t;return xa(e,r=>t=r)(),t}var Wu=!1,_o=!1,Nl=Symbol("unmounted");function br(e,t,r){let i=r[t]??={store:null,source:H(void 0),unsubscribe:rr};if(j&&(i.source.label=t),i.store!==e&&!(Nl in r))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=rr;else{var n=!0;i.unsubscribe=xa(e,a=>{n?i.source.v=a:D(i.source,a)}),n=!1}return e&&Nl in r?rs(e):s(i.source)}function Zr(){let e={};function t(){sr(()=>{for(var r in e)e[r].unsubscribe();Cr(e,Nl,{enumerable:!1,value:!0})})}return[e,t]}function Bl(e){var t=_o;try{return _o=!1,[e(),_o]}finally{_o=t}}var Gu=!1;function mo(){Gu||(Gu=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Cn]?.()})},{capture:!0}))}function Ei(e){var t=Je,r=Te;mr(null),ar(null);try{return e()}finally{mr(t),ar(r)}}function xo(e,t,r,i=r){e.addEventListener(t,()=>Ei(r));let n=e[Cn];n?e[Cn]=()=>{n(),i(!0)}:e[Cn]=()=>i(!0),mo()}function Hl(e){let t=0,r=Jr(0),i;return j&&Wr(r,"createSubscriber version"),()=>{gn()&&(s(r),yr(()=>(t===0&&(i=u(()=>e(()=>is(r)))),t+=1,()=>{hr(()=>{t-=1,t===0&&(i?.(),i=void 0,is(r))})})))}}var cg=589824;
72function zl(e,t,r,i){new Ul(e,t,r,i)}var Ul=class{parent;is_pending=!1;transform_error;#e;#t=Ae?We:null;#r;#l;#s;#a=null;#i=null;#o=null;#n=null;#g=0;#d=0;#u=!1;#p=new Set;#v=new Set;#c=null;#m=Hl(()=>(this.#c=Jr(this.#g),j&&Wr(this.#c,"$effect.pending()"),()=>{this.#c=null}));constructor(t,r,i,n){this.#e=t,this.#r=r,this.#l=a=>{var o=Te;o.b=this,o.f|=128,i(a)},this.parent=Te.b,this.transform_error=n??this.parent?.transform_error??(a=>a),this.#s=li(()=>{if(Ae){let a=this.#t;fr();let o=a.data==="[!";if(a.data.startsWith("[?")){let p=JSON.parse(a.data.slice("[?".length));this.#x(p)}else o?this.#w():this.#$()}else this.#f()},cg),Ae&&(this.#e=We)}#$(){try{this.#a=kr(()=>this.#l(this.#e))}catch(t){this.error(t)}}#x(t){let r=this.#r.failed,{reset:i,invoke_onerror:n}=this.#b(t);hr(n),r&&(this.#o=kr(()=>{r(this.#e,()=>t,()=>i)}))}#b(t){var r=!1,i=!1;let n=()=>{if(r){Fu();return}r=!0,i&&Su(),this.#o!==null&&sn(this.#o,()=>{this.#o=null}),this.#h(()=>{this.#f()})};return{reset:n,invoke_onerror:()=>{try{i=!0,this.#r.onerror?.(t,n),i=!1}catch(o){Hi(o,this.#s&&this.#s.parent)}}}}#w(){let t=this.#r.pending;t&&(this.is_pending=!0,this.#i=kr(()=>t(this.#e)),hr(()=>{var r=this.#n=document.createDocumentFragment(),i=lr();r.append(i),this.#a=this.#h(()=>kr(()=>this.#l(i))),this.#d===0&&(this.#e.before(r),this.#n=null,sn(this.#i,()=>{this.#i=null}),this.#_(He))}))}#f(){try{if(this.is_pending=this.has_pending_snippet(),this.#d=0,this.#g=0,this.#a=kr(()=>{this.#l(this.#e)}),this.#d>0){var t=this.#n=document.createDocumentFragment();Is(this.#a,t);let r=this.#r.pending;this.#i=kr(()=>r(this.#e))}else this.#_(He)}catch(r){this.error(r)}}#_(t){this.is_pending=!1,t.transfer_effects(this.#p,this.#v)}defer_effect(t){$o(t,this.#p,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#h(t){var r=Te,i=Je,n=it;ar(this.#s),mr(this.#s),vn(this.#s.ctx);try{return $i.ensure(),t()}catch(a){return vo(a),null}finally{ar(r),mr(i),vn(n)}}#y(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t,r);return}this.#d+=t,this.#d===0&&(this.#_(r),this.#i&&sn(this.#i,()=>{this.#i=null}),this.#n&&(this.#e.before(this.#n),this.#n=null))}update_pending_count(t,r){this.#y(t,r),this.#g+=t,!(!this.#c||this.#u)&&(this.#u=!0,hr(()=>{this.#u=!1,this.#c&&ji(this.#c,this.#g)}))}get_effect_pending(){return this.#m(),s(this.#c)}error(t){if(!this.#r.onerror&&!this.#r.failed)throw t;He?.is_fork?(this.#a&&He.skip_effect(this.#a),this.#i&&He.skip_effect(this.#i),this.#o&&He.skip_effect(this.#o),He.oncommit(()=>{this.#k(t)})):this.#k(t)}#k(t){this.#a&&(or(this.#a),this.#a=null),this.#i&&(or(this.#i),this.#i=null),this.#o&&(or(this.#o),this.#o=null),Ae&&(mt(this.#t),Se(),mt(tn()));let r=this.#r.failed,i=n=>{let{reset:a,invoke_onerror:o}=this.#b(n);o(),r&&(this.#o=this.#h(()=>{try{return kr(()=>{var d=Te;d.b=this,d.f|=128,r(this.#e,()=>n,()=>a)})}catch(d){return Hi(d,this.#s.parent),null}}))};hr(()=>{var n;try{n=this.transform_error(t)}catch(a){Hi(a,this.#s&&this.#s.parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(i,a=>Hi(a,this.#s&&this.#s.parent)):i(n)})}};function bo(e,t,r,i){let n=nn()?mn:cr;var a=e.filter(g=>!g.settled),o=t.map(n);if(j&&o.forEach((g,v)=>{g.label=t[v].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(y,E)=>E)}),r.length===0&&a.length===0){i(o);return}var d=Te,p=Yu(),h=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(g=>g.promise)):null;function $(g){if((d.f&16384)===0){p();try{i([...o,...g])}catch(v){Hi(v,d)}Ds()}}var b=Vl();if(r.length===0){h.then(()=>$([])).finally(b);return}function m(){Promise.all(r.map(g=>Wl(g))).then($).catch(g=>Hi(g,d)).finally(b)}h?h.then(()=>{p(),m(),Ds()}):m()}function Yu(){var e=Te,t=Je,r=it,i=He;if(j)var n=Ni;return function(o=!0){ar(e),mr(t),vn(r),o&&(e.f&16384)===0&&(i?.activate(),i?.apply()),j&&(ql(null),Rs(n))}}function Ds(e=!0){ar(null),mr(null),vn(null),e&&He?.deactivate(),j&&(ql(null),Rs(null))}function Vl(){var e=Te,t=e.b,r=He,i=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(i,e),()=>
72{t?.update_pending_count(-1,r),r.decrement(i,e)}}var ci=null;function ql(e){ci=e}var wa=new Set;function mn(e){var t=2050;Te!==null&&(Te.f|=524288);let r={ctx:it,deps:null,effects:null,equals:uo,f:t,fn:e,reactions:null,rv:0,v:Lt,wv:0,parent:Te,ac:null};return j&&Oi&&(r.created=Fi("created at")),r}var Os=Symbol("obsolete");function Wl(e,t,r){let i=Te;i===null&&hu();var n=void 0,a=Jr(Lt);j&&(a.label=t??e.toString());var o=!Je,d=new Set;return Ku(()=>{var p=Te;j&&(ci={effect:p,effect_deps:new Set,warned:!1});var h=la();n=h.promise;try{Promise.resolve(e()).then(h.resolve,g=>{g!==en&&h.reject(g)}).finally(Ds)}catch(g){h.reject(g),Ds()}if(j){if(ci){if(p.deps!==null)for(let g=0;g<Qr;g+=1)ci.effect_deps.add(p.deps[g]);if(Pr!==null)for(let g=0;g<Pr.length;g+=1)ci.effect_deps.add(Pr[g])}ci=null}var $=He;if(o){if((p.f&32768)!==0)var b=Vl();if(i.b?.is_rendered())$.async_deriveds.get(p)?.reject(Os);else for(let g of d.values())g.reject(Os);d.add(h),$.async_deriveds.set(p,h)}let m=(g,v=void 0)=>{j&&(ci=null),b?.(),d.delete(h),v!==Os&&($.activate(),v?(a.f|=8388608,ji(a,v)):((a.f&8388608)!==0&&(a.f^=8388608),j&&r!==void 0&&!a.equals(g)&&(wa.add(a),setTimeout(()=>{wa.has(a)&&(p.f&16384)===0&&(Cu(a.label,r),wa.delete(a))})),ji(a,g)),$.deactivate())};h.promise.then(m,g=>m(null,g||"unknown"))}),sr(()=>{for(let p of d)p.reject(Os)}),j&&(a.f|=4194304),new Promise(p=>{function h($){function b(){$===n?p(a):h(n)}$.then(b,b)}h(n)})}function Ui(e){let t=mn(e);return ir||ko(t),t}function cr(e){let t=mn(e);return t.equals=fo,t}function Ju(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)or(t[r])}}var Gl=[];function ya(e){var t,r=Te,i=e.parent;if(!_i&&i!==null&&e.v!==Lt&&(i.f&24576)!==0)return Ru(),e.v;if(ar(i),j){let n=ns;wo(new Set);try{Tn.call(Gl,e)&&gu(),Gl.push(e),e.f&=-65537,Ju(e),t=yo(e)}finally{ar(r),wo(n),Gl.pop()}}else try{e.f&=-65537,Ju(e),t=yo(e)}finally{ar(r)}return t}function Yl(e){var t=ya(e);if(!e.equals(t)&&(e.wv=Fs(),(!He?.is_fork||e.deps===null)&&(He!==null?(He.capture(e,t,!0),an?.capture(e,t,!0)):e.v=t,e.deps===null))){St(e,1024);return}_i||(Lr!==null?(gn()||He?.is_fork)&&Lr.set(e,t):Ms(e))}function Xu(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Ei(()=>{t.ac.abort(en),t.ac=null}),t.fn!==null&&(t.teardown=rr),ss(t,0),ka(t))}function Jl(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&zi(t)}var Eo=null,Ns=null,He=null,an=null,Lr=null,Zl=null,ts=!1,Xl=!1,as=null,Ea=null,Zu=0,Kl=new Set,pg=1,$i=class e{id=pg++;#e=!1;linked=!0;#t=null;#r=null;async_deriveds=new Map;current=new Map;previous=new Map;#l=new Set;#s=new Set;#a=0;#i=new Map;#o=null;#n=[];#g=[];#d=new Set;#u=new Set;#p=new Map;#v=new Set;is_fork=!1;#c=!1;constructor(){Ns===null?Eo=Ns=this:(Ns.#r=this,this.#t=Ns),Ns=this}#m(){if(this.is_fork)return!0;for(let i of this.#i.keys()){for(var t=i,r=!1;t.parent!==null;){if(this.#p.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#p.has(t)||this.#p.set(t,{d:[],m:[]}),this.#v.delete(t)}unskip_effect(t,r=i=>this.schedule(i)){var i=this.#p.get(t);if(i){this.#p.delete(t);for(var n of i.d)St(n,2048),r(n);for(n of i.m)St(n,4096),r(n)}this.#v.add(t)}#$(){if(this.#e=!0,Zu++>1e3&&(this.#h(),fg()),j)for(let p of this.current.keys())Kl.add(p);for(let p of this.#d)this.#u.delete(p),St(p,2048),this.schedule(p);for(let p of this.#u)St(p,4096),this.schedule(p);let t=this.#n;this.#n=[],this.apply();var r=as=[],i=[],n=Ea=[];for(let p of t)try{this.#x(p,r,i)}catch(h){throw rp(p),this.#m()||this.discard(),h}if(He=null,n.length>0){var a=e.ensure();for(let p of n)a.schedule(p)}if(as=null,Ea=null,this.#m()){this.#f(i),this.#f(r);for(let[p,h]of this.#p)tp(p,h);n.length>0&&He.#$();return}let o=this.#b();if(o){this.#f(i),this.#f(r),o.#w(this);return}this.#d.clear(),this.#u.clear();for(let p of this.#l)p(this);this.#l.clear(),an=this,Qu(i),Qu(r),an=null,this.#o?.resolve();var d=He;if(this.#a===0&&(this.#n.length===0||d!==null)&&(this.#h(),ir&&(this.#_(),He=d)),this.#n.length>0)if(d!==null){let p=d;p.#n.push(...this.#n.filter(h=>!p.#n.includes(h)))}else d=this;d!==null&&d.#$()}#x(t,r,i){t.f^=1024;for(var n=t.first;n!==null;){var a=n.f,o=(a&96)!==0,d=o&&(a&1024)!==0,p=d||(a&8192)!==0||this.#p.has(n);if(!p&&n.fn!==null){o?n.f^=1024:(a&4)!==0?r.push(n):ir&&(a&16777224)!==0?i.push(n):bn(n)&&((a&16)!==0&&this.#u.add(n),zi(n));var h=n.first;if(h!==null){n=h;continue}}for(;n!==null;){var $=n.next;if($!==null){n=$;break}n=n.parent}}}#b(){for(var t=this.#t;t!==null;){if(!t.is_fork){for(let[r,[,i]]of this.current)if(t.current.has(r)&&!i)return t}t=t.#t}return null}#w(t){for(let[i,n]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,n);for(let[i,n]of t.async_deriveds){let a=this.async_deriveds.get(i);
72a&&n.promise.then(a.resolve).catch(a.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#d,t.#u);let r=i=>{var n=i.reactions;if(n!==null&&!((i.f&2)!==0&&(i.f&6144)===0))for(let d of n){var a=d.f;if((a&2)!==0)r(d);else{var o=d;a&4194320&&!this.async_deriveds.has(o)&&(this.#u.delete(o),St(o,2048),this.schedule(o))}}};for(let i of this.current.keys())r(i);this.oncommit(()=>t.discard()),t.#h(),He=this,this.#$()}#f(t){for(var r=0;r<t.length;r+=1)$o(t[r],this.#d,this.#u)}capture(t,r,i=!1){t.v!==Lt&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[r,i]),Lr?.set(t,r)),this.is_fork||(t.v=r)}activate(){He=this}deactivate(){He=null,Lr=null}flush(){try{j&&Kl.clear(),Xl=!0,He=this,this.#$()}finally{if(Zu=0,Zl=null,as=null,Ea=null,Xl=!1,He=null,Lr=null,xn.clear(),j)for(let t of Kl)t.updated=null}}discard(){for(let t of this.#s)t(this);this.#s.clear();for(let t of this.async_deriveds.values())t.reject(Os);this.#h(),this.#o?.resolve()}register_created_effect(t){this.#g.push(t)}#_(){for(let b=Eo;b!==null;b=b.#r){var t=b.id<this.id,r=[];for(let[m,[g,v]]of this.current){if(b.current.has(m)){var i=b.current.get(m)[0];if(t&&g!==i)b.current.set(m,[g,v]);else continue}r.push(m)}if(t)for(let[m,g]of this.async_deriveds){let v=b.async_deriveds.get(m);v&&g.promise.then(v.resolve).catch(v.reject)}var n=[...b.current.keys()].filter(m=>!b.current.get(m)[1]);if(!(!b.#e||n.length===0)){var a=n.filter(m=>!this.current.has(m));if(a.length===0)t&&b.discard();else if(r.length>0){if(j&&!b.#c&&ju(b.#n.length===0,"Batch has scheduled roots"),t)for(let m of this.#v)b.unskip_effect(m,g=>{(g.f&4194320)!==0?b.schedule(g):b.#f([g])});b.activate();var o=new Set,d=new Map;for(var p of r)ep(p,a,o,d);d=new Map;var h=[...b.current].filter(([m,g])=>{let v=this.current.get(m);return v?v[0]!==g[0]||v[1]!==g[1]:!0}).map(([m])=>m);if(h.length>0)for(let m of this.#g)(m.f&155648)===0&&Ql(m,h,d)&&((m.f&4194320)!==0?(St(m,2048),b.schedule(m)):b.#d.add(m));if(b.#n.length>0&&!b.#c){b.apply();for(var $ of b.#n)b.#x($,[],[]);b.#n=[]}b.deactivate()}}}}increment(t,r){if(this.#a+=1,t){let i=this.#i.get(r)??0;this.#i.set(r,i+1)}}decrement(t,r){if(this.#a-=1,t){let i=this.#i.get(r)??0;i===1?this.#i.delete(r):this.#i.set(r,i-1)}this.#c||(this.#c=!0,hr(()=>{this.#c=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(let i of t)this.#d.add(i);for(let i of r)this.#u.add(i);t.clear(),r.clear()}oncommit(t){this.#l.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#o??=la()).promise}static ensure(){if(He===null){let t=He=new e;!Xl&&!ts&&hr(()=>{t.#e||t.flush()})}return He}apply(){if(!ir||!this.is_fork&&this.#t===null&&this.#r===null){Lr=null;return}Lr=new Map;for(let[r,[i]]of this.current)Lr.set(r,i);for(let r=Eo;r!==null;r=r.#r)if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(let[i,[,n]]of r.current)if(!n&&this.current.has(i)){t=!0;break}}if(!t)for(let[i,n]of r.previous)Lr.has(i)||Lr.set(i,n)}}schedule(t){if(Zl=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var i=r.f;if(as!==null&&r===Te&&(ir||(Je===null||(Je.f&2)===0)&&!Wu))return;if((i&96)!==0){if((i&1024)===0)return;r.f^=1024}}this.#n.push(r)}#h(){if(this.linked){var t=this.#t,r=this.#r;t===null?Eo=r:t.#r=r,r===null?Ns=t:r.#t=t,this.linked=!1}}};function ls(e){var t=ts;ts=!0;try{var r;for(e&&(He!==null&&!He.is_fork&&He.flush(),r=e());;){if(zu(),He===null)return r;He.flush()}}finally{ts=t}}function fg(){if(j){var e=new Map;for(let r of He.current.keys())for(let[i,n]of r.updated??[]){var t=e.get(i);t||(t={error:n.error,count:0},e.set(i,t)),t.count+=n.count}for(let r of e.values())r.error&&console.error(r.error)}try{xu()}catch(r){j&&Cr(r,"stack",{value:""}),Hi(r,Zl)}}var Ai=null;function Qu(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var i=e[r++];if((i.f&24576)===0&&bn(i)&&(Ai=new Set,zi(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&ec(i),Ai?.size>0)){xn.clear();for(let n of Ai){if((n.f&24576)!==0)continue;let a=[n],o=n.parent;for(;o!==null;)Ai.has(o)&&(Ai.delete(o),a.push(o)),o=o.parent;for(let d=a.length-1;d>=0;d--){let p=a[d];(p.f&24576)===0&&zi(p)}}Ai.clear()}}Ai=null}}function ep(e,t,r,i){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(let n of e.reactions){let a=n.f;(a&2)!==0?ep(n,t,r,i):(a&4194320)!==0&&(a&2048)===0&&Ql(n,t,i)&&(St(n,2048),Aa(n))}}function Ql(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let n of e.deps){if(Tn.call(t,n))return!0;
72if((n.f&2)!==0&&Ql(n,t,r))return r.set(n,!0),!0}return r.set(e,!1),!1}function Aa(e){He.schedule(e)}function tp(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),St(e,1024);for(var r=e.first;r!==null;)tp(r,t),r=r.next}}function rp(e){St(e,1024);for(var t=e.first;t!==null;)rp(t),t=t.next}var ns=new Set,xn=new Map;function wo(e){ns=e}var tc=!1;function np(){tc=!0}function Jr(e,t){var r={f:0,v:e,reactions:null,equals:uo,rv:0,wv:0};return j&&Oi&&(r.created=t??Fi("created at"),r.updated=null,r.set_during_effect=!1,r.trace=null),r}function on(e,t){let r=Jr(e,t);return ko(r),r}function H(e,t=!1,r=!0){let i=Jr(e);return t||(i.equals=fo),rn&&r&&it!==null&&it.l!==null&&(it.l.s??=[]).push(i),i}function D(e,t,r=!1){Je!==null&&(!ei||(Je.f&131072)!==0)&&nn()&&(Je.f&4325394)!==0&&(Vi===null||!Vi.has(e))&&Au();let i=r?Si(t):t;return j&&ho(i,e.label),ji(e,i,Ea)}function ji(e,t,r=null){if(!e.equals(t)){xn.set(e,_i?t:e.v);var i=$i.ensure();if(i.capture(e,t),j){if(Oi||Te!==null){e.updated??=new Map;let n=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:n}),Oi||n>5){let a=Fi("updated at");if(a!==null){let o=e.updated.get(a.stack);o||(o={error:a,count:0},e.updated.set(a.stack,o)),o.count++}}}Te!==null&&(e.set_during_effect=!0)}if((e.f&2)!==0){let n=e;(e.f&2048)!==0&&ya(n),Lr===null&&Ms(n)}e.wv=Fs(),sp(e,2048,r),nn()&&Te!==null&&(Te.f&1024)!==0&&(Te.f&96)===0&&(mi===null?ap([e]):mi.push(e)),!i.is_fork&&ns.size>0&&!tc&&So()}return t}function So(){tc=!1;for(let e of ns){(e.f&1024)!==0&&St(e,4096);let t;try{t=bn(e)}catch{t=!0}t&&zi(e)}ns.clear()}function is(e){D(e,e.v+1)}function sp(e,t,r){var i=e.reactions;if(i!==null)for(var n=nn(),a=i.length,o=0;o<a;o++){var d=i[o],p=d.f;if(!(!n&&d===Te)){var h=(p&2048)===0;if(h&&St(d,t),(p&131072)!==0)ns.add(d);else if((p&2)!==0){var $=d;Lr?.delete($),(p&65536)===0&&(p&512&&(Te===null||(Te.f&2097152)===0)&&(d.f|=65536),sp($,4096,r))}else if(h){var b=d;(p&16)!==0&&Ai!==null&&Ai.add(b),r!==null?r.push(b):Aa(b)}}}}var gg=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Si(e){if(typeof e!="object"||e===null||Rr in e)return e;let t=Kn(e);if(t!==Tl&&t!==nu)return e;var r=new Map,i=Di(e),n=on(0),a=j&&Oi?Fi("created at"):null,o=Dn,d=b=>{if(Dn===o)return b();var m=Je,g=Dn;mr(null),rc(o);var v=b();return mr(m),rc(g),v};i&&(r.set("length",on(e.length,a)),j&&(e=$g(e)));var p="";let h=!1;function $(b){if(!h){h=!0,p=b,Wr(n,`${p} version`);for(let[m,g]of r)Wr(g,cs(p,m));h=!1}}return new Proxy(e,{defineProperty(b,m,g){(!("value"in g)||g.configurable===!1||g.enumerable===!1||g.writable===!1)&&ku();var v=r.get(m);return v===void 0?d(()=>{var y=on(g.value,a);return r.set(m,y),j&&typeof m=="string"&&Wr(y,cs(p,m)),y}):D(v,g.value,!0),!0},deleteProperty(b,m){var g=r.get(m);if(g===void 0){if(m in b){let v=d(()=>on(Lt,a));r.set(m,v),is(n),j&&Wr(v,cs(p,m))}}else D(g,Lt),is(n);return!0},get(b,m,g){if(m===Rr)return e;if(j&&m===ao)return $;var v=r.get(m),y=m in b;if(v===void 0&&(!y||Kr(b,m)?.writable)&&(v=d(()=>{var P=Si(y?b[m]:Lt),T=on(P,a);return j&&Wr(T,cs(p,m)),T}),r.set(m,v)),v!==void 0){var E=s(v);return E===Lt?void 0:E}return Reflect.get(b,m,g)},getOwnPropertyDescriptor(b,m){var g=Reflect.getOwnPropertyDescriptor(b,m);if(g&&"value"in g){var v=r.get(m);v&&(g.value=s(v))}else if(g===void 0){var y=r.get(m),E=y?.v;if(y!==void 0&&E!==Lt)return{enumerable:!0,configurable:!0,value:E,writable:!0}}return g},has(b,m){if(m===Rr)return!0;var g=r.get(m),v=g!==void 0&&g.v!==Lt||Reflect.has(b,m);if(g!==void 0||Te!==null&&(!v||Kr(b,m)?.writable)){g===void 0&&(g=d(()=>{var E=v?Si(b[m]):Lt,P=on(E,a);return j&&Wr(P,cs(p,m)),P}),r.set(m,g));var y=s(g);if(y===Lt)return!1}return v},set(b,m,g,v){var y=r.get(m),E=m in b;if(i&&m==="length")for(var P=g;P<y.v;P+=1){var T=r.get(P+"");T!==void 0?D(T,Lt):P in b&&(T=d(()=>on(Lt,a)),r.set(P+"",T),j&&Wr(T,cs(p,P)))}if(y===void 0)(!E||Kr(b,m)?.writable)&&(y=d(()=>on(void 0,a)),j&&Wr(y,cs(p,m)),D(y,Si(g)),r.set(m,y));else{E=y.v!==Lt;var B=d(()=>Si(g));D(y,B)}var I=Reflect.getOwnPropertyDescriptor(b,m);if(I?.set&&I.set.call(v,g),!E){if(i&&typeof m=="string"){var L=r.get("length"),O=Number(m);Number.isInteger(O)&&O>=L.v&&D(L,O+1)}is(n)}return!0},ownKeys(b){s(n);var m=Reflect.ownKeys(b).filter(y=>{var E=r.get(y);return E===void 0||E.v!==Lt});for(var[g,v]of r)v.v!==Lt&&!(g in b)&&m.push(g);return m},setPrototypeOf(){Eu()}})}function cs(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:gg.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Hs(e){try{if(e!==null&&typeof e=="object"&&Rr in e)return e[Rr]}catch{}return e}function ic(e,t){return Object.is(Hs(e),Hs(t))}var vg=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function $g(e){return new Proxy(e,{get(t,r,i){var n=Reflect.get(t,r,i);return vg.has(r)?function(...a){np();var o=n.apply(this,a);return So(),o}:n}})}function op(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:i,includes:n}=e;e.indexOf=function(a,o){let d=r.call(this,a,o);if(d===-1){for(let p=o??0;p<this.length;p+=1)if(Hs(this[p])===a){co("array.indexOf(...)");break}}return d},e.lastIndexOf=function(a,o){let d=i.call(this,a,o??this.length-1);if(d===-1){for(let p=0;p<=(o??this.length-1);p+=1)if(Hs(this[p])===a){co("array.lastIndexOf(...)");break}}return d},e.includes=function(a,o){let d=n.call(this,a,o);if(!d){for(let p=0;p<this.length;p+=1)if(Hs(this[p])===a){co("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{e.indexOf=r,e.lastIndexOf=i,e.includes=n}}var js,lp,ma,cp,dp;function To(){if(js===void 0){js=window,lp=document,ma=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;cp=Kr(t,"firstChild").get,dp=Kr(t,"nextSibling").get,Cl(e)&&(e[ua]=void 0,e[oo]=null,e[pa]=void 0,e.__e=void 0),Cl(r)&&(r[fa]=void 0),j&&(e.__svelte_meta=null,op())}}function lr(e=""){return document.createTextNode(e)}function Dt(e){return cp.call(e)}function xr(e){return dp.call(e)}function c(e,t){if(!Ae)return Dt(e);var r=Dt(We);if(r===null)r=We.appendChild(lr());else if(t&&r.nodeType!==Zn){var i=lr();return r?.before(i),mt(i),i}return t&&Sa(r),mt(r),r}function Xe(e,t=!1){if(!Ae){var r=Dt(e);return r instanceof Comment&&r.data===""?xr(r):r}if(t){if(We?.nodeType!==Zn){var i=lr();return We?.before(i),mt(i),i}Sa(We)}return We}function f(e,t=1,r=!1){let i=Ae?We:e;for(var n;t--;)n=i,i=xr(i);if(!Ae)return i;if(r){if(i?.nodeType!==Zn){var a=lr();return i===null?n?.after(a):i.before(a),mt(a),a}Sa(i)}return mt(i),i}function ba(e){e.textContent=""}function Co(){if(!ir||Ai!==null)return!1;var e=Te.f;return(e&32768)!==0}function qi(e,t,r){return t==null||t===no?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Sa(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Zn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}
72function sc(e){Te===null&&(Je===null&&mu(e),_u()),_i&&$u(e)}function _g(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Wi(e,t){var r=Te;if(j)for(;r!==null&&(r.f&131072)!==0;)r=r.parent;r!==null&&(r.f&8192)!==0&&(e|=8192);var i={ctx:it,deps:null,nodes:null,f:e|2048|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};j&&(i.component_function=vi),He?.register_created_effect(i);var n=i;if((e&4)!==0)as!==null?as.push(i):$i.ensure().schedule(i);else if(t!==null){try{zi(i)}catch(o){throw or(i),o}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&524288)===0&&(n=n.first,(e&16)!==0&&(e&65536)!==0&&n!==null&&(n.f|=65536))}if(n!==null&&(n.parent=r,r!==null&&_g(n,r),Je!==null&&(Je.f&2)!==0&&(e&64)===0)){var a=Je;(a.effects??=[]).push(n)}return i}function gn(){return Je!==null&&!ei}function sr(e){let t=Wi(8,null);return St(t,1024),t.teardown=e,t}function Us(e){sc("$effect"),j&&Cr(e,"name",{value:"$effect"});var t=Te.f,r=!Je&&(t&32)!==0&&it!==null&&!it.i;if(r){var i=it;(i.e??=[]).push(e)}else return Ol(e)}function Ol(e){return Wi(1048580,e)}function Ta(e){return sc("$effect.pre"),j&&Cr(e,"name",{value:"$effect.pre"}),Wi(1048584,e)}function Ro(e){$i.ensure();let t=Wi(524352,e);return()=>{or(t)}}function fp(e){$i.ensure();let t=Wi(524352,e);return(r={})=>new Promise(i=>{r.outro?sn(t,()=>{or(t),i(void 0)}):(or(t),i(void 0))})}function Ti(e){return Wi(4,e)}function X(e,t){var r=it,i={effect:null,ran:!1,deps:e};r.l.$.push(i),i.effect=yr(()=>{if(e(),!i.ran){i.ran=!0;var n=Te;try{ar(n.parent),u(t)}finally{ar(n)}}})}function nt(){var e=it;yr(()=>{for(var t of e.l.$){t.deps();var r=t.effect;(r.f&1024)!==0&&r.deps!==null&&St(r,4096),bn(r)&&zi(r),t.ran=!1}})}function Ku(e){return Wi(4718592,e)}function yr(e,t=0){return Wi(8|t,e)}function S(e,t=[],r=[],i=[]){bo(i,t,r,n=>{Wi(8,()=>{e(...n.map(s))})})}function li(e,t=0){var r=Wi(16|t,e);return j&&(r.dev_stack=Ni),r}function kr(e){return Wi(524320,e)}function ac(e){var t=e.teardown;
72if(t!==null){let r=_i,i=Je;nc(!0),mr(null);try{t.call(null)}finally{nc(r),mr(i)}}}function ka(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){let n=r.ac;n!==null&&Ei(()=>{n.abort(en)});var i=r.next;(r.f&64)!==0?r.parent=null:or(r,t),r=i}}function hp(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&32)===0&&or(t),t=r}}function or(e,t=!0){var r=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(oc(e.nodes.start,e.nodes.end),r=!0),e.f|=33554432,ka(e,t&&!r),ss(e,0);var i=e.nodes&&e.nodes.t;if(i!==null)for(let a of i)a.stop();ac(e),e.f^=33554432,e.f|=16384;var n=e.parent;n!==null&&n.first!==null&&ec(e),j&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function oc(e,t){for(;e!==null;){var r=e===t?null:xr(e);e.remove(),e=r}}function ec(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function sn(e,t,r=!0){var i=[];gp(e,i,!0);var n=()=>{r&&or(e),t&&t()},a=i.length;if(a>0){var o=()=>--a||n();for(var d of i)d.out(o)}else n()}function gp(e,t,r){if((e.f&8192)===0){e.f^=8192;var i=e.nodes&&e.nodes.t;if(i!==null)for(let d of i)(d.is_global||r)&&t.push(d);for(var n=e.first;n!==null;){var a=n.next;if((n.f&64)===0){var o=(n.f&65536)!==0||(n.f&32)!==0&&(e.f&16)!==0;gp(n,t,o?r:!1)}n=a}}}function zs(e){vp(e,!0)}function vp(e,t){if((e.f&8192)!==0){e.f^=8192,(e.f&1024)===0&&(St(e,2048),$i.ensure().schedule(e));for(var r=e.first;r!==null;){var i=r.next,n=(r.f&65536)!==0||(r.f&32)!==0;vp(r,n?t:!1),r=i}var a=e.nodes&&e.nodes.t;if(a!==null)for(let o of a)(o.is_global||t)&&o.in()}}function Is(e,t){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end;r!==null;){var n=r===i?null:xr(r);t.append(r),r=n}}var $p=null;var Mo=!1,_i=!1;function nc(e){_i=e}var Je=null,ei=!1;function mr(e){Je=e}var Te=null;function ar(e){Te=e}var Vi=null;function ko(e){Je!==null&&(!ir||(Je.f&2)!==0)&&(Vi??=new Set).add(e)}var Pr=null,Qr=0,mi=null;function ap(e){mi=e}var _p=1,ds=0,Dn=ds;function rc(e){Dn=e}function Fs(){return++_p}function bn(e){var t=e.f;if((t&2048)!==0)return!0;if(t&2&&(e.f&=-65537),(t&4096)!==0){for(var r=e.deps,i=r.length,n=0;n<i;n++){var a=r[n];if(bn(a)&&Yl(a),a.wv>e.wv)return!0}(t&512)!==0&&Lr===null&&St(e,1024)}return!1}function mp(e,t,r=!0){var i=e.reactions;if(i!==null&&!(!ir&&Vi!==null&&Vi.has(e)))for(var n=0;n<i.length;n++){var a=i[n];(a.f&2)!==0?mp(a,t,!1):t===a&&(r?St(a,2048):(a.f&1024)!==0&&St(a,4096),Aa(a))}}function yo(e){var t=Pr,r=Qr,i=mi,n=Je,a=Vi,o=it,d=ei,p=Dn,h=e.f;Pr=null,Qr=0,mi=null,Je=(h&96)===0?e:null,Vi=null,vn(e.ctx),ei=!1,Dn=++ds,e.ac!==null&&(Ei(()=>{e.ac.abort(en)}),e.ac=null);try{e.f|=2097152;var $=e.fn,b=$();e.f|=32768;var m=e.deps,g=He?.is_fork;if(Pr!==null){var v;if(g||ss(e,Qr),m!==null&&Qr>0)for(m.length=Qr+Pr.length,v=0;v<Pr.length;v++)m[Qr+v]=Pr[v];else e.deps=m=Pr;if(gn()&&(e.f&512)!==0)for(v=Qr;v<m.length;v++)(m[v].reactions??=[]).push(e)}else!g&&m!==null&&Qr<m.length&&(ss(e,Qr),m.length=Qr);if(nn()&&mi!==null&&!ei&&m!==null&&(e.f&6146)===0)for(v=0;v<mi.length;v++)mp(mi[v],e);if(n!==null&&n!==e){if(ds++,n.deps!==null)for(let y=0;y<r;y+=1)n.deps[y].rv=ds;if(t!==null)for(let y of t)y.rv=ds;mi!==null&&(i===null?i=mi:i.push(...mi))}return(e.f&8388608)!==0&&(e.f^=8388608),b}catch(y){return vo(y)}finally{e.f^=2097152,Pr=t,Qr=r,mi=i,Je=n,Vi=a,vn(o),ei=d,Dn=p}}function mg(e,t){let r=t.reactions;if(r!==null){var i=iu.call(r,e);if(i!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[i]=r[n],r.pop())}}if(r===null&&(t.f&2)!==0&&(Pr===null||!Tn.call(Pr,t))){var a=t;(a.f&512)!==0&&(a.f^=512,a.f&=-65537),a.v!==Lt&&Ms(a),a.ac!==null&&Ei(()=>{a.ac.abort(en),a.ac=null,St(a,2048)}),Xu(a),ss(a,0)}}function ss(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)mg(e,r[i])}function zi(e){var t=e.f;if((t&16384)===0){St(e,1024);var r=Te,i=Mo;if(Te=e,Mo=(t&96)===0,j){var n=vi;go(e.component_function);var a=Ni;Rs(e.dev_stack??Ni)}try{(t&16777232)!==0?hp(e):ka(e),ac(e);var o=yo(e);if(e.teardown=typeof o=="function"?o:null,e.wv=_p,j&&Oi&&(e.f&2048)!==0&&e.deps!==null)for(var d of e.deps)d.set_during_effect&&(d.wv=Fs(),d.set_during_effect=!1)}finally{Mo=i,Te=r,j&&(go(n),Rs(a))}}}async function Lo(){if(ir)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),ls()}function s(e){var t=e.f,r=(t&2)!==0;if($p?.add(e),Je!==null&&!ei){var i=Te!==null&&(Te.f&16384)!==0;if(!i&&(Vi===null||!Vi.has(e))){var n=Je.deps;if((Je.f&2097152)!==0)e.rv<ds&&(e.rv=ds,Pr===null&&n!==null&&n[Qr]===e?Qr++:Pr===null?Pr=[e]:Pr.push(e));else{Je.deps??=[],Tn.call(Je.deps,e)||Je.deps.push(e);var a=e.reactions;
72a===null?e.reactions=[Je]:Tn.call(a,Je)||a.push(Je)}}}if(j){if(!ei&&ci&&He===null&&an===null&&!ci.warned&&(ci.effect.f&2097152)===0&&!ci.effect_deps.has(e)){ci.warned=!0,Tu(e.label);var o=Fi("traced at");o&&console.warn(o)}if(wa.delete(e),Oi&&!ei&&$a!==null&&Je!==null&&$a.reaction===Je){if(e.trace)e.trace();else if(o=Fi("traced at"),o){var d=$a.entries.get(e);d===void 0&&(d={traces:[]},$a.entries.set(e,d));var p=d.traces[d.traces.length-1];o.stack!==p?.stack&&d.traces.push(o)}}}if(_i&&xn.has(e))return xn.get(e);if(r){var h=e;if(_i){var $=h.v;return((h.f&1024)===0&&h.reactions!==null||bp(h))&&($=ya(h)),xn.set(h,$),$}var b=(h.f&512)===0&&!ei&&Je!==null&&(Mo||(Je.f&512)!==0),m=(h.f&32768)===0;bn(h)&&(b&&(h.f|=512),Yl(h)),b&&!m&&(Jl(h),xp(h))}if(Lr?.has(e))return Lr.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function xp(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&2)!==0&&(t.f&512)===0&&(Jl(t),xp(t))}function bp(e){if(e.v===Lt)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(xn.has(t)||(t.f&2)!==0&&bp(t))return!0;return!1}function u(e){var t=ei;try{return ei=!0,e()}finally{ei=t}}function _(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Rr in e)Po(e);else if(!Array.isArray(e))for(let t in e){let r=e[t];typeof r=="object"&&r&&Rr in r&&Po(r)}}}function Po(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let i in e)try{Po(e[i],t)}catch{}let r=Kn(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){let i=so(r);for(let n in i){let a=i[n].get;if(a)try{a.call(e)}catch{}}}}}function xa(e,t,r){if(e==null)return t(void 0),r&&r(void 0),rr;let i=u(()=>e.subscribe(t,r));return i.unsubscribe?()=>i.unsubscribe():i}var wp=`<!--${"["}-->`,xg=`<!--${"[!"}-->`,bg=`<!--${"]"}-->`;var wg=/\r/g;function lc(e){e=e.replace(wg,"");let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return(t>>>0).toString(36)}var yg=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var n0=[...yg,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var kg=["touchstart","touchmove"];function yp(e){return kg.includes(e)}var Eg=["$state","$state.raw","$derived","$derived.by"],s0=[...Eg,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];var Ag=["textarea","script","style","title"];function cc(e){return Ag.includes(e)}function Io(e){return e?.replace(/\//g,"/\u200B")}var Rg={li:{direct:["li"]},dt:{descendant:["dt","dd"],reset_by:["dl"]},dd:{descendant:["dt","dd"],reset_by:["dl"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};var Z0={...Rg,form:{descendant:["form"]},a:{descendant:["a"]},button:{descendant:["button"]},h1:{descendant:["h1","h2","h3","h4","h5","h6"]},h2:{descendant:["h1","h2","h3","h4","h5","h6"]},h3:{descendant:["h1","h2","h3","h4","h5","h6"]},h4:{descendant:["h1","h2","h3","h4","h5","h6"]},h5:{descendant:["h1","h2","h3","h4","h5","h6"]},h6:{descendant:["h1","h2","h3","h4","h5","h6"]},tr:{only:["th","td","style","script","template"]},tbody:{only:["tr","style","script","template"]},thead:{only:["tr","style","script","template"]},tfoot:{only:["tr","style","script","template"]},colgroup:{only:["col","template"]},table:{only:["caption","colgroup","tbody","thead","tfoot","style","script","template"]},head:{only:["base","basefont","bgsound","link","meta","title","noscript","noframes","style","script","template"]},html:{only:["head","body","frameset"]},frameset:{only:["frame"]},"#document":{only:["html"]}};var Do=Symbol("events"),Cp=new Set,dc=new Set;function Rp(e,t,r,i={}){function n(a){if(i.capture||Oo.call(t,a),!a.cancelBubble)return Ei(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?hr(()=>{t.addEventListener(e,n,i)}):t.addEventListener(e,n,i),n}function gr(e,t,r,i,n){var a={capture:i,passive:n},o=Rp(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&sr(()=>{t.removeEventListener(e,o,a)})}var Tp=null;function Oo(e){var t=this,r=t.ownerDocument,i=e.type,n=e.composedPath?.()||[],a=n[0]||e.target;Tp=e;var o=0,d=Tp===e&&e[Do];if(d){var p=n.indexOf(d);if(p!==-1&&(t===document||t===window)){e[Do]=t;return}var h=n.indexOf(t);if(h===-1)return;p<=h&&(o=p)}if(a=n[o]||e.target,a!==t){Cr(e,"currentTarget",{configurable:!0,get(){return a||r}});var $=Je,b=Te;mr(null),ar(null);try{for(var m,g=[];a!==null&&a!==t;){try{var v=a[Do]?.[i];v!=null&&(!a.disabled||e.target===a)&&v.call(a,e)}catch(y){m?g.push(y):m=y}if(e.cancelBubble)break;o++,a=o<n.length?n[o]:null}if(m){for(let y of g)queueMicrotask(()=>{throw y});throw m}}finally{e[Do]=t,delete e.currentTarget,mr($),ar(b)}}}var Vg=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Mp(e){return Vg?.createHTML(e)??e}function Ra(e){var t=qi("template");return t.innerHTML=Mp(e.replaceAll("<!>","<!---->")),t.content}function vr(e,t){var r=Te;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function k(e,t){var r=(t&1)!==0,i=(t&2)!==0,n,a=!e.startsWith("<!>");return()=>{if(Ae)return vr(We,null),We;n===void 0&&(n=Ra(a?e:"<!>"+e),r||(n=Dt(n)));var o=i||ma?document.importNode(n,!0):n.cloneNode(!0);if(r){var d=Dt(o),p=o.lastChild;vr(d,p)}else vr(o,o);return o}}function Gg(e,t,r="svg"){var i=!e.startsWith("<!>"),n=(t&1)!==0,a=`<${r}>
72${i?e:"<!>"+e}</${r}>`,o;return()=>{if(Ae)return vr(We,null),We;if(!o){var d=Ra(a),p=Dt(d);if(n)for(o=document.createDocumentFragment();Dt(p);)o.appendChild(Dt(p));else o=Dt(p)}var h=o.cloneNode(!0);if(n){var $=Dt(h),b=h.lastChild;vr($,b)}else vr(h,h);return h}}function Yt(e,t){return Gg(e,t,"svg")}function di(e=""){if(!Ae){var t=lr(e+"");return vr(t,t),t}var r=We;return r.nodeType!==Zn?(r.before(r=lr()),mt(r)):Sa(r),vr(r,r),r}function On(){if(Ae)return vr(We,null),We;var e=document.createDocumentFragment(),t=document.createComment(""),r=lr();return e.append(t,r),vr(t,r),e}function w(e,t){if(Ae){var r=Te;((r.f&32768)===0||r.nodes.end===null)&&(r.nodes.end=We),fr();return}e!==null&&e.before(t)}var No=!0;function Vs(e){No=e}function A(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[fa]??=e.nodeValue)&&(e[fa]=r,e.nodeValue=`${r}`)}function Fn(e,t){return Lp(e,t)}function us(e,t){To(),t.intro=t.intro??!1;let r=t.target,i=Ae,n=We;try{for(var a=Dt(r);a&&(a.nodeType!==gi||a.data!=="[");)a=xr(a);if(!a)throw Qi;pr(!0),mt(a);let o=Lp(e,{...t,anchor:a});return pr(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
73`).some(d=>d.startsWith("https://svelte.dev/e/")))throw o;return o!==Qi&&console.warn("Failed to hydrate: ",o),t.recover===!1&&bu(),To(),ba(r),pr(!1),Fn(e,t)}finally{pr(i),mt(n)}}var Fo=new Map;function Lp(e,{target:t,anchor:r,props:i={},events:n,context:a,intro:o=!0,transformError:d}){To();var p=void 0,h=fp(()=>{var $=r??t.appendChild(lr());zl($,{pending:()=>{}},g=>{Ie({});var v=it;if(a&&(v.c=a),n&&(i.$$events=n),Ae&&vr(g,null),No=o,p=e(g,i)||{},No=!0,Ae&&(Te.nodes.end=We,We===null||We.nodeType!==gi||We.data!=="]"))throw Rn(),Qi;De()},d);var b=new Set,m=g=>{for(var v=0;v<g.length;v++){var y=g[v];if(!b.has(y)){b.add(y);var E=yp(y);for(let B of[t,document]){var P=Fo.get(B);P===void 0&&(P=new Map,Fo.set(B,P));var T=P.get(y);T===void 0?(B.addEventListener(y,Oo,{passive:E}),P.set(y,1)):P.set(y,T+1)}}}};return m(Ss(Cp)),dc.add(m),()=>{for(var g of b)for(let E of[t,document]){var v=Fo.get(E),y=v.get(g);--y==0?(E.removeEventListener(g,Oo),v.delete(g),v.size===0&&Fo.delete(E)):v.set(g,y)}dc.delete(m),$!==r&&$.parentNode?.removeChild($)}});return uc.set(p,h),p}var uc=new WeakMap;function Ma(e,t){let r=uc.get(e);return r?(uc.delete(e),r(t)):(j&&(Rr in e?Ou():Iu()),Promise.resolve())}var ln=class{anchor;#e=new Map;#t=new Map;#r=new Map;#l=new Set;#s=!0;constructor(t,r=!0){this.anchor=t,this.#s=r}#a=t=>{if(this.#e.has(t)){var r=this.#e.get(t),i=this.#t.get(r);if(i)zs(i),this.#l.delete(r);else{var n=this.#r.get(r);n&&(zs(n.effect),this.#t.set(r,n.effect),this.#r.delete(r),j&&(n.fragment.lastChild[Ll]=this.anchor),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(let[a,o]of this.#e){if(this.#e.delete(a),a===t)break;let d=this.#r.get(o);d&&(or(d.effect),this.#r.delete(o))}for(let[a,o]of this.#t){if(a===r||this.#l.has(a))continue;let d=()=>{if(Array.from(this.#e.values()).includes(a)){var h=document.createDocumentFragment();Is(o,h),h.append(lr()),this.#r.set(a,{effect:o,fragment:h})}else or(o);this.#l.delete(a),this.#t.delete(a)};this.#s||!i?(this.#l.add(a),sn(o,d,!1)):d()}}};#i=t=>{this.#e.delete(t);let r=Array.from(this.#e.values());for(let[i,n]of this.#r)r.includes(i)||(or(n.effect),this.#r.delete(i))};ensure(t,r){var i=He,n=Co();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(n){var a=document.createDocumentFragment(),o=lr();a.append(o),this.#r.set(t,{effect:kr(()=>r(o)),fragment:a})}else this.#t.set(t,kr(()=>r(this.anchor)));if(this.#e.set(i,t),n){for(let[d,p]of this.#t)d===t?i.unskip_effect(p):i.skip_effect(p);for(let[d,p]of this.#r)d===t?i.unskip_effect(p.effect):i.skip_effect(p.effect);i.oncommit(this.#a),i.ondiscard(this.#i)}else Ae&&(this.anchor=We),this.#a(i)}};function N(e,t,r=!1){var i;Ae&&(i=We,fr());var n=new ln(e),a=r?65536:0;function o(d,p){if(Ae){var h=ga(i);if(d!==parseInt(h.substring(1))){var $=tn();mt($),n.anchor=$,pr(!1),n.ensure(d,p),pr(!0);return}}n.ensure(d,p)}li(()=>{var d=!1;t((p,h=0)=>{d=!0,o(h,p)}),d||o(-1,null)},a)}function ae(e,t){return t}function Zg(e,t,r){for(var i=[],n=t.length,a,o=t.length,d=0;d<n;d++){let b=t[d];sn(b,()=>{if(a){if(a.pending.delete(b),a.done.add(b),a.pending.size===0){var m=e.outrogroups;pc(e,Ss(a.done)),m.delete(a),m.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var p=i.length===0&&r!==null;if(p){var h=r,$=h.parentNode;ba($),$.append(h),e.items.clear()}pc(e,t,!p)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function pc(e,t,r=!0){var i;if(e.pending.size>0){i=new Set;for(let o of e.pending.values())for(let d of o)i.add(e.items.get(d).e)}for(var n=0;n<t.length;n++){var a=t[n];if(i?.has(a)){a.f|=33554432;let o=document.createDocumentFragment();Is(a,o)}else or(t[n],r)}}var Ip;function Y(e,t,r,i,n,a=null){var o=e,d=new Map,p=(t&4)!==0;if(p){var h=e;o=Ae?mt(Dt(h)):h.appendChild(lr())}Ae&&fr();var $=null,b=cr(()=>{var B=r();return Di(B)?B:B==null?[]:Ss(B)});j&&Wr(b,"{#each ...}");var m,g=new Map,v=!0;function y(B){(T.effect.f&16384)===0&&(T.pending.delete(B),T.fallback=$,Qg(T,m,o,t,i),$!==null&&(m.length===0?($.f&33554432)===0?zs($):($.f^=33554432,La($,null,o)):sn($,()=>{$=null})))}function E(B){T.pending.delete(B)}var P=li(()=>{m=s(b);var B=m.length;let I=!1;if(Ae){var L=ga(o)==="[!";L!==(B===0)&&(o=tn(),mt(o),pr(!1),I=!0)}for(var O=new Set,ee=He,me=Co(),C=0;C<B;C+=1){Ae&&We.nodeType===gi&&We.data==="]"&&(o=We,I=!0,pr(!1));var M=m[C],J=i(M,C);if(j){var fe=i(M,C);J!==fe&&vu(String(C),String(J),String(fe))}var ue=v?null:d.get(J);ue?(ue.v&&ji(ue.v,M),ue.i&&ji(ue.i,C),me&&ee.unskip_effect(ue.e)):(ue=ev(d,v?o:Ip??=lr(),M,J,C,n,t,r),v||(ue.e.f|=33554432),d.set(J,ue)),O.add(J)}if(B===0&&a&&!$&&(v?$=kr(()=>a(o)):($=kr(()=>a(Ip??=lr())),$.f|=33554432)),B>O.size&&(j?tv(m,i):Dl("","","")),Ae&&B>0&&mt(tn()),!v)if(g.set(ee,O),me){for(let[$e,W]of d)O.has($e)||ee.skip_effect(W.e);ee.oncommit(y),ee.ondiscard(E)}else y(ee);I&&pr(!0),s(b)}),T={effect:P,flags:t,items:d,pending:g,outrogroups:null,fallback:$};v=!1,Ae&&(o=We)}function Pa(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function Qg(e,t,r,i,n){var a=(i&8)!==0,o=t.length,d=e.items,p=Pa(e.effect.first),h,$=null,b,m=[],g=[],v,y,E,P;if(a)for(P=0;P<o;P+=1)v=t[P],y=n(v,P),E=d.get(y).e,(E.f&33554432)===0&&(E.nodes?.a?.measure(),(b??=new Set).add(E));for(P=0;P<o;P+=1){if(v=t[P],y=n(v,P),E=d.get(y).e,e.outrogroups!==null)for(let M of e.outrogroups)M.pending.delete(E),M.done.delete(E);if((E.f&8192)!==0&&(zs(E),a&&(E.nodes?.a?.unfix(),(b??=new Set).delete(E))),(E.f&33554432)!==0)if(E.f^=33554432,E===p)La(E,null,r);else{var T=$?$.next:p;E===e.effect.last&&(e.effect.last=E.prev),E.prev&&(E.prev.next=E.next),E.next&&(E.next.prev=E.prev),Nn(e,$,E),Nn(e,E,T),La(E,T,r),$=E,m=[],g=[],p=Pa($.next);continue}if(E!==p){if(h!==void 0&&h.has(E)){if(m.length<g.length){var B=g[0],I;$=B.prev;var L=m[0],O=m[m.length-1];for(I=0;I<m.length;I+=1)La(m[I],B,r);for(I=0;I<g.length;I+=1)h.delete(g[I]);Nn(e,L.prev,O.next),Nn(e,$,L),Nn(e,O,B),p=B,$=O,P-=1,m=[],g=[]}else h.delete(E),La(E,p,r),Nn(e,E.prev,E.next),Nn(e,E,$===null?e.effect.first:$.next),Nn(e,$,E),$=E;continue}for(m=[],g=[];p!==null&&p!==E;)(h??=new Set).add(p),g.push(p),p=Pa(p.next);if(p===null)continue}(E.f&33554432)===0&&m.push(E),$=E,p=Pa(E.next)}if(e.outrogroups!==null){for(let M of e.outrogroups)M.pending.size===0&&(pc(e,Ss(M.done)),e.outrogroups?.delete(M));e.outrogroups.size===0&&(e.outrogroups=null)}if(p!==null||h!==void 0){var ee=[];
73if(h!==void 0)for(E of h)(E.f&8192)===0&&ee.push(E);for(;p!==null;)(p.f&8192)===0&&p!==e.fallback&&ee.push(p),p=Pa(p.next);var me=ee.length;if(me>0){var C=(i&4)!==0&&o===0?r:null;if(a){for(P=0;P<me;P+=1)ee[P].nodes?.a?.measure();for(P=0;P<me;P+=1)ee[P].nodes?.a?.fix()}Zg(e,ee,C)}}a&&hr(()=>{if(b!==void 0)for(E of b)E.nodes?.a?.apply()})}function ev(e,t,r,i,n,a,o,d){var p=(o&1)!==0?(o&16)===0?H(r,!1,!1):Jr(r):null,h=(o&2)!==0?Jr(n):null;return j&&p&&(p.trace=()=>{d()[h?.v??n]}),{v:p,i:h,e:kr(()=>(a(t,p??r,h??n,d),()=>{e.delete(i)}))}}function La(e,t,r){if(e.nodes)for(var i=e.nodes.start,n=e.nodes.end,a=t&&(t.f&33554432)===0?t.nodes.start:r;i!==null;){var o=xr(i);if(a.before(i),i===n)return;i=o}}function Nn(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function tv(e,t){let r=new Map,i=e.length;for(let n=0;n<i;n++){let a=t(e[n],n);if(r.has(a)){let o=String(r.get(a)),d=String(n),p=String(a);p.startsWith("[object ")&&(p=null),Dl(o,d,p)}r.set(a,n)}}function rv(e,t,r){if(!t||t===lc(String(r??"")))return;let i,n=e.__svelte_meta?.loc;n?i=`near ${n.file}:${n.line}:${n.column}`:vi?.[Fr]&&(i=`in ${vi[Fr]}`),Pu(Io(i))}function wn(e,t,r=!1,i=!1,n=!1,a=!1){var o=e,d="";if(r){var p=e;Ae&&(o=mt(Dt(p)))}S(()=>{var h=Te;if(d===(d=t()??"")){Ae&&fr();return}if(r&&!Ae){h.nodes=null,p.innerHTML=d,d!==""&&vr(Dt(p),p.lastChild);return}if(h.nodes!==null&&(oc(h.nodes.start,h.nodes.end),h.nodes=null),d!==""){if(Ae){for(var $=We.data,b=fr(),m=b;b!==null&&(b.nodeType!==gi||b.data!=="");)m=b,b=xr(b);if(b===null)throw Rn(),Qi;j&&!a&&rv(b.parentNode,$,d),vr(We,m),o=mt(b);return}var g=i?As:n?Al:void 0,v=qi(i?"svg":n?"math":"template",g);v.innerHTML=d;var y=i||n?v:v.content;if(vr(Dt(y),y.lastChild),i||n)for(;Dt(y);)o.before(Dt(y));else o.before(y)}})}function qs(e){return(t,...r)=>{var i=e(...r),n;if(Ae)n=We,fr();else{var a=i.render().trim(),o=Ra(a);n=Dt(o),j&&(xr(n)!==null||n.nodeType!==ha)&&Lu(),t.before(n)}let d=i.setup?.(n);vr(n,n),typeof d=="function"&&sr(d)}}var sv=null;function fc(e){sv=e}function hc(e,t,r,i,n,a){let o=Ae;Ae&&fr();var d=j&&a&&it?.function[Fr],p=null;Ae&&We.nodeType===ha&&(p=We,fr());var h=Ae?We:e,$=Te,b=new ln(h,!1);li(()=>{let m=t()||null;var g=n?n():r||m==="svg"?As:void 0;if(m===null){b.ensure(null,null),Vs(!0);return}return b.ensure(m,v=>{if(m){if(p=Ae?p:qi(m,g),j&&a&&(p.__svelte_meta={parent:Ni,loc:{f
73ile:d,line:a[0],column:a[1]}}),vr(p,p),i){var y=null;Ae&&cc(m)&&p.append(y=document.createComment(""));var E=Ae?Dt(p):p.appendChild(lr());Ae&&(E===null?pr(!1):mt(E)),fc($),i(p,E),y?.remove(),fc(null)}Te.nodes.end=p,v.before(p)}Ae&&mt(v)}),Vs(!0),()=>{m&&Vs(!1)}},65536),sr(()=>{Vs(!0)}),o&&(pr(!0),mt(h))}function Ze(e,t,r,i,n,a){var o=e[ua];if(Ae||o!==r||o===void 0){var d=Ml(r,i,a);(!Ae||d!==e.getAttribute("class"))&&(d==null?e.removeAttribute("class"):t?e.className=d:e.setAttribute("class",d)),e[ua]=r}else if(a&&n!==a)for(var p in a){var h=!!a[p];(n==null||h!==!!n[p])&&e.classList.toggle(p,h)}return a}function gc(e,t={},r,i){for(var n in r){var a=r[n];t[n]!==a&&(r[n]==null?e.style.removeProperty(n):e.style.setProperty(n,a,i))}}function Hr(e,t,r,i){var n=e[pa];if(Ae||n!==t){var a=Pl(t,i);(!Ae||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e[pa]=t}else i&&(Array.isArray(i)?(gc(e,r?.[0],i[0]),gc(e,r?.[1],i[1],"important")):gc(e,r,i));return i}function Ws(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Di(t))return Du();for(var i of e.options)i.selected=t.includes(Ia(i));return}for(i of e.options){var n=Ia(i);if(ic(n,t)){i.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Da(e){var t=new MutationObserver(()=>{"__value"in e&&Ws(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),sr(()=>{t.disconnect()})}function ps(e,t,r=t){var i=new WeakSet,n=!0;xo(e,"change",a=>{var o=a?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(o),Ia);else{var p=e.querySelector(o)??e.querySelector("option:not([disabled])");d=p&&Ia(p)}r(d),e.__value=d,He!==null&&i.add(He)}),Ti(()=>{var a=t();if(e===document.activeElement){var o=ir?an:He;if(i.has(o))return}if(Ws(e,a,n),n&&a===void 0){var d=e.querySelector(":checked");d!==null&&(a=Ia(d),r(a))}e.__value=a,n=!1}),Da(e)}function Ia(e){return"__value"in e?e.__value:e.value}var dv=Symbol("is custom element"),uv=Symbol("is html"),pv=lo?"link":"LINK";var fv=lo?"progress":"PROGRESS";function Ci(e){if(Ae){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;x(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var n=e.checked;x(e,"checked",null),e.checked=n}}};e[Cn]=r,hr(r),mo()}}function $c(e,t){var r=Bp(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==fv)||(e.value=t??"")}function x(e,t,r,i){var n=Bp(e);if(Ae&&(n[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===pv)){i||gv(e,t,r??"");return}n[t]!==(n[t]=r)&&(t==="loading"&&(e[uu]=r),r==null?e.removeAttribute(t):typeof r!="string"&&hv(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Bp(e){return e[oo]??={[dv]:e.nodeName.includes("-"),[uv]:e.namespaceURI===no}}var Op=new Map;function hv(e){var t=e.getAttribute("is")||e.nodeName,r=Op.get(t);if(r)return r;Op.set(t,r=[]);for(var i,n=e,a=Element.prototype;a!==n;){i=so(n);for(var o in i)i[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);n=Kn(n)}return r}function gv(e,t,r){j&&(t==="srcset"&&vv(e,r)||vc(e.getAttribute(t)??"",r)||Mu(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function vc(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Fp(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function vv(e,t){var r=Fp(e.srcset),i=Fp(t);return i.length===r.length&&i.every(([n,a],o)=>a===r[o][1]&&(vc(r[o][0],n)||vc(n,r[o][0])))}function Ri(e,t,r=t){var i=new WeakSet;xo(e,"input",async n=>{j&&e.type==="checkbox"&&Il();var a=n?e.defaultValue:e.value;if(a=_c(e)?mc(a):a,r(a),He!==null&&i.add(He),await Lo(),a!==(a=t())){var o=e.selectionStart,d=e.selectionEnd,p=e.value.length;if(e.value=a??"",d!==null){var h=e.value.length;o===d&&d===p&&h>p?(e.selectionStart=h,e.selectionEnd=h):(e.selectionStart=o,e.selectionEnd=Math.min(d,h))}}}),(Ae&&e.defaultValue!==e.value||u(t)==null&&e.value)&&(r(_c(e)?mc(e.value):e.value),He!==null&&i.add(He)),yr(()=>{j&&e.type==="checkbox"&&Il();var n=t();if(e===document.activeElement){var a=ir?an:He;if(i.has(a))return}_c(e)&&n===mc(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function _c(e){var t=e.type;return t==="number"||t==="range"}function mc(e){return e===""?null:+e}function Ke(e,t,r){var i=Kr(e,t);i&&i.set&&(e[t]=r,sr(()=>{e[t]=null}))}function Ho(e){return function(...t){var r=t[0];return r.preventDefault(),e?.apply(this,t)}}function je(e=!1){let t=it,r=t.l.u;if(!r)return;let i=()=>_(t.s);if(e){let n=0,a={},o=mn(()=>{let d=!1,p=t.s;for(let h in p)p[h]!==a[h]&&(a[h]=p[h],d=!0);return d&&n++,n});i=()=>s(o)}r.b.length&&Ta(()=>{Hp(t,i),Ts(r.b)}),Us(()=>{let n=u(()=>r.m.map(su));return()=>{for(let a of n)typeof a=="function"&&a()}}),r.a.length&&Us(()=>{Hp(t,i),Ts(r.a)})}function Hp(e,t){if(e.l.s)for(let r of e.l.s)s(r);t()}function xc(e,t){var r=e.$$events?.[t.type],i=Di(r)?r.slice():r==null?[]:[r];for(var n of i)n.call(this,t)}
73function G(e,t,r,i){var n=!rn||(r&2)!==0,a=(r&8)!==0,o=(r&16)!==0,d=i,p=!0,h=void 0,$=()=>o&&n?(h??=mn(i),s(h)):(p&&(p=!1,d=o?u(i):i),d);let b;if(a){var m=Rr in e||da in e;b=Kr(e,t)?.set??(m&&t in e?I=>e[t]=I:void 0)}var g,v=!1;a?[g,v]=Bl(()=>e[t]):g=e[t],g===void 0&&i!==void 0&&(g=$(),b&&(n&&wu(t),b(g)));var y;if(n?y=()=>{var I=e[t];return I===void 0?$():(p=!0,I)}:y=()=>{var I=e[t];return I!==void 0&&(d=void 0),I===void 0?d:I},n&&(r&4)===0)return y;if(b){var E=e.$$legacy;return(function(I,L){return arguments.length>0?((!n||!L||E||v)&&b(L?y():I),I):y()})}var P=!1,T=((r&1)!==0?mn:cr)(()=>(P=!1,y()));j&&(T.label=t),a&&s(T);var B=Te;return(function(I,L){if(arguments.length>0){let O=L?s(T):n&&a?Si(I):I;return D(T,O),P=!0,d!==void 0&&(d=O),I}return _i&&P||(B.f&16384)!==0?T.v:s(T)})}function jp(e){return new bc(e)}var bc=class{#e;#t;constructor(t){var r=new Map,i=(a,o)=>{var d=H(o,!1,!1);return r.set(a,d),d};let n=new Proxy({...t.props||{},$$events:{}},{get(a,o){return s(r.get(o)??i(o,Reflect.get(a,o)))},has(a,o){return o===da?!0:(s(r.get(o)??i(o,Reflect.get(a,o))),Reflect.has(a,o))},set(a,o,d){return D(r.get(o)??i(o,d),d),Reflect.set(a,o,d)}});this.#t=(t.hydrate?us:Fn)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),!ir&&(!t?.props?.$$host||t.sync===!1)&&ls(),this.#e=n.$$events;for(let a of Object.keys(this.#t))a==="$set"||a==="$destroy"||a==="$on"||Cr(this,a,{get(){return this.#t[a]},set(o){this.#t[a]=o},enumerable:!0});this.#t.$set=a=>{Object.assign(n,a)},this.#t.$destroy=()=>{Ma(this.#t)}}$set(t){this.#t.$set(t)}$on(t,r){this.#e[t]=this.#e[t]||[];let i=(...n)=>
73r.call(this,...n);return this.#e[t].push(i),()=>{this.#e[t]=this.#e[t].filter(n=>n!==i)}}$destroy(){this.#t.$destroy()}};var Tv;typeof HTMLElement=="function"&&(Tv=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let i=this.$$c.$on(e,t);this.$$l_u.set(t,i)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){let i=this.$$l_u.get(t);i&&(i(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return n=>{let a=qi("slot");i!=="default"&&(a.name=i),w(n,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let t={},r=Cv(this);for(let i of this.$$s)i in r&&(i==="default"&&!this.$$d.children?(this.$$d.children=e(i),t.default=!0):t[i]=e(i));for(let i of this.attributes){let n=this.$$g_p(i.name);n in this.$$d||(this.$$d[n]=wc(n,i.value,this.$$p_d,"toProp"))}for(let i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=jp({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ro(()=>{yr(()=>{this.$$r=!0;for(let i of Sl(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];let n=wc(i,this.$$d[i],this.$$p_d,"toAttribute");n==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,n)}this.$$r=!1})});for(let i in this.$$l)for(let n of this.$$l[i]){let a=this.$$c.$on(i,n);this.$$l_u.set(n,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=wc(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Sl(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function wc(e,t,r,i){let n=r[e]?.type;if(t=n==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(n){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(n){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Cv(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}if(j){let e=function(t){if(!(t in globalThis)){let r;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(r!==void 0)return r;yu(t)},set:i=>{r=i}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function Bn(e){it===null&&Cs("onMount"),rn&&it.l!==null?Iv(it).m.push(e):Us(()=>{let t=u(e);if(typeof t=="function")return t})}function jo(e){it===null&&Cs("onDestroy"),Bn(()=>()=>u(e))}function Iv(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Dv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function yc(e,t){let r=e.includes("~")?Dv(e):e;if(Array.isArray(t)){if(r.startsWith("$$")){let i=r.substring(2),n=t.findIndex(a=>a&&typeof a=="object"&&a.__dom_id==i);return n===-1?(console.warn(`JSON Patch: item with __dom_id "${i}" not found, skipping`),null):n}return r==="-"?t.length:parseInt(r,10)}return r}function Uo(e,t){if(!t)return e;let r=t.split("/").slice(1),i=e;for(let n of r){if(i==null)return;let a=yc(n,i);if(a===null)return;i=i[a]}return i}function kc(e,t){if(t.path==="")return t.op==="add"||t.op==="replace"?t.value:t.op==="remove"?null:e;let r=t.path.split("/").slice(1),i=e;for(let a=0;a<r.length-1;a++){let o=yc(r[a],i);if(o===null||(i=i[o],i==null))return e}let n=yc(r[r.length-1],i);if(n===null)return e;if(Array.isArray(i)){let a=typeof n=="number"?n:parseInt(n,10);switch(t.op){case"add":i.splice(a,0,t.value);break;case"remove":i.splice(a,1);break;case"replace":i[a]=t.value;break;case"upsert":{let o=t.value;if(o&&typeof o=="object"&&"__dom_id"in o){let d=i.findIndex(p=>p&&typeof p=="object"&&p.__dom_id===o.__dom_id);d!==-1?i[d]=o:i.splice(a,0,o)}else i.splice(a,0,o);break}case"limit":{let o=t.value;if(typeof o=="number")if(o>=0)o<i.length&&i.splice(o);else{let d=Math.abs(o);d<i.length&&i.splice(0,i.length-d)}break}case"move":{let o=Uo(e,t.from);kc(e,{op:"remove",path:t.from}),i.splice(a,0,o);break}case"copy":{let o=Uo(e,t.from);i.splice(a,0,JSON.parse(JSON.stringify(o)));break}}}else switch(t.op){case"add":case"replace":i[n]=t.value;break;case"remove":delete i[n];break;case"limit":{let a=i[n];if(Array.isArray(a)){let o=t.value;if(typeof o=="number")if(o>=0)o<a.length&&a.splice(o);else{let d=Math.abs(o);d<a.length&&a.splice(0,a.length-d)}}break}case"move":{let a=Uo(e,t.from);kc(e,{op:"remove",path:t.from}),i[n]=a;break}case"copy":{let a=Uo(e,t.from);i[n]=JSON.parse(JSON.stringify(a));break}}return e}function Ov([e,t,r]){let i={op:e,path:t};return r!==void 0&&(e==="move"||e==="copy"?i.from=r:i.value=r),i}function zo(e,t){if(!t||t.length===0)return e;for(let r of t)r[0]!=="test"&&kc(e,Ov(r));return e}var Up=Symbol("__live_svelte__"),zp=Symbol("__live_svelte_connection__");function Vo(e,t){let r=e.el.getAttribute(t);return r?JSON.parse(r):{}}function Vp(e){let t={};for(let r in Vo(e,"data-slots")){let i=Vo(e,"data-slots")[r],n=document.createElement("div");n.innerHTML=eu(i).trim();let a=qs(o=>({render:()=>n.outerHTML}));r==="default"?t.children=a:t[r]=a}return t}function qp(e){return{...Vo(e,"data-props"),...Vp(e),live:e}}function Ec(e,t){let r=e.el.getAttribute(t);if(!r)return[];try{let i=JSON.parse(r);return Array.isArray(i)?i:[]}catch{return[]}}function Fv(e){let t=e.el.getAttribute("data-use-diff")==="true",r=e._instance?.
73state;if(t&&r){let i=Ec(e,"data-props-diff");if(i.length>0)zo(r,i);else{let a=Vo(e,"data-props");for(let o in a)a[o]===null?r[o]=void 0:r[o]=a[o]}let n=Vp(e);for(let a in n)r[a]=n[a];r.live=e}else if(r){let i=qp(e);for(let n in i)r[n]=i[n]}if(r){let i=Ec(e,"data-streams-diff");i.length>0&&zo(r,i)}}function Ac(e){return e=El(e),{SvelteHook:{mounted(){let r=Si(qp(this)),i=Si({connected:!0}),n=this.el.getAttribute("data-name");if(!n)throw new Error("Component name must be provided");let a=e[n];if(!a)throw new Error(`Unable to find ${n} component.`);let o=this.el.querySelector("[data-svelte-target]");this.el.hasAttribute("data-ssr")||(o.innerHTML="");let d=this.el.hasAttribute("data-ssr")?us:Fn;this._instance=d(a,{target:o,props:r,context:new Map([[Up,this],[zp,i]])}),this._instance.state=r,this._instance.connectionState=i;let p=Ec(this,"data-streams-diff");p.length>0&&zo(r,p)},updated(){Fv(this)},disconnected(){this._instance?.connectionState&&(this._instance.connectionState.connected=!1)},reconnected(){this._instance?.connectionState&&(this._instance.connectionState.connected=!0)},destroyed(){this._instance&&window.addEventListener("phx:page-loading-stop",()=>Ma(this._instance),{once:!0})}}}}typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var wP=k("<a><!></a>");var Yo={};At(Yo,{default:()=>cb,filenames:()=>db});var Mc={};At(Mc,{default:()=>Qp});Nu();var Tc="/image/upload/",Gp=e=>!!e&&e.includes("res.cloudinary.com")&&e.includes(Tc),Yp=e=>!!e&&e.includes("graphassets.com")&&!e.includes("/resize=");function Be(e,t){return Gp(e)?e.replace(Tc,`${Tc}f_auto,q_auto,w_${t}/`):Yp(e)?e.replace(/\/([^/]+)$/,`/auto_image/resize=width:${t}/$1`):e}function Ue(e,t){if(!(!Gp(e)&&!Yp(e)))return t.map(r=>`${Be(e,r)} ${r}w`).join(", ")}var Xp="bdt_currency",Jp="bdt_rates",Bv=720*60*1e3,Hv="https://open.er-api.com/v6/latest/USD",qo=[{code:"USD",label:"US Dollar",locale:"en-US"},{code:"EUR",label:"Euro",locale:"de-DE"},{code:"GBP",label:"British Pound",locale:"en-GB"},{code:"AUD",label:"Australian Dollar",locale:"en-US"},{code:"IDR",label:"Indonesian Rupiah",locale:"id-ID"}],Oa=qo.map(e=>e.code),jv=[["Australia/","AUD"],["Antarctica/Macquarie","AUD"],["Europe/London","GBP"],["Europe/Belfast","GBP"],["Europe/Guernsey","GBP"],["Europe/Isle_of_Man","GBP"],["Europe/Jersey","GBP"],["Asia/Jakarta","IDR"],["Asia/Pontianak","IDR"],["Asia/Makassar","IDR"],["Asia/Jayapura","IDR"]],Uv=new Set(["Europe/Amsterdam","Europe/Andorra","Europe/Athens","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Dublin","Europe/Helsinki","Europe/Lisbon","Europe/Ljubljana","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Monaco","Europe/Nicosia","Europe/Paris","Europe/Podgorica","Europe/Riga","Europe/Rome","Europe/San_Marino","Europe/Sarajevo","Europe/Tallinn","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Zagreb","Atlantic/Canary","Atlantic/Azores","Atlantic/Madeira"]);function zv(){if(typeof Intl>"u")return null;let e;try{e=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return null}if(!e)return null;if(Uv.has(e))return"EUR";for(let[t,r]of jv)if(e===t||e.startsWith(t))return r;return null}var Cc={USD:1,EUR:.92,GBP:.79,AUD:1.52,IDR:16300},jr=Ln("USD"),dn=Ln({...Cc});function Xr(e,t,r){if(e==null||e==="")return"";let i=Oa.includes(t)?t:"USD",n=r&&r[i];if(!n||i==="USD")return`$${e}`;let a=Number(e)*n,o=qo.find(d=>d.code===i);try{return new Intl.NumberFormat(o.locale,{style:"currency",currency:i,maximumFractionDigits:0,minimumFractionDigits:0}).format(a)}catch{return`$${e}`}}function Kp(e){let t=Oa.includes(e)?e:"USD";if(jr.set(t),typeof window<"u")try{window.localStorage.setItem(Xp,t)}catch{}}function Zp(){if(typeof window>"u")return;let e=null;try{e=window.localStorage.getItem(Xp)}catch{}if(e&&Oa.includes(e))jr.set(e);else{let t=zv();t&&Oa.includes(t)&&jr.set(t)}Vv()}function Vv(){try{let e=JSON.parse(window.localStorage.getItem(Jp)||"null");if(e&&e.fetchedAt&&Date.now()-e.fetchedAt<Bv){dn.set({...Cc,...e.rates});return}}catch{}fetch(Hv).then(e=>e.ok?e.json():Promise.reject(new Error("bad status"))).then(e=>{if(!e||!e.rates)return;let t={};for(let i of Oa)typeof e.rates[i]=="number"&&(t[i]=e.rates[i]);let r={...Cc,...t};dn.set(r);try{window.localStorage.setItem(Jp,JSON.stringify({fetchedAt:Date.now(),rates:t}))}catch{}}).catch(()=>{})}function st(e,t){if(!e)return"/contact-us";let r=t?`?text=${encodeURIComponent(t)}`:"";return`https://wa.me/${e}${r}`}function Ur(e){if(!e)return"";let t=String(e).replace(/\D/g,"");if(t.startsWith("62")&&t.length>=11){let r=t.slice(2);return`+62 ${r.slice(0,3)} ${r.slice(3,7)} ${r.slice(7)}`.trim()}return`+${t}`}var Kt=["M4 20l1.3-3.9A8 8 0 1 1 8.2 19z","M9 9.5c0 3 2.5 5.5 5.5 5.5"];var Rc={};At(Rc,{default:()=>Gs});var qv=Yt("<path></path>"),Wv=k('<a target="_blank" rel="noopener noreferrer" title="Message Bali Daily Tours on WhatsApp" class="flex items-start gap-4 roun
73ded-[18px] border border-line bg-card p-5 text-ink hover:text-ink hover:shadow-card lg:p-[22px]"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-sea-tint"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-whatsapp" aria-hidden="true"></svg></span> <span class="flex flex-col gap-1"><span class="text-[13px] font-bold uppercase tracking-[0.12em] text-muted">WhatsApp</span> <span class="text-lg font-bold"> </span> <span class="text-sm text-muted">Fastest way to reach us</span></span></a> <a title="Call Bali Daily Tours" class="flex items-start gap-4 rounded-[18px] border border-line bg-card p-5 text-ink hover:text-ink hover:shadow-card lg:p-[22px]"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-sun-tint"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-clay" aria-hidden="true"><path d="M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z"></path></svg></span> <span class="flex flex-col gap-1"><span class="text-[13px] font-bold uppercase tracking-[0.12em] text-muted">Phone</span> <span class="text-lg font-bold"> </span> <span class="text-sm text-muted">Call us</span></span></a>',1),Gv=k('<a target="_blank" rel="noopener noreferrer" title="Open our office address in Google Maps" class="flex items-start gap-4 roun
73ded-[18px] border border-line bg-card p-5 text-ink hover:text-ink hover:shadow-card sm:col-span-2 lg:col-span-1 lg:p-[22px]"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-sand"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-forest" aria-hidden="true"><path d="M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21zM12 12a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z"></path></svg></span> <span class="flex flex-col gap-1"><span class="text-[13px] font-bold uppercase tracking-[0.12em] text-muted">Office</span> <span class="text-base font-bold leading-snug lg:text-[17px]"> </span> <span class="text-sm text-muted">Open in Google Maps</span></span></a>'),Yv=k('<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3 lg:gap-4"><!> <!></div>');function Gs(e,t){Ie(t,!1);let r=H(),i=H(),n=null,a=G(t,"phone",8,null),o=G(t,"address",8,"");X(()=>(st,_(a())),()=>{D(r,st(a(),"Hi Bali Daily Tours! I have a question about your tours."))}),X(()=>_(o()),()=>{D(i,o()?`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(o())}`:null)}),nt();var d={live:n};je();var p=Yv(),h=c(p);{var $=g=>{var v=Wv(),y=Xe(v),E=c(y),P=c(E);Y(P,5,()=>Kt,ae,(C,M)=>{var J=qv();S(()=>x(J,"d",s(M))),w(C,J)}),l(P),l(E);var T=f(E,2),B=f(c(T),2),I=c(B,!0);l(B),Se(2),l(T),l(y);var L=f(y,2),O=f(c(L),2),ee=f(c(O),2),me=c(ee,!0);l(ee),Se(2),l(O),l(L),S((C,M)=>{x(y,"href",s(r)),A(I,C),x(L,"href",`tel:+${a()}`),A(me,M)},[()=>(_(Ur),_(a()),u(()=>Ur(a()))),()=>(_(Ur),_(a()),u(()=>Ur(a())))]),w(g,v)};N(h,g=>{a()&&g($)})}var b=f(h,2);{var m=g=>{var v=Gv(),y=f(c(v),2),E=f(c(y),2),P=c(E,!0);l(E),Se(2),l(y),l(v),S(()=>{x(v,"href",s(i)),A(P,o())}),w(g,v)};N(b,g=>{o()&&g(m)})}return l(p),w(e,p),Ke(t,"live",n),De(d)}var Jv=Yt("<path></path>"),Xv=k('<div class="h-[320px] overflow-hidden rounded-[20px] bg-line sm:h-[420px] lg:h-[560px] lg:rounded-3xl"><img sizes="(min-width: 1024px) 50vw, 100vw" alt="Green rice terraces in the Balinese countryside near Ubud" loading="eager" fetchpriority="high" decoding="async" class="size-full object-cover"/></div>'),Kv=k(`<section class="border-t border-line"><div class="u-container grid gap-6 py-12 lg:grid-cols-[5fr_7fr] lg:gap-18 lg:py-18"><div class="flex flex-col gap-2 lg:sticky lg:top-28 lg:gap-3 lg:self-start"><span class="u-eyebrow">In our own words</span> <h2 class="text-[30px] font-bold leading-[1.06] tracking-[-0.02em] lg:text-5xl">What a day with us is about</h2></div> <div class="prose prose-lg max-w-none text-ink-soft prose-headings:tracking-[-0.015em] prose-headings:text-ink
74                       prose-h2:text-[26px] prose-h3:text-[22px] prose-h4:text-xl prose-h4:font-bold prose-p:leading-[1.75] prose-a:text-clay prose-strong:text-ink"></div></div></section>`),Zv=k('<div class="flex gap-4 sm:flex-col sm:gap-3"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-paper/10 lg:size-12 lg:rounded-[14px]"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-gold" aria-hidden="true"><path></path></svg></span> <span class="flex flex-col gap-1 sm:gap-3"><span class="text-base font-bold lg:text-[19px]"> </span> <span class="text-sm leading-relaxed text-paper/78 lg:text-[15px]"> </span></span></div>'),Qv=k('<span class="text-sm text-muted"> </span>
74'),e$=k('<a class="flex items-center gap-4 rounded-[18px] border border-line bg-card p-4 text-ink hover:text-ink hover:shadow-card lg:p-5"><span class="grid size-12 shrink-0 place-items-center rounded-[14px] bg-sand lg:size-13"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-forest" aria-hidden="true"><path></path></svg></span> <span class="flex min-w-0 grow flex-col gap-0.5"><span class="text-base font-bold lg:text-[17px]"> </span> <!></span> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-muted" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a>'),t$=k('<section class="u-container flex flex-col gap-5 pb-12 pt-12 lg:gap-7 lg:pb-14 lg:pt-20"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">What you can book with us</h2> <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4 lg:gap-4"></div></section>'),r$=k(`<div class="u-container pt-5 lg:pt-7"><nav aria-label="Breadcrumb" class="flex gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <span aria-current="page" class="font-semibold text-ink">About us</span></nav></div> <section class="u-container grid items-center gap-8 pb-12 pt-6 lg:grid-cols-2 lg:gap-18 lg:pb-20 lg:pt-8"><div class="flex flex-col gap-4 lg:gap-6"><span class="u-eyebrow">About Bali Daily Tours</span> <h1 class="u-h1">A small local team showing you our Bali</h1> <p class="text-[17px] leading-[1.65] text-ink-soft lg:text-[19px]">We run private day tours, airport and fast-boat transfers and water sports across the island. You get your own car and a
75            licensed, insured local driver, one clear price per car or per person, and no hidden fees on the day.</p> <p class="text-base leading-[1.65] text-ink-soft lg:text-[17px]">Book online or just message us on WhatsApp \u2014 a real person on our team replies and helps shape the day around what you want to see.</p> <div class="mt-2 flex flex-col gap-2.5 sm:flex-row sm:gap-3"><a target="_blank" rel="noopener noreferrer" title="Message Bali Daily Tours on WhatsApp" class="u-btn"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Chat with our team</a> <a href="/tours" title="Browse all day tours in Bali" class="u-btn-ghost">See our tours</a></div></div> <!></section> <!> <div class="px-3 lg:u-container"><section class="my-4 flex flex-col gap-8 rounded-3xl bg-forest px-6 py-9 text-paper lg:gap-12 lg:rounded-[28px] lg:px-18 lg:py-16"><div class="flex max-w-[720px] flex-col gap-3 lg:gap-3.5"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">How we work</span> <h2 class="text-[30px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[44px] lg:leading-[1.08]">Four things we keep simple</h2></div> <div class="grid gap-7 sm:grid-cols-2 lg:grid-cols-4 lg:gap-10"></div></section></div> <!> <section id="contact" class="border-t border-line"><div class="u-container flex flex-col gap-6 pb-16 pt-12 lg:gap-10 lg:pb-24 lg:pt-20"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Contact</span> <h2 class="u-h2">Talk to our team</h2></div> <!></div></section>`,1);function Qp(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",n),i=()=>br(dn,"$rates",n),[n,a]=Zr(),o=H(),d=H(),p=H(),h=H(),$=null,b=G(t,"about",8,""),m=G(t,"address",8,""),g=G(t,"phone",8,null),v=G(t,"categories",24,()=>[]),y=G(t,"hero_image",8,null),E=[{title:"Local experts",body:"Balinese guides who share the stories and hidden corners behind every stop.",icon:"M16 20v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 18.5V20M10 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM20 20v-1.5a3.5 3.5 0 0 0-2.5-3.3M15.5 4.2a3.5 3.5 0 0 1 0 6.6"},{title:"Honest pricing",body:"One clear price per car or per person. No hidden fees on the day.",icon:"M3 12V4h8l10 10-8 8zM7.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"},{title:"Safe & licensed",body:"Licensed, insured drivers and well-kept air-conditioned cars.",icon:"M12 21s8-3.5 8-10V5l-8-3-8 3v6c0 6.5 8 10 8 10zM9 12l2 2 4-4"},{title:"Flexible booking",body:"Book online or on WhatsApp, with flexible cancellation.",icon:"M4 6h16v14H4zM4 10h16M8 3v4M16 3v4"}],P={tours:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM15.5 8.5l-2 5-5 2 2-5z",transfers:"M5 16V11l2-5h10l2 5v5M3 16h18M7 19v-3M17 19v-3M7 12h.01M17 12h.01","water-sports":"M2 12c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2M2 17c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2","bali-safari-and-marine-park":"M5 19c0-8 5-13 14-14 0 9-5 14-13 14zM5 19l7-7"},T=Z=>v().find(we=>we.slug===Z),B=(Z,we,re)=>Z&&Z.from_price!=null?`From ${Xr(Z.from_price,we,re)}`:"";X(()=>{},()=>{D(o,T("bali-airport-transfers"))}),X(()=>{},()=>{D(d,T("bali-sea-transfers"))}),X(()=>(r(),i(),s(o),s(d),Xr),()=>{D(p,[T("tours")&&{key:"tours",name:"Day tours",href:T("tours").href,tip:"Browse Bali day tours",sub:B(T("tours"),r(),i())},(s(o)||s(d))&&{key:"transfers",name:"Transfers",href:"/transfers",tip:"Browse airport and fast-boat transfers",sub:[s(o)&&s(o).from_price!=null?`Airport from ${Xr(s(o).from_price,r(),i())}`:"",s(d)&&s(d).from_price!=null?`boats from ${Xr(s(d).from_price,r(),i())}
75`:""].filter(Boolean).join(" \xB7 ")},T("water-sports")&&{key:"water-sports",name:"Water sports",href:T("water-sports").href,tip:"Browse Bali water sports",sub:B(T("water-sports"),r(),i())},T("bali-safari-and-marine-park")&&{key:"bali-safari-and-marine-park",name:"Safari & Marine",href:T("bali-safari-and-marine-park").href,tip:"Browse Bali Safari and Marine Park tours",sub:B(T("bali-safari-and-marine-park"),r(),i())}].filter(Boolean))}),X(()=>(st,_(g())),()=>{D(h,st(g(),"Hi Bali Daily Tours! I have a question about your tours."))}),nt();var I={live:$};je();var L=r$(),O=f(Xe(L),2),ee=c(O),me=f(c(ee),8),C=c(me),M=c(C);Y(M,5,()=>Kt,ae,(Z,we)=>{var re=Jv();S(()=>x(re,"d",s(we))),w(Z,re)}),l(M),Se(),l(C),Se(2),l(me),l(ee);var J=f(ee,2);{var fe=Z=>{var we=Xv(),re=c(we);l(we),S((U,ce)=>{x(re,"src",U),x(re,"srcset",ce)},[()=>(_(Be),_(y()),u(()=>Be(y(),1280))),()=>(_(Ue),_(y()),u(()=>Ue(y(),[640,960,1280])))]),w(Z,we)};N(J,Z=>{y()&&Z(fe)})}l(O);var ue=f(O,2);{var $e=Z=>{var we=Kv(),re=c(we),U=f(c(re),2);wn(U,b,!0),l(U),l(re),l(we),w(Z,we)};N(ue,Z=>{b()&&Z($e)})}var W=f(ue,2),le=c(W),de=f(c(le),2);Y(de,5,()=>E,ae,(Z,we)=>{var re=Zv(),U=c(re),ce=c(U),ge=c(ce);l(ce),l(U);var Fe=f(U,2),xe=c(Fe),be=c(xe,!0);l(xe);var Ge=f(xe,2),ze=c(Ge,!0);l(Ge),l(Fe),l(re),S(()=>{x(ge,"d",(s(we),u(()=>s(we).icon))),A(be,(s(we),u(()=>s(we).title))),A(ze,(s(we),u(()=>s(we).body)))}),w(Z,re)}),l(de),l(le),l(W);var te=f(W,2);{var Le=Z=>{var we=t$(),re=f(c(we),2);Y(re,5,()=>s(p),U=>U.key,(U,ce)=>{var ge=e$(),Fe=c(ge),xe=c(Fe),be=c(xe);l(xe),l(Fe);var Ge=f(Fe,2),ze=c(Ge),Ve=c(ze,!0);l(ze);var at=f(ze,2);{var dt=ut=>{var xt=Qv(),Ot=c(xt,!0);l(xt),S(()=>A(Ot,(s(ce),u(()=>s(ce).sub)))),w(ut,xt)};N(at,ut=>{s(ce),u(()=>s(ce).sub)&&ut(dt)})}l(Ge),Se(2),l(ge),S(()=>{x(ge,"href",(s(ce),u(()=>s(ce).href))),x(ge,"title",(s(ce),u(()=>s(ce).tip))),x(be,"d",(s(ce),u(()=>P[s(ce).key]||P.tours))),A(Ve,(s(ce),u(()=>s(ce).name)))}),w(U,ge)}),l(re),l(we),w(Z,we)};N(te,Z=>{s(p),u(()=>s(p).length)&&Z(Le)})}var F=f(te,2),V=c(F),oe=f(c(V),2);Gs(oe,{get phone(){return g()},get address(){return m()}}),l(V),l(F),S(()=>x(C,"href",s(h))),w(e,L),Ke(t,"live",$);var se=De(I);return a(),se}var Ic={};At(Ic,{default:()=>ef});var Lc={};At(Lc,{default:()=>Hn});var Pc={};At(Pc,{default:()=>Er});var i$=k("<span>From</span>"),n$=k("<span> </span>"),s$=k('<span class="flex items-baseline gap-1.5"><!> <data> </data> <!></span>');function Er(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",n),i=()=>br(dn,"$rates",n),[n,a]=Zr(),o=H(),d=H(),p=null,h=G(t,"price",8),$=G(t,"price_type",8,null),b=G(t,"size",8,"md"),m=G(t,"show_from",8,!0),g={sm:{from:"text-[13px]",amount:"text-base",unit:"text-[13px]"},md:{from:"text-sm",amount:"text-lg lg:text-xl",unit:"text-sm"},lg:{from:"text-[15px]",amount:"text-[26px] lg:text-[44px] tracking-[-0.02em]",unit:"text-[13px] lg:text-[15px]"}};X(()=>_(b()),()=>{D(o,g[b()]||g.md)}),X(()=>_($()),()=>{D(d,$()?`/ ${String($()).toLowerCase()}`:"")}),nt();var v={live:p};je();var y=On(),E=Xe(y);{var P=B=>{var I=s$(),L=c(I);{var O=J=>{var fe=i$();S(()=>Ze(fe,1,`${s(o),u(()=>s(o).from)??""} text-muted`)),w(J,fe)};N(L,J=>{m()&&J(O)})}var ee=f(L,2),me=c(ee,!0);l(ee);var C=f(ee,2);{var M=J=>{var fe=n$(),ue=c(fe,!0);l(fe),S(()=>{Ze(fe,1,`${s(o),u(()=>s(o).unit)??""} whitespace-nowrap text-muted`),A(ue,s(d))}),w(J,fe)};N(C,J=>{s(d)&&J(M)})}l(I),S(J=>{$c(ee,h()),Ze(ee,1,`${s(o),u(()=>s(o).amount)??""} font-bold text-ink`),A(me,J)},[()=>(_(Xr),_(h()),r(),i(),u(()=>Xr(h(),r(),i())))]),w(B,I)};N(E,B=>{h()!==null&&h()!==void 0&&h()!==""&&B(P)})}w(e,y),Ke(t,"live",p);var T=De(v);return a(),T}var a$=k('<img loading="lazy" decoding="async" class="size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),o$=k('<span class="text-[13px] font-semibold text-muted"> </span>'),l$=k('<article class="flex flex-col gap-3 lg:gap-4"><a tabindex="-1" aria-hidden="true"><!></a> <div class="flex flex-col gap-2"><!> <a class="text-[21px] font-bold leading-tight text-ink hover:text-clay lg:text-2xl"> </a> <div class="mt-1"><!></div></div></article>');function Hn(e,t){Ie(t,!1);let r=H(),i=H(),n=null,a=G(t,"tour",8),o=G(t,"aspect",8,"aspect-[4/5]"),d=G(t,"sizes",8,"(min-width: 1024px) 25vw, 272px");X(()=>_(a()),()=>{D(r,a().price_type==="Car"?"Private car":a().price_type==="Person"?"Per person":null)}),X(()=>(_(a()),s(r)),()=>
75{D(i,[a().category,s(r)].filter(Boolean).join(" \xB7 "))}),nt();var p={live:n};je();var h=l$(),$=c(h),b=c($);{var m=I=>{var L=a$();S((O,ee)=>{x(L,"src",O),x(L,"srcset",ee),x(L,"sizes",d()),x(L,"alt",(_(a()),u(()=>`${a().title} \u2014 Bali day trip photo`)))},[()=>(_(Be),_(a()),u(()=>Be(a().image,640))),()=>(_(Ue),_(a()),u(()=>Ue(a().image,[320,640,960])))]),w(I,L)};N(b,I=>{_(a()),u(()=>a().image)&&I(m)})}l($);var g=f($,2),v=c(g);{var y=I=>{var L=o$(),O=c(L,!0);l(L),S(()=>A(O,s(i))),w(I,L)};N(v,I=>{s(i)&&I(y)})}var E=f(v,2),P=c(E,!0);l(E);var T=f(E,2),B=c(T);return Er(B,{get price(){return _(a()),u(()=>a().price)},get price_type(){return _(a()),u(()=>a().price_type)}}),l(T),l(g),l(h),S(()=>{x($,"href",(_(a()),u(()=>a().href))),x($,"title",(_(a()),u(()=>`See the ${a().title} itinerary and price`))),Ze($,1,`group relative block overflow-hidden rounded-[18px] bg-line ${o()??""}`),x(E,"href",(_(a()),u(()=>a().href))),x(E,"title",(_(a()),u(()=>`See the ${a().title} itinerary and price`))),A(P,(_(a()),u(()=>a().title)))}),w(e,h),Ke(t,"live",n),De(p)}var c$=k("\xB7 Updated <time> </time>",1),d$=k("<span>Published <time> </time><!></span>"),u$=k("<span> </span>"),p$=k('<p class="flex flex-wrap gap-x-2 text-sm font-semibold text-muted lg:text-[15px]"><!> <!></p>'),f$=k('<figure class="u-container"><img sizes="(min-width: 1280px) 1280px, 100vw" width="1280" height="640" loading="eager" fetchpriority="high" decoding="async" class="aspect-[3/2] w-full rounded-[18px] object-cover sm:aspect-[2/1] lg:rounded-3xl"/></figure>'),h$=k('<div class="w-[272px] shrink-0 lg:w-auto"><!></div>'),g$=k('<section class="border-t border-line py-12 lg:py-18" aria-labelledby="related-tours-heading"><div class="u-container flex flex-col gap-6 lg:gap-10"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Read it, then go</span> <h2 id="related-tours-heading" class="text-[30px] font-bold leading-[1.06] tracking-[-0.02em] lg:text-[44px]">Tours that bring this guide to life</h2></div> <div class="u-edge-row -mx-4 flex gap-3.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:grid-cols-4 lg:gap-7 lg:overflow-visible lg:px-0"></div></div></section>'),v$=k('<img sizes="(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw" loading="lazy" decoding="async" class="size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),$$=k('<span class="text-[13px] font-semibold text-muted"> </span>'),_$=k('<article class="flex flex-col gap-3 lg:gap-3.5"><a tabindex="-1" aria-hidden="true" class="group block aspect-[3/2] overflow-hidden rounded-2xl bg-line lg:rounded-[18px]"><!></a> <h3 class="text-xl font-bold leading-tight lg:text-[23px] lg:leading-[1.25]"><a class="text-ink hover:text-clay"> </a></h3> <!></article>'),m$=k('<section class="py-12 lg:py-20"><div class="u-container flex flex-col gap-6 lg:gap-10"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Keep reading</span> <h2 class="text-[30px] font-bold leading-[1.06] tracking-[-0.02em] lg:text-[44px]">More from the journal</h2></div> <a href="/blogs" title="Read every article in the Bali journal" class="shrink-0 py-3 text-sm font-bold text-ink underline underline-offset-4 hover:text-clay lg:border-b-[1.5px] lg:border-ink lg:py-0 lg:pb-1 lg:text-base lg:no-underline">All articles</a></div> <div class="grid gap-10 sm:grid-cols-2 lg:grid-cols-3 lg:gap-7"></div></div></section>'),x$=k(`<article><header class="u-container flex flex-col gap-4 pb-6 pt-5 lg:gap-5 lg:pb-9 lg:pt-7"><nav aria-label="Breadcrumb" class="flex min-w-0 gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="shrink-0 text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <a href="/blogs" title="Back to the Bali travel journal" class="shrink-0 text-muted hover:text-ink">Journal</a> <span aria-hidden="true">/</span> <span aria-current="page" class="truncate font-semibold text-ink"> </span></nav> <h1 class="max-w-[960px] text-[34px] font-bold leading-[1.06] tracking-[-0.025em] lg:text-[56px] lg:leading-[1.02]"> </h1> <!></header> <!> <div class="u-container pb-12 pt-8 lg:pb-18 lg:pt-14"><div class="prose prose-lg mx-auto max-w-[720px] text-ink-soft
76             prose-headings:tracking-[-0.015em] prose-headings:text-ink prose-h2:text-[28px] lg:prose-h2:text-[34px]
77             prose-p:leading-[1.75] prose-a:font-semibold prose-a:text-clay hover:prose-a:text-clay-dark
78             prose-strong:text-ink prose-li:marker:text-clay prose-blockquote:border-l-clay prose-blockquote:text-ink
79             prose-img:rounded-[18px]"></div></div></article> <!> <div class="px-3 lg:u-container"><section class="my-6 flex flex-col gap-5 rounded-3xl bg-forest px-6 py-9 text-paper lg:my-10 lg:flex-row lg:items-center lg:justify-between lg:gap-12 lg:rounded-[28px] lg:px-18 lg:py-16"><div class="flex max-w-[640px] flex-col gap-3 lg:gap-4"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">Plan your day</span> <h2 class="text-[30px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[44px]">Turn these tips into a day out.</h2> <p class="text-[15px] leading-relaxed text-paper/80 lg:text-[17px]">Private car, a local driver and one clear price per car or per person.</p></div> <a href="/tours" title="Browse all day tours in Bali" class="u-btn shrink-0">Browse day tours <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></section></div> <!>`,1);function ef(e,t){Ie(t,!1);let r=null,i=G(t,"selected_blog",8),n=G(t,"blogs",24,()=>[]),a=G(t,"related_tours",24,()=>[]),o=M=>[M.date_label,M.minutes?`${M.minutes}
79 min read`:""].filter(Boolean).join(" \xB7 ");var d={live:r};je();var p=x$(),h=Xe(p),$=c(h),b=c($),m=f(c(b),8),g=c(m,!0);l(m),l(b);var v=f(b,2),y=c(v,!0);l(v);var E=f(v,2);{var P=M=>{var J=p$(),fe=c(J);{var ue=le=>{var de=d$(),te=f(c(de)),Le=c(te,!0);l(te);var F=f(te);{var V=oe=>{var se=c$(),Z=f(Xe(se)),we=c(Z,!0);l(Z),S(()=>{x(Z,"datetime",(_(i()),u(()=>i().updated_at))),A(we,(_(i()),u(()=>i().updated_label)))}),w(oe,se)};N(F,oe=>{_(i()),u(()=>i().updated_label)&&oe(V)})}l(de),S(()=>{x(te,"datetime",(_(i()),u(()=>i().published_at))),A(Le,(_(i()),u(()=>i().published_label)))}),w(le,de)};N(fe,le=>{_(i()),u(()=>i().published_label)&&le(ue)})}var $e=f(fe,2);{var W=le=>{var de=u$(),te=c(de);l(de),S(()=>A(te,`${_(i()),u(()=>i().published_label?"\xB7 ":"")??""}${_(i()),u(()=>i().minutes)??""} min read`)),w(le,de)};N($e,le=>{_(i()),u(()=>i().minutes)&&le(W)})}l(J),w(M,J)};N(E,M=>{_(i()),u(()=>i().published_label||i().minutes)&&M(P)})}l($);var T=f($,2);{var B=M=>{var J=f$(),fe=c(J);l(J),S((ue,$e)=>{x(fe,"src",ue),x(fe,"srcset",$e),x(fe,"alt",(_(i()),u(()=>`${i().title} \u2014 cover photo`)))},[()=>(_(Be),_(i()),u(()=>Be(i().image_url,1280))),()=>(_(Ue),_(i()),u(()=>Ue(i().image_url,[640,1280,1920])))]),w(M,J)};N(T,M=>{_(i()),u(()=>i().image_url)&&M(B)})}var I=f(T,2),L=c(I);wn(L,()=>(_(i()),u(()=>i().content)),!0),l(L),l(I),l(h);var O=f(h,2);{var ee=M=>{var J=g$(),fe=c(J),ue=f(c(fe),2);Y(ue,5,a,$e=>$e.id,($e,W)=>{var le=h$(),de=c(le);Hn(de,{get tour(){return s(W)},aspect:"aspect-[4/3]"}),l(le),w($e,le)}),l(ue),l(fe),l(J),w(M,J)};N(O,M=>{_(a()),u(()=>a()&&a().length>0)&&M(ee)})}var me=f(O,4);{var C=M=>{var J=m$(),fe=c(J),ue=f(c(fe),2);Y(ue,5,()=>(_(n()),u(()=>n().slice(0,3))),$e=>$e.id,($e,W)=>{var le=_$(),de=c(le),te=c(de);{var Le=re=>{var U=v$();S((ce,ge)=>{x(U,"src",ce),x(U,"srcset",ge),x(U,"alt",(s(W),u(()=>`${s(W).title} \u2014 cover photo`)))},[()=>(_(Be),s(W),u(()=>Be(s(W).img_url,640))),()=>(_(Ue),s(W),u(()=>Ue(s(W).img_url,[320,640,960])))]),w(re,U)};N(te,re=>{s(W),u(()=>s(W).img_url)&&re(Le)})}l(de);var F=f(de,2),V=c(F),oe=c(V,!0);l(V),l(F);var se=f(F,2);{var Z=re=>{var U=$$(),ce=c(U,!0);l(U),S(ge=>A(ce,ge),[()=>(s(W),u(()=>o(s(W))))]),w(re,U)},we=Ui(()=>(s(W),u(()=>o(s(W)))));N(se,re=>{s(we)&&re(Z)})}l(le),S(()=>{x(de,"href",(s(W),u(()=>`/blogs/${s(W).slug}`))),x(de,"title",(s(W),u(()=>`Read ${s(W).title}`))),x(V,"href",(s(W),u(()=>`/blogs/${s(W).slug}`))),x(V,"title",(s(W),u(()=>`Read ${s(W).title}`))),A(oe,(s(W),u(()=>s(W).title)))}),w($e,le)}),l(ue),l(fe),l(J),w(M,J)};N(me,M=>{_(n()),u(()=>n()&&n().length>0)&&M(C)})}return S(()=>{A(g,(_(i()),u(()=>i().title))),A(y,(_(i()),u(()=>i().title)))}),w(e,p),Ke(t,"live",r),De(d)}var Dc={};At(Dc,{default:()=>tf});var b$=k('<img sizes="(min-width: 1024px) 58vw, 100vw" loading="eager" fetchpriority="high" decoding="async" class="absolute inset-0 size-full object-cover"/>'),w$=k('<p class="text-[15px] leading-relaxed text-ink-soft lg:text-[17px] lg:leading-[1.65]"> </p>'),y$=k("<time> </time>"),k$=k('<span class="text-[13px] font-semibold text-muted lg:text-sm"><!> </span>'),E$=k('<section class="u-container pb-12 lg:pb-18"><article class="grid overflow-hidden rounded-[20px] border border-line bg-card shadow-[0_24px_60px_-34px_rgba(28,33,28,0.3)] lg:grid-cols-[7fr_5fr] lg:rounded-3xl"><a tabindex="-1" aria-hidden="true" class="relative block aspect-[3/2] overflow-hidden lg:aspect-auto lg:min-h-[480px]"><!>
79 <span class="absolute left-4 top-4 rounded-full bg-card/95 px-3.5 py-[7px] text-xs font-bold text-forest lg:left-5 lg:top-5">Latest</span></a> <div class="flex flex-col justify-center gap-3.5 p-6 lg:gap-[18px] lg:px-[52px] lg:py-12"><h2 class="text-[26px] font-bold leading-[1.12] tracking-[-0.02em] lg:text-[38px] lg:leading-[1.1]"><a class="text-ink hover:text-clay"> </a></h2> <!> <!> <a class="u-btn mt-2 self-start">Read article <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></div></article></section>'),A$=k('<img sizes="(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw" loading="lazy" decoding="async" class="size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),S$=k('<p class="u-clamp-3 text-[15px] leading-relaxed text-ink-soft"> </p>'),T$=k('<span class="text-[13px] font-semibold text-muted"> </span>'),C$=k('<article class="flex flex-col gap-3 lg:gap-3.5"><a tabindex="-1" aria-hidden="true" class="group block aspect-[3/2] overflow-hidden rounded-2xl bg-line lg:rounded-[18px]"><!></a> <h3 class="text-xl font-bold leading-tight tracking-[-0.01em] lg:text-[23px] lg:leading-[1.25]"><a class="text-ink hover:text-clay"> </a></h3> <!> <!></article>'),R$=k('<div class="grid gap-10 sm:grid-cols-2 lg:grid-cols-3 lg:gap-x-7 lg:gap-y-12"></div>'),M$=k('<p class="rounded-[18px] border border-line bg-card p-6 text-[15px] text-ink-soft"> </p>'),P$=k('<img sizes="112px" loading="lazy" decoding="async" class="size-full object-cover"/>
79'),L$=k('<a class="flex items-center gap-4 rounded-[18px] border border-line bg-card p-3 text-ink hover:text-ink hover:shadow-card lg:p-3.5"><span class="size-24 shrink-0 overflow-hidden rounded-[14px] bg-line lg:size-28"><!></span> <span class="flex min-w-0 grow flex-col gap-1.5"><span class="text-[13px] font-semibold text-muted"> </span> <span class="text-[17px] font-bold leading-[1.22] lg:text-[19px]"> </span> <!></span></a>'),I$=k('<div class="px-3 lg:u-container"><section class="mb-12 mt-2 flex flex-col gap-6 rounded-3xl bg-sand px-5 py-8 lg:mb-22 lg:mt-4 lg:gap-7 lg:px-12 lg:py-11"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-2"><span class="u-eyebrow">Read it, then go</span> <h2 class="text-[26px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[34px]">Our signature day tours</h2></div> <a href="/tours" title="See every Bali day tour we run" class="hidden shrink-0 items-center gap-2 border-b-[1.5px] border-ink pb-1 text-[15px] font-bold text-ink hover:text-clay sm:flex">All day tours <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></div> <div class="grid gap-3 lg:grid-cols-3 lg:gap-5"></div> <a href="/tours" title="See every Bali day tour we run" class="u-btn-ghost sm:hidden">All day tours</a></section></div>'),D$=k('<section class="u-container flex flex-col gap-4 pb-8 pt-5 lg:gap-[18px] lg:pb-10 lg:pt-7"><nav aria-label="Breadcrumb" class="flex gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <span aria-current="page" class="font-semibold text-ink">Journal</span></nav> <div class="flex flex-col gap-3"><h1 class="u-h1">Bali travel journal</h1> <p class="text-base leading-normal text-ink-soft lg:text-[19px]">Local tips, guides and stories from our team</p></div> <label class="relative mt-1 flex items-center lg:mt-3.5 lg:max-w-[340px]"><span class="sr-only">Search the journal</span> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="pointer-events-none absolute left-[18px] text-muted" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-3.5-3.5"></path></svg> <input type="search" placeholder="Search articles and guides" class="h-12 w-full rounded-full border border-line-strong bg-white pl-[46px] pr-[18px] text-[15px] font-medium text-ink placeholder:text-muted"/></label></section> <!> <section class="u-container flex flex-col gap-6 pb-12 lg:gap-8 lg:pb-14"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-2 lg:gap-2.5"><span class="u-eyebrow"> </span> <h2 class="text-[28px] font-bold leading-[1.05] tracking-[-0.02em] lg:text-[40px]">Guides, tips and stories</h2></div> <span class="shrink-0 text-sm font-semibold text-muted lg:text-[15px]" aria-l
79ive="polite"> </span></div> <!></section> <!>',1);function tf(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=H(),o=H(),d=null,p=G(t,"blogs",24,()=>[]),h=G(t,"tours",24,()=>[]),$=H(""),b=W=>[W.date_label,W.minutes?`${W.minutes} min read`:""].filter(Boolean).join(" \xB7 ");X(()=>s($),()=>{D(r,s($).trim().toLowerCase())}),X(()=>(s(r),_(p())),()=>{D(i,s(r)?p().filter(W=>`${W.title} ${W.excerpt}`.toLowerCase().includes(s(r))):p())}),X(()=>(s(r),_(p())),()=>{D(n,s(r)?null:p()[0])}),X(()=>(s(r),s(i),_(p())),()=>{D(a,s(r)?s(i):p().slice(1))}),X(()=>s(a),()=>{D(o,`${s(a).length} ${s(a).length===1?"article":"articles"}`)}),nt();var m={live:d};je();var g=D$(),v=Xe(g),y=f(c(v),4),E=f(c(y),4);Ci(E),l(y),l(v);var P=f(v,2);{var T=W=>{var le=E$(),de=c(le),te=c(de),Le=c(te);{var F=xe=>{var be=b$();S((Ge,ze)=>{x(be,"src",Ge),x(be,"srcset",ze),x(be,"alt",(s(n),u(()=>`${s(n).title} \u2014 cover photo`)))},[()=>(_(Be),s(n),u(()=>Be(s(n).img_url,1280))),()=>(_(Ue),s(n),u(()=>Ue(s(n).img_url,[640,960,1280])))]),w(xe,be)};N(Le,xe=>{s(n),u(()=>s(n).img_url)&&xe(F)})}Se(2),l(te);var V=f(te,2),oe=c(V),se=c(oe),Z=c(se,!0);l(se),l(oe);var we=f(oe,2);{var re=xe=>{var be=w$(),Ge=c(be,!0);l(be),S(()=>A(Ge,(s(n),u(()=>s(n).excerpt)))),w(xe,be)};N(we,xe=>{s(n),u(()=>s(n).excerpt)&&xe(re)})}var U=f(we,2);{var ce=xe=>{var be=k$(),Ge=c(be);{var ze=dt=>{var ut=y$(),xt=c(ut,!0);l(ut),S(()=>{x(ut,"datetime",(s(n),u(()=>s(n).published_at))),A(xt,(s(n),u(()=>s(n).date_label)))}),w(dt,ut)},Ve=dt=>{var ut=di();S(()=>A(ut,(s(n),u(()=>s(n).date_label)))),w(dt,ut)};N(Ge,dt=>{s(n),u(()=>s(n).published_at)?dt(ze):dt(Ve,-1)})}var at=f(Ge,1,!0);l(be),S(()=>A(at,(s(n),u(()=>s(n).minutes?`${s(n).date_label?" \xB7 ":""}${s(n).minutes} min read`:"")))),w(xe,be)},ge=Ui(()=>(s(n),u(()=>b(s(n)))));N(U,xe=>{s(ge)&&xe(ce)})}var Fe=f(U,2);l(V),l(de),l(le),S(()=>{x(te,"href",(s(n),u(()=>`/blogs/${s(n).slug}`))),x(te,"title",(s(n),u(()=>`Read ${s(n).title}`))),x(se,"href",(s(n),u(()=>`/blogs/${s(n).slug}`))),x(se,"title",(s(n),u(()=>`Read ${s(n).title}`))),A(Z,(s(n),u(()=>s(n).title))),x(Fe,"href",(s(n),u(()=>`/blogs/${s(n).slug}`))),x(Fe,"title",(s(n),u(()=>`Read ${s(n).title}`)))}),w(W,le)};N(P,W=>{s(n)&&W(T)})}var B=f(P,2),I=c(B),L=c(I),O=c(L),ee=c(O,!0);l(O),Se(2),l(L);var me=f(L,2),C=c(me,!0);l(me),l(I);var M=f(I,2);{var J=W=>{var le=R$();Y(le,5,()=>s(a),de=>de.id,(de,te)=>{var Le=C$(),F=c(Le),V=c(F);{var oe=xe=>{var be=A$();S((Ge,ze)=>{x(be,"src",Ge),x(be,"srcset",ze),x(be,"alt",(s(te),u(()=>`${s(te).title} \u2014 cover photo`)))},[()=>(_(Be),s(te),u(()=>Be(s(te).img_url,640))),()=>(_(Ue),s(te),u(()=>Ue(s(te).img_url,[320,640,960])))]),w(xe,be)};N(V,xe=>{s(te),u(()=>s(te).img_url)&&xe(oe)})}l(F);var se=f(F,2),Z=c(se),we=c(Z,!0);l(Z),l(se);var re=f(se,2);{var U=xe=>{var be=S$(),Ge=c(be,!0);l(be),S(()=>A(Ge,(s(te),u(()=>s(te).excerpt)))),w(xe,be)};N(re,xe=>{s(te),u(()=>s(te).excerpt)&&xe(U)})}var ce=f(re,2);{var ge=xe=>{var be=T$(),Ge=c(be,!0);l(be),S(ze=>A(Ge,ze),[()=>(s(te),u(()=>b(s(te))))]),w(xe,be)},Fe=Ui(()=>(s(te),u(()=>b(s(te)))));N(ce,xe=>{s(Fe)&&xe(ge)})}l(Le),S(()=>{x(F,"href",(s(te),u(()=>`/blogs/${s(te).slug}`))),x(F,"title",(s(te),u(()=>`Read ${s(te).title}`))),x(Z,"href",(s(te),u(()=>`/blogs/${s(te).slug}`))),x(Z,"title",(s(te),u(()=>`Read ${s(te).title}`))),A(we,(s(te),u(()=>s(te).title)))}),w(de,Le)}),l(le),w(W,le)},fe=W=>{var le=M$(),de=c(le);l(le),S(te=>A(de,`No articles match \u201C${te??""}\u201D. Try a place name like Ubud, or a word like temple or market.`),[()=>(s($),u(()=>s($).trim()))]),w(W,le)};N(M,W=>{s(a),u(()=>s(a).length)?W(J):W(fe,-1)})}l(B);var ue=f(B,2);{var $e=W=>{var le=I$(),de=c(le),te=f(c(de),2);Y(te,5,h,Le=>Le.id,(Le,F)=>{var V=L$(),oe=c(V),se=c(oe);{var Z=xe=>{var be=P$();S((Ge,ze)=>{x(be,"src",Ge),x(be,"srcset",ze),x(be,"alt",(s(F),u(()=>`${s(F).title} \u2014 Bali day trip photo`)))},[()=>(_(Be),s(F),u(()=>Be(s(F).image,320))),()=>(_(Ue),s(F),u(()=>Ue(s(F).image,[160,320])))]),w(xe,be)};N(se,xe=>{s(F),u(()=>s(F).image)&&xe(Z)})}l(oe);var we=f(oe,2),re=c(we),U=c(re,!0);l(re);var ce=f(re,2),ge=c(ce,!0);l(ce);var Fe=f(ce,2);Er(Fe,{get price(){return s(F),u(()=>s(F).price)},get price_type(){return s(F),u(()=>s(F).price_type)},size:"sm"}),l(we),l(V),S(xe=>{x(V,"href",(s(F),u(()=>s(F).href))),x(V,"title",(s(F),u(()=>`See the ${s(F).title} itinerary and price`))),A(U,xe),A(ge,(s(F),u(()=>s(F).title)))},[()=>(s(F),u(()=>[s(F).category,s(F).price_type==="Car"?"Private car":s(F).price_type==="Person"?"Per person":null].filter(
79Boolean).join(" \xB7 ")))]),w(Le,V)}),l(te),Se(2),l(de),l(le),w(W,le)};N(ue,W=>{_(h()),u(()=>h().length)&&W($e)})}return S(()=>{A(ee,s(r)?"Search results":"More articles"),A(C,s(o))}),Ri(E,()=>s($),W=>D($,W)),w(e,g),Ke(t,"live",d),De(m)}var Oc={};At(Oc,{default:()=>rf});var O$=k('<section class="u-container flex flex-col gap-5 pb-12 lg:gap-8 lg:pb-18"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Find us</span> <h2 class="text-[30px] font-bold leading-[1.06] tracking-[-0.02em] lg:text-[44px]">Our office in Kuta</h2></div> <div class="overflow-hidden rounded-[20px] border border-line bg-sea-tint lg:rounded-3xl"><iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3943.6652767623345!2d115.17554997654081!3d-8.723299491326333!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x2dd246afe6a65ce9%3A0x990e8d0d314ab8a2!2sJl.%20Blambangan%20No.4x%2C%20Kuta%2C%20Kec.%20Kuta%2C%20Kabupaten%20Badung%2C%20Bali%2080361!5e0!3m2!1sen!2sid!4v1720250873757!5m2!1sen!2sid" width="100%" height="440" allowfullscreen="" loading="lazy" title="Map of the Bali Daily Tours office in Kuta" referrerpolicy="no-referrer-when-downgrade" class="block h-80 w-full border-0 lg:h-[440px]"></iframe></div></section>
79'),F$=k('<a class="flex items-center gap-4 rounded-[18px] border border-line bg-card p-4 text-ink hover:text-ink hover:shadow-card lg:p-5"><span class="flex min-w-0 grow flex-col gap-0.5"><span class="text-base font-bold lg:text-[17px]"> </span> <span class="text-sm text-muted"> </span></span> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-muted" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a>'),N$=k('<section class="u-container flex flex-col gap-4 pb-8 pt-5 lg:gap-[18px] lg:pb-12 lg:pt-7"><nav aria-label="Breadcrumb" class="flex gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <span aria-current="page" class="font-semibold text-ink">Contact</span></nav> <div class="flex max-w-[760px] flex-col gap-3"><span class="u-eyebrow">Contact</span> <h1 class="u-h1">Get in touch</h1> <p class="text-base leading-relaxed text-ink-soft lg:text-[19px]">Questions about a tour, a transfer or a custom day? Message us on WhatsApp \u2014 a real person on our team replies.</p></div></section> <section class="u-container pb-12 lg:pb-18"><!></section> <!> <section class="border-t border-line"><div class="u-container flex flex-col gap-5 pb-16 pt-12 lg:gap-7 lg:pb-24 lg:pt-18"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">Looking for something else?</h2> <div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4 lg:gap-4"></div></div></section>',1);function rf(e,t){Ie(t,!1);let r=H(),i=null,n=G(t,"about",24,()=>({})),a=G(t,"phone",8,null),o=[{title:"Day tours",href:"/tours",tip:"Browse all day tours in Bali",body:"Private day trips with your own driver"},{title:"Transfers",href:"/transfers",tip:"See airport and fast-boat transfers",body:"Airport pickups and boats to Gili and Lombok"},{title:"FAQ",href:"/frequently-asked-questions",tip:"Read answers to common questions",body:"Answers to the questions we get most"},{title:"About us",href:"/about",tip:"Learn about Bali Daily Tours",body:"Who we are and how we work"}];X(()=>_(n()),()=>{D(r,(n()&&n().address?String(n().address):"").trim())}),nt();var d={live:i};je();var p=N$(),h=f(Xe(p),2),$=c(h);Gs($,{get phone(){return a()},get address(){return s(r)}}),l(h);var b=f(h,2);{var m=E=>{var P=O$();w(E,P)};N(b,E=>{s(r)&&E(m)})}var g=f(b,2),v=c(g),y=f(c(v),2);return Y(y,5,()=>o,ae,(E,P)=>{var T=F$(),B=c(T),I=c(B),L=c(I,!0);l(I);var O=f(I,2),ee=c(O,!0);l(O),l(B),Se(2),l(T),S(()=>{x(T,"href",(s(P),u(()=>s(P).href))),x(T,"title",(s(P),u(()=>s(P).tip))),A(L,(s(P),u(()=>s(P).title))),A(ee,(s(P),u(()=>s(P).body)))}),w(E,T)}),l(y),l(v),l(g),w(e,p),Ke(t,"live",i),De(d)}var Fc={};At(Fc,{default:()=>Wo});var B$=k('<option class="text-ink"> </option>'),H$=k('<label class="relative inline-flex items-center"><span class="sr-only">Display currency</span> <select aria-label="Display currency" title="Change the currency prices are shown in"></select> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 9l6 6 6-6"></path></svg></label>');function Wo(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",i),[i,n]=Zr(),a=null,o=G(t,"on_hero",8,!1);Bn(Zp);function d(v){Kp(v.target.value)}var p={live:a};je();var h=H$(),$=f(c(h),2);Y($,5,()=>qo,ae,(v,y)=>{var E=B$(),P=c(E,!0);l(E);var T={};S(()=>{A(P,(s(y),u(()=>s(y).code))),T!==(T=(s(y),u(()=>s(y).code)))&&(E.value=(E.__value=(s(y),u(()=>s(y).code)))??"")}),w(v,E)}),l($);var b;Da($);var m=f($,2);l(h),S(()=>{Ze($,1,`h-11 cursor-pointer appearance-none rounded-full border pl-3.5 pr-7 text-[13px] font-bold transition-colors lg:pl-4 lg:pr-8 lg:text-sm
80               ${o()?"border-white/45 bg-white/12 text-white backdrop-blur-sm hover:bg-white/20":"border-line-strong bg-transparent text-ink hover:bg-ink/5"}`),b!==(b=r())&&($.value=($.__value=r())??"",Ws($,r())),Ze(m,0,`pointer-events-none absolute right-2.5 lg:right-3 ${o()?"text-white":"text-ink"}`)}),gr("change",$,d),w(e,h),Ke(t,"live",a);var g=De(p);return n(),g}var Bc={};At(Bc,{default:()=>nf});var Nc={};At(Nc,{default:()=>Ys});var j$=Yt("<path></path>"),U$=k('<div class="px-3 lg:u-container"><section class="mb-12 mt-4 flex flex-col gap-5 rounded-3xl bg-forest px-6 py-9 text-paper lg:mb-24 lg:mt-6 lg:flex-row lg:items-center lg:justify-between lg:gap-12 lg:rounded-[28px] lg:px-18 lg:py-16"><div class="flex max-w-[640px] flex-col gap-3 lg:gap-4"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">Still unsure?</span> <h2 class="text-[30px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[44px]">Ask us directly.</h2> <p class="text-[15px] leading-relaxed text-paper/80 lg:text-[17px]">Message us on WhatsApp and a real person on our team replies.</p></div> <div class="flex shrink-0 flex-col gap-2.5 sm:flex-row sm:gap-3"><a target="_blank" rel="noopener noreferrer" title="Ask Bali Daily Tours a question on WhatsApp" class="u-btn"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Chat on WhatsApp</a> <a href="/contact-us" title="See all the ways to contact our team" class="flex min-h-13 items-center justify-center rounded-full border border-paper/50 px-7 text-base font-bold text-paper hover:bg-paper/10 hover:text-paper">Contact page</a></div></section></div>');function Ys(e,t){Ie(t,!1);let r=H(),i=null,n=G(t,"phone",8,null);X(()=>
80(st,_(n())),()=>{D(r,st(n(),"Hi Bali Daily Tours! I have a question about your tours."))}),nt();var a={live:i};je();var o=U$(),d=c(o),p=f(c(d),2),h=c(p),$=c(h);return Y($,5,()=>Kt,ae,(b,m)=>{var g=j$();S(()=>x(g,"d",s(m))),w(b,g)}),l($),Se(),l(h),Se(2),l(p),l(d),l(o),S(()=>x(h,"href",s(r))),w(e,o),Ke(t,"live",i),De(a)}var z$=k('<article class="u-container flex flex-col gap-4 pb-12 pt-5 lg:gap-5 lg:pb-18 lg:pt-7"><nav aria-label="Breadcrumb" class="flex min-w-0 gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="shrink-0 text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <a href="/frequently-asked-questions" title="Back to all frequently asked questions" class="shrink-0 text-muted hover:text-ink">FAQ</a> <span aria-hidden="true">/</span> <span aria-current="page" class="truncate font-semibold text-ink"> </span></nav> <span class="u-eyebrow mt-2">Frequently asked question</span> <h1 class="max-w-[900px] text-[32px] font-bold leading-[1.08] tracking-[-0.025em] lg:text-[52px] lg:leading-[1.04]"> </h1> <div class="mt-2 max-w-[760px] whitespace-pre-line rounded-[20px] border border-line bg-card p-6 text-[17px] leading-[1.75] text-ink-soft lg:p-9 lg:text-lg"> </div></article>'),V$=k('<li><a class="group flex h-full items-center justify-between gap-4 rounded-[18px] border border-line bg-card p-5 text-ink hover:text-ink hover:shadow-card"><span class="text-base font-bold leading-snug group-hover:text-clay lg:text-[17px]"> </span> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-muted" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></li>'),q$=k('<section class="border-t border-line"><div class="u-container flex flex-col gap-5 py-12 lg:gap-8 lg:py-18"><div class="flex items-end justify-between gap-4"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">More questions</h2> <a href="/frequently-asked-questions" title="See all frequently asked questions" class="shrink-0 py-3 text-sm font-bold text-ink underline underline-offset-4 hover:text-clay lg:text-base">All questions</a></div> <ul class="grid gap-3 lg:grid-cols-2 lg:gap-4"></ul></div></section>'),W$=k("<!> <!> <!>",1);function nf(e,t){Ie(t,!1);let r=H(),i=H(),n=null,a=G(t,"faqs",24,()=>[]),o=G(t,"selected_id",8),d=G(t,"phone",8,null);X(()=>(_(a()),_(o())),()=>{D(r,a().find(y=>y.id===o()))}),X(()=>(_(a()),_(o())),()=>{D(i,a().filter(y=>y.id!==o()))}),nt();var p={live:n};je();var h=W$(),$=Xe(h);{var b=y=>{var E=z$(),P=c(E),T=f(c(P),8),B=c(T,!0);l(T),l(P);var I=f(P,4),L=c(I,!0);l(I);var O=f(I,2),ee=c(O,!0);l(O),l(E),S(()=>{A(B,(s(r),u(()=>s(r).attributes.question))),A(L,(s(r),u(()=>s(r).attributes.question))),A(ee,(s(r),u(()=>s(r).attributes.answer)))}),w(y,E)};N($,y=>{s(r)&&y(b)})}var m=f($,2);{var g=y=>{var E=q$(),P=c(E),T=f(c(P),2);Y(T,5,()=>s(i),({id:B,attributes:{question:I,slug:L}})=>B,(B,I)=>{let L=()=>s(I).id,O=()=>s(I).attributes.question,ee=()=>s(I).attributes.slug;var me=V$(),C=c(me),M=c(C),J=c(M,!0);l(M),Se(2),l(C),l(me),S(()=>{x(C,"href",`/frequently-asked-questions/${ee()}-${L()}`),x(C,"title",`Read the answer: ${O()}`),A(J,O())}),w(B,me)}),l(T),l(P),l(E),w(y,E)};N(m,y=>{s(i),u(()=>s(i).length)&&y(g)})}var v=f(m,2);return Ys(v,{get phone(){return d()}}),w(e,h),Ke(t,"live",n),De(p)}var Hc={};At(Hc,{default:()=>sf});var G$=k('<span class="u-clamp-2 text-[15px] leading-relaxed text-ink-soft"> </span>'),Y$=k('<li>
80<a class="group flex h-full items-start gap-4 rounded-[18px] border border-line bg-card p-5 text-ink hover:text-ink hover:shadow-card lg:p-6"><span class="flex min-w-0 grow flex-col gap-2"><span class="text-[17px] font-bold leading-snug group-hover:text-clay lg:text-lg"> </span> <!></span> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mt-1 shrink-0 text-muted" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></li>'),J$=k('<section class="u-container flex flex-col gap-4 pb-8 pt-5 lg:gap-[18px] lg:pb-12 lg:pt-7"><nav aria-label="Breadcrumb" class="flex gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <span aria-current="page" class="font-semibold text-ink">FAQ</span></nav> <div class="flex max-w-[760px] flex-col gap-3"><h1 class="u-h1">Frequently asked questions</h1> <p class="text-base leading-relaxed text-ink-soft lg:text-[19px]">Booking, pickups, prices and what to expect on the day \u2014 answered by our team.</p></div></section> <section class="u-container pb-12 lg:pb-18"><ul class="grid gap-3 lg:grid-cols-2 lg:gap-4"></ul></section> <!>',1);function sf(e,t){Ie(t,!1);let r=null,i=G(t,"faqs",24,()=>[]),n=G(t,"phone",8,null);var a={live:r},o=J$(),d=f(Xe(o),2),p=c(d);Y(p,5,i,({id:$,attributes:{answer:b,question:m,slug:g}})=>$,($,b)=>{let m=()=>s(b).id,g=()=>s(b).attributes.answer,v=()=>s(b).attributes.question,y=()=>s(b).attributes.slug;var E=Y$(),P=c(E),T=c(P),B=c(T),I=c(B,!0);l(B);var L=f(B,2);{var O=ee=>{var me=G$(),C=c(me,!0);l(me),S(()=>A(C,g())),w(ee,me)};N(L,ee=>{g()&&ee(O)})}l(T),Se(2),l(P),l(E),S(()=>{x(P,"href",`/frequently-asked-questions/${y()}-${m()}`),x(P,"title",`Read the answer: ${v()}`),A(I,v())}),w($,E)}),l(p),l(d);var h=f(d,2);return Ys(h,{get phone(){return n()}}),w(e,o),Ke(t,"live",r),De(a)}var jc={};At(jc,{default:()=>af});var X$=k('<a class="py-2 text-[15px] text-night-text hover:text-white lg:py-0"> </a>'),K$=k('<div class="flex flex-col gap-1 lg:gap-3"><span class="mb-1 text-xs font-bold uppercase tracking-[0.16em] text-paper lg:mb-0 lg:text-[13px]"> </span> <!></div>'),Z$=k('<footer class="bg-night text-night-text"><div class="u-container flex flex-col gap-8 pb-28 pt-11 lg:gap-14 lg:pb-10 lg:pt-18"><div class="grid grid-cols-2 gap-x-4 gap-y-7 lg:grid-cols-[2fr_1fr_1fr_1fr] lg:gap-12"><div class="col-span-2 flex flex-col gap-3 lg:col-span-1 lg:gap-4"><a href="/" title="Bali Daily Tours \u2014 back to the homepage" class="block self-start"><img src="/icons/logo-light.png" alt="Bali Daily Tours logo" width="183" height="63" loading="lazy" class="h-11 w-auto lg:h-12"/></a> <p class="max-w-[340px] text-sm leading-relaxed text-night-muted lg:text-[15px]">Private day tours, airport and fast-boat transfers, and water sports across Bali \u2014 run by a local team.</p></div> <!></div> <div class="flex flex-col gap-1 border-t border-night-line pt-5 text-[13px] text-night-muted sm:flex-row sm:justify-between lg:pt-6 lg:text-sm"><span> </span> <span>Prices are set in USD; other currencies are estimates</span></div></div></footer>');function af(e,t){Ie(t,!1);let r=null,i=G(t,"columns",24,()=>[]),n=new Date().getFullYear();var a={live:r};je();var o=Z$(),d=c(o),p=c(d),h=f(c(p),2);Y(h,1,i,ae,(g,v)=>{var y=K$(),E=c(y),P=c(E,!0);l(E);var T=f(E,2);Y(T,1,()=>(s(v),u(()=>s(v).links)),ae,(B,I)=>{var L=X$(),O=c(L,!0);l(L),S(()=>{x(L,"href",(s(I),u(()=>s(I).href))),x(L,"title",(s(I),u(()=>s(I).tip))),A(O,(s(I),u(()=>s(I).title)))}),w(B,L)}),l(y),S(()=>A(P,(s(v),u(()=>s(v).heading)))),w(g,y)}),l(p);var $=f(p,2),b=c($),m=c(b);return l(b),Se(2),l($),l(d),l(o),S(()=>A(m,`\xA9 ${n??""} Bali Daily Tours`)),w(e,o),Ke(t,"live",r),De(a)}var Uc={};At(Uc,{default:()=>of});var Q$=k("<a> </a>"),e_=Yt('<path d="M6 6l12 12M18 6L6 18"></path>'),t_=Yt('<path d="M4 8h16M4 16h16"></path>'),r_=k('<li><a> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-muted" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></li>'),i_=k('<div class="fixed inset-0 z-40 xl:hidden" role="dialog" aria-modal="true" aria-label="Site menu"><button type="button" class="absolute inset-0 size-full cursor-default bg-night/40 backdrop-blur-sm" aria-label="Close menu" title="Close menu"></button> <nav id="mobile-menu" aria-label="Site" class="absolute inset-x-0 top-16 max-h-[calc(100dvh-4rem)] overflow-y-auto rounded-b-3xl border-t border-line bg-paper px-5 pb-6 pt-2 lg:top-[84px]"><ul class="divide-y divide-line"></ul> <a target="_blank" rel="noopener noreferrer" title="Chat with our team on WhatsApp" class="mt-4 flex h-13 items-center justify-center gap-2.5 rounded-full bg-whatsapp text-base font-bold text-white hover:text-white"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 20l1.3-3.9A8 8 0 1 1 8.2 19z"></path><path d="M9 9.5c0 3 2.5 5.5 5.5 5.5"></path></svg> Chat on WhatsApp</a></nav></div>'),n_=k('<header><div class="u-container flex h-16 items-center justify-between gap-6 lg:h-[84px]"><a href="/" title="Bali Daily Tours \u2014 back to the homepage" class="block shrink-0"><img src="/icons/logo-dark.png" alt="Bali Daily Tours logo" width="183" height="63" loading="eager" fetchpriority="high"/> <img src="/icons/logo-light.png" alt="Bali Daily Tours logo" width="183" height="63" loading="eager"/></a> <nav aria-label="Main" class="hidden items-center gap-8 xl:flex"></nav> <div class="flex items-center gap-2 lg:gap-3"><!> <a target="_blank" rel="noopener noreferrer" title="Chat with our team on WhatsApp"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 20l1.3-3.9A8 8 0 1 1 8.2 19z"></path><path d="M9 9.5c0 3 2.5 5.5 5.5 5.5"></path></svg> WhatsApp us</a> <button type="button" aria-controls="mobile-menu"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><!></svg></button></div></div></header> <!>',1);function of(e,t){Ie(t,!1);let r=H(),i=H(),n=null,a=G(t,"nav",24,()=>[]),o=G(t,"current_path",8,"/"),d=G(t,"overlay",8,!1),p=G(t,"phone",8,null),h=H(!1),$=H(!1),b=encodeURIComponent("Hi Bali Daily Tours! I'd like to know more about your Bali tours.");function m(F){return(F.match||[F.href]).some(V=>o()===V||o().startsWith(V+"/"))}function g(F){typeof document>"u"||(document.body.style.overflow=F?"hidden":"")}
80function v(){D(h,!s(h)),g(s(h))}function y(){s(h)&&(D(h,!1),g(!1))}function E(){D($,window.scrollY>24)}Bn(E),jo(()=>g(!1)),X(()=>(_(d()),s($),s(h)),()=>{D(r,d()&&!s($)&&!s(h))}),X(()=>_(p()),()=>{D(i,p()?`https://wa.me/${p()}?text=${b}`:"/contact-us")}),nt();var P={live:n};je();var T=n_();gr("keydown",js,F=>F.key==="Escape"&&y()),gr("scroll",js,E,void 0,!0);var B=Xe(T),I=c(B),L=c(I),O=c(L),ee=f(O,2);l(L);var me=f(L,2);Y(me,5,a,ae,(F,V)=>{var oe=Q$(),se=c(oe,!0);l(oe),S((Z,we)=>{x(oe,"href",(s(V),u(()=>s(V).href))),x(oe,"title",(s(V),u(()=>s(V).tip))),x(oe,"aria-current",Z),Ze(oe,1,`whitespace-nowrap text-[15px] transition-opacity hover:opacity-70
81                           ${we??""}
82                           ${s(r)?"text-white hover:text-white":"text-ink hover:text-ink"}`),A(se,(s(V),u(()=>s(V).title)))},[()=>(s(V),u(()=>m(s(V))?"page":void 0)),()=>(s(V),u(()=>m(s(V))?"font-bold":"font-semibold"))]),w(F,oe)}),l(me);var C=f(me,2),M=c(C);Wo(M,{get on_hero(){return s(r)}});var J=f(M,2),fe=c(J);Se(),l(J);var ue=f(J,2),$e=c(ue),W=c($e);{var le=F=>{var V=e_();w(F,V)},de=F=>{var V=t_();w(F,V)};N(W,F=>{s(h)?F(le):F(de,-1)})}l($e),l(ue),l(C),l(I),l(B);var te=f(B,2);{var Le=F=>{var V=i_(),oe=c(V),se=f(oe,2),Z=c(se);Y(Z,5,a,ae,(re,U)=>{var ce=r_(),ge=c(ce),Fe=c(ge);Se(),l(ge),l(ce),S((xe,be)=>{x(ge,"href",(s(U),u(()=>s(U).href))),x(ge,"title",(s(U),u(()=>s(U).tip))),x(ge,"aria-current",xe),Ze(ge,1,`flex min-h-14 items-center justify-between text-lg text-ink hover:text-clay
83                                   ${be??""}`),A(Fe,`${s(U),u(()=>s(U).title)??""} `)},[()=>(s(U),u(()=>m(s(U))?"page":void 0)),()=>(s(U),u(()=>m(s(U))?"font-extrabold":"font-semibold"))]),gr("click",ge,y),w(re,ce)}),l(Z);var we=f(Z,2);l(se),l(V),S(()=>x(we,"href",s(i))),gr("click",oe,y),w(F,V)};N(te,F=>{s(h)&&F(Le)})}return S(()=>{Ze(B,1,`fixed inset-x-0 top-0 z-50 transition-colors duration-300
84           ${s(r)?"bg-gradient-to-b from-black/35 to-transparent":"border-b border-line bg-paper"}`),Ze(O,1,`h-10 w-auto lg:h-12 ${s(r)?"hidden":"block"}`),Ze(ee,1,`h-10 w-auto lg:h-12 ${s(r)?"block":"hidden"}`),x(J,"href",s(i)),Ze(J,1,`hidden h-11 items-center gap-2 rounded-full px-5 text-sm font-bold lg:flex
85                       ${s(r)?"bg-white text-ink hover:bg-card hover:text-ink":"bg-ink text-white hover:bg-forest hover:text-white"}`),Ze(fe,0,ca(s(r)?"stroke-whatsapp":"stroke-[#7FD1A6]")),x(ue,"aria-expanded",s(h)),x(ue,"aria-label",s(h)?"Close menu":"Open menu"),x(ue,"title",s(h)?"Close menu":"Open menu"),Ze(ue,1,`grid size-11 place-items-center rounded-full xl:hidden ${s(r)?"bg-white text-ink":"bg-ink text-white"}`)}),gr("click",ue,v),w(e,T),Ke(t,"live",n),De(P)}var zc={};At(zc,{default:()=>lf});var s_=k('<img sizes="100vw" alt="Tanah Lot temple on its rock in the sea at golden hour" fetchpriority="high" loading="eager" class="absolute inset-0 size-full object-cover object-[40%_center] lg:object-center"/>'),a_=k('<span class="hidden text-[13px] font-medium text-muted lg:block"> </span>'),o_=k('<a><span class="grid shrink-0 place-items-center lg:size-12 lg:rounded-xl lg:bg-sand"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="size-[18px] lg:size-[22px] lg:text-forest" aria-hidden="true"><path></path></svg></span> <span class="flex flex-col gap-0.5"><span class="lg:text-[15px]"> </span> <!></span></a>'),l_=k('<div class="w-[272px] shrink-0 lg:w-auto"><!></div>'),c_=k('<img sizes="(min-width: 1024px) 50vw, 100vw" alt="Snorkeling and water sports off the Bali coast" loading="lazy" class="absolute inset-0 size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),d_=k('<a title="Browse Bali water sports and snorkeling trips" class="group relative col-span-2 overflow-hidden rounded-[18px] text-white hover:text-white lg:row-span-2 lg:rounded-[22px]"><!> <span class="absolute inset-0 bg-[linear-gradient(180deg,rgba(12,18,14,0)_35%,rgba(12,18,14,0.72)_100%)]"></span> <span class="absolute inset-x-[18px] bottom-4 flex items-end justify-between gap-4 lg:inset-x-8 lg:bottom-[30px]"><span class="flex flex-col gap-0.5 lg:gap-1.5"><span class="text-[26px] font-bold leading-none lg:text-[40px]">Water sports</span> <span class="text-[13px] opacity-92 lg:text-base">Snorkeling, jet ski, fly board<!></span></span> <span class="hidden size-13 shrink-0 place-items-center rounded-full bg-white lg:grid"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#1C211C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 17L17 7M9 7h8v8"></path></svg></span></span></a>'),u_=k('<img sizes="(min-width: 1024px) 25vw, 50vw" loading="lazy" class="absolute inset-0 size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),p_=k('<a class="group relative overflow-hidden rounded-[18px] text-white hover:text-white lg:rounded-[22px]"><!> <span class="absolute inset-0 bg-[linear-gradient(180deg,rgba(12,18,14,0)_30%,rgba(12,18,14,0.75
85)_100%)]"></span> <span class="absolute inset-x-3.5 bottom-3 flex flex-col gap-0.5 lg:inset-x-[22px] lg:bottom-5 lg:gap-1"><span class="text-[19px] font-bold leading-tight lg:text-[26px]"> </span> <span class="text-xs opacity-92 lg:text-sm"> </span></span></a>'),f_=k('<div class="flex gap-4 lg:flex-col lg:gap-3"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-paper/10 lg:size-12 lg:rounded-[14px]"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-gold" aria-hidden="true"><path></path></svg></span> <span class="flex flex-col gap-1 lg:gap-3"><span class="text-base font-bold lg:text-[19px]"> </span> <span class="text-sm leading-relaxed text-paper/78 lg:text-[15px]"> </span></span></div>'),h_=k('<img sizes="(min-width: 1024px) 33vw, 280px" loading="lazy" class="size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),g_=k('<time class="text-[11px] font-bold uppercase tracking-[0.12em] text-muted lg:text-[13px]"> </time>'),v_=k('<a class="group flex w-[280px] shrink-0 flex-col gap-3 text-ink hover:text-ink lg:w-auto lg:gap-[18px]"><span class="block h-[186px] overflow-hidden rounded-2xl lg:aspect-[3/2] lg:h-auto lg:rounded-[18px]"><!></span> <!> <span class="-mt-1 text-xl font-bold leading-snug group-hover:text-clay lg:mt-0 lg:text-[26px] lg:leading-tight"> </span></a>'),$_=k('<section class="pb-6 pt-8 lg:py-20"><div class="u-container flex flex-col gap-5 lg:gap-10"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">From the journal</span> <h2 class="u-h2"><span class="lg:hidden">Local tips</span><span class="hidden lg:inline">Stories &amp; local tips</span></h2></div> <a href="/blogs" title="Read every article in the Bali journal" class="shrink-0 py-3 text-sm font-bold text-ink underline underline-offset-4 hover:text-clay lg:border-b-[1.5px] lg:border-ink lg:py-0 lg:pb-1 lg:text-base lg:no-underline"><span class="lg:hidden">See all</span><span class="hidden lg:inline">All articles</span></a></div> <div class="u-edge-row -mx-4 flex gap-3.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:grid-cols-3 lg:gap-7 lg:overflow-visible lg:px-0"></div></div></section>'),__=k('<img sizes="100vw" alt="Sunrise over the caldera from the summit of Mount Batur" loading="lazy" class="absolute inset-0 size-full object-cover"/>'),m_=Yt("<path></path>"),x_=k(`<section class="relative h-[640px] lg:h-[780px]"><!> <div class="absolute inset-0 bg-[linear-gradient(180deg,rgba(12,18,14,0.5)_0%,rgba(12,18,14,0)_22%,rgba(12,18,14,0)_40%,rgba(12,18,14,0.78)_100%)]"></div> <div class="u-container relative flex h-full flex-col justify-end pb-8 lg:pb-[140px]"><div class="flex max-w-[760px] flex-col gap-4 text-white lg:gap-[22px]"><span class="text-[11px] font-bold uppercase tracking-[0.2em] opacity-90 lg:text-[13px]">Private day tours \xB7 Island transfers \xB7 Water sports</span> <h1 class="text-[48px] font-bold leading-none tracking-[-0.025em] lg:text-[84px] lg:leading-[0.98]">Bali, the way<br class="hidden lg:block"/> locals show it.</h1> <p class="max-w-[580px] text-base leading-relaxed opacity-92 lg:text-[19px]"><span class="hidden lg:inline">Temples at sunset, volcano sunrises and hidden waterfalls \u2014 with</span><span class="lg:hidden">Your</span> <span class="hidden lg:inline">your</span> own driver, a clear price per car or per person, and nothing hidden.</p> <div class="mt-1 flex flex-col gap-2.5 sm:flex-row sm:gap-3 lg:mt-1.5"><a href="#tours" title="Jump to our signature day tours" class="u-btn">Explore tours <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a> <a target="_blank" rel="noopener noreferrer" title="Plan a custom day with us on WhatsApp" class="flex min-h-13 items-center justify-center rounded-full border border-white/60 bg-white/8 px-7 text-base font-bold text-white hover:bg-white/15 hover:text-white">Plan a custom day</a></div></div></div></section> <div class="u-container"><nav aria-label="Tour categories" class="u-edge-row -mx-4 flex gap-2 overflow-x-auto px-4 pb-1 pt-5 lg:relative lg:z-10 lg:-mt-[52px] lg:mx-0 lg:grid lg:grid-cols-5 lg:overflow-visible lg:rounded-[20px] lg:bg-card lg:p-3 lg:shadow-[0_18px_50px_-20px_rgba(28,33,28,0.35)]"></nav></div> <section id="tours" class="scroll-mt-20 pb-4 pt-10 lg:pb-10 lg:pt-28"><div class="u-container flex flex-col gap-5 lg:gap-10"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Signature day tours</span> <h2 class="u-h2"><span class="lg:hidden">Best days out</span><span class="hidden lg:inline">The island's best days out</span></h2></div> <a href="/tours" title="See every Bali day tour we run" class="flex shrink-0 items-center gap-2 py-3 text-sm font-bold text-ink underline underline-offset-4 hover:text-clay lg:border-b-[1.5px] lg:border-ink lg:py-0 lg:pb-1 lg:text-base lg:no-underline"><span class="lg:hidden">See all</span><span class="hidden lg:inline">All day tours</span>
85 <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="hidden lg:block" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></div> <div class="u-edge-row -mx-4 flex gap-3.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:grid-cols-4 lg:gap-7 lg:overflow-visible lg:px-0"></div></div></section> <section class="pb-6 pt-10 lg:py-20"><div class="u-container flex flex-col gap-5 lg:gap-10"><div class="flex max-w-[720px] flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Find your kind of day</span> <h2 class="u-h2">Reef, jungle, road or sea</h2></div> <div class="grid auto-rows-[168px] grid-cols-2 gap-3 lg:grid-cols-4 lg:grid-rows-[280px_280px] lg:gap-5"><!> <!></div></div></section> <div class="px-3 lg:u-container"><section class="my-6 grid gap-7 rounded-3xl bg-forest px-6 py-9 text-paper lg:my-10 lg:grid-cols-[5fr_7fr] lg:gap-18 lg:rounded-[28px] lg:p-18"><div class="flex flex-col gap-3.5 lg:gap-5"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">Why travel with us</span> <h2 class="text-[30px] font-bold leading-[1.12] tracking-[-0.02em] lg:text-5xl lg:leading-[1.08]">A small local team with big island knowledge.</h2> <p class="hidden text-[17px] leading-[1.65] text-paper/82 lg:block">Our local guides know the roads, the temples and the quiet corners \u2014 and shape each day around what you want to see.</p></div> <div class="grid gap-7 lg:grid-cols-2 lg:gap-x-12 lg:gap-y-10"></div></section></div> <section class="u-container grid grid-cols-2 gap-3 py-6 lg:gap-6 lg:pb-10 lg:pt-20"><a href="/weather" title="Check today's Bali weather forecast" class="flex flex-col gap-3.5 rounded-[18px] border border-line bg-card px-[18px] py-5 text-ink hover:text-ink hover:shadow-card lg:flex-row lg:items-center lg:gap-6 lg:rounded-[22px] lg:p-9"><span class="grid size-12 shrink-0 place-items-center rounded-[14px] bg-sun-tint lg:size-18 lg:rounded-[20px]"><svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="size-6 text-clay lg:size-8" aria-hidden="true"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"></path></svg></span> <span class="flex grow flex-col gap-1 lg:gap-1.5"><span class="text-xl font-bold lg:text-[28px]">Bali weather</span> <span class="text-[13px] leading-normal text-muted lg:text-[15px]"><span class="lg:hidden">Plan around the forecast</span><span class="hidden lg:inline">Check the forecast before a sunrise trek or a boat day.</span></span></span> <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="hidden lg:block" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a> <a href="/wave-info" title="See surf and wave conditions around Bali" class="flex flex-col gap-3.5 rounded-[18px] border border-line bg-card px-[18px] py-5 text-ink hover:text-ink hover:shadow-card lg:flex-row lg:items-center lg:gap-6 lg:rounded-[22px] lg:p-9"><span class="grid size-12 shrink-0 place-items-center rounded-[14px] bg-sea-tint lg:size-18 lg:rounded-[20px]"><svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="size-6 text-sea lg:size-8" aria-hidden="true"><path d="M2 9c2 0 2-1.5 4-1.5S8 9 10 9s2-1.5 4-1.5S16 9 18 9s2-1.5 4-1.5M2 14c2 0 2-1.5 4-1.5S8 14 10 14s2-1.5 4-1.5S16 14 18 14s2-1.5 4-1.5M2 19c2 0 2-1.5 4-1.5S8 19 10 19s2-1.5 4-1.5S16 19 18 19s2-1.5 4-1.5"></path></svg></span> <span class="flex grow flex-col gap-1 lg:gap-1.5"><span class="text-xl font-bold lg:text-[28px]">Surf &amp; waves</span> <span class="text-[13px] leading-normal text-muted lg:text-[15px]"><span class="lg:hidden">Swell, wind and tide</span><span class="hidden lg:inline">Swell, wind and tide for Bali's surf spots.</span></span></span> <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="hidden lg:block" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></section> <!> <div class="px-3 lg:u-container"><section class="relative mb-10 mt-6 h-[440px] overflow-hidden rounded-3xl text-white lg:mb-24 lg:mt-10 lg:h-[420px] lg:rounded-[28px]"><!> <div class="absolute inset-0 bg-[linear-gradient(180deg,rgba(12,18,14,0.15)_0%,rgba(12,18,14,0.8)_100%)] lg:bg-[linear-gradient(90deg,rgba(12,18,14,0.78)_0%,rgba(12,18,14,0.35)_60%,rgba(12,18,14,0.1)_100%)]"></div> <div class="absolute inset-x-6 bottom-7 flex flex-col gap-3.5 lg:inset-y-0 lg:left-18 lg:right-auto lg:w-[620px] lg:justify-center lg:gap-5"><h2 class="text-[34px] font-bold leading-[1.05] tracking-[-0.02em] lg:text-[56px] lg:leading-[1.02]">
85Tell us your dates.<br class="hidden lg:block"/> We'll plan the day.</h2> <p class="text-[15px] leading-relaxed opacity-92 lg:text-lg">Mix temples, rice terraces and a waterfall into one private day<span class="hidden lg:inline">\u2014 message us and a local planner replies</span>.</p> <a target="_blank" rel="noopener noreferrer" title="Message Bali Daily Tours on WhatsApp" class="flex h-13 items-center justify-center gap-2.5 rounded-full bg-white px-6.5 text-[15px] font-bold text-ink hover:bg-card hover:text-ink lg:h-14 lg:self-start lg:text-base"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-whatsapp" aria-hidden="true"></svg> <span class="lg:hidden">Chat on WhatsApp</span> <span class="hidden lg:inline"> </span></a></div></section></div>`,1);function lf(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",n),i=()=>br(dn,"$rates",n),[n,a]=Zr(),o=H(),d=H(),p=H(),h=H(),$=H(),b=null,m=G(t,"hero_image",8,null),g=G(t,"cta_image",8,null),v=G(t,"signature",24,()=>[]),y=G(t,"categories",24,()=>[]),E=G(t,"blogs",24,()=>[]),P=G(t,"phone",8,null),T={tours:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM15.5 8.5l-2 5-5 2 2-5z","water-sports":"M2 12c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2M2 17c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2","bali-safari-and-marine-park":"M5 19c0-8 5-13 14-14 0 9-5 14-13 14zM5 19l7-7","bali-sea-transfers":"M3 16l2 4h14l2-4zM12 4v12M12 5l6 9H12","bali-airport-transfers":"M10.5 13.5L3 11l1.5-1.5 7.5 1 4-4.5a2 2 0 0 1 3 3l-4.5 4 1 7.5L14 22l-2.5-7.5-3 3V20L7 21.5 5.5 17 2 15.5 3.5 14h2.5z"},B=["tours","water-sports","bali-safari-and-marine-park","bali-sea-transfers","bali-airport-transfers"],I=Me=>B.indexOf(Me)===-1?99:B.indexOf(Me),L=[{title:"Local experts",body:"Balinese guides who share the stories and hidden corners behind every stop.",icon:"M16 20v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 18.5V20M10 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM20 20v-1.5a3.5 3.5 0 0 0-2.5-3.3M15.5 4.2a3.5 3.5 0 0 1 0 6.6"},{title:"Honest pricing",body:"One clear price per car or per person. No hidden fees on the day.",icon:"M3 12V4h8l10 10-8 8zM7.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"},{title:"Safe & licensed",body:"Licensed, insured drivers and well-kept air-conditioned cars.",icon:"M12 21s8-3.5 8-10V5l-8-3-8 3v6c0 6.5 8 10 8 10zM9 12l2 2 4-4"},{title:"Flexible booking",body:"Book online or on WhatsApp, with flexible cancellation.",icon:"M4 6h16v14H4zM4 10h16M8 3v4M16 3v4"}],O=(Me,he,Ye)=>Me.from_price==null?"":`From ${Xr(Me.from_price,he,Ye)}${Me.from_type?" / "+Me.from_type.toLowerCase():""}`,ee=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),me=Me=>{let he=Me?new Date(Me):null;return he&&!isNaN(he)?ee.format(he):""};X(()=>_(y()),()=>{D(o,[...y()].sort((Me,he)=>I(Me.slug)-I(he.slug)))}),X(()=>s(o),()=>{D(d,s(o).find(Me=>Me.slug==="water-sports"))}),X(()=>s(o),()=>{D(p,s(o).filter(Me=>Me.slug!=="water-sports"))}),X(()=>(st,_(P())),()=>{D(h,st(P(),"Hi Bali Daily Tours! I'd like to plan a custom day in Bali."))}),X(()=>(st,_(P())),()=>{D($,st(P(),"Hi Bali Daily Tours! Here are my dates \u2014 can you help me plan a day?"))}),nt();var C={live:b};je();var M=x_(),J=Xe(M),fe=c(J);{var ue=Me=>{var he=s_();S((Ye,ye)=>{x(he,"src",Ye),x(he,"srcset",ye)},[()=>(_(Be),_(m()),u(()=>
85Be(m(),1920))),()=>(_(Ue),_(m()),u(()=>Ue(m(),[640,1280,1920])))]),w(Me,he)};N(fe,Me=>{m()&&Me(ue)})}var $e=f(fe,4),W=c($e),le=f(c(W),6),de=f(c(le),2);l(le),l(W),l($e),l(J);var te=f(J,2),Le=c(te);Y(Le,5,()=>s(o),ae,(Me,he,Ye)=>{var ye=o_();Ze(ye,1,`flex h-11 shrink-0 items-center gap-2 whitespace-nowrap rounded-full border px-4 pl-3 text-sm font-bold
86                       lg:h-auto lg:gap-3.5 lg:rounded-[14px] lg:border-0 lg:bg-transparent lg:px-4 lg:py-3.5 lg:text-ink lg:hover:bg-sand/60
87                       ${Ye===0?"border-forest bg-forest text-paper hover:text-paper":"border-line bg-card text-ink hover:text-ink"}`);var Re=c(ye),Pe=c(Re),Qe=c(Pe);l(Pe),l(Re);var K=f(Re,2),Q=c(K),ve=c(Q,!0);l(Q);var Ee=f(Q,2);{var Oe=pt=>{var vt=a_(),et=c(vt);l(vt),S(kt=>A(et,`From ${kt??""}`),[()=>(_(Xr),s(he),r(),i(),u(()=>Xr(s(he).from_price,r(),i())))]),w(pt,vt)};N(Ee,pt=>{s(he),u(()=>s(he).from_price!=null)&&pt(Oe)})}l(K),l(ye),S(()=>{x(ye,"href",(s(he),u(()=>s(he).href))),x(ye,"title",(s(he),u(()=>`Browse ${s(he).name} in Bali`))),x(Qe,"d",(s(he),u(()=>T[s(he).slug]||T.tours))),A(ve,(s(he),u(()=>s(he).short)))}),w(Me,ye)}),l(Le),l(te);var F=f(te,2),V=c(F),oe=f(c(V),2);Y(oe,5,v,Me=>Me.id,(Me,he)=>{var Ye=l_(),ye=c(Ye);Hn(ye,{get tour(){return s(he)}}),l(Ye),w(Me,Ye)}),l(oe),l(V),l(F);var se=f(F,2),Z=c(se),we=f(c(Z),2),re=c(we);{var U=Me=>{var he=d_(),Ye=c(he);{var ye=ve=>{var Ee=c_();S((Oe,pt)=>{x(Ee,"src",Oe),x(Ee,"srcset",pt)},[()=>(_(Be),s(d),u(()=>Be(s(d).image,1280))),()=>(_(Ue),s(d),u(()=>Ue(s(d).image,[640,960,1280])))]),w(ve,Ee)};N(Ye,ve=>{s(d),u(()=>s(d).image)&&ve(ye)})}var Re=f(Ye,4),Pe=c(Re),Qe=f(c(Pe),2),K=f(c(Qe));{var Q=ve=>{var Ee=di();S(Oe=>A(Ee,`\xA0\xB7 from ${Oe??""}`),[()=>(_(Xr),s(d),r(),i(),u(()=>Xr(s(d).from_price,r(),i())))]),w(ve,Ee)};N(K,ve=>{s(d),u(()=>s(d).from_price!=null)&&ve(Q)})}l(Qe),l(Pe),Se(2),l(Re),l(he),S(()=>x(he,"href",(s(d),u(()=>s(d).href)))),w(Me,he)};N(re,Me=>{s(d)&&Me(U)})}var ce=f(re,2);Y(ce,1,()=>s(p),ae,(Me,he)=>{var Ye=p_(),ye=c(Ye);{var Re=Ee=>{var Oe=u_();S((pt,vt)=>{x(Oe,"src",pt),x(Oe,"srcset",vt),x(Oe,"alt",(s(he),u(()=>`${s(he).name} \u2014 Bali photo`)))},[()=>(_(Be),s(he),u(()=>Be(s(he).image,640))),()=>(_(Ue),s(he),u(()=>Ue(s(he).image,[320,640,960])))]),w(Ee,Oe)};N(ye,Ee=>{s(he),u(()=>s(he).image)&&Ee(Re)})}var Pe=f(ye,4),Qe=c(Pe),K=c(Qe,!0);l(Qe);var Q=f(Qe,2),ve=c(Q,!0);l(Q),l(Pe),l(Ye),S(Ee=>{x(Ye,"href",(s(he),u(()=>s(he).href))),x(Ye,"title",(s(he),u(()=>`Browse ${s(he).name} in Bali`))),A(K,(s(he),u(()=>s(he).short))),A(ve,Ee)},[()=>(s(he),r(),i(),u(()=>O(s(he),r(),i())))]),w(Me,Ye)}),l(we),l(Z),l(se);var ge=f(se,2),Fe=c(ge),xe=f(c(Fe),2);Y(xe,5,()=>L,ae,(Me,he)=>{var Ye=f_(),ye=c(Ye),Re=c(ye),Pe=c(Re);l(Re),l(ye);var Qe=f(ye,2),K=c(Qe),Q=c(K,!0);l(K);var ve=f(K,2),Ee=c(ve,!0);l(ve),l(Qe),l(Ye),S(()=>{x(Pe,"d",(s(he),u(()=>s(he).icon))),A(Q,(s(he),u(()=>s(he).title))),A(Ee,(s(he),u(()=>s(he).body)))}),w(Me,Ye)}),l(xe),l(Fe),l(ge);var be=f(ge,4);{var Ge=Me=>{var he=$_(),Ye=c(he),ye=f(c(Ye),2);Y(ye,5,E,ae,(Re,Pe)=>{var Qe=v_(),K=c(Qe),Q=c(K);{var ve=kt=>{var gt=h_();S((Mt,Zt)=>{x(gt,"src",Mt),x(gt,"srcset",Zt),x(gt,"alt",(s(Pe),u(()=>`${s(Pe).title} \u2014 article photo`)))},[()=>(_(Be),s(Pe),u(()=>Be(s(Pe).image,640))),()=>(_(Ue),s(Pe),u(()=>Ue(s(Pe).image,[320,640,960])))]),w(kt,gt)};N(Q,kt=>{s(Pe),u(()=>s(Pe).image)&&kt(ve)})}l(K);var Ee=f(K,2);{var Oe=kt=>{var gt=g_(),Mt=c(gt,!0);l(gt),S(Zt=>{x(gt,"datetime",(s(Pe),u(()=>s(Pe).date))),A(Mt,Zt)},[()=>(s(Pe),u(()=>me(s(Pe).date)))]),w(kt,gt)},pt=Ui(()=>(s(Pe),u(()=>me(s(Pe).date))));N(Ee,kt=>{s(pt)&&kt(Oe)})}var vt=f(Ee,2),et=c(vt,!0);l(vt),l(Qe),S(()=>{x(Qe,"href",(s(Pe),u(()=>s(Pe).href))),x(Qe,"title",(s(Pe),u(()=>`Read: ${s(Pe).title}`))),A(et,(s(Pe),u(()=>s(Pe).title)))}),w(Re,Qe)}),l(ye),l(Ye),l(he),w(Me,he)};N(be,Me=>{_(E()),u(()=>E().length)&&Me(Ge)})}var ze=f(be,2),Ve=c(ze),at=c(Ve);{var dt=Me=>{var he=__();S((Ye,ye)=>{x(he,"src",Ye),x(he,"srcset",ye)},[()=>(_(Be),_(g()),u(()=>Be(g(),1280))),()=>(_(Ue),_(g()),u(()=>Ue(g(),[640,1280,1920])))]),w(Me,he)};N(at,Me=>{g()&&Me(dt)})}var ut=f(at,4),xt=f(c(ut),4),Ot=c(xt);Y(Ot,5,()=>Kt,ae,(Me,he)=>{var Ye=m_();S(()=>x(Ye,"d",s(he))),w(Me,Ye)}),l(Ot);var jt=f(Ot,4),dr=c(jt,!0);l(jt),l(xt),l(ut),l(Ve),l(ze),S(Me=>{x(de,"href",s(h)),x(xt,"href",s($)),A(dr,Me)},[()=>(_(P()),_(Ur),u(()=>P()?`WhatsApp ${Ur(P())}`:"Chat on WhatsApp"))]),w(e,M),Ke(t,"live",b);var Ar=De(C);return a(),Ar}var qc={};At(qc,{default:()=>cf});var Vc={};At(Vc,{default:()=>Js});var b_=k('<img loading="lazy" decoding="async" class="size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),w_=k('<a class="text-ink hover:text-clay"> </a>'),y_=k('<p class="u-clamp-2 text-[13px] leading-normal text-ink-soft sm:u-clamp-3 sm:text-sm sm:leading-[1.55]"> </p>'),k_=k('<article class="flex h-full gap-3.5 overflow-hidden rounded-[18px] border border-line bg-card p-3 sm:flex-col sm:gap-0 sm:p-0"><a tabindex="-1" aria-hidden="true" class="group block h-32 w-[104px] shrink-0 overflow-hidden rounded-xl bg-sand sm:aspect-[4/3] sm:h-auto sm:w-auto 
87sm:rounded-none"><!></a> <div class="flex min-w-0 grow flex-col gap-1.5 sm:gap-2 sm:px-4 sm:pb-[18px] sm:pt-4"><a class="self-start rounded-full bg-sea-tint px-2.5 py-1 text-[11px] font-bold sm:text-xs text-sea hover:text-sea"> </a> <!> <!> <div class="mt-auto sm:border-t sm:border-line sm:pt-3"><a class="inline-flex min-h-11 items-center gap-1.5 text-sm font-bold text-clay hover:text-clay-dark">Read the place guide <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></div></div></article>');function Js(e,t){Ie(t,!1);let r=null,i=G(t,"place",8),n=G(t,"heading",8,"h3"),a=G(t,"sizes",8,"(min-width: 1280px) 20vw, (min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw");var o={live:r};je();var d=k_(),p=c(d),h=c(p);{var $=B=>{var I=b_();S((L,O)=>{x(I,"src",L),x(I,"srcset",O),x(I,"sizes",a()),x(I,"alt",(_(i()),u(()=>`${i().name} \u2014 photo of this place in Bali`)))},[()=>(_(Be),_(i()),u(()=>Be(i().image,640))),()=>(_(Ue),_(i()),u(()=>Ue(i().image,[320,480,640,960])))]),w(B,I)};N(h,B=>{_(i()),u(()=>i().image)&&B($)})}l(p);var b=f(p,2),m=c(b),g=c(m,!0);l(m);var v=f(m,2);hc(v,n,!1,(B,I)=>{Ze(B,0,"u-clamp-3 text-lg font-bold sm:text-[19px] leading-tight tracking-[-0.01em]");var L=w_(),O=c(L,!0);l(L),S(()=>{x(L,"href",(_(i()),u(()=>i().href))),x(L,"title",(_(i()),u(()=>`Read the guide to ${i().name}`))),A(O,(_(i()),u(()=>i().name)))}),w(I,L)});var y=f(v,2);{var E=B=>{var I=y_(),L=c(I,!0);l(I),S(()=>A(L,(_(i()),u(()=>i().info)))),w(B,I)};N(y,B=>{_(i()),u(()=>i().info)&&B(E)})}var P=f(y,2),T=c(P);return l(P),l(b),l(d),S(()=>{x(p,"href",(_(i()),u(()=>i().href))),x(p,"title",(_(i()),u(()=>`Read the guide to ${i().name}`))),x(m,"href",(_(i()),u(()=>i().category_href))),x(m,"title",(_(i()),u(()=>`See all ${i().category} places in Bali`))),A(g,(_(i()),u(()=>i().category))),x(T,"href",(_(i()),u(()=>i().href))),x(T,"title",(_(i()),u(()=>`Read the guide to ${i().name}`)))}),w(e,d),Ke(t,"live",r),De(o)}var E_=k('<div class="u-container"><div class="h-[260px] overflow-hidden rounded-[20px] sm:h-[380px] lg:h-[540px] lg:rounded-3xl"><img sizes="(min-width: 1344px) 1280px, 100vw" fetchpriority="high" class="size-full object-cover"/></div></div>'),A_=k('<p class="text-lg font-medium leading-relaxed text-ink lg:text-[21px] lg:leading-[1.6]"> </p>'),S_=k(`<div class="prose max-w-none text-ink-soft lg:prose-lg prose-headings:font-bold prose-headings:tracking-[-0.015em] prose-headings:text-ink
88                       prose-h2:text-[26px] lg:prose-h2:text-[34px] prose-a:font-semibold prose-a:text-clay prose-strong:text-ink prose-li:marker:text-clay"></div>`),T_=Yt("<path></path>"),C_=k("<li><!></li>"),R_=k('<section class="u-container mt-6 flex flex-col gap-5 border-t border-line pb-14 pt-10 lg:gap-8 lg:pb-22 lg:pt-14"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-1.5 lg:gap-2"><span class="u-eyebrow">Keep exploring</span> <h2 class="text-[28px] font-bold leading-tight tracking-[-0.02em] lg:text-[40px]">More places to visit</h2></div> <a title="See every place to visit in Bali" class="shrink-0 py-3 text-sm font-bold text-ink underline underline-offset-4 hover:text-clay lg:text-[15px]">All places</a></div> <ul class="grid gap-3 sm:grid-cols-2 sm:gap-5 lg:grid-cols-4 lg:gap-7"></ul></section>'),M_=k('<section class="u-container flex flex-col gap-3.5 pb-5 pt-5 lg:gap-[18px] lg:py-7"><nav aria-label="Breadcrumb" class="flex min-w-0 flex-wrap gap-x-2 gap-y-1 text-[13px] text-muted lg:gap-x-2.5 lg:text-sm"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <a title="See every place to visit in Bali" class="text-muted hover:text-ink">Places to visit</a> <span aria-hidden="true">/</span> <a class="text-muted hover:text-ink"> </a></nav> <div class="flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between lg:gap-10"><div class="flex max-w-[960px] flex-col gap-3"><h1 class="text-[34px] font-bold leading-[1.05] tracking-[-0.025em] lg:text-[52px] lg:leading-[1.02]"> </h1> <div class="flex flex-wrap items-center gap-x-3 gap-y-1 text-[15px] font-semibold text-muted"><a class="rounded-full bg-sea-tint px-3 py-1 text-[13px] font-bold text-sea hover:text-sea"> </a> <span aria-hidden="true">\xB7</span> <span>Bali, Indonesia</span></div></div> <div class="flex shrink-0 items-center gap-3"><button type="button" title="Share this place guide" class="flex h-11 items-center gap-2 rounded-full border border-line-strong px-[18px] text-sm font-bold text-ink hover:bg-ink/5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M12 3v12M7 8l5-5 5 5"></path></svg> Share</button>
88 <span class="text-sm font-semibold text-ok" aria-live="polite"> </span></div></div></section> <!> <section class="u-container grid items-start gap-8 pb-10 pt-8 lg:grid-cols-[minmax(0,1fr)_408px] lg:gap-18 lg:pb-10 lg:pt-14"><div class="flex min-w-0 flex-col gap-6 lg:gap-8"><!> <!></div> <aside class="flex flex-col gap-5 rounded-[22px] border border-line bg-white p-6 shadow-[0_24px_60px_-28px_rgba(28,33,28,0.35)] lg:sticky lg:top-[108px] lg:p-7"><span class="text-xs font-bold uppercase tracking-[0.16em] text-clay">Plan a visit</span> <h2 class="text-[26px] font-bold leading-tight tracking-[-0.02em]">See it on a private day with a driver</h2> <p class="text-[15px] leading-relaxed text-ink-soft">Tell us where you are staying and we will suggest a route that takes in this place and a few more nearby. One price per car, no hidden fees.</p> <a target="_blank" rel="noopener noreferrer" class="u-btn !min-h-14"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Ask on WhatsApp</a> <a href="/tours" title="Browse ready-made Bali day tours" class="u-btn-ghost !text-[15px]">Browse day tours</a></aside></section> <!>',1);function cf(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=null,o=G(t,"selected_place",8),d=G(t,"places",24,()=>[]),p=G(t,"phone",8,null),h="/points-of-interests",$=H("");async function b(){let U=window.location.href;try{if(navigator.share){await navigator.share({title:s(r).name,url:U});return}await navigator.clipboard.writeText(U),D($,"Link copied")}catch{D($,"");return}setTimeout(()=>D($,""),2500)}X(()=>_(o()),()=>{D(r,o())}),X(()=>s(r),()=>{D(i,`${h}/${s(r).category.slug}`)}),X(()=>(st,_(p()),s(r)),()=>{D(n,st(p(),`Hi Bali Daily Tours! I'd like to visit ${s(r).name}. Can you plan a day with a driver?`))}),nt();var m={live:a};je();var g=M_(),v=Xe(g),y=c(v),E=f(c(y),4);x(E,"href",h);var P=f(E,4),T=c(P,!0);l(P),l(y);var B=f(y,2),I=c(B),L=c(I),O=c(L,!0);l(L);var ee=f(L,2),me=c(ee),C=c(me,!0);l(me),Se(4),l(ee),l(I);var M=f(I,2),J=c(M),fe=f(J,2),ue=c(fe,!0);l(fe),l(M),l(B),l(v);var $e=f(v,2);{var W=U=>{var ce=E_(),ge=c(ce),Fe=c(ge);l(ge),l(ce),S((xe,be)=>{x(Fe,"src",xe),x(Fe,"srcset",be),x(Fe,"alt",(s(r),u(()=>`${s(r).name} \u2014 photo of this place in Bali`)))},[()=>(_(Be),s(r),u(()=>Be(s(r).image_url,1280))),()=>(_(Ue),s(r),u(()=>Ue(s(r).image_url,[640,960,1280,1920])))]),w(U,ce)};N($e,U=>{s(r),u(()=>s(r).image_url)&&U(W)})}var le=f($e,2),de=c(le),te=c(de);{var Le=U=>{var ce=A_(),ge=c(ce,!0);l(ce),S(()=>A(ge,(s(r),u(()=>s(r).info)))),w(U,ce)};N(te,U=>{s(r),u(()=>s(r).info)&&U(Le)})}var F=f(te,2);{var V=U=>{var ce=S_();wn(ce,()=>(s(r),u(()=>s(r).description)),!0),l(ce),w(U,ce)};N(F,U=>{s(r),u(()=>s(r).description)&&U(V)})}l(de);var oe=f(de,2),se=f(c(oe),6),Z=c(se);Y(Z,5,()=>Kt,ae,(U,ce)=>{var ge=T_();S(()=>x(ge,"d",s(ce))),w(U,ge)}),l(Z),Se(),l(se),Se(2),l(oe),l(le);var we=f(le,2);{var re=U=>{var ce=R_(),ge=c(ce),Fe=f(c(ge),2);x(Fe,"href",h),l(ge);var xe=f(ge,2);Y(xe,5,d,be=>be.id,(be,Ge)=>{var ze=C_(),Ve=c(ze);Js(Ve,{get place(){return s(Ge)},sizes:"(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw"}),l(ze),w(be,ze)}),l(xe),l(ce),w(U,ce)};N(we,U=>{_(d()),u(()=>d().length)&&U(re)})}return S(()=>{x(P,"href",s(i)),x(P,"title",(s(r),u(()=>`See ${s(r).category.name} places in Bali`))),A(T,(s(r),u(()=>s(r).category.name))),A(O,(s(r),u(()=>s(r).name))),x(me,"href",s(i)),x(me,"title",(s(r),u(()=>`See ${s(r).category.name} places in Bali`))),A(C,(s(r),u(()=>s(r).category.name))),A(ue,s($)),x(se,"href",s(n)),x(se,"title",(s(r),u(()=>`Ask our team about visiting ${s(r).name} on WhatsApp`)))}),gr("click",J,b),w(e,g),Ke(t,"live",a),De(m)}var Wc={};At(Wc,{default:()=>df});var P_=k('<a title="See every place to visit in Bali" class="text-muted hover:text-ink">Places to visit</a> <span aria-hidden="true">/</span> <span class="font-semibold text-ink" aria-current="page"> </span>',1),L_=k('<span class="font-semibold text-ink" aria-current="page">Places to visit</span>'),I_=k('<span class="ml-1.5 font-semibold opacity-70"> </span>'),D_=k('<a> <span class="ml-1.5 font-semibold opacity-70"> </span></a>'),O_=k('<img sizes="(min-width: 1024px) 50vw, 100vw" class="absolute inset-0 size-full object-cover"/>
88'),F_=k('<p class="u-clamp-5 text-base leading-relaxed text-ink-soft"> </p>'),N_=k('<div class="mt-auto flex flex-col gap-4 border-t border-sand pt-5 sm:flex-row sm:items-center sm:justify-between"><span class="flex flex-col gap-0.5"><span class="text-[13px] text-muted">Visited on</span> <a class="text-base font-bold text-clay hover:text-clay-dark"> </a> <!></span> <a class="u-btn shrink-0 !min-h-13 !px-6 !text-[15px]">See the tour <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></div>'),B_=k('<section class="u-container pb-8 lg:pb-16"><article class="grid overflow-hidden rounded-[22px] border border-line bg-white shadow-[0_24px_60px_-28px_rgba(28,33,28,0.35)] lg:grid-cols-2"><div class="relative h-60 lg:h-auto lg:min-h-[460px]"><!> <span class="absolute left-4 top-4 rounded-full bg-card/95 px-3 py-1.5 text-xs font-bold text-forest">Featured place</span></div> <div class="flex flex-col gap-3.5 p-6 lg:p-10"><span class="text-xs font-bold uppercase tracking-[0.14em] text-clay"> </span> <h2 class="text-[28px] font-bold leading-[1.08] tracking-[-0.02em] lg:text-[34px]"><a class="text-ink hover:text-clay"> </a></h2> <!> <a class="inline-flex min-h-11 items-center gap-1.5 self-start text-[15px] font-bold text-ink underline underline-offset-4 hover:text-clay">Read the place guide</a> <!></div></article></section>'),H_=k("<li><!></li>"),j_=k('<ul class="grid gap-3 sm:grid-cols-2 sm:gap-5 lg:grid-cols-4 xl:grid-cols-5"></ul>'),U_=k('<div class="flex flex-col gap-3 rounded-[18px] bg-sand px-5 py-6 lg:flex-row lg:items-center lg:justify-between lg:gap-6 lg:p-10"><span class="flex flex-col gap-1.5"><span class="text-xl font-bold lg:text-[22px]"> </span> <span class="text-sm leading-relaxed text-ink-soft lg:text-[15px]">Tell us where you want to go and we will plan a private day with a driver.</span></span> <a target="_blank" rel="noopener noreferrer" title="Ask our team about this place on WhatsApp" class="flex h-12 shrink-0 items-center justify-center rounded-full bg-ink px-6 text-[15px] font-bold text-white hover:bg-forest hover:text-white lg:h-13">Ask on WhatsApp</a></div>'),z_=Yt("<path></path>"),V_=k('<div class="relative hidden lg:block"><img sizes="50vw" loading="lazy" class="absolute inset-0 size-full object-cover"/></div>'),q_=k('<section class="u-container flex flex-col gap-3.5 pb-4 pt-5 lg:gap-5 lg:pb-8 lg:pt-7"><nav aria-label="Breadcrumb" class="flex flex-wrap gap-2 text-[13px] text-muted lg:gap-2.5 lg:text-sm"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <!></nav> <div class="flex flex-col gap-3.5 lg:flex-row lg:items-end lg:justify-between lg:gap-12"><div class="flex max-w-[720px] flex-col gap-3.5"><h1 class="u-h1"> </h1> <p class="text-[15px] leading-relaxed text-ink-soft lg:text-lg"><!></p></div> <label class="mt-1 flex h-13 shrink-0 items-center gap-2.5 rounded-full border border-line-strong bg-white px-[18px] shadow-[0_12px_30px_-22px_rgba(28,33,28,0.4)] focus-within:border-ink lg:mt-0 lg:h-14 lg:w-[400px] lg:gap-3 lg:px-5"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-muted" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="M20 20l-3.5-3.5"></path></svg> <span class="sr-only">Search a place</span> <input type="search" placeholder="Search a place" autocomplete="off" class="h-11 min-w-0 grow border-0 bg-transparent p-0 text-base font-medium text-ink placeholder:text-muted focus:outline-none focus:ring-0"/></label></div> <div class="flex items-center justify-between gap-6"><nav aria-label="Place categories" class="u-edge-row -mx-4 flex gap-2 overflow-x-auto px-4 pb-1 lg:mx-0 lg:flex-wrap lg:overflow-visible lg:px-0"><a title="See every place to visit in Bali">All places<!></a> <!></nav> <span class="hidden shrink-0 whitespace-nowrap text-sm font-semibold text-muted lg:block" aria-l
88ive="polite"> </span></div></section> <!> <section class="u-container flex flex-col gap-4 pb-10 pt-6 lg:gap-7 lg:border-t lg:border-line lg:pb-18 lg:pt-14"><div class="flex items-end justify-between gap-4"><div class="flex flex-col gap-1.5 lg:gap-2"><span class="u-eyebrow"> </span> <h2 class="text-[28px] font-bold leading-tight tracking-[-0.02em] lg:text-[40px]"> </h2></div> <span class="shrink-0 pb-1 text-[13px] font-semibold text-muted lg:hidden"> </span> <a href="/tours" title="Browse every Bali day tour" class="hidden shrink-0 py-3 text-[15px] font-bold text-ink underline underline-offset-4 hover:text-clay lg:block">Browse day tours</a></div> <!></section> <div class="px-3 lg:u-container"><section class="mb-10 grid overflow-hidden rounded-3xl bg-forest text-paper lg:mb-22 lg:h-[340px] lg:grid-cols-2"><div class="flex flex-col justify-center gap-3.5 px-6 py-8 lg:gap-4 lg:px-14 lg:py-12"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px] lg:tracking-[0.16em]">Private car with driver</span> <h2 class="text-[30px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[40px] lg:leading-[1.08]">Plan a day around these places</h2> <p class="text-[15px] leading-relaxed text-paper/82 lg:text-base">Pick the places you want to see and we will build the route. One price per car, no hidden fees.</p> <div class="mt-1.5 flex flex-col gap-3 sm:flex-row lg:mt-2"><a target="_blank" rel="noopener noreferrer" title="Plan a custom day with us on WhatsApp" class="u-btn !px-6 !text-[15px]"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Plan on WhatsApp</a> <a href="/tours" title="Browse ready-made day tours" class="flex min-h-13 items-center justify-center rounded-full border border-paper/50 px-6 text-[15px] font-bold text-paper hover:bg-paper/10 hover:text-paper">See day tours</a></div></div> <!></section></div>',1);function df(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=H(),o=H(),d=H(),p=H(),h=H(),$=null,b=G(t,"places",24,()=>[]),m=G(t,"categories",24,()=>[]),g=G(t,"featured",8,null),v=G(t,"active",8,null),y=G(t,"title",8,null),E=G(t,"phone",8,null),P="/points-of-interests",T=H(""),B=K=>(K||"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");X(()=>s(T),()=>{D(r,B(s(T).trim()))}),X(()=>(s(r),_(b())),()=>{D(i,s(r)?b().filter(K=>B(`${K.name} ${K.category} ${K.info}`).includes(s(r))):b())}),X(()=>s(i),()=>{D(n,`${s(i).length} ${s(i).length===1?"place":"places"}`)}),X(()=>_(y()),()=>{D(a,y()?`${y()} in Bali`:"Places to visit in Bali")}),X(()=>_(m()),()=>{D(o,m().reduce((K,Q)=>K+Q.count,0))}),X(()=>_(b()),()=>{D(d,b().find(K=>K.id==="9")||b()[0])}),X(()=>(st,_(E())),()=>{D(p,st(E(),"Hi Bali Daily Tours! I'd like to plan a private day around a few places in Bali."))}),X(()=>(st,_(E()),s(T)),()=>{D(h,st(E(),`Hi Bali Daily Tours! I'm looking for a place in Bali: ${s(T).trim()}`))}),nt();var I={live:$};je();var L=q_(),O=Xe(L),ee=c(O),me=f(c(ee),4);{var C=K=>{var Q=P_(),ve=Xe(Q);x(ve,"href",P);var Ee=f(ve,4),Oe=c(Ee,!0);l(Ee),S(()=>A(Oe,y())),w(K,Q)},M=K=>{var Q=L_();w(K,Q)};N(me,K=>{y()?K(C):K(M,-1)})}l(ee);var J=f(ee,2),fe=c(J),ue=c(fe),$e=c(ue,!0);l(ue);var W=f(ue,2),le=c(W);{var de=K=>{var Q=di();S(ve=>A(Q,`Every ${ve??""} guide we have written \u2014 what each place is, when to go and what to expect when you get there.`),[()=>(_(y()),u(()=>y().toLowerCase()))]),w(K,Q)},te=K=>{var Q=di("Temples, rice terraces, waterfalls and beaches across the island \u2014 each with a short guide to help you decide where to spend your day.");w(K,Q)};N(le,K=>{y()?K(de):K(te,-1)})}l(W),l(fe);var Le=f(fe,2),F=f(c(Le),4);Ci(F),l(Le),l(J);var V=f(J,2),oe=c(V),se=c(oe);x(se,"href",P);var Z=f(c(se));{var we=K=>{var Q=I_(),ve=c(Q,!0);l(Q),S(()=>A(ve,s(o))),w(K,Q)};N(Z,K=>{s(o)&&K(we)})}l(se);var re=f(se,2);Y(re,1,m,ae,(K,Q)=>{var ve=D_(),Ee=c(ve,!0),Oe=f(Ee),pt=c(Oe,!0);l(Oe),l(ve),S(()=>{x(ve,"href",(s(Q),u(()=>s(Q).href))),x(ve,"title",(s(Q),u(()=>`See ${s(Q).name} places in Bali`))),x(ve,"aria-current",(_(v()),s(Q),u(()=>v()===s(Q).href?"page":void 0))),Ze(ve,1,`flex h-11 shrink-0 items-center whitespace-nowrap rounded-full border px-4 text-sm font-bold lg:px-[18px]
89                           ${_(v()),s(Q),u(()=>v()===s(Q).href?"border-forest bg-forest text-paper hover:text-paper":"border-line-strong bg-card text-ink hover:text-ink hover:bg-sand/60")??""}`),A(Ee,(s(Q),u(()=>s(Q).name))),A(pt,(s(Q),u(()=>s(Q).count)))}),w(K,ve)}),l(oe);var U=f(oe,2),ce=c(U,!0);l(U),l(V),l(O);var ge=f(O,2);{var Fe=K=>{var Q=B_(),ve=c(Q),Ee=c(ve),Oe=c(Ee);{var pt=Ft=>{var ie=O_();S((pe,z)=>{x(ie,"src",pe),x(ie,"srcset",z),x(ie,"alt",(_(g()),u(()=>`${g().place.name} \u2014 photo of this place in Bali`)))},[()=>(_(Be),_(g()),u(()=>Be(g().place.image,960))),()=>(_(Ue),_(g()),u(()=>Ue(g().place.image,[480,960,1440])))]),w(Ft,ie)};N(Oe,Ft=>{_(g()),u(()=>g().place.image)&&Ft(pt)})}Se(2),l(Ee);var vt=f(Ee,2),et=c(vt),kt=c(et,!0);l(et);var gt=f(et,2),Mt=c(gt),Zt=c(Mt,!0);l(Mt),l(gt);var $r=f(gt,2);{var ur=Ft=>{var ie=F_(),pe=c(ie,!0);l(ie),S(()=>A(pe,(_(g()),u(()=>g().place.info)))),w(Ft,ie)};N($r,Ft=>{_(g()),u(()=>g().place.info)&&Ft(ur)})}var Jt=f($r,2),Ir=f(Jt,2);{var ti=Ft=>{var ie=N_(),pe=c(ie),z=f(c(pe),2),q=c(z,!0);l(z);var ke=f(z,2);Er(ke,{get price(){return _(g()),u(()=>g().tour.price)},get price_type(){return _(g()),u(()=>g().tour.price_type)},size:"sm"}),l(pe);var qe=f(pe,2);l(ie),S(()=>{x(z,"href",(_(g()),u(()=>g().tour.href))),x(z,"title",(_(g()),u(()=>`See the ${g().tour.title} itinerary and price`))),A(q,(_(g()),u(()=>g().tour.title))),x(qe,"href",(_(g()),u(()=>g().tour.href))),x(qe,"title",(_(g()),u(()=>`See the ${g().tour.title} itinerary and price`)))}),w(Ft,ie)};N(Ir,Ft=>{_(g()),u(()=>g().tour)&&Ft(ti)})}l(vt),l(ve),l(Q),S(()=>{A(kt,(_(g()),u(()=>g().place.category))),x(Mt,"href",(_(g()),u(()=>g().place.href))),x(Mt,"title",(_(g()),u(()=>`Read the guide to ${g().place.name}`))),A(Zt,(_(g()),u(()=>g().place.name))),x(Jt,"href",(_(g()),u(()=>g().place.href))),x(Jt,"title",(_(g()),u(()=>`Read the guide to ${g().place.name}`)))}),w(K,Q)};N(ge,K=>{g()&&!s(r)&&K(Fe)})}var xe=f(ge,2),be=c(xe),Ge=c(be),ze=c(Ge),Ve=c(ze,!0);l(ze);var at=f(ze,2),dt=c(at,!0);l(at),l(Ge);var ut=f(Ge,2),xt=c(ut,!0);l(ut),Se(2),l(be);var Ot=f(be,2);{var jt=K=>{var Q=j_();Y(Q,5,()=>s(i),ve=>ve.id,(ve,Ee)=>{var Oe=H_(),pt=c(Oe);Js(pt,{get place(){return s(Ee)}}),l(Oe),w(ve,Oe)}),l(Q),w(K,Q)},dr=K=>{var Q=U_(),ve=c(Q),Ee=c(ve),Oe=c(Ee);l(Ee),Se(2),l(ve);var pt=f(ve,2);l(Q),S(vt=>{A(Oe,`No place guides match \u201C${vt??""}\u201D`),x(pt,"href",s(h))},[()=>(s(T),u(()=>s(T).trim()))]),w(K,Q)};N(Ot,K=>{s(i),u(()=>s(i).length)?K(jt):K(dr,-1)})}l(xe);var Ar=f(xe,2),Me=c(Ar),he=c(Me),Ye=f(c(he),6),ye=c(Ye),Re=c(ye);Y(Re,5,()=>Kt,ae,(K,Q)=>{var ve=z_();S(()=>x(ve,"d",s(Q))),w(K,ve)}),l(Re),Se(),l(ye),Se(2),l(Ye),l(he);var Pe=f(he,2);{var Qe=K=>{var Q=V_(),ve=c(Q);l(Q),S((Ee,Oe)=>{x(ve,"src",Ee),x(ve,"srcset",Oe),x(ve,"alt",(s(d),u(()=>`${s(d).name} \u2014 photo of this place in Bali`)))},[()=>(_(Be),s(d),u(()=>Be(s(d).image,960))),()=>(_(Ue),s(d),u(()=>Ue(s(d).image,[480,960,1440])))]),w(K,Q)};N(Pe,K=>{s(d),u(()=>s(d)&&s(d).image)&&K(Qe)})}return l(Me),l(Ar),S(K=>{A($e,s(a)),x(se,"aria-current",v()?void 0:"page"),Ze(se,1,`flex h-11 shrink-0 items-center whitespace-nowrap rounded-full border px-4 text-sm font-bold lg:px-[18px]
90                       ${v()?"border-line-strong bg-card text-ink hover:text-ink hover:bg-sand/60":"border-forest bg-forest text-paper hover:text-paper"}`),A(ce,s(n)),A(Ve,y()||"All of Bali"),A(dt,K),A(xt,s(n)),x(ye,"href",s(p))},[()=>(s(r),s(T),u(()=>s(r)?`Places matching \u201C${s(T).trim()}\u201D`:"Places worth the drive"))]),Ri(F,()=>s(T),K=>D(T,K)),w(e,L),Ke(t,"live",$),De(I)}var Qc={};At(Qc,{default:()=>hf});var Gc={};At(Gc,{default:()=>Mi});var W_=k('<a class="text-muted hover:text-ink"> </a>'),G_=k('<span aria-current="page" class="font-semibold text-ink"> </span>'),Y_=k('<span aria-hidden="true">/</span>'),J_=k('<li class="flex items-center gap-2.5"><!> <!></li>'),X_=k('<nav aria-label="Breadcrumb" class="text-sm text-muted"><ol class="flex flex-wrap items-center gap-x-2.5 gap-y-1"></ol></nav>');function Mi(e,t){Ie(t,!1);let r=G(t,"items",24,()=>[]);je();var i=X_(),n=c(i);Y(n,5,r,ae,(a,o,d)=>{var p=J_(),h=c(p);{var $=v=>{var y=W_(),E=c(y,!0);l(y),S(()=>{x(y,"href",(s(o),u(()=>s(o).href))),x(y,"title",(s(o),u(()=>s(o).tip))),A(E,(s(o),u(()=>s(o).label)))}),w(v,y)},b=v=>{var y=G_(),E=c(y,!0);l(y),S(()=>A(E,(s(o),u(()=>s(o).label)))),w(v,y)};N(h,v=>{s(o),u(()=>
90s(o).href)?v($):v(b,-1)})}var m=f(h,2);{var g=v=>{var y=Y_();w(v,y)};N(m,v=>{_(r()),u(()=>d<r().length-1)&&v(g)})}l(p),w(a,p)}),l(n),l(i),w(e,i),De()}var Xc={};At(Xc,{default:()=>un});var Ce={sun:"M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4",partly:"M8 3v1.5M3 8h1.5M4.5 4.5l1 1M11.5 4.5l-1 1M5.3 11A3.5 3.5 0 1 1 11.6 7M17 20H8.5a4 4 0 1 1 .8-7.9A5 5 0 0 1 18.8 13.2 3.4 3.4 0 0 1 17 20z",cloud:"M7 19h10.5a4 4 0 0 0 .6-8A6 6 0 0 0 6.4 9.6 4.8 4.8 0 0 0 7 19z",rain:"M7 15h10.5a4 4 0 0 0 .6-8A6 6 0 0 0 6.4 5.6 4.8 4.8 0 0 0 7 15zM8.5 18l-1 3M12.5 18l-1 3M16.5 18l-1 3",storm:"M7 15h10.5a4 4 0 0 0 .6-8A6 6 0 0 0 6.4 5.6 4.8 4.8 0 0 0 7 15zM13 15l-2.5 4h3L11 23",drop:"M12 3s6 6.5 6 11a6 6 0 0 1-12 0c0-4.5 6-11 6-11z",wind:"M3 8h11a3 3 0 1 0-3-3M3 12h16a3 3 0 1 1-3 3M3 16h8",umbrella:"M12 3a9 9 0 0 1 9 9H3a9 9 0 0 1 9-9zM12 12v7a2 2 0 0 1-4 0",wave:"M2 12c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2M2 17c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2",tide:"M3 17c3 0 3-6 6-6s3 6 6 6 3-6 6-6M3 21h18",thermo:"M14 14.8V5a2 2 0 1 0-4 0v9.8a4 4 0 1 0 4 0zM12 17.5v-6",compass:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM15.5 8.5l-2 5-5 2 2-5z",pin:"M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21zM12 12a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z",calendar:"M4 6h16v14H4zM4 10h16M8 3v4M16 3v4",ruler:"M3 17L17 3l4 4L7 21zM7 13l2 2M10 10l2 2M13 7l2 2",user:"M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0",arrow:"M5 12h14M13 6l6 6-6 6",book:"M4 19V5a2 2 0 0 1 2-2h14v16H6a2 2 0 0 0-2 2zM20 19v2H6"},uf={sunny:{path:Ce.sun,color:"#B9531C",tint:"#F6E3CF"},"partly-cloudy":{path:Ce.partly,color:"#9A5B2E",tint:"#F6E3CF"},cloudy:{path:Ce.cloud,color:"#5A6158",tint:"#EDE5D4"},rainy:{path:Ce.rain,color:"#1F5D63",tint:"#DCE8E4"},thunderstorms:{path:Ce.storm,color:"#1F5D63",tint:"#DCE8E4"}},Fa=e=>uf[e]||uf["partly-cloudy"],K_=["N","NE","E","SE","S","SW","W","NW"];function fs(e){return e==null||isNaN(Number(e))?"":K_[Math.round((Number(e)%360+360)%360/45)%8]}function zr(e){let t=Number(e)||0;return t>=8?{label:"Excellent",color:"#1F6B43",bg:"#E3EFE6",dots:4}:t>=6?{label:"Good",color:"#1F5D63",bg:"#DCE8E4",dots:3}:t>=4?{label:"Fair",color:"#8A5A12",bg:"#F3E6CC",dots:2}:{label:"Poor",color:"#9A3B12",bg:"#F6E3CF",dots:1}}var Yc=[{range:"8\u201310",...zr(8),text:"Clean, well-shaped waves with light or offshore wind."},{range:"6\u20137",...zr(6),text:"Good surf with decent wind. Great for intermediate to advanced surfers."},{range:"4\u20135",...zr(4),text:"Rideable, but not ideal. Fine for beginners and practice sessions."},{range:"1\u20133",...zr(1),text:"Small waves or strong onshore wind. Consider another activity."}];function Pi(e){let t=String(e||"").toLowerCase();return t.startsWith("beginner")?"bg-[#E3EFE6] text-ok":t.startsWith("intermediate")?"bg-sea-tint text-sea":"bg-sun-tint text-no"}var pf="Asia/Makassar",Z_=new Intl.DateTimeFormat("en-GB",{weekday:"short",timeZone:"UTC"}),Q_=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",timeZone:"UTC"}),em=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",timeZone:pf});function hs(e){let t=e?new Date(`${String(e).slice(0,10)}T00:00:00Z`):null;return!t||isNaN(t)?{weekday:"",date:""}:{weekday:Z_.format(t),date:Q_.format(t)}}var tm=new Intl.DateTimeFormat("en-CA",{timeZone:pf});function yn(e){return String(e||"").slice(0,10)===tm.format(new Date)?"Today":hs(e).weekday}function Jc(e){let t=e?new Date(e):null;return t&&!isNaN(t)?em.format(t):""}function ff(e=new Date){let t=e.getUTCMonth()+1;return t>=5&&t<=10?"dry":t>=11||t<=3?"wet":null}var rm=k('<a><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg> </a>'),im=k('<nav aria-label="Weather and surf" class="flex self-start rounded-full bg-sand p-1 gap-1"></nav>');function un(e,t){Ie(t,!1);let r=G(t,"active",8,"weather"),i=[{key:"weather",label:"Weather",href:"/weather",tip:"See the Bali weather forecast",icon:Ce.sun},{key:"surf",label:"Surf",href:"/wave-info",tip:"See the Bali surf report",icon:Ce.wave}];je();var n=im();Y(n,5,()=>i,ae,(a,o)=>{var d=rm(),p=c(d),h=c(p);l(p);var $=f(p);l(d),S(()=>{x(d,"href",(s(o),u(()=>s(o).href))),x(d,"title",(s(o),u(()=>s(o).tip))),x(d,"aria-current",(_(r()),s(o),u(()=>r()===s(o).key?"page":void 0))),Ze(d,1,`flex h-11 items-center gap-2 rounded-full px-5 text-[15px] font-bold lg:px-6
91                   ${_(r()),s(o),u(()=>r()===s(o).key?"bg-ink text-white hover:text-white":"text-ink hover:bg-card hover:text-ink")??""}`),x(h,"d",(s(o),u(()=>s(o).icon))),A($,` ${s(o),u(()=>s(o).label)??""}`)}),w(a,d)}
91),l(n),w(e,n),De()}var Kc={};At(Kc,{default:()=>Li});var nm=Yt("<path></path>"),sm=k('<a class="flex h-13 items-center justify-center rounded-full border border-white/60 px-6 text-[15px] font-bold text-white hover:bg-white/10 hover:text-white lg:h-14"> </a>'),am=k('<div class="px-3 lg:u-container"><section class="relative mb-10 mt-6 overflow-hidden rounded-3xl bg-sea px-6 py-10 text-white lg:mb-24 lg:mt-10 lg:rounded-[28px] lg:px-18 lg:py-18"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="0.6" stroke-linecap="round" class="pointer-events-none absolute -right-16 -bottom-24 size-[420px] text-white/8 lg:-right-8 lg:size-[560px]" aria-hidden="true"><path d="M2 9c2 0 2-1.5 4-1.5S8 9 10 9s2-1.5 4-1.5S16 9 18 9s2-1.5 4-1.5M2 14c2 0 2-1.5 4-1.5S8 14 10 14s2-1.5 4-1.5S16 14 18 14s2-1.5 4-1.5M2 19c2 0 2-1.5 4-1.5S8 19 10 19s2-1.5 4-1.5S16 19 18 19s2-1.5 4-1.5"></path></svg> <div class="relative flex max-w-[640px] flex-col gap-4 lg:gap-5"><h2 class="text-[34px] font-bold leading-[1.05] tracking-[-0.02em] lg:text-[56px] lg:leading-[1.02]"> </h2> <p class="text-[15px] leading-relaxed text-white/90 lg:text-lg"> </p> <div class="mt-1 flex flex-col gap-3 sm:flex-row sm:items-center"><a target="_blank" rel="noopener noreferrer" title="Plan your days around the weather with us on WhatsApp" class="flex h-13 items-center justify-center gap-2.5 rounded-full bg-white px-6.5 text-[15px] font-bold text-ink hover:bg-card hover:text-ink lg:h-14 lg:text-base"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-whatsapp" aria-hidden="true"></svg> </a> <!></div></div></section></div>');function Li(e,t){Ie(t,!1);let r=H(),i=G(t,"phone",8,null),n=G(t,"title",8,"Plan around the weather"),a=G(t,"body",8,"Tell us your dates and where you're staying. We'll suggest the best day for a sunrise trek, a sunset temple or a day on the water."),o=G(t,"message",8,"Hi Bali Daily Tours! Can you help me plan my days around the weather?"),d=G(t,"links",24,()=>[]);X(()=>(st,_(i()),_(o())),()=>{D(r,st(i(),o()))}),nt(),je();var p=am(),h=c(p),$=f(c(h),2),b=c($),m=c(b,!0);l(b);var g=f(b,2),v=c(g,!0);l(g);var y=f(g,2),E=c(y),P=c(E);Y(P,5,()=>Kt,ae,(I,L)=>{var O=nm();S(()=>x(O,"d",s(L))),w(I,O)}),l(P);var T=f(P);l(E);var B=f(E,2);Y(B,1,d,ae,(I,L)=>{var O=sm(),ee=c(O,!0);l(O),S(()=>{x(O,"href",(s(L),u(()=>s(L).href))),x(O,"title",(s(L),u(()=>s(L).tip))),A(ee,(s(L),u(()=>s(L).label)))}),w(I,O)}),l(y),l($),l(h),l(p),S(I=>{A(m,n()),A(v,a()),x(E,"href",s(r)),A(T,` ${I??""}`)},[()=>(_(i()),_(Ur),u(()=>i()?`WhatsApp ${Ur(i())}`:"Chat on WhatsApp"))]),w(e,p),De()}var Zc={};At(Zc,{default:()=>Xs});var om=k(`<div role="status" class="flex items-start gap-3 rounded-2xl border border-[#E7C98F] bg-[#FBF1DC] p-4 text-sm text-[#6B4A10]"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0" aria-hidden="true"><path d="M12 9v4M12 17h.01M10.3 3.9L2 18a2 2 0 0 0 1.7 3h16.6a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"></path></svg> <p><strong>Live readings are temporarily unavailable.</strong> The numbers below are sample data, not today's surf.</p></div>`);function Xs(e,t){let r=G(t,"show",8,!1);var i=On(),n=Xe(i);{var a=o=>{var d=om();w(o,d)};N(n,o=>{r()&&o(a)})}w(e,i)}var lm=k("<span> </span>"),cm=k('<li class="shrink-0"><a> </a></li>'),dm=k('<span class="text-sm text-muted"> </span>'),um=k('<div class="flex flex-col gap-0.5 rounded-2xl border border-line bg-card px-3.5 py-3 lg:px-4"><dt class="flex items-center gap-1.5 text-xs text-muted lg:text-[13px]"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-sea" aria-hidden="true"><path></path></svg> </dt> <dd class="text-[15px] font-bold lg:text-[17px]"> </dd></div>'),pm=k('<div class="flex gap-3 py-3 first:pt-0 last:pb-0"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-gold" aria-hidden="true"><path></path></svg> <span class="flex flex-col gap-0.5"><dt class="text-[13px] text-paper/70"> </dt> <dd class="text-[15px] font-bold"> </dd></span></div>
91'),fm=k('<aside class="flex flex-col gap-4 rounded-3xl bg-forest px-5 py-6 text-paper lg:rounded-[22px] lg:p-7"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px] lg:tracking-[0.16em]">When it works best</span> <h2 class="text-2xl font-bold leading-tight tracking-[-0.015em] lg:text-[26px]"> </h2> <dl class="flex flex-col divide-y divide-paper/12"></dl> <p class="mt-auto text-[13px] text-paper/75">Compare every spot on the <a href="/wave-info" title="Bali surf report and best tide for every spot" class="font-bold text-gold underline underline-offset-2 hover:text-white">Bali surf report</a>.</p></aside>'),hm=k('<li><span class="flex flex-col gap-0.5"><span class="text-sm font-bold lg:text-[15px]"> </span> <span class="text-[11px] text-muted lg:text-[13px]"> </span></span> <strong class="text-xl lg:text-2xl"> </strong> <span class="text-[13px] text-muted"> </span> <span class="rounded-full px-2.5 py-0.5 text-xs font-bold"> </span></li>'),gm=k('<section class="u-container flex flex-col gap-3 pb-6 pt-8 lg:gap-4 lg:pb-10 lg:pt-12"><div class="flex items-baseline justify-between gap-4"><h2 class="text-xl font-bold tracking-[-0.01em] lg:text-2xl"> </h2> <span class="shrink-0 text-xs text-muted lg:text-sm">Waves \xB7 period \xB7 wind</span></div> <ol class="u-edge-row -mx-4 flex gap-2.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:gap-3 lg:overflow-visible lg:px-0"></ol></section>'),vm=k('<section class="u-container flex flex-col gap-4 pt-5 lg:gap-[18px] lg:pt-7"><!> <div class="flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between"><div class="flex max-w-3xl flex-col gap-3"><h1 class="u-h1"> </h1> <p class="text-base leading-relaxed text-ink-soft lg:text-lg"> </p> <div class="flex flex-wrap items-center gap-2"><span class="rounded-full bg-sand px-3 py-1.5 text-[13px] font-bold text-forest"> </span> <!> <a class="flex items-center gap-1.5 px-1 py-1.5 text-sm font-bold text-clay hover:text-clay-dark"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg> </a></div></div> <!></div> <!></section> <nav aria-label="Surf spots" class="u-container pt-6 lg:pt-8"><ul class="u-edge-row -mx-4 flex gap-2 overflow-x-auto px-4 lg:mx-0 lg:flex-wrap lg:px-0"></ul></nav> <section class="u-container grid gap-4 pt-6 lg:grid-cols-[minmax(0,1fr)_400px] lg:gap-6 lg:pt-8"><article class="flex flex-col gap-6 rounded-[22px] border border-line bg-white p-5 shadow-[0_24px_60px_-28px_rgba(28,33,28,0.35)] lg:gap-7 lg:p-8"><div class="flex items-start justify-between gap-4"><div class="flex flex-col gap-1.5"><span class="u-eyebrow !text-sea">Current conditions</span> <h2 class="text-[22px] font-bold tracking-[-0.01em] lg:text-[26px]"> </h2> <!></div> <span class="rounded-full px-3 py-1.5 text-[13px] font-bold"> </span></div> <div class="flex items-center gap-5 lg:gap-8"><span class="grid size-24 shrink-0 place-items-center rounded-full bg-sea-tint lg:size-[132px]"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-14 text-sea lg:size-[76px]" aria-hidden="true"><path></path></svg></span> <div class="flex flex-col gap-1"><span class="text-[64px] font-bold leading-[0.95] tracking-[-0.04em] lg:text-[104px]"> <span class="text-3xl tracking-normal lg:text-5xl">m</span></span> <span class="text-lg font-bold lg:text-xl">Wave height</span> <span class="text-sm text-muted lg:text-[15px]">Face height, in metres</span></div></div> <dl class="grid grid-cols-2 gap-2.5 sm:grid-cols-3 lg:gap-3"></dl></article> <!></section> <!> <!>',1);function hf(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=H(),o=H(),d=H(),p=null,h=G(t,"spot_data",8),$=G(t,"spot_guide",8,null),b=G(t,"all_spots",24,()=>[]),m=G(t,"current_slug",8),g=G(t,"phone",8,null),v=ye=>`${(ye||0).toFixed(1)} m`,y=ye=>`${Math.round(ye||0)} s`,E=ye=>ye||ye===0?`${fs(ye)} (${Math.round(ye)}\xB0)`:"\u2014";X(()=>_(h()),()=>{D(r,h().spot)}),X(()=>s(r),()=>{D(i,s(r).current||{})}),X(()=>(zr,s(i)),()=>{D(n,zr(s(i).surf_rating))}),X(()=>(Jc,s(r)),()=>{D(a,Jc(s(r).last_updated))}),X(()=>(s(i),Ce,fs),()=>{D(o,[{label:"Swell",value:`${v(s(i).swell_height)} \xB7 ${y(s(i).swell_period)}`,icon:Ce.wave},{label:"Swell direction",value:E(s(i).swell_direction),icon:Ce.compass},{label:"Wind",value:`${Math.round(s(i).wind_speed||0)} km/h ${fs(s(i).wind_direction)}`.trim(),icon:Ce.wind}
91,{label:"Wind waves",value:`${v(s(i).wind_wave_height)} \xB7 ${y(s(i).wind_wave_period)}`,icon:Ce.wind},{label:"Secondary swell",value:`${v(s(i).secondary_swell_height)} \xB7 ${y(s(i).secondary_swell_period)}`,icon:Ce.wave},{label:"Water",value:`${Math.round(s(i).water_temperature||0)}\xB0C`,icon:Ce.thermo}])}),X(()=>(_($()),Ce),()=>{D(d,$()?[{label:"Best tide",value:$().tide,icon:Ce.tide},{label:"Swell direction",value:$().swell,icon:Ce.compass},{label:"Offshore wind",value:$().wind,icon:Ce.wind},{label:"Ideal size",value:$().size,icon:Ce.ruler},{label:"Skill level",value:$().level,icon:Ce.user},{label:"Best season",value:$().season,icon:Ce.calendar}].filter(ye=>ye.value):[])}),nt();var P={live:p};je();var T=vm(),B=Xe(T),I=c(B);{let ye=cr(()=>(s(r),u(()=>[{label:"Home",href:"/",tip:"Go to the homepage"},{label:"Surf report",href:"/wave-info",tip:"See the surf report for every Bali spot"},{label:s(r).name}])));Mi(I,{get items(){return s(ye)}})}var L=f(I,2),O=c(L),ee=c(O),me=c(ee);l(ee);var C=f(ee,2),M=c(C,!0);l(C);var J=f(C,2),fe=c(J),ue=c(fe,!0);l(fe);var $e=f(fe,2);{var W=ye=>{var Re=lm(),Pe=c(Re,!0);l(Re),S(Qe=>{Ze(Re,1,`rounded-full px-3 py-1.5 text-[13px] font-bold ${Qe??""}`),A(Pe,(_($()),u(()=>$().level)))},[()=>(_(Pi),_($()),u(()=>Pi($().level)))]),w(ye,Re)};N($e,ye=>{_($()),u(()=>$()?.level)&&ye(W)})}var le=f($e,2),de=c(le),te=c(de);l(de);var Le=f(de);l(le),l(J),l(O);var F=f(O,2);un(F,{active:"surf"}),l(L);var V=f(L,2);{let ye=cr(()=>(_(h()),s(r),u(()=>h().is_fallback||s(r).is_fallback)));Xs(V,{get show(){return s(ye)}})}l(B);var oe=f(B,2),se=c(oe);Y(se,5,b,ae,(ye,Re)=>{var Pe=cm(),Qe=c(Pe),K=c(Qe,!0);l(Qe),l(Pe),S(()=>{x(Qe,"href",`/wave-info/${s(Re),u(()=>s(Re).slug)??""}`),x(Qe,"title",`See the live ${s(Re),u(()=>s(Re).name)??""} surf report`),x(Qe,"aria-current",(s(Re),_(m()),u(()=>s(Re).slug===m()?"page":void 0))),Ze(Qe,1,`flex h-11 items-center whitespace-nowrap rounded-full border px-4 text-sm font-bold
92                           ${s(Re),_(m()),u(()=>s(Re).slug===m()?"border-forest bg-forest text-paper hover:text-paper":"border-line bg-card text-ink hover:text-ink hover:border-line-strong")??""}`),A(K,(s(Re),u(()=>s(Re).name)))}),w(ye,Pe)}),l(se),l(oe);var Z=f(oe,2),we=c(Z),re=c(we),U=c(re),ce=f(c(U),2),ge=c(ce,!0);l(ce);var Fe=f(ce,2);{var xe=ye=>{var Re=dm(),Pe=c(Re);l(Re),S(()=>A(Pe,`Updated ${s(a)??""} Bali time`)),w(ye,Re)};N(Fe,ye=>{s(a)&&ye(xe)})}l(U);var be=f(U,2),Ge=c(be);l(be),l(re);var ze=f(re,2),Ve=c(ze),at=c(Ve),dt=c(at);l(at),l(Ve);var ut=f(Ve,2),xt=c(ut),Ot=c(xt,!0);Se(),l(xt),Se(4),l(ut),l(ze);var jt=f(ze,2);Y(jt,5,()=>s(o),ae,(ye,Re)=>{var Pe=um(),Qe=c(Pe),K=c(Qe),Q=c(K);l(K);var ve=f(K,1,!0);l(Qe);var Ee=f(Qe,2),Oe=c(Ee,!0);l(Ee),l(Pe),S(()=>{x(Q,"d",(s(Re),u(()=>s(Re).icon))),A(ve,(s(Re),u(()=>s(Re).label))),A(Oe,(s(Re),u(()=>s(Re).value)))}),w(ye,Pe)}),l(jt),l(we);var dr=f(we,2);{var Ar=ye=>{var Re=fm(),Pe=f(c(Re),2),Qe=c(Pe);l(Pe);var K=f(Pe,2);Y(K,5,()=>s(d),ae,(Q,ve)=>{var Ee=pm(),Oe=c(Ee),pt=c(Oe);l(Oe);var vt=f(Oe,2),et=c(vt),kt=c(et,!0);l(et);var gt=f(et,2),Mt=c(gt,!0);l(gt),l(vt),l(Ee),S(()=>{x(pt,"d",(s(ve),u(()=>s(ve).icon))),A(kt,(s(ve),u(()=>s(ve).label))),A(Mt,(s(ve),u(()=>s(ve).value)))}),w(Q,Ee)}),l(K),Se(2),l(Re),S(()=>A(Qe,`The ideal day at ${s(r),u(()=>s(r).name)??""}`)),w(ye,Re)};N(dr,ye=>{s(d),u(()=>s(d).length)&&ye(Ar)})}l(Z);var Me=f(Z,2);{var he=ye=>{var Re=gm(),Pe=c(Re),Qe=c(Pe),K=c(Qe);l(Qe),Se(2),l(Pe);var Q=f(Pe,2);Y(Q,5,()=>(s(r),u(()=>s(r).forecast)),ae,(ve,Ee)=>{let Oe=cr(()=>(_(zr),s(Ee),u(()=>zr(s(Ee).surf_rating)))),pt=cr(()=>(_(yn),s(Ee),u(()=>yn(s(Ee).date))));var vt=hm(),et=c(vt),kt=c(et),gt=c(kt,!0);l(kt);var Mt=f(kt,2),Zt=c(Mt,!0);l(Mt),l(et);var $r=f(et,2),ur=c($r);l($r);var Jt=f($r,2),Ir=c(Jt);l(Jt);var ti=f(Jt,2),Ft=c(ti);l(ti),l(vt),S((ie,pe,z,q)=>{Ze(vt,1,`flex w-[120px] shrink-0 flex-col items-center gap-2 rounded-2xl border px-2.5 py-3.5 text-center lg:w-auto lg:rounded-[18px] lg:px-4 lg:py-[18px]
93                           ${s(pt)==="Today"?"border-ink bg-white":"border-line bg-card"}`),A(gt,s(pt)),A(Zt,ie),A(ur,`${pe??""} m`),A(Ir,`${z??""} s \xB7 ${q??""} km/h`),Hr(ti,`background: ${_(s(Oe)),u(()=>s(Oe).bg)??""}; color: ${_(s(Oe)),u(()=>s(Oe).color)??""}`),A(Ft,`${_(s(Oe)),u(()=>s(Oe).label)??""} ${s(Ee),u(()=>s(Ee).surf_rating)??""}/10`)},[()=>(_(hs),s(Ee),u(()=>hs(s(Ee).date).date)),()=>(s(Ee),u(()=>
93(s(Ee).wave_height||0).toFixed(1))),()=>(s(Ee),u(()=>Math.round(s(Ee).wave_period||0))),()=>(s(Ee),u(()=>Math.round(s(Ee).wind_speed||0)))]),w(ve,vt)}),l(Q),l(Re),S(()=>{A(K,`${s(r),u(()=>s(r).forecast.length)??""}-day surf forecast`),Hr(Q,`grid-template-columns: repeat(${s(r),u(()=>s(r).forecast.length)??""}, minmax(0, 1fr))`)}),w(ye,Re)};N(Me,ye=>{s(r),u(()=>s(r).forecast?.length)&&ye(he)})}var Ye=f(Me,2);return Li(Ye,{get phone(){return g()},get title(){return`Surf ${s(r),u(()=>s(r).name)??""} on your Bali trip`},body:"Tell us where you're staying and when you want to paddle out. A private car and driver can take you there and add a temple or a sunset on the way back.",get message(){return`Hi Bali Daily Tours! I'd like to plan a day around a surf session at ${s(r),u(()=>s(r).name)??""}.`},links:[{label:"All surf spots",href:"/wave-info",tip:"See the surf report for every Bali spot"}]}),S(ye=>{A(me,`${s(r),u(()=>s(r).name)??""} surf report`),A(M,(s(r),u(()=>s(r).description))),A(ue,(s(r),u(()=>s(r).region))),x(le,"href",`/surf-spots/${m()??""}-wave-info`),x(le,"title",`Read our ${s(r),u(()=>s(r).name)??""} surf spot guide`),x(te,"d",(_(Ce),u(()=>Ce.book))),A(Le,` Read the ${s(r),u(()=>s(r).name)??""} spot guide`),A(ge,(s(r),u(()=>s(r).name))),Hr(be,`background: ${s(n),u(()=>s(n).bg)??""}; color: ${s(n),u(()=>s(n).color)??""}`),A(Ge,`${s(n),u(()=>s(n).label)??""} \xB7 ${s(i),u(()=>s(i).surf_rating||0)??""}/10`),x(dt,"d",(_(Ce),u(()=>Ce.wave))),A(Ot,ye)},[()=>(s(i),u(()=>(s(i).wave_height||0).toFixed(1)))]),w(e,T),Ke(t,"live",p),De(P)}var ed={};At(ed,{default:()=>gf});var $m=k('<div class="flex gap-3 py-3 first:pt-0 last:pb-0"><span class="grid size-9 shrink-0 place-items-center rounded-xl bg-sand"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-forest" aria-hidden="true"><path></path></svg></span> <span class="flex flex-col gap-0.5"><dt class="text-[13px] text-muted"> </dt> <dd class="text-[15px] font-bold"> </dd></span></div>'),_m=k(`<section class="u-container flex flex-col gap-4 pt-5 lg:gap-[18px] lg:pt-7"><!> <div class="flex flex-col gap-3"><h1 class="u-h1"> </h1> <div class="flex flex-wrap items-center gap-2"><span class="rounded-full bg-sand px-3 py-1.5 text-[13px] font-bold text-forest"> </span> <span class="rounded-full bg-sand px-3 py-1.5 text-[13px] font-bold text-forest"> </span> <span> </span></div></div></section> <section class="u-container grid gap-6 py-8 lg:grid-cols-[minmax(0,1fr)_400px] lg:gap-18 lg:py-14"><article class="flex flex-col gap-4 lg:gap-5"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]"> </h2> <p class="text-base leading-[1.75] text-ink-soft lg:text-lg"> </p> <div class="mt-2 flex flex-col gap-3 sm:flex-row"><a class="u-btn"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg></a> <a href="/surf-spots" title="Browse our guides to Bali's surf spots" class="u-btn-ghost">All surf spots</a></div></article> <aside class="h-fit rounded-[22px] border border-line bg-white p-5 lg:p-7"><h2 class="mb-4 text-xl font-bold lg:text-[22px]">Quick facts</h2> <dl class="flex flex-col divide-y divide-line"></dl></aside></section> <!>`,1);function gf(e,t){Ie(t,!1);let r=H(),i=null,n=G(t,"spot",8),a=G(t,"phone",8,null);X(()=>(_(n()),Ce),()=>{D(r,[{label:"Wave type",value:n().wave_type,icon:Ce.wave},{label:"Skill level",value:n().level,icon:Ce.user},{label:"Best season",value:n().season,icon:Ce.calendar},{label:"Best tide",value:n().tide,icon:Ce.tide},{label:"Swell",value:n().swell,icon:Ce.compass},{label:"Offshore wind",value:n().wind,icon:Ce.wind},{label:"Ideal size",value:n().size,icon:Ce.ruler},{label:"Region",value:n().region,icon:Ce.pin},{label:"Coordinates",value:`${n().lat}, ${n().lng}`,icon:Ce.pin}].filter(te=>te.value))}),nt();var o={live:i};je();var d=_m(),p=Xe(d),h=c(p);{let te=cr(()=>(_(n()),u(()=>[{label:"Home",href:"/",tip:"Go to the homepage"},{label:"Surf spots",href:"/surf-spots",tip:"Browse our guides to Bali's surf spots"},{label:n().name}])));Mi(h,{get items(){return s(te)}})}var $=f(h,2),b=c($),m=c(b);l(b);var g=f(b,2),v=c(g),y=c(v,!0);l(v);var E=f(v,2),P=c(E,!0);l(E);var T=f(E,2),B=c(T,!0);l(T),l(g),l($),l(p);var I=f(p,2),L=c(I),O=c(L),ee=c(O);l(O);var me=f(O,2),C=c(me,!0);l(me);var M=f(me,2),J=c(M),fe=c(J),ue=f(fe),$e=c(ue);l(ue),l(J),Se(2),l(M),l(L);var W=f(L,2),le=f(c(W),2);Y(le,5,()=>s(r),ae,(te,Le)=>{var F=$m(),V=c(F),oe=c(V),se=c(oe);l(oe),l(V);var Z=f(V,2),we=c(Z),re=c(we,!0);l(we);var U=f(we,2),ce=c(U,!0);l(U),l(Z),l(F),S(()=>{x(se,"d",(s(Le),u(()=>s(Le).icon))),A(re,(s(Le),u(()=>s(Le).label))),A(ce,(s(Le),u(()=>s(Le).value)))}),w(te,F)}),l(le),l(W),l(I);var de=f(I,2);{let te=cr(()=>(_(n()),u(()=>[{label:"Live surf report",href:"/wave-info/"+n().slug,tip:"See the live "+n().name+" surf report"}])));Li(de,{get phone(){return a()},get title(){return`Surf ${_(n()),u(()=>n().name)??""} on your Bali trip`},body:"Tell us where you're staying and when you want to paddle out. A private car and driver can take you there and add a temple or a sunset on the way back.",get message(){return`Hi Bali Daily Tours! I'd like to plan a day around a surf session at ${_(n()),u(()=>n().name)??""}.`},get links(){return s(te)}})}return S(te=>{A(m,`${_(n()),u(()=>n().name)??""} surf spot guide`),A(y,(_(n()),u(()=>n().region))),A(P,(_(n()),u(()=>n().wave_type))),Ze(T,1,`rounded-full px-3 py-1.5 text-[13px] font-bold ${te??""}`),A(B,(_(n()),u(()=>n().level))),A(ee,`About ${_(n()),u(()=>n().name)??""}`),A(C,(_(n()),u(()=>n().long_description))),x(J,"href",`/wave-info/${_(n()),u(()=>n().slug)??""}`),x(J,"title",`See the live ${_(n()),u(()=>n().name)??""} surf report`),A(fe,`Check the live ${_(n()),u(()=>n().name)??""} surf report `),x($e,"d",(_(Ce),u(()=>Ce.arrow)))},[()=>(_(Pi),_(n()),u(()=>Pi(n().level)))]),w(e,d),Ke(t,"live",i),De(o)}var td={};At(td,{default:()=>vf});
93var mm=k('<article class="flex flex-col gap-4 rounded-[20px] border border-line bg-white p-5 lg:p-6"><div class="flex items-start justify-between gap-3"><h3 class="text-xl font-bold tracking-[-0.01em] lg:text-[22px]"><a class="text-ink hover:text-clay"> </a></h3> <span> </span></div> <span class="self-start rounded-full bg-sand px-2.5 py-1 text-xs font-bold text-forest"> </span> <p class="grow text-[15px] leading-relaxed text-ink-soft"> </p> <div class="flex gap-2 border-t border-sand pt-4"><a class="flex h-11 grow items-center justify-center rounded-full border border-line-strong px-4 text-sm font-bold text-ink hover:bg-ink/5 hover:text-ink">Spot guide</a> <a class="flex h-11 grow items-center justify-center rounded-full bg-ink px-4 text-sm font-bold text-white hover:bg-forest hover:text-white">Live report</a></div></article>'),xm=k('<section class="flex flex-col gap-5 lg:gap-7"><div class="flex flex-col gap-2"><span class="u-eyebrow !text-sea"> </span> <h2 class="u-h2"> </h2></div> <div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3 lg:gap-6"></div></section>'),bm=k(`<section class="u-container flex flex-col gap-4 pt-5 lg:gap-[18px] lg:pt-7"><!> <div class="flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between"><div class="flex max-w-3xl flex-col gap-3.5"><h1 class="u-h1">Bali surf spots guide</h1> <p class="text-base leading-relaxed text-ink-soft lg:text-lg">From the world-class lefts of the Bukit Peninsula to the punchy east-coast rights, Bali has a wave for
94                every surfer. Explore each spot's wave type, skill level, best season and tides \u2014 then check the live
95                surf report before you paddle out.</p></div> <!></div> <a href="/wave-info" title="See today's surf conditions across Bali" class="u-btn self-start">View the live surf report <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg></a></section> <div class="u-container flex flex-col gap-12 py-10 lg:gap-18 lg:py-18"></div> <!>`,1);function vf(e,t){Ie(t,!1);let r=null,i=G(t,"regions",8),n=G(t,"phone",8,null);var a={live:r};je();var o=bm(),d=Xe(o),p=c(d);Mi(p,{items:[{label:"Home",href:"/",tip:"Go to the homepage"},{label:"Surf spots"}]});var h=f(p,2),$=f(c(h),2);un($,{active:"surf"}),l(h);var b=f(h,2),m=f(c(b)),g=c(m);l(m),l(b),l(d);var v=f(d,2);Y(v,5,i,ae,(E,P)=>{var T=xm(),B=c(T),I=c(B),L=c(I);l(I);var O=f(I,2),ee=c(O,!0);l(O),l(B);var me=f(B,2);Y(me,5,()=>(s(P),u(()=>s(P).spots)),ae,(C,M)=>{var J=mm(),fe=c(J),ue=c(fe),$e=c(ue),W=c($e,!0);l($e),l(ue);var le=f(ue,2),de=c(le,!0);l(le),l(fe);var te=f(fe,2),Le=c(te,!0);l(te);var F=f(te,2),V=c(F);l(F);var oe=f(F,2),se=c(oe),Z=f(se,2);l(oe),l(J),S((we,re,U)=>{x($e,"href",`/surf-spots/${s(M),u(()=>s(M).slug)??""}-wave-info`),x($e,"title",`Read our ${s(M),u(()=>s(M).name)??""} surf spot guide`),A(W,(s(M),u(()=>s(M).name))),Ze(le,1,`whitespace-nowrap rounded-full px-2.5 py-1 text-xs font-bold ${we??""}`),A(de,(s(M),u(()=>s(M).level))),A(Le,(s(M),u(()=>s(M).wave_type))),A(V,`${s(M),u(()=>s(M).description)??""}. Best on a ${re??""}. Season: ${U??""}.`),x(se,"href",`/surf-spots/${s(M),u(()=>s(M).slug)??""}-wave-info`),x(se,"title",`Read our ${s(M),u(()=>s(M).name)??""} surf spot guide`),x(Z,"href",`/wave-info/${s(M),u(()=>s(M).slug)??""}`),x(Z,"title",`See the live ${s(M),u(()=>s(M).name)??""} surf report`)},[()=>(_(Pi),s(M),u(()=>Pi(s(M).level))),()=>(s(M),u(()=>s(M).swell.toLowerCase())),()=>(s(M),u(()=>s(M).season.charAt(0).toLowerCase()+s(M).season.slice(1)))]),w(C,J)}),l(me),l(T),S(()=>{A(L,`${s(P),u(()=>s(P).spots.length)??""} ${s(P),u(()=>s(P).spots.length===1?"spot":"spots")??""}`),A(ee,(s(P),u(()=>s(P).region)))}),w(E,T)}),l(v);var y=f(v,2);return Li(y,{get phone(){return n()},title:"Plan your Bali surf trip",body:"Tell us which breaks you want to surf and where you're staying. A private car and driver can take you there and add a temple or a sunset on the way back.",message:"Hi Bali Daily Tours! I'd like to plan a day around a surf session.",links:[{label:"Live surf report",href:"/wave-info",tip:"See today's surf conditions across Bali"}]}),S(()=>x(g,"d",(_(Ce),u(()=>Ce.arrow)))),w(e,o),Ke(t,"live",r),De(a)}var rd={};At(rd,{default:()=>bf});var wm=k('<span aria-hidden="true">\xB7</span>'),km=k("<!><span> </span>",1),$f=k('<span role="status" class="text-sm font-semibold text-ok"> </span>'),Em=k('<img sizes="(min-width: 1280px) 1280px, 100vw" fetchpriority="high" class="size-full object-cover"/>
95'),Am=k('<div class="flex flex-col gap-2 rounded-[14px] border border-line bg-card p-3.5 lg:gap-2.5 lg:rounded-2xl lg:p-[18px]"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="size-[22px] text-forest lg:size-6" aria-hidden="true"><path></path></svg> <span class="text-sm font-bold leading-snug lg:text-[15px]"> </span></div>'),Sm=k('<a href="#itinerary" title="See the stops on this tour" class="flex h-11 shrink-0 items-center rounded-full border border-line bg-card px-[18px] text-sm font-bold text-ink hover:text-ink lg:h-auto lg:rounded-none lg:border-0 lg:bg-transparent lg:px-1 lg:py-3.5 lg:text-[15px] lg:font-semibold lg:text-muted">Itinerary</a>'),Tm=k(`<a href="#included" title="See what the price includes" class="flex h-11 shrink-0 items-center rounded-full border border-line bg-card px-[18px] text-sm font-bold text-ink hover:text-ink lg:h-auto lg:rounded-none lg:border-0 lg:bg-transparent lg:px-1 lg:py-3.5 lg:text-[15px] lg:font-semibold lg:text-muted">What's included</a>`),Cm=k('<a href="#good-to-know" title="Read the practical notes for this tour" class="flex h-11 shrink-0 items-center rounded-full border border-line bg-card px-[18px] text-sm font-bold text-ink hover:text-ink lg:h-auto lg:rounded-none lg:border-0 lg:bg-transparent lg:px-1 lg:py-3.5 lg:text-[15px] lg:font-semibold lg:text-muted">Good to know</a>'),Rm=k('<div class="prose max-w-none text-base leading-[1.7] text-ink-soft prose-p:my-3 prose-a:text-clay prose-strong:text-ink lg:text-lg lg:leading-[1.75]"></div>'),Mm=k('<p class="text-base leading-[1.7] text-ink-soft lg:text-lg"> </p>'),Pm=k('<h3 class="text-lg font-bold lg:text-xl"> </h3>'),_f=k('<p class="text-[15px] leading-relaxed text-ink-soft lg:text-base"> </p>'),Lm=k('<span class="min-h-5 w-0.5 grow bg-line-strong lg:min-h-7"></span>'),Im=k('<a class="shrink-0 whitespace-nowrap text-sm font-bold text-clay hover:text-clay-dark">Place guide</a>'),Dm=k('<li class="grid grid-cols-[32px_minmax(0,1fr)] gap-3.5 lg:grid-cols-[44px_minmax(0,1fr)] lg:gap-5"><div class="flex flex-col items-center"><span class="grid size-[30px] shrink-0 place-items-center rounded-full bg-forest text-[13px] font-bold text-paper lg:size-9 lg:text-sm"></span> <!></div> <div class="flex items-baseline justify-between gap-4 pb-[22px] pt-0.5 lg:pb-7 lg:pt-1"><span class="text-[19px] font-bold leading-snug lg:text-[22px]"> </span> <!></div></li>'),Om=k('<ol class="flex flex-col"></ol>'),mf=k("<!> <!> <!>",1),Fm=k('<a class="font-semibold text-clay hover:text-clay-dark"> </a>'),Nm=k("<!><!>",1),Bm=k('<span class="text-sm leading-relaxed text-ink-soft lg:text-[15px]"></span>'),Hm=k('<span class="text-sm leading-relaxed text-ink-soft lg:text-[15px]"> </span>'),jm=k('<div class="flex flex-col gap-1 rounded-[14px] bg-sand px-[18px] py-4 lg:gap-1.5 lg:rounded-2xl lg:px-6 lg:py-5"><span class="text-sm font-bold lg:text-[15px]"> </span> <!> <!></div>'),Um=k('<div id="itinerary" class="flex scroll-mt-24 flex-col gap-[18px] lg:gap-6"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">Itinerary</h2> <!> <!></div>'),zm=k('<li class="flex items-start gap-3 text-[15px] lg:text-base"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-ok" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg> </li>'),Vm=k('<div class="flex flex-col gap-3 rounded-2xl border border-line bg-card p-5 lg:gap-4 lg:rounded-[18px] lg:p-7"><span class="text-[13px] font-bold uppercase tracking-[0.16em] text-ok">Included</span> <ul class="flex flex-col gap-3"></ul></div>'),qm=k('<li class="flex items-start gap-3 text-[15px] text-ink-soft lg:text-base lg:text-ink"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-no" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"></path></svg> </li>'),Wm=k('<div class="flex flex-col gap-3 rounded-2xl border border-line bg-card p-5 lg:gap-4 lg:rounded-[18px] lg:p-7"><span class="text-[13px] font-bold uppercase tracking-[0.16em] text-no">Not included</span> <ul class="flex flex-col gap-3"></ul></div>'),Gm=k(`<div id="included" class="flex scroll-mt-24 flex-col gap-3.5 lg:gap-6"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">What's included</h2> <div class="grid gap-4 md:grid-cols-2"><!> <!></div></div>`),Ym=k('<p class="text-[15px] font-bold lg:text-base"> </p>'),Jm=k('<li class="flex items-start gap-3 text-[15px] leading-relaxed text-ink-soft lg:text-base"><span class="mt-2.5 size-1.5 shrink-0 rounded-full bg-forest" aria-hidden="true"></span> </li>'),Xm=k('<ul class="flex flex-col gap-2"></ul>'),Km=k('<div id="good-to-know" class="flex scroll-mt-24 flex-col gap-3.5 lg:gap-5"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">Good to know</h2> <div class="flex flex-col gap-3 rounded-2xl bg-sand p-5 lg:rounded-[18px] lg:p-7"></div></div>'),Zm=k("<option> </option>"),xf=Yt("<path></path>"),Qm=k('<li class="flex items-center gap-2.5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-ok" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg> </li>'),ex=k('<div class="w-[230px] shrink-0 lg:w-auto"><!></div>'),tx=k('<section class="mt-4 border-line pb-8 pt-10 lg:mt-6 lg:border-t lg:pb-22 lg:pt-14"><div class="u-container flex flex-col gap-4 lg:gap-8"><h2 class="text-[26px] font-bold tracking-[-0.02em] lg:text-[40px]">You might also like</h2> <div class="u-edge-row -mx-4 flex gap-3.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:grid-cols-4 lg:gap-7 lg:overflow-visible lg:px-0"></div></div></section>'),rx=k('<section class="u-container hidden flex-col gap-[18px] py-7 lg:flex"><nav aria-label="Breadcrumb" class="flex gap-2.5 text-sm text-muted"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a><span aria-hidden="true">/</span> <a class="text-muted hover:text-ink"> </a><span aria-hidden="true">/</span> <span aria-current="page" class="font-semibold text-ink"> </span></nav> <div class="flex items-end justify-between gap-8"><div class="flex flex-col gap-3"><h1 class="u-h1"> </h1> <div class="flex flex-wrap gap-x-5 gap-y-1 text-[15px] font-semibold text-muted"></div></div> <div class="flex shrink-0 items-center gap-3"><!> <button type="button" class="flex h-11 items-center gap-2 rounded-full border border-line-strong px-[18px] text-sm font-bold text-ink hover:bg-ink/5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M12 3v12M7 8l5-5 5 5"></path></svg> Share</button></div></div></section> <div class="relative h-[380px] lg:u-container lg:h-auto"><div class="relative h-full overflow-hidden lg:h-[540px] lg:rounded-3xl"><!></div> <div class="absolute inset-x-4 top-3 flex justify-between lg:hidden"><a class="grid size-11 place-items-center rounded-full bg-card/95 text-ink hover:text-ink"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5M11 18l-6-6 6-6"></path></svg></a> <button type="button" aria-label="Share this tour" title="Share this tour" class="grid size-11 place-items-center rounded-full bg-card/95 text-ink"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M12 3v12M7 8l5-5 5 5"></path></svg></button></div></div> <section class="relative -mt-7 flex flex-col gap-3 rounded-t-[28px] bg-paper px-5 pb-2 pt-7 lg:hidden">
95<span class="self-start rounded-full bg-sand px-3 py-1.5 text-xs font-bold text-forest"> </span> <p role="heading" aria-level="1" class="text-[40px] font-bold leading-[1.02] tracking-[-0.025em]"> </p> <span class="text-[15px] text-muted"> </span> <!></section> <section class="u-container grid items-start gap-10 pb-6 pt-4 lg:grid-cols-[minmax(0,1fr)_408px] lg:gap-18 lg:pb-10 lg:pt-14"><div class="flex min-w-0 flex-col gap-7 lg:gap-12"><div class="grid grid-cols-2 gap-2.5 lg:grid-cols-4 lg:gap-3"></div> <nav aria-label="On this page" class="u-edge-row -mx-4 flex gap-2 overflow-x-auto px-4 lg:mx-0 lg:gap-6 lg:overflow-visible lg:border-b lg:border-line lg:px-0"><a href="#overview" title="Read the tour overview" class="flex h-11 shrink-0 items-center rounded-full bg-ink px-[18px] text-sm font-bold text-paper hover:text-paper lg:h-auto lg:rounded-none lg:border-b-2 lg:border-ink lg:bg-transparent lg:px-1 lg:py-3.5 lg:text-[15px] lg:text-ink lg:hover:text-ink">Overview</a> <!> <!> <!></nav> <div id="overview" class="flex scroll-mt-24 flex-col gap-3 lg:gap-4"><h2 class="text-[26px] font-bold tracking-[-0.015em] lg:text-[34px]">Overview</h2> <!></div> <!> <!> <!></div> <aside id="book" class="flex scroll-mt-24 flex-col gap-5 rounded-[22px] border border-line bg-white p-5 shadow-[0_24px_60px_-28px_rgba(28,33,28,0.35)] lg:sticky lg:top-[108px] lg:p-7"><div class="flex flex-col gap-1 [&amp;>span]:flex-wrap [&amp;_span]:whitespace-nowrap"><!> <span class="text-sm text-muted"> </span></div> <div class="flex flex-col gap-3"><label class="flex flex-col gap-1.5 text-[13px] font-bold">Date <input type="date" class="h-[50px] rounded-xl border border-line-strong bg-card px-3.5 text-[15px] font-medium text-ink"/></label> <div class="grid grid-cols-2 gap-3"><label class="flex flex-col gap-1.5 text-[13px] font-bold">Guests <select class="h-[50px] rounded-xl border border-line-strong bg-card px-3 text-[15px] font-medium text-ink"></select></label> <label class="flex flex-col gap-1.5 text-[13px] font-bold">Pickup <input type="text" placeholder="Hotel or area" autocomplete="off" class="h-[50px] min-w-0 rounded-xl border border-line-strong bg-card px-3 text-[15px] font-medium text-ink placeholder:text-muted"/></label></div></div> <a target="_blank" rel="noopener noreferrer" class="u-btn min-h-14"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Request on WhatsApp</a> <a target="_blank" rel="noopener noreferrer" class="u-btn-ghost">Ask a question</a> <ul class="flex flex-col gap-3 border-t border-sand pt-[18px] text-sm text-ink-soft"></ul></aside></section> <!> <div class="fixed inset-x-0 bottom-0 z-40 flex items-center justify-between gap-3 border-t border-line bg-white py-3 pl-5 pr-4 pb-[max(0.75rem,env(safe-area-inset-bottom))] shadow-[0_-12px_32px_-18px_rgba(28,33,28,0.4)] lg:hidden"><div class="min-w-0 whitespace-nowrap"><!></div> <a target="_blank" rel="noopener noreferrer" class="flex h-13 shrink-0 items-center gap-2 rounded-full bg-clay px-[22px] text-[15px] font-bold text-white hover:bg-clay-dark hover:text-white"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Book on WhatsApp</a></div>',1);function bf(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",i),[i,n]=Zr(),a=H(),o=H(),d=H(),p=H(),h=H(),$=H(),b=H(),m=H(),g=H(),v=H(),y=H(),E=H(),P=null,T=G(t,"page",8),B=G(t,"phone",8,null),I={car:"M5 16V11l2-5h10l2 5v5M3 16h18M7 19v-3M17 19v-3M7 12h.01M17 12h.01",users:"M16 20v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 18.5V20M10 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM20 20v-1.5a3.5 3.5 0 0 0-2.5-3.3M15.5 4.2a3.5 3.5 0 0 1 0 6.6",pin:"M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21zM12 12a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z",compass:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM15.5 8.5l-2 5-5 2 2-5z",chat:"M4 20l1.3-3.9A8 8 0 1 1 8.2 19zM9 9.5c0 3 2.5 5.5 5.5 5.5"},L=H(""),O=H("2"),ee=H(""),me=H(""),C=["1","2","3","4","5","6","7","8","9","10","More than 10"];Bn(()=>{D(me,new Date().toISOString().slice(0,10))});let M=H("");async function J(){let ne={title:s(a).title,url:T().url};try{if(navigator.share){await navigator.share(ne);return}await navigator.clipboard.writeText(T().url),D(M,"Link copied")}catch(_e){if(_e&&_e.name==="AbortError")return;D(M,"Couldn't share \u2014 copy the address bar")}setTimeout(()=>D(M,""),2500)}X(()=>_(T()),()=>{D(a,T().tour)}),X(()=>s(a),()=>{D(o,s(a).price_type==="Car")}),X(()=>_(T()),()=>{D(d,T().itinerary||[])}),X(()=>s(d),()=>{D(p,s(d).filter(ne=>ne.title&&/optional/i.test(ne.title)))}),X(()=>(s(d),s(p)),()=>{D(h,s(d).filter(ne=>!s(p).includes(ne)))}),X(()=>(s(h),s(p)),()=>{D($,s(h).length>0||s(p).length>0)}),X(()=>_(T()),()=>{D(b,T().included.length>0||T().excluded.length>0)}),X(()=>_(T()),()=>{D(m,T().notes.length>0)}),X(()=>(s(o),s(a),_(T())),()=>{D(g,[s(o)?{title:"Private car for your group",icon:I.car}:s(a).price_type==="Person"?{title:"Priced per person",icon:I.users}:null,T().stops>0?{title:`${T().stops} ${T().stops===1?"stop":"stops"} on the way`,icon:I.pin}:null,{title:T().category.short,icon:I.compass},{title:"Book on WhatsApp",icon:I.chat}
95].filter(Boolean))}),X(()=>(_(T()),s(o),s(a)),()=>{D(v,[T().category.short,s(o)?"Private car for your group":s(a).price_type==="Person"?"Per person":null,T().stops>0?`${T().stops} stops`:null].filter(Boolean))}),X(()=>(st,_(B()),s(a),s(L),s(O),s(ee),_(T())),()=>{D(y,st(B(),[`Hi Bali Daily Tours! I'd like to book the ${s(a).title}.`,`Date: ${s(L)||"not decided yet"}`,`Guests: ${s(O)}`,`Pickup: ${s(ee).trim()||"to confirm"}`,T().url].join(`
96`)))}),X(()=>(st,_(B()),s(a),_(T())),()=>{D(E,st(B(),`Hi Bali Daily Tours! I have a question about the ${s(a).title}: ${T().url}`))}),nt();var fe={live:P};je();var ue=rx(),$e=Xe(ue),W=c($e),le=f(c(W),3),de=c(le,!0);l(le);var te=f(le,3),Le=c(te,!0);l(te),l(W);var F=f(W,2),V=c(F),oe=c(V),se=c(oe,!0);l(oe);var Z=f(oe,2);Y(Z,5,()=>s(v),ae,(ne,_e,Ne)=>{var ct=km(),ft=Xe(ct);{var rt=zt=>{var Vt=wm();w(zt,Vt)};N(ft,zt=>{Ne>0&&zt(rt)})}var Ct=f(ft),Pt=c(Ct,!0);l(Ct),S(()=>A(Pt,s(_e))),w(ne,ct)}),l(Z),l(V);var we=f(V,2),re=c(we);{var U=ne=>{var _e=$f(),Ne=c(_e,!0);l(_e),S(()=>A(Ne,s(M))),w(ne,_e)};N(re,ne=>{s(M)&&ne(U)})}var ce=f(re,2);l(we),l(F),l($e);var ge=f($e,2),Fe=c(ge),xe=c(Fe);{var be=ne=>{var _e=Em();S((Ne,ct)=>{x(_e,"src",Ne),x(_e,"srcset",ct),x(_e,"alt",(s(a),u(()=>`${s(a).title} \u2014 photo from the Bali trip`)))},[()=>(_(Be),s(a),u(()=>Be(s(a).image,1600))),()=>(_(Ue),s(a),u(()=>Ue(s(a).image,[640,1280,1600,1920])))]),w(ne,_e)};N(xe,ne=>{s(a),u(()=>s(a).image)&&ne(be)})}l(Fe);var Ge=f(Fe,2),ze=c(Ge),Ve=f(ze,2);l(Ge),l(ge);var at=f(ge,2),dt=c(at),ut=c(dt,!0);l(dt);var xt=f(dt,2),Ot=c(xt,!0);l(xt);var jt=f(xt,2),dr=c(jt,!0);l(jt);var Ar=f(jt,2);{var Me=ne=>{var _e=$f(),Ne=c(_e,!0);l(_e),S(()=>A(Ne,s(M))),w(ne,_e)};N(Ar,ne=>{s(M)&&ne(Me)})}l(at);var he=f(at,2),Ye=c(he),ye=c(Ye);Y(ye,5,()=>s(g),ae,(ne,_e)=>{var Ne=Am(),ct=c(Ne),ft=c(ct);l(ct);var rt=f(ct,2),Ct=c(rt,!0);l(rt),l(Ne),S(()=>{x(ft,"d",(s(_e),u(()=>s(_e).icon))),A(Ct,(s(_e),u(()=>s(_e).title)))}),w(ne,Ne)}),l(ye);var Re=f(ye,2),Pe=f(c(Re),2);{var Qe=ne=>{var _e=Sm();w(ne,_e)};N(Pe,ne=>{s($)&&ne(Qe)})}var K=f(Pe,2);{var Q=ne=>{var _e=Tm();w(ne,_e)};N(K,ne=>{s(b)&&ne(Q)})}var ve=f(K,2);{var Ee=ne=>{var _e=Cm();w(ne,_e)};N(ve,ne=>{s(m)&&ne(Ee)})}l(Re);var Oe=f(Re,2),pt=f(c(Oe),2);{var vt=ne=>{var _e=Rm();wn(_e,()=>(_(T()),u(()=>T().description_html)),!0),l(_e),w(ne,_e)},et=ne=>{var _e=Mm(),Ne=c(_e);l(_e),S(()=>A(Ne,`Message us on WhatsApp for the full plan of the ${s(a),u(()=>s(a).title)??""}.`)),w(ne,_e)};N(pt,ne=>{_(T()),u(()=>T().description_html)?ne(vt):ne(et,-1)})}l(Oe);var kt=f(Oe,2);{var gt=ne=>{var _e=Um(),Ne=f(c(_e),2);Y(Ne,1,()=>s(h),ae,(ft,rt)=>{var Ct=mf(),Pt=Xe(Ct);{var zt=ht=>{var Nt=Pm(),Sr=c(Nt,!0);l(Nt),S(()=>A(Sr,(s(rt),u(()=>s(rt).title)))),w(ht,Nt)};N(Pt,ht=>{s(rt),u(()=>s(rt).title)&&ht(zt)})}var Vt=f(Pt,2);Y(Vt,1,()=>(s(rt),u(()=>s(rt).paras)),ae,(ht,Nt)=>{var Sr=_f(),Bt=c(Sr,!0);l(Sr),S(()=>A(Bt,s(Nt))),w(ht,Sr)});var Vr=f(Vt,2);{var Gt=ht=>{var Nt=Om();Y(Nt,5,()=>(s(rt),u(()=>s(rt).items)),ae,(Sr,Bt,jn)=>{var gs=Dm(),vs=c(gs),Na=c(vs);Na.textContent=jn+1;var Xo=f(Na,2);{var Ko=Un=>{var Ks=Lm();w(Un,Ks)};N(Xo,Un=>{s(rt),u(()=>jn<s(rt).items.length-1)&&Un(Ko)})}l(vs);var Ba=f(vs,2),ii=c(Ba),ui=c(ii,!0);l(ii);var Zo=f(ii,2);{var Lf=Un=>{var Ks=Im();S(()=>{x(Ks,"href",(s(Bt),u(()=>s(Bt).href))),x(Ks,"title",(s(Bt),u(()=>`Read the place guide for ${s(Bt).text}`)))}),w(Un,Ks)};N(Zo,Un=>{s(Bt),u(()=>s(Bt).href)&&Un(Lf)})}l(Ba),l(gs),S(()=>A(ui,(s(Bt),u(()=>s(Bt).text)))),w(Sr,gs)}),l(Nt),w(ht,Nt)};N(Vr,ht=>{s(rt),u(()=>s(rt).items.length)&&ht(Gt)})}w(ft,Ct)});var ct=f(Ne,2);Y(ct,1,()=>s(p),ae,(ft,rt)=>{var Ct=jm(),Pt=c(Ct),zt=c(Pt,!0);l(Pt);var Vt=f(Pt,2);{var Vr=ht=>{var Nt=Bm();Y(Nt,5,()=>(s(rt),u(()=>s(rt).items)),ae,(Sr,Bt,jn)=>{var gs=Nm(),vs=Xe(gs);{var Na=ii=>{var ui=di();ui.nodeValue=", ",w(ii,ui)};N(vs,ii=>{jn>0&&ii(Na)})}var Xo=f(vs);{var Ko=ii=>{var ui=Fm(),Zo=c(ui,!0);l(ui),S(()=>{x(ui,"href",(s(Bt),u(()=>s(Bt).href))),x(ui,"title",(s(Bt),u(()=>`Read the place guide for ${s(Bt).text}`))),A(Zo,(s(Bt),u(()=>s(Bt).text)))}),w(ii,ui)},Ba=ii=>{var ui=di();S(()=>A(ui,(s(Bt),u(()=>s(Bt).text)))),w(ii,ui)};N(Xo,ii=>{s(Bt),u(()=>s(Bt).href)?ii(Ko):ii(Ba,-1)})}w(Sr,gs)}),l(Nt),w(ht,Nt)};N(Vt,ht=>{s(rt),u(()=>s(rt).items.length)&&ht(Vr)})}var Gt=f(Vt,2);Y(Gt,1,()=>(s(rt),u(()=>s(rt).paras)),ae,(ht,Nt)=>{var Sr=Hm(),Bt=c(Sr,!0);l(Sr),S(()=>A(Bt,s(Nt))),w(ht,Sr)}),l(Ct),S(()=>A(zt,(s(rt),u(()=>s(rt).title)))),w(ft,Ct)}),l(_e),w(ne,_e)};N(kt,ne=>{s($)&&ne(gt)})}var Mt=f(kt,2);{var Zt=ne=>{var _e=Gm(),Ne=f(c(_e),2),ct=c(Ne);{var ft=Pt=>{var zt=Vm(),Vt=f(c(zt),2);Y(Vt,5,()=>(_(T()),u(()=>T().included)),ae,(Vr,Gt)=>{var ht=zm(),Nt=f(c(ht));l(ht),S(()=>A(Nt,` ${s(Gt),u(()=>s(Gt).text)??""}`)),w(Vr,ht)}),l(Vt),l(zt),w(Pt,zt)};
96N(ct,Pt=>{_(T()),u(()=>T().included.length)&&Pt(ft)})}var rt=f(ct,2);{var Ct=Pt=>{var zt=Wm(),Vt=f(c(zt),2);Y(Vt,5,()=>(_(T()),u(()=>T().excluded)),ae,(Vr,Gt)=>{var ht=qm(),Nt=f(c(ht));l(ht),S(()=>A(Nt,` ${s(Gt),u(()=>s(Gt).text)??""}`)),w(Vr,ht)}),l(Vt),l(zt),w(Pt,zt)};N(rt,Pt=>{_(T()),u(()=>T().excluded.length)&&Pt(Ct)})}l(Ne),l(_e),w(ne,_e)};N(Mt,ne=>{s(b)&&ne(Zt)})}var $r=f(Mt,2);{var ur=ne=>{var _e=Km(),Ne=f(c(_e),2);Y(Ne,5,()=>(_(T()),u(()=>T().notes)),ae,(ct,ft)=>{var rt=mf(),Ct=Xe(rt);{var Pt=Gt=>{var ht=Ym(),Nt=c(ht,!0);l(ht),S(()=>A(Nt,(s(ft),u(()=>s(ft).title)))),w(Gt,ht)};N(Ct,Gt=>{s(ft),u(()=>s(ft).title)&&Gt(Pt)})}var zt=f(Ct,2);Y(zt,1,()=>(s(ft),u(()=>s(ft).paras)),ae,(Gt,ht)=>{var Nt=_f(),Sr=c(Nt,!0);l(Nt),S(()=>A(Sr,s(ht))),w(Gt,Nt)});var Vt=f(zt,2);{var Vr=Gt=>{var ht=Xm();Y(ht,5,()=>(s(ft),u(()=>s(ft).items)),ae,(Nt,Sr)=>{var Bt=Jm(),jn=f(c(Bt),1,!0);l(Bt),S(()=>A(jn,(s(Sr),u(()=>s(Sr).text)))),w(Nt,Bt)}),l(ht),w(Gt,ht)};N(Vt,Gt=>{s(ft),u(()=>s(ft).items.length)&&Gt(Vr)})}w(ct,rt)}),l(Ne),l(_e),w(ne,_e)};N($r,ne=>{s(m)&&ne(ur)})}l(Ye);var Jt=f(Ye,2),Ir=c(Jt),ti=c(Ir);Er(ti,{get price(){return s(a),u(()=>s(a).price)},get price_type(){return s(a),u(()=>s(a).price_type)},size:"lg"});var Ft=f(ti,2),ie=c(Ft);l(Ft),l(Ir);var pe=f(Ir,2),z=c(pe),q=f(c(z));Ci(q),l(z);var ke=f(z,2),qe=c(ke),lt=f(c(qe));Y(lt,5,()=>C,ae,(ne,_e)=>{var Ne=Zm(),ct=c(Ne,!0);l(Ne);var ft={};S(()=>{A(ct,s(_e)),ft!==(ft=s(_e))&&(Ne.value=(Ne.__value=s(_e))??"")}),w(ne,Ne)}),l(lt),l(qe);var wt=f(qe,2),Tt=f(c(wt));Ci(Tt),l(wt),l(ke),l(pe);var $t=f(pe,2),Wt=c($t);Y(Wt,5,()=>Kt,ae,(ne,_e)=>{var Ne=xf();S(()=>x(Ne,"d",s(_e))),w(ne,Ne)}),l(Wt),Se(),l($t);var Et=f($t,2),Ut=f(Et,2);Y(Ut,4,()=>["Flexible cancellation","No hidden fees","Licensed, insured local driver"],ae,(ne,_e)=>{var Ne=Qm(),ct=f(c(Ne));l(Ne),S(()=>A(ct,` ${_e??""}`)),w(ne,Ne)}),l(Ut),l(Jt),l(he);var Qt=f(he,2);{var er=ne=>{var _e=tx(),Ne=c(_e),ct=f(c(Ne),2);Y(ct,5,()=>(_(T()),u(()=>T().related)),ft=>ft.id,(ft,rt)=>{var Ct=ex(),Pt=c(Ct);Hn(Pt,{get tour(){return s(rt)},aspect:"aspect-[4/3]",sizes:"(min-width: 1024px) 25vw, 230px"}),l(Ct),w(ft,Ct)}),l(ct),l(Ne),l(_e),w(ne,_e)};N(Qt,ne=>{_(T()),u(()=>T().related.length)&&ne(er)})}var Dr=f(Qt,2),ri=c(Dr),tr=c(ri);Er(tr,{get price(){return s(a),u(()=>s(a).price)},get price_type(){return s(a),u(()=>s(a).price_type)},size:"sm"}),l(ri);var tt=f(ri,2),bt=c(tt);Y(bt,5,()=>Kt,ae,(ne,_e)=>{var Ne=xf();S(()=>x(Ne,"d",s(_e))),w(ne,Ne)}),l(bt),Se(),l(tt),l(Dr),S(ne=>{x(le,"href",(_(T()),u(()=>T().category.url))),x(le,"title",(_(T()),u(()=>`Browse ${T().category.name}`))),A(de,(_(T()),u(()=>T().category.short))),A(Le,(s(a),u(()=>s(a).title))),A(se,(s(a),u(()=>s(a).title))),x(ze,"href",(_(T()),u(()=>T().category.url))),x(ze,"title",(_(T()),u(()=>`Back to ${T().category.name}`))),x(ze,"aria-label",(_(T()),u(()=>`Back to ${T().category.name}`))),A(ut,(_(T()),u(()=>T().category.short))),A(Ot,(s(a),u(()=>s(a).title))),A(dr,ne),A(ie,`${s(o)?"One price for your whole group":"Price per person"} \xB7 ${r()==="USD"?"shown in USD":`set in USD, ${r()} is an estimate`}`),x(q,"min",s(me)||void 0),x($t,"href",s(y)),x($t,"title",(s(a),u(()=>`Send a booking request for the ${s(a).title} on WhatsApp`))),x(Et,"href",s(E)),x(Et,"title",(s(a),u(()=>`Ask our team a question about the ${s(a).title}`))),x(tt,"href",s(y)),x(tt,"title",(s(a),u(()=>`Send a booking request for the ${s(a).title} on WhatsApp`)))},[()=>(s(v),_(T()),u(()=>s(v).slice(1).join(" \xB7 ")||T().category.short))]),gr("click",ce,J),gr("click",Ve,J),Ri(q,()=>s(L),ne=>D(L,ne)),ps(lt,()=>s(O),ne=>D(O,ne)),Ri(Tt,()=>s(ee),ne=>D(ee,ne)),w(e,ue),Ke(t,"live",P);var ot=De(fe);return n(),ot}var id={};At(id,{default:()=>yf});var ix=k('<img sizes="(min-width: 1024px) 33vw, (min-width: 768px) 50vw, 100vw" loading="lazy" decoding="async" class="size-full object-cover transition-transform duration-500 group-hover:scale-[1.03]"/>'),nx=k('<span class="flex items-center gap-1.5 text-[13px] font-semibold text-muted"> </span>'),sx=k('<article class="flex flex-col overflow-hidden rounded-[18px] border border-line bg-card lg:rounded-[20px]"><a tabindex="-1" aria-hidden="true" class="group block h-[220px] shrink-0 overflow-hidden bg-line md:aspect-[4/3] md:h-auto"><!></a> <div class="flex grow flex-col gap-2 px-[18px] pb-[18px] pt-4 lg:gap-2.5 lg:px-[22px] lg:pb-[22px] lg:pt-5"><!> <a class="text-[21px] font-bold leading-tight tracking-[-0.02em] text-ink hover:text-clay lg:text-[23px]"> </a> <div class="mt-auto flex items-center justify-between gap-3 border-t border-line pt-3.5 lg:pt-4">
96<div class="min-w-0 whitespace-nowrap"><!></div> <a class="flex h-11 shrink-0 items-center gap-1.5 rounded-full border border-ink px-4 text-sm font-bold text-ink hover:bg-ink hover:text-white lg:gap-2 lg:px-[18px]">View tour <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"></path></svg></a></div></div></article>'),ax=k('<a href="/tours" title="Browse every Bali tour" class="py-3 text-muted hover:text-ink lg:py-0">Tours</a> <span aria-hidden="true">/</span>',1),ox=k('<p class="mt-1 text-[15px] leading-relaxed text-ink-soft lg:mt-0 lg:text-lg"> </p>'),lx=k('<li class="flex items-center gap-2.5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-ok" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg> </li>'),cx=k('<a><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="hidden lg:block" aria-hidden="true"><path></path></svg> </a>'),dx=k('<button type="button"> </button>'),ux=k('<button type="button" class="h-11 self-start text-sm font-bold text-ink underline underline-offset-4 lg:h-[52px] lg:self-auto lg:px-[18px]">Clear all</button>'),wf=Yt("<path></path>"),px=k('<img sizes="(min-width: 1024px) 380px, 100vw" alt="A Bali day trip you can combine with other stops into one custom day" loading="lazy" class="order-1 block h-[132px] w-full object-cover lg:order-2 lg:h-full lg:min-h-[220px]"/>'),fx=k('<li class="flex items-start gap-3.5 rounded-2xl bg-card p-4"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-forest"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-gold" aria-hidden="true"><path></path></svg></span> <span class="flex flex-col gap-1"><span class="text-xs font-extrabold text-muted"></span> <span class="text-[17px] font-bold"> </span> <span class="text-sm leading-relaxed text-ink-soft"> </span></span></li>'),hx=k('<li class="flex flex-col gap-3.5 rounded-[20px] bg-card p-7"><div class="flex items-center justify-between"><span class="grid size-13 place-items-center rounded-[14px] bg-forest"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-gold" aria-hidden="true"><path></path></svg></span> <span class="text-[15px] font-extrabold text-muted"></span></div> <span class="text-[23px] font-bold tracking-[-0.02em]"> </span> <span class="text-[15px] leading-relaxed text-ink-soft"> </span></li>'),gx=k(`<section class="u-container flex flex-col gap-2 pb-5 pt-1 lg:gap-[18px] lg:pb-8 lg:pt-7"><nav aria-label="Breadcrumb" class="flex items-center gap-2 text-[13px] text-muted lg:gap-2.5 lg:text-sm"><a href="/" title="Go to the homepage" class="py-3 text-muted hover:text-ink lg:py-0">Home</a> <span aria-hidden="true">/</span> <!> <span aria-current="page" class="font-semibold text-ink"> </span></nav> <div class="flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between lg:gap-12"><div class="flex max-w-[760px] flex-col gap-2 lg:gap-3.5"><h1 class="u-h1"> </h1> <!></div> <ul class="hidden shrink-0 flex-col gap-2.5 text-sm font-semibold text-ink-soft lg:flex"></ul></div></section> <div class="sticky top-16 z-20 border-b border-line bg-paper shadow-[0_10px_18px_-16px_rgba(28,33,28,0.45)] lg:static lg:border-0 lg:bg-transparent lg:shadow-none"><nav aria-label="Tour categories" class="u-container"><div class="u-edge-row flex gap-2 overflow-x-auto pb-3 pt-2.5 lg:mx-0 lg:flex-wrap lg:overflow-visible lg:px-0 lg:py-0"></div></nav></div> <section class="u-container pt-4 lg:pt-4"><div class="flex flex-col gap-3 rounded-[20px] lg:flex-row lg:items-end lg:gap-4 lg:border lg:border-line lg:bg-white lg:px-5 lg:py-4 lg:shadow-[0_18px_44px_-30px_rgba(28,33,28,0.35)]"><div class="flex flex-col gap-1.5"><span id="price-type-label" class="text-[13px] font-bold">Price type</span> <div role="group" aria-labelledby="price-type-label" class="flex h-[52px] gap-1 rounded-full bg-sand p-1"></div></div> <label class="flex flex-col gap-1.5 text-[13px] font-bold lg:w-64">Sort by <select class="h-[52px] rounded-xl border border-line-strong bg-card px-3 text-[15px] font-medium text-ink"><option>Recommended</option><option>Price: low to high</option><option>Price: high to low</option></select></label> <!></div></section> <section class="u-container flex flex-col gap-4 pb-10 pt-4 lg:gap-6 lg:pb-18 lg:pt-7"><p class="text-sm text-ink-soft lg:text-base"><strong class="text-ink"> </strong> <span class="hidden lg:inline">, per car or per person as shown</span></p> <div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3 lg:gap-7"><!> <aside class="grid overflow-hidden rounded-[20px] bg-forest text-paper md:col-span-2 lg:col-span-3 lg:grid-cols-[minmax(0,1fr)_380px] lg:rounded-[22px]"><div class="order-2 flex flex-col gap-2.5 px-5 py-[22px] lg:order-1 lg:flex-row lg:items-center lg:justify-between lg:gap-10 lg:px-12 lg:py-10"><div class="flex max-w-[560px] flex-col gap-2.5"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">Can't decide?</span> <h2 class="text-[26px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[34px]">Plan a custom day on WhatsApp</h2> <p class="text-sm leading-relaxed text-paper/82 lg:text-base">Mix temples, rice terraces and a waterfall into one private day. Tell us your dates and pickup area and a local planner replies.</p></div> <a target="_blank" rel="noopener noreferrer" title="Plan a custom day with us on WhatsApp" class="u-btn mt-1.5 shrink-0 lg:mt-0 lg:min-h-14"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Plan my day</a></div> <!></aside> <!></div> <p class="mt-1 text-center text-sm leading-relaxed text-muted lg:mt-2 lg:text-[15px]"> <br class="lg:hidden"/><span class="hidden lg:inline">\xB7</span> <a href="/transfers" title="See airport and fast-boat transfers" class="inline-block py-3 font-bold text-clay hover:text-clay-dark lg:py-0">Looking for transfers?</a></p></section> <div class="px-3 lg:u-container"><section class="mb-10 flex flex-col gap-5 rounded-3xl bg-sand px-5 py-8 lg:mb-22 lg:gap-9 lg:rou
96nded-[28px] lg:p-14"><div class="flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between lg:gap-10"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">How booking works</span> <h2 class="text-[28px] font-bold leading-[1.1] tracking-[-0.02em] lg:text-[44px] lg:leading-[1.05]">Three steps to your day out</h2></div> <a target="_blank" rel="noopener noreferrer" title="Message Bali Daily Tours on WhatsApp" class="order-last flex h-13 shrink-0 items-center justify-center gap-2.5 rounded-full bg-ink px-6 text-[15px] font-bold text-white hover:bg-forest hover:text-white lg:order-none"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#7FD1A6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> </a> <ol class="flex flex-col gap-2.5 lg:hidden"></ol></div> <ol class="hidden grid-cols-3 gap-5 lg:grid"></ol></section></div>`,1);function yf(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",i),[i,n]=Zr(),a=H(),o=H(),d=H(),p=H(),h=H(),$=H(),b=H(),m=H(),g=H(),v=(z,q=rr)=>{var ke=sx(),qe=c(ke),lt=c(qe);{var wt=tt=>{var bt=ix();S((ot,ne)=>{x(bt,"src",ot),x(bt,"srcset",ne),x(bt,"alt",(q(),u(()=>`${q().title} \u2014 Bali trip photo`)))},[()=>(_(Be),q(),u(()=>Be(q().image,640))),()=>(_(Ue),q(),u(()=>Ue(q().image,[400,640,960])))]),w(tt,bt)};N(lt,tt=>{q(),u(()=>q().image)&&tt(wt)})}l(qe);var Tt=f(qe,2),$t=c(Tt);{var Wt=tt=>{var bt=nx(),ot=c(bt,!0);l(bt),S(ne=>A(ot,ne),[()=>(q(),u(()=>$e(q())))]),w(tt,bt)},Et=Ui(()=>(q(),u(()=>$e(q()))));N($t,tt=>{s(Et)&&tt(Wt)})}var Ut=f($t,2),Qt=c(Ut,!0);l(Ut);var er=f(Ut,2),Dr=c(er),ri=c(Dr);Er(ri,{get price(){return q(),u(()=>q().price)},get price_type(){return q(),u(()=>q().price_type)}}),l(Dr);var tr=f(Dr,2);l(er),l(Tt),l(ke),S(()=>{x(qe,"href",(q(),u(()=>q().href))),x(qe,"title",(q(),u(()=>`See the ${q().title} itinerary and price`))),x(Ut,"href",(q(),u(()=>q().href))),x(Ut,"title",(q(),u(()=>`See the ${q().title} itinerary and price`))),A(Qt,(q(),u(()=>q().title))),x(tr,"href",(q(),u(()=>q().href))),x(tr,"title",(q(),u(()=>`See the ${q().title} itinerary and price`)))}),w(z,ke)},y=null,E=G(t,"tours",24,()=>[]),P=G(t,"categories",24,()=>[]),T=G(t,"current",8,null),B=G(t,"heading",8,"Bali tours & day trips"),I=G(t,"intro",8,""),L=G(t,"phone",8,null),O={all:"M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z",tours:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM15.5 8.5l-2 5-5 2 2-5z","water-sports":"M2 12c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2M2 17c2 0 2-2 4-2s2 2 4 2 2-2 4-2 2 2 4 2 2-2 4-2","bali-safari-and-marine-park":"M5 19c0-8 5-13 14-14 0 9-5 14-13 14zM5 19l7-7","bali-sea-transfers":"M3 16l2 4h14l2-4zM12 4v12M12 5l6 9H12","bali-airport-transfers":"M10.5 13.5L3 11l1.5-1.5 7.5 1 4-4.5a2 2 0 0 1 3 3l-4.5 4 1 7.5L14 22l-2.5-7.5-3 3V20L7 21.5 5.5 17 2 15.5 3.5 14h2.5z"},ee=["tours","water-sports","bali-safari-and-marine-park","bali-sea-transfers","bali-airport-transfers"],me=z=>ee.includes(z)?ee.indexOf(z):99,C=[{value:"any",label:"Any"},{value:"Car",label:"Per car"},{value:"Person",label:"Per person"}],M=H("any"),J=H("recommended");function fe(){D(M,"any"),D(J,"recommended")}let ue=z=>z.price_type==="Car"?"Private car":z.price_type==="Person"?"Per person":null,$e=z=>[z.category,ue(z)].filter(Boolean).join(" \xB7 "),W=[{title:"Pick a tour",body:"Choose a tour above, or tell us the places you want to mix into one day.",icon:"M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM20 20l-4-4"},{title:"Request on WhatsApp",body:"Send your date, group size and pickup area. We confirm the price per car or per person \u2014 no hidden fees.",icon:"M4 20l1.3-3.9A8 8 0 1 1 8.2 19zM9 9.5c0 3 2.5 5.5 5.5 5.5"},{title:"Your driver picks you up",body:"A licensed, insured local driver collects you from your hotel in a private air-conditioned car.",icon:"M5 16V11l2-5h10l2 5v5M3 16h18M7 19v-3M17 19v-3M7 12h.01M17 12h.01"}],le=["Flexible cancellation","No hidden fees","Licensed, insured local drivers"];X(()=>_(P()),()=>{D(a,[{slug:null,short:"All",href:"/tours",name:"every Bali tour"},...[...P()].sort((z,q)=>me(z.slug)-me(q.slug))])}),X(()=>(_(E()),s(M),s(J)),()=>{D(o,E().filter(z=>s(M)==="any"||z.price_type===s(M)).slice().sort((z,q)=>s(J)==="low"?(z.price??1/0)-(q.price??1/0):s(J)==="high"?(q.price??-1/0)-(z.price??-1/0):0))}),X(()=>(s(M),s(J)),()=>{D(d,s(M)!=="any"||s(J)!=="recommended")}),X(()=>s(o),()=>{D(p,s(o).slice(0,3))}),X(()=>s(o),()=>{D(h,s(o).slice(3))}),X(()=>s(o),()=>{D($,s(o).length===1?"tour":"tours")}),X(()=>
96(_(P()),_(T()),_(E())),()=>{D(b,(P().find(z=>z.slug===(T()==="tours"?"water-sports":"tours"))||{}).image||E().find(z=>z.image)?.image)}),X(()=>(st,_(L())),()=>{D(m,st(L(),"Hi Bali Daily Tours! I'd like to plan a custom day in Bali."))}),X(()=>(st,_(L())),()=>{D(g,st(L(),"Hi Bali Daily Tours! I'd like to book a tour."))}),nt();var de={live:y};je();var te=gx(),Le=Xe(te),F=c(Le),V=f(c(F),4);{var oe=z=>{var q=ax();Se(2),w(z,q)};N(V,z=>{T()&&z(oe)})}var se=f(V,2),Z=c(se,!0);l(se),l(F);var we=f(F,2),re=c(we),U=c(re),ce=c(U,!0);l(U);var ge=f(U,2);{var Fe=z=>{var q=ox(),ke=c(q,!0);l(q),S(()=>A(ke,I())),w(z,q)};N(ge,z=>{I()&&z(Fe)})}l(re);var xe=f(re,2);Y(xe,5,()=>le,ae,(z,q)=>{var ke=lx(),qe=f(c(ke));l(ke),S(()=>A(qe,` ${s(q)??""}`)),w(z,ke)}),l(xe),l(we),l(Le);var be=f(Le,2),Ge=c(be),ze=c(Ge);Y(ze,5,()=>s(a),ae,(z,q)=>{let ke=cr(()=>(s(q),_(T()),u(()=>s(q).slug===T())));var qe=cx(),lt=c(qe),wt=c(lt);l(lt);var Tt=f(lt);l(qe),S(()=>{x(qe,"href",(s(q),u(()=>s(q).href))),x(qe,"title",(s(q),u(()=>s(q).slug?`Browse ${s(q).name} in Bali`:"Browse every Bali tour"))),x(qe,"aria-current",s(ke)?"page":void 0),Ze(qe,1,`flex h-11 shrink-0 items-center gap-2 whitespace-nowrap rounded-full border pl-3 pr-4 text-sm font-bold lg:pl-3.5 lg:pr-[18px]
97                           ${s(ke)?"border-forest bg-forest text-paper hover:text-paper":"border-line bg-card text-ink hover:border-line-strong hover:text-ink"}`),x(wt,"d",(s(q),u(()=>O[s(q).slug||"all"]||O.tours))),A(Tt,` ${s(q),u(()=>s(q).short)??""}`)}),w(z,qe)}),l(ze),l(Ge),l(be);var Ve=f(be,2),at=c(Ve),dt=c(at),ut=f(c(dt),2);Y(ut,5,()=>C,ae,(z,q)=>{var ke=dx(),qe=c(ke,!0);l(ke),S(()=>{x(ke,"aria-pressed",(s(M),s(q),u(()=>s(M)===s(q).value))),Ze(ke,1,`h-11 flex-1 rounded-full px-[18px] text-sm font-bold transition-colors lg:flex-none
98                               ${s(M),s(q),u(()=>s(M)===s(q).value?"bg-white text-ink shadow-[0_2px_8px_-3px_rgba(28,33,28,0.3)]":"text-ink-soft hover:text-ink")??""}`),A(qe,(s(q),u(()=>s(q).label)))}),gr("click",ke,()=>D(M,s(q).value)),w(z,ke)}),l(ut),l(dt);var xt=f(dt,2),Ot=f(c(xt)),jt=c(Ot);jt.value=jt.__value="recommended";var dr=f(jt);dr.value=dr.__value="low";var Ar=f(dr);Ar.value=Ar.__value="high",l(Ot),l(xt);var Me=f(xt,2);{var he=z=>{var q=ux();gr("click",q,fe),w(z,q)};N(Me,z=>{s(d)&&z(he)})}l(at),l(Ve);var Ye=f(Ve,2),ye=c(Ye),Re=c(ye),Pe=c(Re);l(Re);var Qe=f(Re);Se(),l(ye);var K=f(ye,2),Q=c(K);Y(Q,1,()=>s(p),z=>z.id,(z,q)=>{v(z,()=>s(q))});var ve=f(Q,2),Ee=c(ve),Oe=f(c(Ee),2),pt=c(Oe);Y(pt,5,()=>Kt,ae,(z,q)=>{var ke=wf();S(()=>x(ke,"d",s(q))),w(z,ke)}),l(pt),Se(),l(Oe),l(Ee);var vt=f(Ee,2);{var et=z=>{var q=px();S((ke,qe)=>{x(q,"src",ke),x(q,"srcset",qe)},[()=>(_(Be),s(b),u(()=>Be(s(b),800))),()=>(_(Ue),s(b),u(()=>Ue(s(b),[400,800])))]),w(z,q)};N(vt,z=>{s(b)&&z(et)})}l(ve);var kt=f(ve,2);Y(kt,1,()=>s(h),z=>z.id,(z,q)=>{v(z,()=>s(q))}),l(K);var gt=f(K,2),Mt=c(gt);Se(4),l(gt),l(Ye);var Zt=f(Ye,2),$r=c(Zt),ur=c($r),Jt=f(c(ur),2),Ir=c(Jt);Y(Ir,5,()=>Kt,ae,(z,q)=>{var ke=wf();S(()=>x(ke,"d",s(q))),w(z,ke)}),l(Ir);var ti=f(Ir);l(Jt);var Ft=f(Jt,2);Y(Ft,5,()=>W,ae,(z,q,ke)=>{var qe=fx(),lt=c(qe),wt=c(lt),Tt=c(wt);l(wt),l(lt);var $t=f(lt,2),Wt=c($t);Wt.textContent=`Step ${ke+1}`;var Et=f(Wt,2),Ut=c(Et,!0);l(Et);var Qt=f(Et,2),er=c(Qt,!0);l(Qt),l($t),l(qe),S(()=>{x(Tt,"d",(s(q),u(()=>s(q).icon))),A(Ut,(s(q),u(()=>s(q).title))),A(er,(s(q),u(()=>s(q).body)))}),w(z,qe)}),l(Ft),l(ur);var ie=f(ur,2);Y(ie,5,()=>W,ae,(z,q,ke)=>{var qe=hx(),lt=c(qe),wt=c(lt),Tt=c(wt),$t=c(Tt);l(Tt),l(wt);var Wt=f(wt,2);Wt.textContent=`Step ${ke+1}`,l(lt);var Et=f(lt,2),Ut=c(Et,!0);l(Et);var Qt=f(Et,2),er=c(Qt,!0);l(Qt),l(qe),S(()=>{x($t,"d",(s(q),u(()=>s(q).icon))),A(Ut,(s(q),u(()=>s(q).title))),A(er,(s(q),u(()=>s(q).body)))}),w(z,qe)}),l(ie),l($r),l(Zt),S(z=>{A(Z,T()?B():"Tours"),A(ce,B()),A(Pe,`${s(o),u(()=>s(o).length)??""} ${s($)??""}`),A(Qe,` \xB7 ${r()==="USD"?"prices in USD":`${r()} prices are estimates`}`),x(Oe,"href",s(m)),A(Mt,`Showing ${s(o),u(()=>s(o).length)??""} of ${_(E()),u(()=>E().length)??""} ${_(E()),u(()=>E().length===1?"tour":"tours")??""}`),x(Jt,"href",s(g)),A(ti,` ${z??""}`)},[()=>(_(L()),_(Ur),u(()=>L()?`WhatsApp ${Ur(L())}`:"Chat on WhatsApp"))]),ps(Ot,()=>s(J),z=>
98D(J,z)),w(e,te),Ke(t,"live",y);var pe=De(de);return n(),pe}var nd={};At(nd,{default:()=>Af});var vx=k('<img sizes="(min-width: 1024px) 1280px, 100vw" fetchpriority="high" class="absolute inset-0 size-full object-cover"/>'),$x=k('<span>Airport from <strong class="text-lg"> </strong> / car</span>'),_x=k('<span aria-hidden="true" class="opacity-60">\xB7</span>'),mx=k('<span>Fast boats from <strong class="text-lg"> </strong></span>'),xx=k('<button type="button"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg> </button>'),bx=k("<option> </option>"),kf=Yt("<path></path>"),Ef=k('<div class="hidden shrink-0 lg:block"><!></div>'),wx=k('<div class="h-[180px] overflow-hidden rounded-[18px] lg:h-[260px] lg:rounded-[20px]"><img sizes="(min-width: 1024px) 360px, 100vw" loading="lazy" class="size-full object-cover"/></div>'),yx=k('<span class="flex items-start gap-2.5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-ok" aria-hidden="true"><path></path></svg> </span>'),kx=k('<li class="flex min-h-[72px] items-center gap-3 px-4 py-3.5 lg:grid lg:grid-cols-[minmax(0,1fr)_150px_120px] lg:gap-4 lg:px-7 lg:py-[18px]"><a class="flex min-w-0 grow flex-col gap-0.5 text-ink hover:text-clay"><span class="flex items-center gap-1.5 text-base font-bold lg:gap-2 lg:text-[17px]"><span class="lg:hidden">DPS</span><span class="hidden lg:inline">Airport (DPS)</span> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-muted" role="img" aria-label="to"><path></path></svg> <span class="truncate"> </span></span> <span class="hidden text-[13px] font-normal text-muted lg:block">Hotel transfer \xB7 Ngurah Rai Airport</span> <span class="lg:hidden"><!></span></a> <span class="hidden lg:block"><!></span> <a target="_blank" rel="noopener noreferrer" class="flex h-11 shrink-0 items-center justify-center rounded-full border border-ink px-4 text-sm font-bold text-ink hover:bg-ink hover:text-white lg:px-0">Book</a></li>'),Ex=k('<section id="airport" class="u-container flex scroll-mt-24 flex-col gap-5 pb-6 pt-12 lg:gap-9 lg:pb-14 lg:pt-22"><div class="flex flex-col gap-2 lg:flex-row lg:items-end lg:justify-between lg:gap-12"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">01 \xB7 Private car</span> <h2 class="text-[32px] font-bold leading-[1.08] tracking-[-0.02em] lg:text-[44px] lg:leading-[1.05]">Airport transfers</h2> <p class="max-w-[620px] text-[15px] leading-relaxed text-ink-soft lg:text-[17px]">From Ngurah Rai Airport (DPS) to your hotel, or back again. One price per car for your whole group.</p></div> <!></div> <div class="grid items-start gap-5 lg:grid-cols-[360px_minmax(0,1fr)] lg:gap-10"><div class="flex flex-col gap-5"><!> <div class="flex flex-col gap-3.5 rounded-[18px] border border-line bg-card p-6 text-[15px] text-ink-soft"><span class="text-[13px] font-bold uppercase tracking-[0.16em] text-ok">Every airport transfer</span> <span class="flex items-start gap-2.5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-ok" aria-hidden="true"><path></path></svg> A six-seat car for up to four passengers with luggage</span> <span class="flex items-start gap-2.5"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-ok" aria-hidden="true"><path></path></svg> More than four of you? We send a second car</span> <!></div></div> <div class="overflow-hidden rounded-[18px] border border-line bg-white lg:rounded-[20px]"><div class="hidden grid-cols-[minmax(0,1fr)_150px_120px] gap-4 bg-sand px-7 py-4 text-xs font-bold uppercase tracking-[0.14em] text-muted lg:grid"><span>Route</span><span>Price</span><span class="sr-only">Book</span></div> <ul aria-label="Airport transfer routes" class="divide-y divide-sand"></ul> <div class="border-t border-line bg-card px-4 py-4 text-[13px] leading-relaxed text-muted lg:px-7 lg:text-sm">Going somewhere else? Send us the address on WhatsApp for a price.</div></div></div></section>'),Ax=k('<img sizes="(min-width: 1024px) 33vw, 290px" loading="lazy" class="size-full object-cover"/>
98'),Sx=k('<article class="flex w-[290px] shrink-0 flex-col overflow-hidden rounded-[18px] border border-line bg-white lg:w-auto lg:rounded-[20px]"><a tabindex="-1" aria-hidden="true" class="relative block h-[180px] lg:h-[240px]"><!> <span class="absolute left-3 top-3 rounded-full bg-card/94 px-2.5 py-1 text-xs font-bold text-sea lg:left-3.5 lg:top-3.5 lg:px-3 lg:py-1.5">Fast boat</span></a> <div class="flex grow flex-col gap-3 p-[18px] lg:gap-4 lg:p-6"><h3 class="text-xl font-bold leading-tight tracking-[-0.01em] lg:text-2xl"><a class="text-ink hover:text-clay"> </a></h3> <div class="mt-auto flex items-center justify-between gap-3 border-t border-sand pt-3 lg:pt-4"><!> <a target="_blank" rel="noopener noreferrer" class="flex h-11 shrink-0 items-center rounded-full bg-clay px-4 text-sm font-bold text-white hover:bg-clay-dark hover:text-white lg:px-5">Check seats</a></div></div></article>'),Tx=k('<section id="boats" class="mt-6 flex scroll-mt-24 flex-col gap-5 bg-sand py-10 lg:mt-0 lg:gap-9 lg:py-22"><div class="u-container flex w-full flex-col gap-2 lg:flex-row lg:items-end lg:justify-between lg:gap-12"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">02 \xB7 By sea</span> <h2 class="text-[32px] font-bold leading-[1.08] tracking-[-0.02em] lg:text-[44px] lg:leading-[1.05]">Fast boats to Gili &amp; Lombok</h2> <p class="max-w-[620px] text-[15px] leading-relaxed text-ink-soft lg:text-[17px]">One-way fast boat tickets, priced per person. We confirm the sailing and total price on WhatsApp.</p></div> <!></div> <div class="u-container w-full"><div class="u-edge-row -mx-4 flex gap-3.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:grid-cols-3 lg:gap-6 lg:overflow-visible lg:px-0"></div></div> <ul class="u-container flex w-full flex-col gap-2 text-[13px] leading-relaxed text-muted lg:flex-row lg:flex-wrap lg:gap-x-8 lg:text-sm"><li class="flex items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-sea" aria-hidden="true"><path></path></svg>Minimum two people per booking</li> <li class="flex items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-sea" aria-hidden="true"><path></path></svg>Luggage: 25 kg per person plus one hand bag</li> <li class="flex items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-sea" aria-hidden="true"><path></path></svg>From Padangbai: IDR 10,000 port fee per person, paid at the harbour</li></ul></section>'),Cx=k('<span class="flex items-start gap-2.5 text-[15px]"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-ok" aria-hidden="true"><path></path></svg> </span>'),Rx=k('<span class="flex items-start gap-2.5 text-[15px] text-ink-soft"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="mt-0.5 shrink-0 text-no" aria-hidden="true"><path></path></svg> </span>'),Mx=k('<div class="flex flex-col gap-2.5"><span class="text-xs font-bold uppercase tracking-[0.16em] text-no">Not included</span> <!></div>
98'),Px=k('<div class="flex flex-col gap-4 rounded-[18px] border border-line bg-card p-5 lg:p-7"><span class="flex items-center gap-3"><span><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg></span> <span class="text-[17px] font-bold"> </span></span> <div class="grid gap-4 sm:grid-cols-2"><div class="flex flex-col gap-2.5"><span class="text-xs font-bold uppercase tracking-[0.16em] text-ok">Included</span> <!></div> <!></div></div>'),Lx=k(`<section class="u-container flex flex-col gap-5 pb-6 pt-12 lg:gap-9 lg:pb-14 lg:pt-22"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">No hidden fees</span> <h2 class="text-[32px] font-bold leading-[1.08] tracking-[-0.02em] lg:text-[44px] lg:leading-[1.05]">What's included</h2></div> <div class="grid gap-3 lg:grid-cols-2 lg:gap-4"></div></section>`),Ix=k('<div class="border-b border-line-strong"><button type="button" class="flex min-h-16 w-full items-center justify-between gap-6 py-4 text-left text-[17px] font-bold text-ink lg:min-h-[76px] lg:py-5 lg:text-xl"> <span class="grid size-9 shrink-0 place-items-center rounded-full border border-line-strong lg:size-10"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path></path></svg></span></button> <div class="pb-5 lg:pb-6 lg:pr-16"><p class="whitespace-pre-line text-[15px] leading-[1.65] text-ink-soft lg:text-base lg:leading-[1.7]"> </p> <a class="mt-3 inline-block text-sm font-bold text-clay hover:text-clay-dark">Read the full answer</a></div></div>'),Dx=k('<section class="u-container grid items-start gap-4 pb-6 pt-8 lg:grid-cols-[400px_minmax(0,1fr)] lg:gap-18 lg:pb-22 lg:pt-14"><div class="flex flex-col gap-2 lg:gap-3.5"><span class="u-eyebrow">Good to know</span> <h2 class="text-[32px] font-bold leading-[1.08] tracking-[-0.02em] lg:text-[44px] lg:leading-[1.05]">Transfer questions</h2> <p class="hidden text-base leading-relaxed text-ink-soft lg:block">Something else on your mind? Our team answers on WhatsApp.</p> <a target="_blank" rel="noopener noreferrer" title="Ask our team a question about transfers" class="mt-2 hidden h-12 items-center self-start rounded-full border border-ink px-[22px] text-[15px] font-bold text-ink hover:bg-ink hover:text-white lg:flex">Ask a question</a></div> <div class="border-t border-line-strong"></div></section>'),Ox=k('<img sizes="(min-width: 1024px) 1280px, 100vw" loading="lazy" class="absolute inset-0 size-full object-cover"/>'),Fx=k(`<nav aria-label="Breadcrumb" class="u-container flex gap-2 py-3.5 text-[13px] text-muted lg:gap-2.5 lg:pb-5 lg:pt-6 lg:text-sm"><a href="/" title="Go to the homepage" class="text-muted hover:text-ink">Home</a> <span aria-hidden="true">/</span> <span aria-current="page" class="font-semibold text-ink">Transfers</span></nav> <div class="px-3 lg:u-container"><section class="relative lg:h-[540px] lg:overflow-hidden lg:rounded-3xl"><div class="relative h-[300px] overflow-hidden rounded-[22px] lg:absolute lg:inset-0 lg:h-auto lg:rounded-none"><!> <div class="absolute inset-0 bg-[linear-gradient(180deg,rgba(12,18,14,0.1)_0%,rgba(12,18,14,0.8)_100%)] lg:bg-[linear-gradient(90deg,rgba(12,18,14,0.78)_0%,rgba(12,18,14,0.45)_45%,rgba(12,18,14,0.1)_100%)]"></div></div> <div class="relative -mt-[300px] flex flex-col lg:mt-0 lg:h-full lg:flex-row lg:items-center lg:justify-between lg:gap-12 lg:p-12"><div class="flex h-[300px] flex-col justify-end gap-2.5 px-5 pb-[72px] text-white lg:h-auto lg:max-w-[560px] lg:self-end lg:gap-[18px] lg:p-0"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">Private car \xB7 Fast boat</span> <h1 class="text-[38px] font-bold leading-[1.02] tracking-[-0.025em] lg:text-[64px] lg:leading-none">Airport &amp; island transfers</h1> <p class="hidden text-lg leading-relaxed opacity-92 lg:block">A private car from Ngurah Rai Airport to your hotel, or a fast boat seat to the Gili Islands and Lombok. One clear price, no hidden fees.</p> <div class="hidden gap-6 text-[15px] font-semibold lg:flex"><!> <!> <!></div></div> <form aria-label="Transfer booking" class="relative mx-2 -mt-[52px] flex flex-col gap-3.5 rounded-[22px] border border-line bg-white p-5 shadow-[0_24px_60px_-28px_rgba(28,33,28,0.4)] lg:m-0 lg:w-[432px] lg:shrink-0 lg:gap-4 lg:border-0 lg:p-6 lg:shadow-[0_24px_60px_-28px_rgba(12,18,14,0.55)]"><div class="grid grid-cols-2 gap-1 rounded-full bg-sand p-1" role="group" aria-label="Transfer type"></div> <div class="grid gap-3.5 lg:grid-cols-2 lg:gap-3"><label class="flex flex-col gap-1.5 text-[13px] font-bold text-ink">From <input type="text" class="h-[50px] min-w-0 rounded-xl border border-line-strong bg-card px-3.5 text-base font-medium text-ink placeholder:text-muted lg:text-[15px]"/></label> <label class="flex flex-col gap-1.5 text-[13px] font-bold text-ink">To <input type="text" class="h-[50px] min-w-0 rounded-xl border border-line-strong bg-card px-3.5 text-base font-medium text-ink placeholder:text-muted lg:text-[15px]"/></label></div> <div class="grid grid-cols-2 gap-2.5 lg:gap-3"><label class="flex flex-col gap-1.5 text-[13px] font-bold text-ink">Date <input type="date" class="h-[50px] min-w-0 rounded-xl border border-line-strong bg-card px-3 text-base font-medium text-ink lg:text-[15px]"/></label> <label class="flex flex-col gap-1.5 text-[13px] font-bold text-ink">
98Passengers <select class="h-[50px] min-w-0 rounded-xl border border-line-strong bg-card px-2.5 text-base font-medium text-ink lg:px-3 lg:text-[15px]"></select></label></div> <a target="_blank" rel="noopener noreferrer" class="u-btn min-h-[54px] lg:min-h-14"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> Get a price on WhatsApp</a> <span class="text-center text-[13px] text-muted"><!></span></form></div></section></div> <!> <!> <!> <!> <div class="px-3 lg:u-container"><section class="relative mb-10 mt-6 h-[400px] overflow-hidden rounded-3xl text-white lg:mb-22 lg:mt-0 lg:h-[360px]"><!> <div class="absolute inset-0 bg-[linear-gradient(180deg,rgba(12,18,14,0.15)_0%,rgba(12,18,14,0.82)_100%)] lg:bg-[linear-gradient(90deg,rgba(12,18,14,0.82)_0%,rgba(12,18,14,0.35)_70%,rgba(12,18,14,0.15)_100%)]"></div> <div class="absolute inset-x-6 bottom-7 flex flex-col gap-3.5 lg:inset-y-0 lg:left-14 lg:right-auto lg:max-w-[700px] lg:justify-center lg:gap-[18px]"><h2 class="text-[32px] font-bold leading-[1.06] tracking-[-0.02em] lg:text-5xl lg:leading-[1.05]">Send your flight or boat date. We'll send the price.</h2> <p class="text-[15px] leading-relaxed opacity-92 lg:text-[17px]">Tell us where you land or sail from, and a local planner replies on WhatsApp.</p> <a target="_blank" rel="noopener noreferrer" title="Message Bali Daily Tours on WhatsApp for a transfer price" class="flex h-13 items-center justify-center gap-2.5 rounded-full bg-white px-6.5 text-[15px] font-bold text-ink hover:bg-card hover:text-ink lg:h-14 lg:self-start lg:text-base"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-whatsapp" aria-hidden="true"></svg> <span class="lg:hidden">Chat on WhatsApp</span> <span class="hidden lg:inline"> </span></a></div></section></div>`,1);function Af(e,t){Ie(t,!1);let r=()=>br(jr,"$currency",n),i=()=>br(dn,"$rates",n),[n,a]=Zr(),o=H(),d=H(),p=H(),h=H(),$=H(),b=H(),m=H(),g=H(),v=H(),y=null,E=G(t,"airport",24,()=>[]),P=G(t,"boats",24,()=>[]),T=G(t,"airport_terms",24,()=>({included:[],excluded:[]})),B=G(t,"boat_terms",24,()=>({included:[],excluded:[]})),I=G(t,"faqs",24,()=>[]),L=G(t,"phone",8,null),O={plane:"M10.5 13.5L3 11l1.5-1.5 7.5 1 4-4.5a2 2 0 0 1 3 3l-4.5 4 1 7.5L14 22l-2.5-7.5-3 3V20L7 21.5 5.5 17 2 15.5 3.5 14h2.5z",boat:"M3 16l2 4h14l2-4zM12 4v12M12 5l6 9H12",arrow:"M5 12h14M13 6l6 6-6 6",car:"M5 16V11l2-5h10l2 5v5M3 16h18M7 19v-3M17 19v-3M7 12h.01M17 12h.01",users:"M16 20v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 18.5V20M10 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM20 20v-1.5a3.5 3.5 0 0 0-2.5-3.3M15.5 4.2a3.5 3.5 0 0 1 0 6.6",bag:"M6 8h12v12H6zM9 8V5h6v3M9 12v5M15 12v5",ticket:"M3 8a2 2 0 0 0 0 4v4h18v-4a2 2 0 0 0 0-4V4H3zM13 4v12",check:"M5 12.5l4.5 4.5L19 7.5",cross:"M6 6l12 12M18 6L6 18",plus:"M12 5v14M5 12h14",minus:"M5 12h14"},ee=ie=>ie.filter(pe=>pe.price!=null).sort((pe,z)=>pe.price-z.price)[0]||null,me=ie=>ie?`Photo for the ${ie.title}`:"",C=(ie,pe,z)=>ie?Xr(ie.price,pe,z):"",M=H("car"),J=H(""),fe=H(""),ue=H(""),$e=H("2"),W=ie=>st(L(),`Hi Bali Daily Tours! I'd like to book the ${ie.title}.`),le=H(0);X(()=>_(E()),()=>{D(o,ee(E()))}),X(()=>_(P()),()=>{D(d,ee(P()))}),X(()=>(_(E()),_(P())),()=>{D(p,[...E(),...P()].filter(ie=>ie.image))}),X(()=>s(p),()=>{D(h,s(p)[0])}),X(()=>(_(E()),s(h)),()=>{D($,E().filter(ie=>ie.image)[1]||s(h))}),X(()=>(_(P()),s(h)),()=>{D(b,P().find(ie=>ie.image)||s(h))}),X(()=>s(M),()=>{D(m,s(M)==="car")}),X(()=>(s(m),s(J),s(fe),s(ue),s($e)),()=>{D(g,[`Hi Bali Daily Tours! I'd like a price for ${s(m)?"an airport transfer":"a fast boat"}.`,s(J)&&`From: ${s(J)}`,s(fe)&&`To: ${s(fe)}`,s(ue)&&`Date: ${s(ue)}`,`Passengers: ${s($e)}`].filter(Boolean).join(`
99`))}),X(()=>(st,_(L()),s(g)),()=>{D(v,st(L(),s(g)))}),nt();var de={live:y};je();var te=Fx(),Le=f(Xe(te),2),F=c(Le),V=c(F),oe=c(V);{var se=ie=>{var pe=vx();S((z,q,ke)=>{x(pe,"src",z),x(pe,"srcset",q),x(pe,"alt",ke)},[()=>(_(Be),s(h),u(()=>Be(s(h).image,1280))),()=>(_(Ue),s(h),u(()=>Ue(s(h).image,[640,1280,1920]))),()=>(s(h),u(()=>me(s(h))))]),w(ie,pe)};N(oe,ie=>{s(h)&&ie(se)})}Se(2),l(V);var Z=f(V,2),we=c(Z),re=f(c(we),6),U=c(re);{var ce=ie=>{var pe=$x(),z=f(c(pe)),q=c(z,!0);l(z),Se(),l(pe),S(ke=>A(q,ke),[()=>(s(o),r(),i(),u(()=>C(s(o),r(),i())))]),w(ie,pe)};N(U,ie=>{s(o)&&ie(ce)})}var ge=f(U,2);{var Fe=ie=>{var pe=_x();w(ie,pe)};N(ge,ie=>{s(o)&&s(d)&&ie(Fe)})}var xe=f(ge,2);{var be=ie=>{var pe=mx(),z=f(c(pe)),q=c(z,!0);l(z),l(pe),S(ke=>A(q,ke),[()=>(s(d),r(),i(),u(()=>C(s(d),r(),i())))]),w(ie,pe)};N(xe,ie=>{s(d)&&ie(be)})}l(re),l(we);var Ge=f(we,2),ze=c(Ge);Y(ze,5,()=>u(()=>[{id:"car",label:"Airport transfer",icon:O.plane},{id:"boat",label:"Fast boat",icon:O.boat}]),ae,(ie,pe)=>{var z=xx(),q=c(z),ke=c(q);l(q);var qe=f(q);l(z),S(()=>{x(z,"aria-pressed",(s(M),s(pe),u(()=>s(M)===s(pe).id))),Ze(z,1,`flex h-11 items-center justify-center gap-2 rounded-full text-sm font-bold transition-colors
100                                   ${s(M),s(pe),u(()=>s(M)===s(pe).id?"bg-white text-ink shadow-[0_2px_8px_-2px_rgba(28,33,28,0.2)]":"text-muted hover:text-ink")??""}`),x(ke,"d",(s(pe),u(()=>s(pe).icon))),A(qe,` ${s(pe),u(()=>s(pe).label)??""}`)}),gr("click",z,()=>D(M,s(pe).id)),w(ie,z)}),l(ze);var Ve=f(ze,2),at=c(Ve),dt=f(c(at));
100Ci(dt),l(at);var ut=f(at,2),xt=f(c(ut));Ci(xt),l(ut),l(Ve);var Ot=f(Ve,2),jt=c(Ot),dr=f(c(jt));Ci(dr),l(jt);var Ar=f(jt,2),Me=f(c(Ar));Y(Me,4,()=>["1","2","3","4","5","6","7","8+"],ae,(ie,pe)=>{var z=bx(),q=c(z);l(z);var ke={};S(()=>{A(q,`${pe??""} ${pe==="1"?"passenger":"passengers"}`),ke!==(ke=pe)&&(z.value=(z.__value=pe)??"")}),w(ie,z)}),l(Me),l(Ar),l(Ot);var he=f(Ot,2),Ye=c(he);Y(Ye,5,()=>Kt,ae,(ie,pe)=>{var z=kf();S(()=>x(z,"d",s(pe))),w(ie,z)}),l(Ye),Se(),l(he);var ye=f(he,2),Re=c(ye);{var Pe=ie=>{var pe=On(),z=Xe(pe);{var q=ke=>{var qe=di();S(lt=>A(qe,`Private car from ${lt??""} \xB7 one price per car`),[()=>(s(o),r(),i(),u(()=>C(s(o),r(),i())))]),w(ke,qe)};N(z,ke=>{s(o)&&ke(q)})}w(ie,pe)},Qe=ie=>{var pe=di();S(z=>A(pe,`Fast boats from ${z??""} per person`),[()=>(s(d),r(),i(),u(()=>C(s(d),r(),i())))]),w(ie,pe)};N(Re,ie=>{s(m)?ie(Pe):s(d)&&ie(Qe,1)})}l(ye),l(Ge),l(Z),l(F),l(Le);var K=f(Le,2);{var Q=ie=>{var pe=Ex(),z=c(pe),q=f(c(z),2);{var ke=bt=>{var ot=Ef(),ne=c(ot);Er(ne,{get price(){return s(o),u(()=>s(o).price)},get price_type(){return s(o),u(()=>s(o).price_type)},size:"lg"}),l(ot),w(bt,ot)};N(q,bt=>{s(o)&&bt(ke)})}l(z);var qe=f(z,2),lt=c(qe),wt=c(lt);{var Tt=bt=>{var ot=wx(),ne=c(ot);l(ot),S((_e,Ne,ct)=>{x(ne,"src",_e),x(ne,"srcset",Ne),x(ne,"alt",ct)},[()=>(_(Be),s($),u(()=>Be(s($).image,640))),()=>(_(Ue),s($),u(()=>Ue(s($).image,[320,640,960]))),()=>(s($),u(()=>me(s($))))]),w(bt,ot)};N(wt,bt=>{s($)&&bt(Tt)})}var $t=f(wt,2),Wt=f(c($t),2),Et=c(Wt),Ut=c(Et);l(Et),Se(),l(Wt);var Qt=f(Wt,2),er=c(Qt),Dr=c(er);l(er),Se(),l(Qt);var ri=f(Qt,2);Y(ri,1,()=>(_(T()),u(()=>T().included)),ae,(bt,ot)=>{var ne=yx(),_e=c(ne),Ne=c(_e);l(_e);var ct=f(_e);l(ne),S(()=>{x(Ne,"d",u(()=>O.check)),A(ct,` ${s(ot)??""}`)}),w(bt,ne)}),l($t),l(lt);var tr=f(lt,2),tt=f(c(tr),2);Y(tt,5,E,bt=>bt.id,(bt,ot)=>{var ne=kx(),_e=c(ne),Ne=c(_e),ct=f(c(Ne),3),ft=c(ct);l(ct);var rt=f(ct,2),Ct=c(rt,!0);l(rt),l(Ne);var Pt=f(Ne,4),zt=c(Pt);Er(zt,{get price(){return s(ot),u(()=>s(ot).price)},get price_type(){return s(ot),u(()=>s(ot).price_type)},show_from:!1,size:"sm"}),l(Pt),l(_e);var Vt=f(_e,2),Vr=c(Vt);Er(Vr,{get price(){return s(ot),u(()=>s(ot).price)},get price_type(){return s(ot),u(()=>s(ot).price_type)},show_from:!1,size:"sm"}),l(Vt);var Gt=f(Vt,2);l(ne),S(ht=>{x(_e,"href",(s(ot),u(()=>s(ot).href))),x(_e,"title",(s(ot),u(()=>`See the ${s(ot).title} details`))),x(ft,"d",u(()=>O.arrow)),A(Ct,(s(ot),u(()=>s(ot).destination))),x(Gt,"href",ht),x(Gt,"title",(s(ot),u(()=>`Book the ${s(ot).title} on WhatsApp`)))},[()=>(s(ot),u(()=>W(s(ot))))]),w(bt,ne)}),l(tt),Se(2),l(tr),l(qe),l(pe),S(()=>{x(Ut,"d",u(()=>O.car)),x(Dr,"d",u(()=>O.users))}),w(ie,pe)};N(K,ie=>{_(E()),u(()=>E().length)&&ie(Q)})}var ve=f(K,2);{var Ee=ie=>{var pe=Tx(),z=c(pe),q=f(c(z),2);{var ke=tr=>{var tt=Ef(),bt=c(tt);Er(bt,{get price(){return s(d),u(()=>s(d).price)},get price_type(){return s(d),u(()=>s(d).price_type)},size:"lg"}),l(tt),w(tr,tt)};N(q,tr=>{s(d)&&tr(ke)})}l(z);var qe=f(z,2),lt=c(qe);Y(lt,5,P,tr=>tr.id,(tr,tt)=>{var bt=Sx(),ot=c(bt),ne=c(ot);{var _e=Vt=>{var Vr=Ax();S((Gt,ht)=>{x(Vr,"src",Gt),x(Vr,"srcset",ht),x(Vr,"alt",(s(tt),u(()=>`${s(tt).title} \u2014 fast boat photo`)))},[()=>(_(Be),s(tt),u(()=>Be(s(tt).image,640))),()=>(_(Ue),s(tt),u(()=>Ue(s(tt).image,[320,640,960])))]),w(Vt,Vr)};N(ne,Vt=>{s(tt),u(()=>s(tt).image)&&Vt(_e)})}Se(2),l(ot);var Ne=f(ot,2),ct=c(Ne),ft=c(ct),rt=c(ft,!0);l(ft),l(ct);var Ct=f(ct,2),Pt=c(Ct);Er(Pt,{get price(){return s(tt),u(()=>s(tt).price)},get price_type(){return s(tt),u(()=>s(tt).price_type)},size:"sm"});var zt=f(Pt,2);l(Ct),l(Ne),l(bt),S(Vt=>{x(ot,"href",(s(tt),u(()=>s(tt).href))),x(ot,"title",(s(tt),u(()=>`See the ${s(tt).title} details`))),x(ft,"href",(s(tt),u(()=>s(tt).href))),x(ft,"title",(s(tt),u(()=>`See the ${s(tt).title} details`))),A(rt,(s(tt),u(()=>s(tt).title))),x(zt,"href",Vt),x(zt,"title",(s(tt),u(()=>`Check seats on the ${s(tt).title} on WhatsApp`)))},[()=>(s(tt),u(()=>W(s(tt))))]),w(tr,bt)}),l(lt),l(qe);var wt=f(qe,2),Tt=c(wt),$t=c(Tt),Wt=c($t);l($t),Se(),l(Tt);var Et=f(Tt,2),Ut=c(Et),Qt=c(Ut);l(Ut),Se(),l(Et);var er=f(Et,2),Dr=c(er),ri=c(Dr);l(Dr),Se(),l(er),l(wt),l(pe),S(()=>{x(Wt,"d",u(()=>O.users)),x(Qt,"d",u(()=>O.bag)),x(ri,"d",u(()=>O.ticket))}),w(ie,pe)};N(ve,ie=>{_(P()),u(()=>P().length)&&ie(Ee)})}var Oe=f(ve,2);{var pt=ie=>{var pe=Lx(),z=f(c(pe),2);Y(z,5,()=>(_(T()),_(B()),u(()=>[{name:"Airport transfers",icon:O.plane,tint:"bg-sun-tint text-clay",terms:T()},{name:"Fast boats",icon:O.boat,tint:"bg-sea-tint text-sea",terms:B()}])),ae,(q,ke)=>{var qe=On(),lt=Xe(qe);{var wt=Tt=>{var $t=Px(),Wt=c($t),Et=c(Wt),Ut=c(Et),Qt=c(Ut);l(Ut),l(Et);var er=f(Et,2),Dr=c(er,!0);l(er),l(Wt);var ri=f(Wt,2),tr=c(ri),tt=f(c(tr),2);Y(tt,1,()=>(s(ke),u(()=>s(ke).terms.included)),ae,(ne,_e)=>{var Ne=Cx(),ct=c(Ne),ft=c(ct);l(ct);var rt=f(ct,1,!0);l(Ne),S(()=>{x(ft,"d",u(()=>O.check)),A(rt,s(_e))}),w(ne,Ne)}),l(tr);var bt=f(tr,2);{var ot=ne=>{var _e=Mx(),Ne=f(c(_e),2);Y(Ne,1,()=>(s(ke),u(()=>s(ke).terms.excluded)),ae,(ct,ft)=>{var rt=Rx(),Ct=c(rt),Pt=c(Ct);l(Ct);var zt=f(Ct,1,!0);l(rt),S(()=>{x(Pt,"d",u(()=>O.cross)),A(zt,s(ft))}),w(ct,rt)}),l(_e),w(ne,_e)};N(bt,ne=>{s(ke),u(()=>s(ke).terms.excluded.length)&&ne(ot)})}l(ri),l($t),S(()=>{Ze(Et,1,`grid size-11 place-items-center rounded-xl ${s(ke),u(()=>s(ke).tint)??""} lg:size-[52px] lg:rounded-[14px]`),x(Qt,"d",(s(ke),u(()=>s(ke).icon))),A(Dr,(s(ke),u(()=>s(ke).name)))}),w(Tt,$t)};N(lt,Tt=>{s(ke),u(()=>s(ke).terms.included.length)&&Tt(wt)})}w(q,qe)}),l(z),l(pe),w(ie,pe)};N(Oe,ie=>{_(T()),_(B()),u(()=>T().included.length||B().included.length)&&ie(pt)})}var vt=f(Oe,2);{var et=ie=>{var pe=Dx(),z=c(pe),q=f(c(z),6);l(z);var ke=f(z,2);Y(ke,5,I,ae,(qe,lt,wt)=>{var Tt=Ix(),$t=c(Tt);x($t,"aria-controls",`transfer-faq-${wt}`);var Wt=c($t),Et=f(Wt),Ut=c(Et),Qt=c(Ut);l(Ut),l(Et),l($t);var er=f($t,2);x(er,"id",`transfer-faq-${wt}`);var Dr=c(er),ri=c(Dr,!0);l(Dr);var tr=f(Dr,2);l(er),l(Tt),S(()=>{x($t,"aria-expanded",s(le)===wt),A(Wt,`${s(lt),u(()=>s(lt).question)??""} `),x(Qt,"d",(s(le),u(()=>s(le)===wt?O.minus:O.plus))),x(er,"hidden",s(le)!==wt),A(ri,(s(lt),u(()=>s(lt).answer))),x(tr,"href",(s(lt),u(()=>s(lt).href))),x(tr,"title",(s(lt),u(()=>`Read the full answer: ${s(lt).question}`)))}),gr("click",$t,()=>D(le,s(le)===wt?-1:wt)),w(qe,Tt)}),l(ke),l(pe),S(qe=>x(q,"href",qe),[()=>(_(st),_(L()),u(()=>st(L(),"Hi Bali Daily Tours! I have a question about transfers.")))]),w(ie,pe)};N(vt,ie=>{_(I()),u(()=>I().length)&&ie(et)})}var kt=f(vt,2),gt=c(kt),Mt=c(gt);{var Zt=ie=>{var pe=Ox();S((z,q,ke)=>{x(pe,"src",z),x(pe,"srcset",q),x(pe,"alt",ke)},[()=>(_(Be),s(b),u(()=>Be(s(b).image,1280))),()=>(_(Ue),s(b),u(()=>Ue(s(b).image,[640,1280,1920]))),()=>(s(b),u(()=>me(s(b))))]),w(ie,pe)};N(Mt,ie=>{s(b)&&ie(Zt)})}var $r=f(Mt,4),ur=f(c($r),4),Jt=c(ur);Y(Jt,5,()=>Kt,ae,(ie,pe)=>{var z=kf();S(()=>x(z,"d",s(pe))),w(ie,z)}),l(Jt);var Ir=f(Jt,4),ti=c(Ir,!0);l(Ir),l(ur),l($r),l(gt),l(kt),S((ie,pe)=>{x(dt,"placeholder",s(m)?"Airport (DPS)":"Padangbai"),x(xt,"placeholder",s(m)?"Hotel or area":"Gili Trawangan"),x(he,"href",s(v)),x(he,"title",s(m)?"Send your airport transfer details on WhatsApp for a price":"Send your fast boat details on WhatsApp for a price"),x(ur,"href",ie),A(ti,pe)},[()=>(_(st),_(L()),u(()=>st(L(),"Hi Bali Daily Tours! I'd like a price for a transfer."))),()=>(_(L()),_(Ur),u(()=>L()?`WhatsApp ${Ur(L())}`:"Chat on WhatsApp"))]),Ri(dt,()=>s(J),ie=>D(J,ie)),Ri(xt,()=>s(fe),ie=>D(fe,ie)),Ri(dr,()=>s(ue),ie=>D(ue,ie)),ps(Me,()=>s($e),ie=>D($e,ie)),gr("submit",Ge,Ho(function(ie){xc.call(this,t,ie)})),w(e,te),Ke(t,"live",y);var Ft=De(de);return a(),Ft}var ad={};At(ad,{default:()=>Sf});var sd={};At(sd,{default:()=>Go});var Nx=k("<span> </span>"),Bx=k('<div class="flex flex-col gap-0.5 rounded-[14px] bg-card px-3.5 py-3"><dt class="flex items-center gap-1.5 text-xs text-muted"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-sea" aria-hidden="true"><path></path></svg> </dt> <dd class="text-base font-bold"> </dd></div>'),Hx=k('<li class="flex flex-col items-center gap-0.5 rounded-xl bg-card px-1 py-2 text-center"><span class="text-[11px] font-semibold text-muted"> </span> <span class="text-sm font-bold"> </span>
100 <span class="size-2 rounded-full"></span></li>'),jx=k('<ol class="grid grid-cols-5 gap-1.5"></ol>'),Ux=k('<span class="size-2.5 rounded-full"></span>'),zx=k('<span class="text-[13px] text-muted"> </span>'),Vx=k('<article class="flex flex-col gap-4 rounded-[20px] border border-line bg-white p-5 lg:gap-[18px] lg:p-6"><div class="flex items-start justify-between gap-3"><div class="flex flex-col gap-1"><h3 class="text-xl font-bold tracking-[-0.01em] lg:text-[22px]"><a class="text-ink hover:text-clay"> </a></h3> <span class="text-sm text-muted"> </span></div> <!></div> <dl class="grid grid-cols-2 gap-2.5"></dl> <!> <div class="mt-auto flex flex-wrap items-center justify-between gap-2 border-t border-sand pt-3.5"><span class="flex items-center gap-2.5"><span class="flex gap-1" aria-hidden="true"></span> <span class="text-sm font-bold"> </span></span> <!></div> <div class="flex gap-2"><a class="flex h-11 grow items-center justify-center rounded-full bg-ink px-4 text-sm font-bold text-white hover:bg-forest hover:text-white">Live report</a> <a class="flex h-11 grow items-center justify-center rounded-full border border-line-strong px-4 text-sm font-bold text-ink hover:bg-ink/5 hover:text-ink">Spot guide</a></div></article>');function Go(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=G(t,"location",8),o=G(t,"guide",8,null);X(()=>_(a()),()=>{D(r,a().current||{})}),X(()=>(zr,s(r)),()=>{D(i,zr(s(r).surf_rating))}),X(()=>(s(r),Ce,fs),()=>{D(n,[{label:"Waves",value:`${(s(r).wave_height||0).toFixed(1)} m`,icon:Ce.wave},{label:"Swell period",value:`${Math.round(s(r).swell_period||0)} s`,icon:Ce.clock},{label:"Wind",value:`${Math.round(s(r).wind_speed||0)} km/h ${fs(s(r).wind_direction)}`.trim(),icon:Ce.wind},{label:"Water",value:`${Math.round(s(r).water_temperature||0)}\xB0C`,icon:Ce.thermo}])}),nt(),je();var d=Vx(),p=c(d),h=c(p),$=c(h),b=c($),m=c(b,!0);l(b),l($);var g=f($,2),v=c(g);l(g),l(h);var y=f(h,2);{var E=$e=>{var W=Nx(),le=c(W,!0);l(W),S(de=>{Ze(W,1,`whitespace-nowrap rounded-full px-2.5 py-1 text-xs font-bold ${de??""}`),A(le,(_(o()),u(()=>o().level)))},[()=>(_(Pi),_(o()),u(()=>Pi(o().level)))]),w($e,W)};N(y,$e=>{_(o()),u(()=>o()?.level)&&$e(E)})}l(p);var P=f(p,2);Y(P,5,()=>s(n),ae,($e,W)=>{var le=Bx(),de=c(le),te=c(de),Le=c(te);l(te);var F=f(te,1,!0);l(de);var V=f(de,2),oe=c(V,!0);l(V),l(le),S(()=>{x(Le,"d",(s(W),u(()=>s(W).icon))),A(F,(s(W),u(()=>s(W).label))),A(oe,(s(W),u(()=>s(W).value)))}),w($e,le)}),l(P);var T=f(P,2);{var B=$e=>{var W=jx();Y(W,5,()=>(_(a()),u(()=>a().forecast.slice(0,5))),ae,(le,de)=>{let te=cr(()=>(_(zr),s(de),u(()=>zr(s(de).surf_rating))));var Le=Hx(),F=c(Le),V=c(F,!0);l(F);var oe=f(F,2),se=c(oe);l(oe);var Z=f(oe,2);l(Le),S((we,re)=>{A(V,we),A(se,`${re??""} m`),Hr(Z,`background: ${_(s(te)),u(()=>s(te).color)??""}`),x(Z,"title",`${_(s(te)),u(()=>s(te).label)??""} (${s(de),u(()=>s(de).surf_rating)??""}/10)`)},[()=>(_(yn),s(de),u(()=>yn(s(de).date))),()=>(s(de),u(()=>(s(de).wave_height||0).toFixed(1)))]),w(le,Le)}),l(W),S(()=>x(W,"aria-label",`${_(a()),u(()=>a().name)??""} five-day wave forecast`)),w($e,W)};N(T,$e=>{_(a()),u(()=>a().forecast?.length)&&$e(B)})}var I=f(T,2),L=c(I),O=c(L);Y(O,4,()=>[0,1,2,3],ae,($e,W)=>{var le=Ux();S(()=>Hr(le,`background: ${s(i),u(()=>W<s(i).dots?s(i).color:"#E3DCCD")??""}`)),w($e,le)}),l(O);var ee=f(O,2),me=c(ee);l(ee),l(L);var C=f(L,2);{var M=$e=>{var W=zx(),le=c(W);l(W),S(de=>A(le,`Best: ${de??""}`),[()=>(_(o()),u(()=>o().tide.toLowerCase()))]),w($e,W)};N(C,$e=>{_(o()),u(()=>o()?.tide)&&$e(M)})}l(I);var J=f(I,2),fe=c(J),ue=f(fe,2);l(J),l(d),S($e=>{x(b,"href",`/wave-info/${_(a()),u(()=>a().slug)??""}`),x(b,"title",`See the live ${_(a()),u(()=>a().name)??""} surf report`),A(m,(_(a()),u(()=>a().name))),A(v,`${_(a()),u(()=>a().region)??""}${$e??""}`),Hr(ee,`color: ${s(i),u(()=>s(i).color)??""}`),A(me,`${s(i),u(()=>s(i).label)??""} \xB7 ${s(r),u(()=>s(r).surf_rating||0)??""}/10`),x(fe,"href",`/wave-info/${_(a()),u(()=>a().slug)??""}`),x(fe,"title",`See the live ${_(a()),u(()=>a().name)??""} surf report`),x(ue,"href",`/surf-spots/${_(a()),u(()=>a().slug)??""}-wave-info`),x(ue,"title",`Read our ${_(a()),u(()=>a().name)??""} surf spot guide`)},[()=>(_(o()),u(()=>o()?.wave_type?` \xB7 ${o().wave_type.toLowerCase()}`:""))]),w(e,d),De()}var qx=k(`<div class="u-container pt-8 lg:pt-10">
100<div class="flex flex-col gap-4 rounded-[22px] bg-forest p-5 text-paper sm:flex-row sm:items-center lg:gap-6 lg:p-7"><span class="grid size-14 shrink-0 place-items-center rounded-2xl bg-paper/10"><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-gold" aria-hidden="true"><path></path></svg></span> <div class="flex grow flex-col gap-1"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px]">Best right now</span> <h2 class="text-2xl font-bold tracking-[-0.015em] lg:text-[28px]"> </h2> <p class="text-sm text-paper/80 lg:text-[15px]">New to surfing? Our spot guides show which breaks suit beginners.</p></div> <div class="flex flex-col gap-2 sm:shrink-0"><a class="flex h-12 items-center justify-center rounded-full bg-paper px-6 text-[15px] font-bold text-ink hover:bg-white hover:text-ink"> </a> <a href="/surf-spots" title="Browse our guides to Bali's surf spots" class="flex h-12 items-center justify-center rounded-full border border-paper/40 px-6 text-[15px] font-bold text-paper hover:bg-paper/10 hover:text-paper">Surf spot guides</a></div></div></div>`),Wx=k('<li class="flex items-center gap-2"><span class="size-2.5 rounded-full"></span> </li>'),Gx=k('<tr class="border-b border-line align-top last:border-0"><th scope="row" class="whitespace-nowrap py-4 pl-5 pr-4 font-bold"><a class="text-ink hover:text-clay"> </a> <span class="block text-xs font-normal text-muted"> </span></th><td class="px-4 py-4 text-sm text-ink-soft"> </td><td class="px-4 py-4 text-sm text-ink-soft"> </td><td class="px-4 py-4 text-sm text-ink-soft"> </td><td class="px-4 py-4 text-sm text-ink-soft"> </td><td class="py-4 pl-4 pr-5 text-sm text-ink-soft"> </td></tr>'),Yx=k('<div class="flex flex-col gap-2 rounded-[20px] border border-line bg-card p-5 lg:p-6"><dt class="text-lg font-bold"> </dt> <dd class="text-[15px] leading-relaxed text-ink-soft"> </dd></div>'),Jx=k(`<section class="u-container flex flex-col gap-6 py-12 lg:gap-8 lg:py-20"><div class="flex max-w-3xl flex-col gap-2 lg:gap-3"><span class="u-eyebrow">When each spot works</span> <h2 class="u-h2">Best tide, swell &amp; wind for each Bali surf spot</h2> <p class="text-[15px] leading-relaxed text-ink-soft lg:text-base">The report above shows what the ocean is doing right now. This shows when each break is actually worth
101                paddling out for.</p></div> <div class="-mx-4 overflow-x-auto px-4 lg:mx-0 lg:px-0"><table class="w-full min-w-[46rem] border-collapse overflow-hidden rounded-[20px] bg-white text-left"><caption class="sr-only">Best tide, swell direction, offshore wind, ideal size and skill level for each Bali surf spot</caption><thead><tr class="border-b border-line bg-card text-[13px] font-bold text-muted"><th scope="col" class="py-3.5 pl-5 pr-4">Spot</th><th scope="col" class="px-4 py-3.5">Best tide</th><th scope="col" class="px-4 py-3.5">Swell</th><th scope="col" class="px-4 py-3.5">Offshore wind</th><th scope="col" class="px-4 py-3.5">Ideal size</th><th scope="col" class="py-3.5 pl-4 pr-5">Level</th></tr></thead><tbody></tbody></table></div></section> <section class="u-container flex flex-col gap-6 pb-12 lg:gap-8 lg:pb-20"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow">Surf forecast basics</span> <h2 class="u-h2">How to read a Bali surf forecast</h2></div> <dl class="grid gap-3 md:grid-cols-2 lg:gap-4"></dl></section>`,1),Xx=k('<li class="flex gap-3"><span class="mt-0.5 h-fit shrink-0 rounded-full px-2.5 py-1 text-xs font-bold"> </span> <span class="text-sm leading-relaxed text-ink-soft lg:text-[15px]"> </span></li>'),Kx=k('<li class="flex flex-col gap-0.5 rounded-2xl bg-card px-4 py-3"><span class="flex flex-wrap items-baseline gap-x-2"><span class="font-bold"> </span><span class="text-sm font-semibold text-sea"> </span></span> <span class="text-sm leading-relaxed text-ink-soft"> </span></li>'),Zx=k(`<section class="u-container flex flex-col gap-4 pt-5 lg:gap-[18px] lg:pt-7"><!> <div class="flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between"><div class="flex max-w-3xl flex-col gap-3.5"><h1 class="u-h1">Bali surf report &amp; forecast</h1> <p class="text-base leading-relaxed text-ink-soft lg:text-lg">A live Bali surf report for eight of the island's best breaks \u2014 wave height, swell and wind, updated
102                through the day, plus the best tide to surf each spot.</p>
102 <span class="flex items-center gap-2 self-start rounded-full bg-sand py-1.5 pl-2.5 pr-3 text-[13px] font-bold text-forest"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-ok" aria-hidden="true"><path></path></svg> Updated every 2 hours</span></div> <!></div> <!></section> <!> <section id="surf" class="mt-10 bg-sand py-10 lg:mt-14 lg:py-18"><div class="u-container flex flex-col gap-6 lg:gap-8"><div class="flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between"><div class="flex flex-col gap-2 lg:gap-3"><span class="u-eyebrow !text-sea">Surf report</span> <h2 class="u-h2">Surf spots today</h2></div> <ul class="flex flex-wrap gap-x-5 gap-y-2 text-sm font-semibold text-ink-soft" aria-label="Rating key"></ul></div> <div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3 lg:gap-6"></div> <p class="flex items-center gap-2 text-sm text-muted"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg> Wave heights are in metres \xB7 ratings run from 1 to 10</p></div></section> <!> <section class="u-container grid gap-4 pb-6 lg:grid-cols-2 lg:gap-6 lg:pb-10">
102<div class="flex flex-col gap-4 rounded-[22px] border border-line bg-white p-5 lg:p-7"><h2 class="text-2xl font-bold tracking-[-0.015em] lg:text-[28px]">Reading the surf rating</h2> <ul class="flex flex-col gap-3"></ul></div> <div class="flex flex-col gap-4 rounded-[22px] border border-line bg-white p-5 lg:p-7"><h2 class="text-2xl font-bold tracking-[-0.015em] lg:text-[28px]">Best times to surf in Bali</h2> <ul class="flex flex-col gap-3"></ul></div></section> <!>`,1);function Sf(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=H(),o=H(),d=null,p=G(t,"wave_data",8),h=G(t,"surf_spots",24,()=>[]),$=G(t,"phone",8,null),b=[{term:'Wave height \u2014 and what "chest-high" means',text:'Forecasts give the face height of the wave in feet or metres. Surfers translate it against the body: waist-high is roughly 2 ft, chest-high 3 ft, head-high 4 ft, and overhead anything above that. So a "4\u20135 ft, chest to head" call means a rideable, punchy wave that most intermediates can handle \u2014 not a 5-foot drop.'},{term:"Swell direction and period",text:`Bali's west coast and the Bukit face the Indian Ocean and need a south-west groundswell; the east coast breaks such as Keramas want south to south-east. Period matters as much as height \u2014 a 14\u201318 second period carries far more power than an 8 second windswell of the same size, which is why a "small" long-period forecast can still produce serious waves.`},{term:"Wind \u2014 the difference between clean and blown out",text:"Offshore wind blows from the land into the wave and holds it up; onshore wind crumbles it. During the dry season the east and south-east trades are offshore on the Bukit and west coast, which is why those months are the classic Bali season. In the wet season the wind swings west and the east coast comes alive instead. Dawn is usually lightest either way."},{term:"Tide",text:"Bali's reefs are shallow, and tide decides whether a spot is world-class or unsurfable. Low tide exposes reef at Bingin and Impossibles; Uluwatu, Balangan and Dreamland prefer mid to high. Check the table above before you commit to the drive \u2014 the right spot on the wrong tide is a wasted morning."}],m=[{title:"Early morning",when:"5:30 \u2013 8:00 AM",text:"Usually the cleanest conditions, with offshore winds and fewer crowds."},{title:"Late afternoon",when:"4:00 \u2013 6:00 PM",text:"Second-best window as the wind eases \u2014 and sunset sessions."},{title:"Tide",when:"Spot by spot",text:"Each break works on a different tide. Check the table above before you drive."}];X(()=>_(p()),()=>{D(r,p().locations||[])}),X(()=>_(h()),()=>{D(i,Object.fromEntries(h().map(re=>[re.slug,re])))}),X(()=>(_(p()),s(r)),()=>{D(n,p().is_fallback||s(r).some(re=>re.is_fallback))}),X(()=>s(r),()=>{D(a,s(r).reduce((re,U)=>!re||(U.current?.surf_rating||0)>(re.current?.surf_rating||0)?U:re,null))}),X(()=>(s(a),zr),()=>{D(o,s(a)?zr(s(a).current.surf_rating):null)}),nt();var g={live:d};je();var v=Zx(),y=Xe(v),E=c(y);Mi(E,{items:[{label:"Home",href:"/",tip:"Go to the homepage"},{label:"Surf report"}]});var P=f(E,2),T=c(P),B=f(c(T),4),I=c(B),L=c(I);l(I),Se(),l(B),l(T);var O=f(T,2);un(O,{active:"surf"}),l(P);var ee=f(P,2);Xs(ee,{get show(){return s(n)}}),l(y);var me=f(y,2);{var C=re=>{var U=qx(),ce=c(U),ge=c(ce),Fe=c(ge),xe=c(Fe);l(Fe),l(ge);var be=f(ge,2),Ge=f(c(be),2),ze=c(Ge);l(Ge),Se(2),l(be);var Ve=f(be,2),at=c(Ve),dt=c(at);l(at),Se(2),l(Ve),l(ce),l(U),S(()=>{x(xe,"d",(_(Ce),u(()=>Ce.wave))),A(ze,`${s(a),u(()=>s(a).name)??""} \xB7 ${s(o),u(()=>s(o).label)??""}, ${s(a),u(()=>s(a).current.surf_rating)??""}/10`),x(at,"href",`/wave-info/${s(a),u(()=>s(a).slug)??""}`),x(at,"title",`See the live ${s(a),u(()=>s(a).name)??""} surf report`),A(dt,`View ${s(a),u(()=>s(a).name)??""}`)}),w(re,U)};N(me,re=>{s(a)&&re(C)})}var M=f(me,2),J=c(M),fe=c(J),ue=f(c(fe),2);Y(ue,5,()=>Yc,ae,(re,U)=>{var ce=Wx(),ge=c(ce),Fe=f(ge);l(ce),S(()=>{Hr(ge,`background: ${s(U),u(()=>s(U).color)??""}`),A(Fe,`${s(U),u(()=>s(U).label)??""} ${s(U),u(()=>s(U).range)??""}`)}),w(re,ce)}),l(ue),l(fe);var $e=f(fe,2);Y($e,5,()=>s(r),re=>re.slug,(re,U)=>{Go(re,{get location(){return s(U)},get guide(){return s(i),s(U),u(()=>s(i)[s(U).slug])}})}),l($e);var W=f($e,2),le=c(W),de=c(le);l(le),Se(),l(W),l(J),l(M);var te=f(M,2);{var Le=re=>{var U=Jx(),ce=Xe(U),ge=f(c(ce),2),Fe=c(ge),xe=f(c(Fe),2);Y(xe,5,h,ae,(ze,Ve)=>{var at=Gx(),dt=c(at),ut=c(dt),xt=c(ut,!0);l(ut);var Ot=f(ut,2),jt=c(Ot,!0);l(Ot),l(dt);var dr=f(dt),Ar=c(dr,!0);l(dr);var Me=f(dr),he=c(Me,!0);l(Me);var Ye=f(Me),ye=c(Ye,!0);l(Ye);var Re=f(Ye),Pe=c(Re,!0);l(Re);var Qe=f(Re),K=c(Qe,!0);l(Qe),l(at),S(()=>{x(ut,"href",`/wave-info/${s(Ve),u(()=>s(Ve).slug)??""}`),x(ut,"title",`Live ${s(Ve),u(()=>s(Ve).name)??""} surf report and forecast`),A(xt,(s(Ve),u(()=>s(Ve).name))),A(jt,(s(Ve),u(()=>s(Ve).region))),A(Ar,(s(Ve),u(()=>s(Ve).tide))),A(he,(s(Ve),u(()=>s(Ve).swell))),A(ye,(s(Ve),u(()=>s(Ve).wind))),A(Pe,(s(Ve),u(()=>s(Ve).size))),A(K,(s(Ve),u(()=>s(Ve).level)))}),w(ze,at)}),l(xe),l(Fe),l(ge),l(ce);var be=f(ce,2),Ge=f(c(be),2);Y(Ge,5,()=>b,ae,(ze,Ve)=>{var at=Yx(),dt=c(at),ut=c(dt,!0);l(dt);var xt=f(dt,2),Ot=c(xt,!0);l(xt),l(at),S(()=>{A(ut,(s(Ve),u(()=>s(Ve).term))),A(Ot,(s(Ve),u(()=>s(Ve).text)))}),w(ze,at)}),l(Ge),l(be),w(re,U)};N(te,re=>{_(h()),u(()=>h().length)&&re(Le)})}var F=f(te,2),V=c(F),oe=f(c(V),2);Y(oe,5,()=>Yc,ae,(re,U)=>{var ce=Xx(),ge=c(ce),Fe=c(ge);l(ge);var xe=f(ge,2),be=c(xe,!0);l(xe),l(ce),S(()=>{Hr(ge,`background: ${s(U),u(()=>s(U).bg)??""}; color: ${s(U),u(()=>s(U).color)??""}`),A(Fe,`${s(U),u(()=>s(U).label)??""} ${s(U),u(()=>s(U).range)??""}`),A(be,(s(U),u(()=>s(U).text)))}),w(re,ce)}),l(oe),l(V);var se=f(V,2),Z=f(c(se),2);Y(Z,5,()=>m,ae,(re,U)=>{var ce=Kx(),ge=c(ce),Fe=c(ge),xe=c(Fe,!0);l(Fe);var be=f(Fe),Ge=c(be,!0);l(be),l(ge);var ze=f(ge,2),Ve=c(ze,!0);l(ze),l(ce),S(()=>{A(xe,(s(U),u(()=>s(U).title))),A(Ge,(s(U),u(()=>s(U).when))),A(Ve,(s(U),u(()=>s(U).text)))}),w(re,ce)}),l(Z),l(se),l(F);var we=f(F,2);return Li(we,{get phone(){return $()},title:"Pair a surf session with a day out",body:"Tell us which break you want to surf and where you're staying. A private car and driver can take you there and add a temple or a sunset on the way back.",message:"Hi Bali Daily Tours! I'd like to plan a day around a surf session.",links:[{label:"Check the weather",href:"/weather",tip:"Check the current Bali weather forecast"}]}),S(()=>{x(L,"d",(_(Ce),u(()=>Ce.clock))),x(de,"d",(_(Ce),u(()=>Ce.clock)))}),w(e,v),Ke(t,"live",d),De(g)}var od={};At(od,{default:()=>Tf});var Qx=k('<span class="rounded-full bg-sun-tint px-3 py-1.5 text-[13px] font-bold text-no">Dry season</span>'),eb=k('<span class="rounded-full bg-sea-tint px-3 py-1.5 text-[13px] font-bold text-sea">Wet season</span>'),tb=k('<span class="text-sm text-muted lg:text-[15px]"> </span>'),rb=k('<div class="flex flex-col gap-2 rounded-2xl border border-line bg-card p-3 sm:flex-row sm:items-center sm:gap-3 lg:p-4"><span class="grid size-10 shrink-0 place-items-center rounded-xl bg-sand"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-forest" aria-hidden="true"><path></path></svg></span> <span class="flex flex-col gap-0.5"><dt class="text-xs text-muted lg:text-[13px]"> </dt> <dd class="text-[15px] font-bold lg:text-[17px]"> </dd></span></div>'),ib=k('<li><span class="flex flex-col gap-0.5"><span class="text-sm font-bold lg:text-[15px]"> </span> <span class="text-[11px] text-muted lg:text-[13px]"> </span></span> <svg viewBox="0 0 24 24" fill="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="size-8 lg:size-10" role="img"><path></path></svg> <span class="hidden text-[13px] text-muted lg:block"> </span> <span class="flex items-baseline gap-1.5 lg:gap-2"><strong class="text-[17px] lg:text-xl"> </strong><span class="text-[13px] text-muted lg:text-[15px]"> </span></span> <span class="flex w-full flex-col gap-1.5"><span class="block h-1.5 overflow-hidden rounded-full bg-sand"><span class="block h-full rounded-full bg-sea"></span></span> <span class="text-xs font-bold text-sea"> </span></span></li>'),nb=k('<div class="flex flex-col gap-3 lg:gap-4"><div class="flex items-baseline justify-between gap-4"><h2 class="text-xl font-bold tracking-[-0.01em] lg:text-2xl"> </h2> <span class="shrink-0 text-xs text-muted lg:text-sm"><span class="lg:hidden">\xB0C \xB7 rain</span><span class="hidden lg:inline">High / low in \xB0C \xB7 chance of rain</span></span></div> <ol class="u-edge-row -mx-4 flex gap-2.5 overflow-x-auto px-4 lg:mx-0 lg:grid lg:gap-3 lg:overflow-visible lg:px-0"></ol></div>'),sb=k('<span class="ml-auto rounded-full bg-ink px-2.5 py-0.5 text-[11px] font-bold text-white">Now</span>'),ab=k('<div><span class="flex flex-wrap items-center gap-x-2.5 gap-y-0.5"><span></span> <span class="text-base font-bold lg:text-lg"> </span> <span class="text-sm text-muted"> </span> <!></span> <span class="text-sm leading-relaxed text-ink-soft lg:text-[15px]"> </span></div>'),ob=k(`<section class="u-container flex flex-col gap-4 pt-5 lg:gap-[18px] lg:pt-7"><!> <div class="flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between"><div class="flex flex-col gap-3.5"><h1 class="u-h1">Bali weather forecast</h1>
102 <span class="flex items-center gap-2 self-start rounded-full bg-sand py-1.5 pl-2.5 pr-3 text-[13px] font-bold text-forest"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-ok" aria-hidden="true"><path></path></svg> Updated hourly</span></div> <!></div></section> <section id="weather" class="u-container flex flex-col gap-6 pb-10 pt-8 lg:gap-7 lg:pb-14 lg:pt-10"><div class="grid gap-4 lg:grid-cols-[minmax(0,1fr)_440px] lg:gap-6"><article class="flex flex-col gap-6 rounded-[22px] border border-line bg-white p-5 shadow-[0_24px_60px_-28px_rgba(28,33,28,0.35)] lg:gap-7 lg:p-8"><div class="flex items-start justify-between gap-4"><div class="flex flex-col gap-1.5"><span class="u-eyebrow">Now</span> <h2 class="text-[22px] font-bold tracking-[-0.01em] lg:text-[26px]"> </h2> <span class="text-[15px] text-muted">South Bali</span></div> <!></div> <div class="flex items-center gap-5 lg:gap-8"><span class="grid size-24 shrink-0 place-items-center rounded-full lg:size-[132px]"><svg viewBox="0 0 24 24" fill="none" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-14 lg:size-[76px]" role="img"><path></path></svg></span> <div class="flex flex-col gap-1"><span class="text-[64px] font-bold leading-[0.95] tracking-[-0.04em] lg:text-[104px]"> </span> <span class="text-lg font-bold lg:text-xl"> </span> <!></div></div> <dl class="grid grid-cols-3 gap-2 lg:gap-3"></dl></article>
102 <aside class="flex flex-col gap-4 rounded-3xl bg-forest px-5 py-6 text-paper lg:gap-[18px] lg:rounded-[22px] lg:p-7"><span class="text-[11px] font-bold uppercase tracking-[0.2em] text-gold lg:text-[13px] lg:tracking-[0.16em]">Good for today</span> <h2 class="text-2xl font-bold leading-tight tracking-[-0.015em] lg:text-[26px]"> </h2> <p class="text-[15px] leading-relaxed text-paper/82"> </p> <a class="mt-1 flex h-13 items-center justify-center gap-2.5 rounded-full bg-paper px-6 text-[15px] font-bold text-ink hover:bg-white hover:text-ink lg:self-start"> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg></a> <a href="/wave-info" title="See today's surf conditions across Bali" class="mt-auto flex items-center gap-3 rounded-2xl bg-paper/8 p-3 text-paper hover:bg-paper/12 hover:text-paper"><span class="grid size-11 shrink-0 place-items-center rounded-xl bg-sea-tint/15"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="text-sea-tint" aria-hidden="true"><path></path></svg></span> <span class="flex grow flex-col"><span class="text-[15px] font-bold">Heading to the beach?</span> <span class="text-[13px] text-paper/78">Check the surf report first</span></span> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0 text-gold" aria-hidden="true"><path></path></svg></a></aside></div> <!> <div class="flex flex-col gap-5 rounded-[22px] border border-line bg-card p-5 lg:gap-6 lg:p-8"><div class="flex flex-col gap-2"><h2 class="text-2xl font-bold tracking-[-0.015em] lg:text-[28px]">When to visit</h2> <p class="max-w-[620px] text-[15px] leading-relaxed text-ink-soft">Bali is warm all year. What changes is the rain, which decides how you shape your days out.</p></div> <div class="grid gap-3 sm:grid-cols-2 lg:gap-4"></div></div></section> <!>`,1);function Tf(e,t){Ie(t,!1);let r=H(),i=H(),n=H(),a=H(),o=H(),d=H(),p=H(),h=null,$=G(t,"weather_data",8),b=G(t,"phone",8,null),m=ff(),g=[{key:"dry",name:"Dry season",months:"May to October",text:"Sunny days, lower humidity and calm evenings \u2014 the classic time for volcano sunrises, temple sunsets and boat days.",swatch:"bg-gold"},{key:"wet",name:"Wet season",months:"November to March",text:"Short, heavy afternoon showers and greener landscapes. Mornings are often clear, so plan outdoor stops early.",swatch:"bg-sea"}];function v(K){switch(K){case"sunny":case"partly-cloudy":return{title:"Great day to be outdoors",text:"Clear skies suit beaches, rice-terrace walks, waterfalls and open-air temple tours.",href:"/tours",cta:"Browse day tours",tip:"Browse Bali day tours for a clear day"};case"cloudy":return{title:"Comfortable for sightseeing",text:"Soft light and cooler air make it a good day for waterfalls, villages and photo-friendly temple visits.",href:"/tours",cta:"Browse day tours",tip:"Browse Bali day tours for a cloudy day"};case"rainy":case"thunderstorms":return{title:"A good day to stay dry",text:"Showers suit indoor culture \u2014 museums, cooking classes and spa time. Rain in Bali often clears fast, so keep a tour on standby.",href:"/points-of-interests",cta:"Explore places to visit",tip:"Explore places to visit in Bali on a rainy day"};default:return{title:"Plan your day",text:"Whatever the sky is doing, there's a Bali day out for it.",href:"/tours",cta:"Browse day tours",tip:"Browse Bali day tours"}}}X(()=>_($()),()=>{D(r,$().current)}),X(()=>_($()),()=>{D(i,$().forecast||[])}),X(()=>s(i),()=>{D(n,s(i)[0])}),X(()=>(Fa,s(r)),()=>{D(a,Fa(s(r).icon))}),X(()=>s(r),()=>{D(o,String(s(r).location||"Denpasar, Bali").split(",")[0])}),X(()=>(s(r),Ce,s(n)),()=>{D(d,[{label:"Humidity",value:`${s(r).humidity}%`,icon:Ce.drop},{label:"Wind",value:`${s(r).wind_speed} km/h${s(r).wind_direction?" "+s(r).wind_direction:""}`,icon:Ce.wind},s(n)?{label:"Chance of rain",value:`${s(n).rain_chance}%`,icon:Ce.umbrella}
102:null].filter(Boolean))}),X(()=>s(r),()=>{D(p,v(s(r).icon))}),nt();var y={live:h};je();var E=ob(),P=Xe(E),T=c(P);Mi(T,{items:[{label:"Home",href:"/",tip:"Go to the homepage"},{label:"Weather"}]});var B=f(T,2),I=c(B),L=f(c(I),2),O=c(L),ee=c(O);l(O),Se(),l(L),l(I);var me=f(I,2);un(me,{active:"weather"}),l(B),l(P);var C=f(P,2),M=c(C),J=c(M),fe=c(J),ue=c(fe),$e=f(c(ue),2),W=c($e,!0);l($e),Se(2),l(ue);var le=f(ue,2);{var de=K=>{var Q=Qx();w(K,Q)},te=K=>{var Q=eb();w(K,Q)};N(le,K=>{m==="dry"?K(de):m==="wet"&&K(te,1)})}l(fe);var Le=f(fe,2),F=c(Le),V=c(F),oe=c(V);l(V),l(F);var se=f(F,2),Z=c(se),we=c(Z);l(Z);var re=f(Z,2),U=c(re,!0);l(re);var ce=f(re,2);{var ge=K=>{var Q=tb(),ve=c(Q);l(Q),S(()=>A(ve,`Today ${s(n),u(()=>s(n).high)??""}\xB0 / ${s(n),u(()=>s(n).low)??""}\xB0`)),w(K,Q)};N(ce,K=>{s(n)&&K(ge)})}l(se),l(Le);var Fe=f(Le,2);Y(Fe,5,()=>s(d),ae,(K,Q)=>{var ve=rb(),Ee=c(ve),Oe=c(Ee),pt=c(Oe);l(Oe),l(Ee);var vt=f(Ee,2),et=c(vt),kt=c(et,!0);l(et);var gt=f(et,2),Mt=c(gt,!0);l(gt),l(vt),l(ve),S(()=>{x(pt,"d",(s(Q),u(()=>s(Q).icon))),A(kt,(s(Q),u(()=>s(Q).label))),A(Mt,(s(Q),u(()=>s(Q).value)))}),w(K,ve)}),l(Fe),l(J);var xe=f(J,2),be=f(c(xe),2),Ge=c(be,!0);l(be);var ze=f(be,2),Ve=c(ze,!0);l(ze);var at=f(ze,2),dt=c(at),ut=f(dt),xt=c(ut);l(ut),l(at);var Ot=f(at,2),jt=c(Ot),dr=c(jt),Ar=c(dr);l(dr),l(jt);var Me=f(jt,4),he=c(Me);l(Me),l(Ot),l(xe),l(M);var Ye=f(M,2);{var ye=K=>{var Q=nb(),ve=c(Q),Ee=c(ve),Oe=c(Ee);l(Ee),Se(2),l(ve);var pt=f(ve,2);Y(pt,5,()=>s(i),ae,(vt,et,kt)=>{let gt=cr(()=>(_(Fa),s(et),u(()=>Fa(s(et).icon)))),Mt=cr(()=>(_(hs),s(et),u(()=>hs(s(et).date))));var Zt=ib();Ze(Zt,1,`flex w-[104px] shrink-0 flex-col items-center gap-2 rounded-2xl border px-2.5 py-3.5 text-center lg:w-auto lg:gap-2.5 lg:rounded-[18px] lg:px-4 lg:py-[18px]
103                               ${kt===0?"border-ink bg-white":"border-line bg-card"}`);var $r=c(Zt),ur=c($r),Jt=c(ur,!0);l(ur);var Ir=f(ur,2),ti=c(Ir,!0);l(Ir),l($r);var Ft=f($r,2),ie=c(Ft);l(Ft);var pe=f(Ft,2),z=c(pe,!0);l(pe);var q=f(pe,2),ke=c(q),qe=c(ke);l(ke);var lt=f(ke),wt=c(lt);l(lt),l(q);var Tt=f(q,2),$t=c(Tt),Wt=c($t);l($t);var Et=f($t,2),Ut=c(Et);l(Et),l(Tt),l(Zt),S(Qt=>{A(Jt,Qt),A(ti,(_(s(Mt)),u(()=>s(Mt).date))),x(Ft,"stroke",(_(s(gt)),u(()=>s(gt).color))),x(Ft,"aria-label",(s(et),u(()=>s(et).condition))),x(ie,"d",(_(s(gt)),u(()=>s(gt).path))),A(z,(s(et),u(()=>s(et).condition))),A(qe,`${s(et),u(()=>s(et).high)??""}\xB0`),A(wt,`${s(et),u(()=>s(et).low)??""}\xB0`),Hr(Wt,`width: ${s(et),u(()=>s(et).rain_chance)??""}%`),A(Ut,`${s(et),u(()=>s(et).rain_chance)??""}% rain`)},[()=>(_(yn),s(et),u(()=>yn(s(et).date)))]),w(vt,Zt)}),l(pt),l(Q),S(()=>{A(Oe,`${s(i),u(()=>s(i).length)??""}-day forecast \xB7 ${s(o)??""}`),Hr(pt,`grid-template-columns: repeat(${s(i),u(()=>s(i).length)??""}, minmax(0, 1fr))`)}),w(K,Q)};N(Ye,K=>{s(i),u(()=>s(i).length)&&K(ye)})}var Re=f(Ye,2),Pe=f(c(Re),2);Y(Pe,5,()=>g,ae,(K,Q)=>{var ve=ab(),Ee=c(ve),Oe=c(Ee),pt=f(Oe,2),vt=c(pt,!0);l(pt);var et=f(pt,2),kt=c(et,!0);l(et);var gt=f(et,2);{var Mt=ur=>{var Jt=sb();w(ur,Jt)};N(gt,ur=>{s(Q),u(()=>m===s(Q).key)&&ur(Mt)})}l(Ee);var Zt=f(Ee,2),$r=c(Zt,!0);l(Zt),l(ve),S(()=>{Ze(ve,1,`flex flex-col gap-2 rounded-2xl border bg-white p-4 lg:p-5 ${s(Q),u(()=>m===s(Q).key?"border-ink":"border-line")??""}`),Ze(Oe,1,`size-3.5 rounded ${s(Q),u(()=>s(Q).swatch)??""}`),A(vt,(s(Q),u(()=>s(Q).name))),A(kt,(s(Q),u(()=>s(Q).months))),A($r,(s(Q),u(()=>s(Q).text)))}),w(K,ve)}),l(Pe),l(Re),l(C);var Qe=f(C,2);return Li(Qe,{get phone(){return b()},links:[{label:"Browse day tours",href:"/tours",tip:"Browse all day tours in Bali"}]}),S(()=>{x(ee,"d",(_(Ce),u(()=>Ce.clock))),A(W,s(o)),Hr(F,`background: ${s(a),u(()=>s(a).tint)??""}`),x(V,"stroke",(s(a),u(()=>s(a).color))),x(V,"aria-label",(s(r),u(()=>s(r).condition))),x(oe,"d",(s(a),u(()=>s(a).path))),A(we,`${s(r),u(()=>s(r).temperature)??""}\xB0`),A(U,(s(r),u(()=>s(r).condition))),A(Ge,(s(p),u(()=>s(p).title))),A(Ve,(s(p),u(()=>s(p).text))),x(at,"href",(s(p),u(()=>s(p).href))),x(at,"title",(s(p),u(()=>s(p).tip))),A(dt,`${s(p),u(()=>s(p).cta)??""} `),x(xt,"d",(_(Ce),u(()=>Ce.arrow))),x(Ar,"d",(_(Ce),u(()=>Ce.wave))),x(he,"d",(_(Ce),u(()=>Ce.arrow)))}),w(e,E),Ke(t,"live",h),De(y)}var lb=[Mc,Ic,Dc,Oc,Fc,Bc,Hc,jc,Uc,zc,qc,Wc,Qc,ed,td,rd,id,nd,ad,od,Rc,Nc,Vc,Pc,Lc,Gc,Zc,Kc,sd,Xc],cb=lb,db=["../svelte/About.svelte","../svelte/Blog.svelte","../svelte/Blogs.svelte","../svelte/Contact.svelte","../svelte/CurrencySwitcher.svelte","../svelte/FAQ.svelte","../svelte/FAQs.svelte","../svelte/Footer.svelte","../svelte/Header.svelte","../svelte/Home.svelte","../svelte/POS.svelte","../svelte/POSes.svelte","../svelte/SurfSpot.svelte","../svelte/SurfSpotGuide.svelte","../svelte/SurfSpots.svelte","../svelte/Tour.svelte","../svelte/TourCategory.svelte","../svelte/Transfers.svelte","../svelte/WaveInfo.svelte","../svelte/Weather.svelte","../svelte/about/ContactCards.svelte","../svelte/faq/AskUs.svelte","../svelte/places/PlaceCard.svelte","../svelte/ui/Price.svelte","../svelte/ui/TourCard.svelte","../svelte/weather/Breadcrumb.svelte","../svelte/weather/FallbackNotice.svelte","../svelte/weather/PlanCta.svelte","../svelte/weather/SpotCard.svelte","../svelte/weather/Switch.svelte"];var ub="[data-phx-session]";function pb(e){if(!Array.isArray(e.default)||!Array.isArray(e.filenames))return e;let t={},r=Math.min(e.default.length,e.filenames.length);for(let i=0;i<r;i++){let n=e.filenames[i].replace("../svelte/","").replace(".svelte","");t[n]=e.default[i].default}return t}function fb(e){let t=Uint8Array.from(atob(e),r=>r.charCodeAt(0));return new TextDecoder().decode(t)}function Cf(e,t){let r=e.getAttribute(t);if(!r)return{};try{return JSON.parse(r)}catch{return{}}}function hb(e){let t={},r=Cf(e,"data-slots");for(let i in r){let n=document.createElement("div");n.innerHTML=fb(r[i]).trim();let a=qs(()=>({render:()=>n.outerHTML}));i==="default"?t.children=a:t[i]=a}return t}function Rf(e){let t=pb(e),r=document.querySelectorAll("[data-name][data-props]");for(let i of r){if(i.closest(ub)||i.dataset.deadHydrated)continue;let n=i.getAttribute("data-name"),a=t[n];if(!a){console.error(`[dead_svelte] Unable to find "${n}" component.`);continue}let o=i.querySelector("[data-svelte-target]");if(!o)continue;let d={...Cf(i,"data-props"),...hb(i)},p=i.hasAttribute("data-ssr");p||(o.innerHTML="");try{(p?us:Fn)(a,{target:o,props:d}),i.dataset.deadHydrated="true"}catch(h){console.error(`[dead_svelte] Failed to hydrate "${n}":`,h)}}}window.lastPage="";function Mf(){if(lastPage!=window.location.pathname){let r=function(){dataLayer.push(arguments)};var t=r;(function(i,n,a,o,d,p,h){i[a]=i[a]||function(){(i[a].q=i[a].q||[]).push(arguments)},p=n.createElement(o),p.async=1,p.src="https://www.clarity.ms/tag/"+d,h=n.getElementsByTagName(o)[0],h.parentNode.insertBefore(p,h)})(window,document,"clarity","script","o6oj135sfa"),(function(i,n,a,o,d,p,h){i[d]=i[d]||function(){(i[d].a=i[d].a||[]).push(arguments)}
103,i[d].l=1*new Date;for(var $=0;$<document.scripts.length;$++)if(document.scripts[$].src===o)return;p=n.createElement(a),h=n.getElementsByTagName(a)[0],p.async=1,p.src=o,h.parentNode.insertBefore(p,h)})(window,document,"script","https://mc.yandex.ru/metrika/tag.js","ym"),ym(90582182,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0}),window.dataLayer=window.dataLayer||[],r("js",new Date),r("config","G-0WJ1LER95Z")}window.lastPage=window.location.pathname}window.addEventListener("phx:page-loading-stop",()=>{Mf()});Mf();var gb=document.querySelector("meta[name='csrf-token']")?.getAttribute("content"),Pf=new Kd("/live",cd,{hooks:Ac(Yo),params:{_csrf_token:gb}});Jo.default.config({barColors:{0:"#29d"},shadowColor:"rgba(0, 0, 0, .3)"});window.addEventListener("phx:page-loading-start",e=>Jo.default.show(300));window.addEventListener("phx:page-loading-stop",e=>Jo.default.hide());Pf.connect();Rf(Yo);window.liveSocket=Pf;})();
104/**
105 * @license MIT
106 * topbar 2.0.0, 2023-02-04
107 * https://buunguyen.github.io/topbar
108 * Copyright (c) 2021 Buu Nguyen
109 */

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.