PageSourceSearch

https://cityofdreamsmacau.com/_nuxt/COT094Ep.js

js cityofdreamsmacau.com collected 2026-09-25 18:44:43 UTC 5,132 bytes, 1 lines download raw bytes

1import{dy as Y,b as Z,b3 as J,K as ee,a1 as te,q as oe,N as se,a4 as ae,r as n,s as r,v as d,A as t,Q as k,V as f,x as H,y as V,F as D,z as F,aC as ne,B as R,aD as ie,i as le,U as re,X as de,Y as ce,W as ue,G as p,D as q,Z as pe,du as _e,_ as me,u as fe,T as he}from"./ByjodPhJ.js";import{b as ve}from"./B9HbF4tI.js";import{a as be,V as ye,u as xe}from"./DER4mN9o.js";import{V as ke}from"./arLZtd0C.js";import{V as Ve}from"./C4bziZ-4.js";import"./BUGFwJUI.js";import"./BgY5jV4J.js";import"./h6PxjQ-X.js";import"./C8437NzI.js";import"./_m1FUMia.js";import"./CXgg5z4d.js";import"./DZSIQuB9.js";import"./_izMDusn.js";import"./B1j2WuOD.js";import"./BTqXoPxJ.js";import"./Deyeok5w.js";import"./eZ_UF_qa.js";const ge=()=>{const h=Y.useReCaptcha();return{executeRecaptcha:async E=>{await h?.recaptchaLoaded();const m=await h?.executeRecaptcha(E);return{token:m,headerOptions:{headers:{"google-recaptcha-token":m}}}}}},Te={class:"widget--form1"},we={class:"media-2xl"},Re={key:0,class:"main-title-box"},qe=["innerHTML"],$e={class:"form-container"},Ee={class:"f-title"},Le=["data-required"],Me={class:"q-answer"},Ue={class:"chkls"},Ce=["innerHTML"],Ie=["innerHTML"],Ne={class:"btn-box"},Be={class:"text"},Pe=["innerHTML"],Ae=Z({__name:"index",props:{id:{},type:{default:""},data:{default:null},blockIndex:{default:0}},emits:["widget:loaded","widget:not-exist","widget:empty"],setup(h,{emit:$}){const m=ve(h),{type:O,data:c,blockIndex:He,blockUniqueId:De}=m,S=$,G=fe(),{executeRecaptcha:W}=ge(),g=xe(),K=J(),z=ee(),L=p(()=>c.value?.field_main_title),j=p(()=>c.value?.field_sub_title),M=p(()=>c.value?.field_content?.processed||""),U=p(()=>c.value?.field_remarks?.processed||""),C=p(()=>c.value?.field_form_footer?.processed||""),Q=p(()=>c.value?.field_form_id),I=p(()=>c.value?.field_button),N=p(()=>{const o=c.value;if(!o)return[];const s=[];for(const a in o){const e=a.match(/^field_form_q(\d+)$/);if(!e)continue;const i=Number(e[1]),u=o[a],_=o[`field_form_q${i}_type`],P=o[`field_form_q${i}_placeholder`],b=o[`field_form_q${i}_required`]??!1,w=o[`field_form_q${i}a`]?.list,y=[];b&&y.push(g.required),_?.name==="mail"&&y.push(g.email),_?.name==="tel"&&y.push(g.phone);const A={key:`q${i}`,index:i,label:u,validate_type:_?.name,placeholder:P,required:b,type:w?"checkbox":"input",v_rules:y};w&&(A.options=w.map(x=>({label:x.description?.processed,value:x.name,description:x.description?.processed,raw:x}))),s.push(A)}return s.sort((a,e)=>a.index-e.index)}),T=q(),B=q(),l=pe({}),v=q(!1);te(N,o=>{o.forEach(s=>{const a=`a${s.index}`;l[a]===void 0&&(l[a]=s.type==="checkbox"?[]:null)})},{immediate:!0});const X=async()=>{try{const{valid:o}=await B.value.validate();if(o){const s=G.public.grecaptchaActionName,{token:a}=await W(s),e=_e(l),i={webform_id:"form1_widget",id:Q.value,...e};a&&(i.captcha_response=a),v.value=!0;const u=await $fetch("/api/webform_rest/submit",{method:"POST",body:i});v.value=!1,u?.sid&&K.push(z(me.subscribed_success))}}catch{v.value=!1}};return oe(async()=>{await se(),S("widget:loaded",m)}),ae(()=>{}),(o,s)=>{const a=ue;return n(),r("div",Te,[d("div",we,[t(L)?(n(),r("div",Re,k(t(L)),1)):f("",!0),t(M)?(n(),r("div",{key:1,class:"main-description-box cmsEditor",innerHTML:t(M)},null,8,qe)):f("",!0),d("div",$e,[d("div",Ee,k(t(j)),1),H(ye,{class:"form",ref_key:"formEl",ref:B,onSubmit:s[0]||(s[0]=re(()=>{},["prevent"])),modelValue:t(T),"onUpdate:modelValue":s[1]||(s[1]=e=>le(T)?T.value=e:null)},{default:V(()=>[(n(!0),r(D,null,F(t(N),(e,i)=>ne((n(),r("div",{class:"f-item",key:e.key},[d("div",{class:"q-title","data-required":e.required},k(e.label),9,Le),d("div",Me,[e.type==="input"?(n(),R(ke,{key:0,class:"form-input",placeholder:e.placeholder,variant:"outlined",modelValue:t(l)[`a${e.index}`],"onUpdate:modelValue":u=>t(l)[`a${e.index}`]=u,rules:e.v_rules},null,8,["placeholder","modelValue","onUpdate:modelValue","rules"])):e.type==="checkbox"?(n(),R(Ve,{key:1,modelValue:t(l)[`a${e.index}`],"onUpdate:modelValue":u=>t(l)[`a${e.index}`]=u,rules:e.v_rules},{default:V(u=>[d("ul",Ue,[(n(!0),r(D,null,F(e.options||[],(_,P)=>(n(),r("li",null,[(n(),R(be,{key:_.value,value:_.raw?.drupal_internal__tid,modelValue:t(l)[`a${e.index}`],"onUpdate:modelValue":b=>t(l)[`a${e.index}`]=b},{label:V(()=>[d("div",{class:"cmsEditor",innerHTML:_.label},null,8,Ce)]),_:2},1032,["value","modelValue","onUpdate:modelValue"]))]))),256))])]),_:2},1032,["modelValue","onUpdate:modelValue","rules"])):f("",!0)])])),[[ie,e.label]])),128))]),_:1},8,["modelValue"]),t(U)?(n(),r("div",{key:0,class:"remarks-container cmsEditor",innerHTML:t(U)},null,8,Ie)):f("",!0),d("div",Ne,[H(a,de({class:["btn--lg btn-submit",{"btn-secondary-book":!o.$getSiteProperty().med,"btn-primary":o.$getSiteProperty().med}],[("ELEM_ATTR_BUTTON_TRACKING_ID"in o?o.ELEM_ATTR_BUTTON_TRACKING_ID:t(ce))||""]:t(I)?.options?.attributes?.id,loading:t(v),onClick:X}),{default:V(()=>
1[d("span",Be,k(t(I)?.title),1)]),_:1},16,["class","loading"])]),t(C)?(n(),r("div",{key:1,class:"footer-container cmsEditor",innerHTML:t(C)},null,8,Pe)):f("",!0)])])])}}}),at=Object.assign(he(Ae,[["__scopeId","data-v-33938c0c"]]),{__name:"WidgetsWidgetForm1Widget"});export{at as default};

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.