(function(factory){'use strict';if(typeofdefine==='function'&&define.amd){define(['jquery'],factory)}elseif(typeofmodule==='object'&&typeofmodule.exports==='object'){factory(require('jquery'))}else{factory(window.jQuery)}}(function($){'use strict';$.fn.fileinputLocales={};$.fn.fileinputThemes={};if(!$.fn.fileinputBsVersion){$.fn.fileinputBsVersion=(window.bootstrap&&window.bootstrap.Alert&&window.bootstrap.Alert.VERSION)||(window.Alert&&window.Alert.VERSION)||'3.x.x'}String.prototype.setTokens=function(replacePairs){varstr=this.toString(),key,re;for(keyinreplacePairs){if(replacePairs.hasOwnProperty(key)){re=newRegExp('\{'+key+'\}','g');str=str.replace(re,replacePairs[key])}}returnstr};if(!Array.prototype.flatMap){Array.prototype.flatMap=function(lambda){return[].concat(this.map(lambda))}}var$h,FileInput;$h={FRAMES:'.kv-preview-thumb',SORT_CSS:'file-sortable',INIT_FLAG:'init-',SCRIPT_SRC:document&&document.currentScript&&document.currentScript.src||null,OBJECT_PARAMS:'<param name="controller" value="true" />\n<param name="allowFullScreen" value="true" />\n<param name="allowScriptAccess" value="always" />\n<param name="autoPlay" value="false" />\n<param name="autoStart" value="false" />\n<param name="quality" value="high" />\n',DEFAULT_PREVIEW:'<div class="file-preview-other">\n<span class="{previewFileIconClass}">{previewFileIcon}</span>\n</div>',MODAL_ID:'kvFileinputModal',MODAL_EVENTS:['show','shown','hide','hidden','loaded'],logMessages:{ajaxError:'{status}: {error}. Error Details: {text}.',badDroppedFiles:'Error scanning dropped files!',badExifParser:'Error loading the piexif.js library. {details}',badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:'The browser does not support resumable or chunk uploads.',noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:'Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.',chunkQueueError:'Could not push task to ajax pool for chunk index # {index}.',resumableMaxRetriesReached:'Maximum resumable ajax retries ({n}) reached.',resumableRetryError:'Could not retry the resumable request (try # {n})... aborting.',resumableAborting:'Aborting / cancelling the resumable request.',resumableRequestError:'Error processing resumable request. {msg}'},objUrl:window.URL||window.webkitURL,getZoomPlaceholder:function(){varsrc=$h.SCRIPT_SRC,srcPath,zoomVar='?kvTemp__2873389129__=';if(!src){returnzoomVar}srcPath=src.substring(0,src.lastIndexOf("/"));returnsrcPath.substring(0,srcPath.lastIndexOf("/")+1)+'img/loading.gif'+zoomVar},isBs:function(ver){varchk=$.trim(($.fn.fileinputBsVersion||'')+'');ver=parseInt(ver,10);if(!chk){returnver===4}returnver===parseInt(chk.charAt(0),10)},defaultButtonCss:function(fill){return'btn-default btn-'+(fill?'':'outline-')+'secondary'},now:function(){returnnewDate().getTime()},round:function(num){num=parseFloat(num);returnisNaN(num)?0:Math.floor(Math.round(num))},getArray:function(obj){vari,arr=[],len=obj&&obj.length||0;for(i=0;i<len;i++){arr.push(obj[i])}returnarr},getFileRelativePath:function(file){returnString(file.newPath||file.relativePath||file.webkitRelativePath||$h.getFileName(file)||null)},getFileId:function(file,generateFileId){varrelativePath=$h.getFileRelativePath(file);if(typeofgenerateFileId==='function'){returngenerateFileId(file)}if(!file){returnnull}if(!relativePath){returnnull}return(file.size+'_'+encodeURIComponent(relativePath).replace(/%/g,'_'))},getFrameSelector:function(id,selector){selector=selector||'';return'[id="'+id+'"]'+selector},getZoomSelector:function(id,selector){return$h.getFrameSelector('zoom-'+id,selector)},getFrameElement:function($eleme