1"use strict";(self.webpackChunkhf_kf_frontend=self.webpackChunkhf_kf_frontend||[]).push([[410],{3782:(e,r,a)=>{a.r(r),a.d(r,{addDropzoneFilesToFormData:()=>n,default:()=>i,validateFileUpload:()=>d});var s=a(4692),o=a.n(s),t=a(2628);a(885);const i=class{constructor(){t.Dropzone.autoDiscover=!1,this.fileUploadConfig={url:BBAjax.ajaxurl,paramName:"file",acceptedFiles:".pdf,.docx,.doc,.png,.jpg,.jpeg,.txt,.odt,.ods,.xlsx,.rtf,.xls,.pptx,.ppt,.gif,.tif,.tiff,.bmp,.csv,.rar,.gz,.zip,.7z,.mp4,.3gp,.mov,.avi,.wmv",parallelUploads:3,addRemoveLinks:!0,autoProcessQueue:!0},this._init()}_init(){o()(".bb-file-upload .dropzone").each(((e,r)=>{var a="#"+o()(r).attr("id");const s=o()(r).closest("form").find(".bb-button[type='submit']"),i=new t.Dropzone(a,this.fileUploadConfig);o()(r).data("dropzone",i),this._addDropzoneEvents(i,s)}))}_addDropzoneEvents(e,r){e.on("addedfile",(()=>{r.addClass("is-disabled")})),e.on("sending",((e,r,a)=>{a.append("action","bb_personio_upload_file")})),e.on("complete",(e=>{if(200!==e.xhr.status){let r="Beim Upload der Datei ist ein Fehler aufgetreten.";if(400===e.xhr.status||422===e.xhr.status){var a=JSON.parse(e.xhr.response);a&&a.error&&a.error.reason&&"errors.invalid-file-type"===a.error.reason&&(r="Der Dateityp ist nicht erlaubt.")}o()(e.previewElement).find(".dz-error-message").text(r)}r.removeClass("is-disabled")}))}};function n(e,r,a){e.files.forEach((e=>{var s=JSON.parse(e.xhr.response);r.append("files[]",JSON.stringify({uuid:s.uuid,original_filename:s.original_filename,category:a}))}))}function d(e){const r=e.find(".dropzone"),a=r.data("dropzone");if(a.files<1)return r.addClass("has-error"),!1;{let e=!1;if(a.files.forEach((r=>{"success"!==r.status&&(e=!0)})),e)return r.addClass("has-error"),!1}return r.removeClass("has-error"),!0}}}]);
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.