PageSourceSearch

https://shopmantatrust.org/assets/TmlContactForm.3645474a.js

js shopmantatrust.org collected 2026-10-08 07:37:12 UTC 2,922 bytes, 6 lines download raw bytes

1import{_ as h,A as f,ag as _,h as g}from"./index.12fd6615.js";import x from"./TmlInput.d14a4a7f.js";import v from"./TmlPhotoUpload.cf499e78.js";import{N as s,D as b,W as y,U as F,f as n,aa as T,ab as S,S as C}from"./vue.e6b86939.js";import"./sentry.09480738.js";import"./faCheck.aa52fda3.js";import"./faTimes.78b49743.js";import"./faPlus.1336d8ef.js";import"./faMinus.7ec1dd0f.js";import"./faArrowRight.b2ea965a.js";import"./faUndo.45e08f8f.js";import"./faUpload.d2b74d81.js";import"./TmlTag.0c7c3193.js";const k={name:"TmlContactForm",components:{TmlForm:f,TmlInput:x,TmlButton:_,TmlPhotoUpload:v},props:{searchTerms:Array,reason:Object},data(){return{photos:[],submitLoading:!1,uploading:!1,uploadFailed:!1}},methods:{contactMessage(o){if(!this.photos.length)return o;const t=this.photos.map(a=>a.url).join(`
2`);return`${o}
3
4Photos:
5${t}`},sendContact(){this.submitLoading||this.uploading||this.uploadFailed||this.$refs.contactForm.validateAll().then(o=>{if(!o||this.uploading||this.uploadFailed)return;const t=this.$store.getters["forms/contact-form/formData"];this.submitLoading=!0,this.axios.post(g("/omnis/v3/contact/send-contact/"),{contact:this.contactMessage(t.contactText.value),reason:this.reason?this.reason.value:null,email:t.contactEmail?t.contactEmail.value:null,name:t.contactName?t.contactName.value:null,allTerms:this.searchTerms?JSON.stringify(this.searchTerms):null,photoFileIds:this.photos.map(a=>a.id).filter(Boolean)}).then(({data:a})=>{this.submitLoading=!1,this.photos=[],this.$dialogs.showSnackBar(a),this.$emit("contactSubmitted")}).catch(()=>{this.submitLoading=!1,this.$dialogs.showSnackBar({message:"Oops! Something went wrong, please try again later",type:"error"})})})}}},N=o=>(T("data-v-feacc077"),o=o(),S(),o),B=N(()=>C("p",{class:"speak-text"},"Speak to someone.",-1));function w(o,t,a,I,e,r){const m=s("tml-textarea"),i=s("tml-input"),c=s("tml-photo-upload"),p=s("tml-button"),d=s("tml-anchor"),u=s("tml-form");return b(),y(u,{ref:"contactForm",class:"md-2","form-name":"contact-form"},{default:F(()=>[B,n(m,{"field-name":"contactText",placeholder:"Tell us more","validation-rules":{required:!0}}),n(i,{"field-name":"contactName",placeholder:"Name",type:"text","validation-rules":{required:!0}}),n(i,{"field-name":"contactEmail",placeholder:"Email",type:"text","validation-rules":{email:!0}}),n(c,{modelValue:e.photos,"onUpdate:modelValue":t[0]||(t[0]=l=>e.photos=l),onUploading:t[1]||(t[1]=l=>e.uploading=l),onFailed:t[2]||(t[2]=l=>e.uploadFailed=l)},null,8,["modelValue"]),n(p,{disabled:e.uploading||e.uploadFailed,loading:e.submitLoading,fill:"",style:{"margin-bottom":"15px"},text:"Send",primary:"",onClick:r.sendContact},null,8,["disabled","loading","onClick"]),n(d,{class:"text-xs mt-6",text:"Privacy policy",href:"/privacy-policy"})]),_:1},512)}const W=h(k,[["render",w],["__scopeId","data-v-feacc077"]]);export{W as default};
6//# sourceMappingURL=TmlContactForm.3645474a.js.map

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.