1(r=>{window.WPUF_Uploader=function(t,e,i,a,o,n){if(this.removed_files=[],this.container=e,this.browse_button=t,this.max=i||1,this.count=r("#"+e).find(".wpuf-attachment-list > li").length,this.perFileCount=0,this.UploadedFiles=0,r("#"+t).length)return r("ul.wpuf-attachment-list").sortable({placeholder:"highlight"}),r("ul.wpuf-attachment-list").disableSelection(),this.uploader=new plupload.Uploader({runtimes:"html5,html4",browse_button:t,container:e,multipart:!0,multipart_params:{action:"wpuf_upload_file",form_id:r("#"+t).data("form_id")},urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:n+"kb",url:wpuf_upload.plupload.url+"&type="+a,flash_swf_url:wpuf_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:o}]}),this.uploader.bind("Init",r.proxy(this,"init")),this.uploader.bind("FilesAdded",r.proxy(this,"added")),this.uploader.bind("QueueChanged",r.proxy(this,"upload")),this.uploader.bind("UploadProgress",r.proxy(this,"progress")),this.uploader.bind("Error",r.proxy(this,"error")),this.uploader.bind("FileUploaded",r.proxy(this,"uploaded")),this.uploader.init(),r("#"+e).on("click","a.attachment-delete",r.proxy(this.removeAttachment,this)),this.uploader},WPUF_Uploader.prototype={init:function(t,e){this.showHide(),r("#"+this.container).prepend('<div class="wpuf-file-warning"></div>')},showHide:function(){var t=r("#"+this.container).find(".file-selector, .wpuf-file-upload-zone");this.count>=this.max?(r("#"+this.container+" .wpuf-file-warning").html(wpuf_upload.warning),t.each(function(){this.style.setProperty("display","none","important")})):(r("#"+this.container+" .wpuf-file-warning").html(""),t.each(function(){this.style.removeProperty("display")}))},added:function(t,e){var i=r("#"+this.container).find(".wpuf-attachment-upload-filelist");this.showHide(),r.each(e,function(t,e){r(".wpuf-submit-button").attr("disabled","disabled"),i.append('<div class="upload-item" id="'+e.id+'"><div class="progress progress-striped active"><div class="bar"></div></div><div class="filename original">'+e.name+" ("+plupload.formatSize(e.size)+") <b></b></div></div>")}),t.refresh(),t.start()},upload:function(t){this.count=t.files.length-this.removed_files.length,this.showHide()},progress:function(t,e){var i=r("#"+e.id);r(".bar",i).css({width:e.percent+"%"}),r(".percent",i).html(e.percent+"%")},error:function(t,e){r("#"+this.container).find("#"+e.file.id).remove();var i="";switch(e.code){case-600:i=wpuf_upload.plupload.size_error;break;case-601:i=wpuf_upload.plupload.type_error;break;default:i="Error #"+e.code+": "+e.message}alert(i),--this.count,this.showHide(),this.uploader.refresh()},uploaded:function(t,e,i){try{var a=r.parseJSON(i.response)}catch(t){var o=!0}r("#"+e.id+" b").html("100%"),r("#"+e.id).remove(),o?(this.perFileCount++,this.UploadedFiles++,(e=r("#"+this.container).find(".wpuf-attachment-list")).append(i.response),this.perFileCount>this.max&&(o=r(".wpuf-image-wrap:last a.attachment-delete",e).data("attach-id"),this.removeExtraAttachment(o),r(".wpuf-image-wrap",e).last().remove(),this.perFileCount--)):(alert(a.data.replace(/(<([^>]+)>)/gi,"")),t.files.pop(),--this.count,this.showHide());i=this.UploadedFiles,o=t.files.length;this.count=r("#"+this.container).find(".wpuf-attachment-list > li").length,this.showHide(),o!==i||"undefined"!=typeof grecaptcha&&r(".wpuf-form-add #g-recaptcha-response").length&&!grecaptcha.getResponse().length||r(".wpuf-submit-button").removeAttr("disabled")},removeAttachment:function(t){t.preventDefault();var e=this,i=r(t.currentTarget);Swal.fire({text:wpuf_upload.confirmMsg,icon:"warning",showCancelButton:!0,confirmButtonColor:"#d54e21",confirmButtonText:wpuf_upload.delete_it,cancelButtonText:wpuf_upload.cancel_it,customClass:{confirmButton:"btn btn-success",cancelButton:"btn btn-danger"}}).then(function(t){t.isConfirmed&&(t={attach_id:i.data("attach-id"),nonce:wpuf_upload.nonce,action:"wpuf_file_del"},e.removed_files.push(t),jQuery("#del_attach").val(i.data("attach-id")),jQuery.post(wpuf_upload.ajaxurl,t,function(){e.perFileCount--,i.parent().parent().remove(),--e.count,e.showHide(),e.uploader.refresh()}))})},removeExtraAttachment:function(t){var e=this,t={attach_id:t,nonce:wpuf_upload.nonce,action:"wpuf_file_del"};this.removed_files.push(t),jQuery.post(wpuf_upload.ajaxurl,t,function(){--e.count,e.showHide(),e.uploader.refresh()})}}})(jQuery);
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.