1import{_ as d,A as c,h as u}from"./index.474d7b13.js";import f from"./TmlTextarea.ac19ea3a.js";import{N as l,D as h,E as b,f as r,U as p,H as C}from"./vue.00f7c436.js";import{g as _}from"./getIframeAttrs.067b16c1.js";import"./sentry.09480738.js";const E={name:"CustomEmbed",components:{TmlForm:c,TmlTextarea:f},props:{value:{type:String,required:!1},formClass:{type:String,default:"mt-4"}},data(){return{embedCode:null,checkingEmbed:!1}},methods:{onValidate(){this.$refs.customEmbedForm.validateAll().then(m=>{m&&(this.checkingEmbed||(this.checkingEmbed=!0,this.axios.post(u("/omnis/v3/iframe/check/"),{content:this.embedCode}).success(t=>{if(t.valid){const e=_(this.embedCode);e&&this.$emit("selected",{src:e.src,height:e.height,width:e.width,allow:e.allow})}else!t.valid&&t.message?(this.$emit("invalid"),snackbar.error(t.message)):snackbar.error()}).oops().finally(()=>{this.checkingEmbed=!1})))})},onSetEmbedCode(){this.embedCode&&this.onValidate()}}};function g(m,t,e,v,s,o){const a=l("tml-textarea"),i=l("tml-form");return h(),b("div",null,[r(i,{ref:"customEmbedForm","form-name":"custom-selector",class:C(e.formClass)},{default:p(()=>[r(a,{modelValue:s.embedCode,"onUpdate:modelValue":t[0]||(t[0]=n=>s.embedCode=n),"field-name":"custom-embed-field",placeholder:"Embed code","validation-rules":{required:!0,iframe:!0},value:e.value,onInput:o.onSetEmbedCode,onSubmit:o.onValidate,onBlur:o.onValidate},null,8,["modelValue","value","onInput","onSubmit","onBlur"])]),_:1},8,["class"])])}const A=d(E,[["render",g]]);export{A as default}; 2//# sourceMappingURL=TmlCustomEmbedField.5c645685.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.