1"use strict";(self.webpackChunkauctionsplus_web=self.webpackChunkauctionsplus_web||[]).push([[31182,78786],{31182(e,t,i){i.r(t),i.d(t,{default:()=>c});var n=i(16407),l=["accept","multiple"],a={key:0,class:"absolute top-0 left-0 w-full h-full z-10"};const o={name:"EditCatalogueMediaPicker",components:{},props:{multiple:Boolean,loading:Boolean,mediaType:{type:String,default:"img"},noLoadingSpinner:Boolean},data:function(){return{status:{invalid:!1},accept:{img:".jpg,.jpeg,.png, .heic, .gif",pdf:".pdf, .xlsx"}}},methods:{openFileDialog:function(){this.loading||(this.status.invalid=!1,this.$refs.fileInput.click(),this.$emit("open"))},onFileSelect:function(e){if(!this.loading){var t=e.target.files;this.selectFiles(t)}},onDrop:function(e){if(!this.loading){var t=e.dataTransfer.files;this.selectFiles(t)}},checkDrop:function(e){e.preventDefault()},isFilesValid:function(e){return"img"===this.mediaType?e.findIndex(this.isInvalidImage)<0:"pdf"===this.mediaType?e.findIndex(this.isInvalidPdfOrExcel)<0:void 0},selectFiles:function(e){this.status.invalid=!1;var t=Array.from(e);this.isFilesValid(t)?this.$emit("select",t):this.status.invalid=!0},isInvalidImage:function(e){return"image/jpeg"!==e.type&&"image/jpg"!==e.type&&"image/png"!==e.type&&"image/gif"!==e.type&&!e.name.toLowerCase().endsWith(".heic")},isInvalidPdfOrExcel:function(e){return"application/pdf"!==e.type&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!==e.type}}};const s=(0,i(21535).A)(o,[["render",function(e,t,i,o,s,c){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{onClick:t[1]||(t[1]=function(){return c.openFileDialog&&c.openFileDialog.apply(c,arguments)}),onDrop:t[2]||(t[2]=(0,n.withModifiers)(function(){return c.onDrop&&c.onDrop.apply(c,arguments)},["prevent"])),onDragenter:t[3]||(t[3]=function(){return c.checkDrop&&c.checkDrop.apply(c,arguments)}),onDragover:t[4]||(t[4]=function(){return c.checkDrop&&c.checkDrop.apply(c,arguments)}),class:"relative"},[(0,n.createElementVNode)("input",{ref:"fileInput",type:"file",accept:s.accept[i.mediaType],class:"invisible z-0 fixed opacity-0",onChange:t[0]||(t[0]=function(){return c.onFileSelect&&c.onFileSelect.apply(c,arguments)}),multiple:i.multiple},null,40,l),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["z-1 w-full h-full",{blur:i.loading&&!i.noLoadingSpinner}])},[(0,n.renderSlot)(e.$slots,"default",{status:s.status},void 0,!0)],2),i.loading&&!i.noLoadingSpinner?((0,n.openBlock)(),(0,n.createElementBlock)("div",a,[].concat(t[5]||(t[5]=[(0,n.createElementVNode)("div",{class:"h-full w-full bg-brand-primary-100 opacity-25"},null,-1),(0,n.createElementVNode)("div",{class:"absolute top-0 left-0 w-full h-full flex items-center justify-center"},[(0,n.createElementVNode)("div",{class:"flex flex-col items-center justify-center px-6 py-3 bg-white shadow-dark rounded-lg text-brand-dark space-y-2"},[(0,n.createElementVNode)("i",{class:"material-symbols-outlined animate-spin text-3xl"},"progress_activity"),(0,n.createElementVNode)("div",null,"Uploading")])],-1)])))):(0,n.createCommentVNode)("v-if",!0)],32)}],["__scopeId","data-v-27b77e3a"]]),c=s}}]);
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.