1var __awaiter=(this&&this.__awaiter)||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})} 2return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}} 3function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}} 4function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)} 5step((generator=generator.apply(thisArg,_arguments||[])).next())})};jQuery(document).ready(function($){if($('#input_848_87')){var $cropiteditor=$('#image-cropper') 6$cropiteditor.cropit({exportZoom:2,smallImage:'reject',maxZoom:3,imageBackground:!0,$fileInput:$('#input_848_87'),onImageError:function(error){image_error(error)},onImageLoaded:function(){image_loaded()},onZoomChange:function(){crop_changed()},onOffsetChange:function(){crop_changed()},})} 7const uploadInput=document.getElementById('input_848_5');if(uploadInput){uploadInput.addEventListener('change',function(){const backgroundInput=document.getElementById('input_848_87');backgroundInput.files=uploadInput.files;$('#input_848_87').trigger('change');$('#button-remove-background').prop("disabled",!1)})} 8const buttonRemoveBackground=document.getElementById('button-remove-background');if(buttonRemoveBackground){buttonRemoveBackground.addEventListener('click',(event)=>__awaiter(void 0,void 0,void 0,function*(){const fileInput=document.getElementById('input_848_5');const files=fileInput.files;try{const imageBlob=yield removeBackground(files[0]);const objectURL=URL.createObjectURL(imageBlob);const backgroundInput=document.getElementById('input_848_87');const myFile=new File([imageBlob],'background-removed.png',{type:'image/png',lastModified:new Date(),});const dataTransfer=new DataTransfer();dataTransfer.items.add(myFile);backgroundInput.files=dataTransfer.files;$('#image-cropper').cropit({exportZoom:2,smallImage:'reject',maxZoom:3,imageBackground:!0,$fileInput:$('#input_848_87'),onImageError:function(error){image_error(error)},onImageLoaded:function(){image_loaded()},onZoomChange:function(){crop_changed()},onOffsetChange:function(){crop_changed()},});$('#button-remove-background').prop("disabled",!0);$('#input_848_87').trigger('change')}catch(error){console.error('Error:',error)} 9return!1}))} 10function image_loaded(){$('div#cropit-error').hide();$('div#cropit-image').show()} 11function image_error(error){console.log(error.code);console.log(error.message);if(error.code==1){$('div#cropit-image').hide();$('div#cropit-error').html("Image is TOO small! It must be at least 600px by 600px.");$('div#cropit-error').show()}} 12function crop_changed(){var image=$cropiteditor.cropit('imageSize');var preview=$cropiteditor.cropit('previewSize');var offset=$cropiteditor.cropit('offset');var zoom=$cropiteditor.cropit('zoom');$('#input_848_32').val(zoom);if(offset!==undefined){$('#input_848_33').val(offset.x);$('#input_848_34').val(offset.y)} 13if(image!==undefined){$('#input_848_35').val(image.width);$('#input_848_36').val(image.height)} 14if(preview!==undefined){$('#input_848_37').val(preview.width);$('#input_848_38').val(preview.height)}}}) 15;
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.