function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,e){var t;if(r)return"string"==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t={}.toString.call(r).slice(8,-1))&&r.constructor?r.constructor.name:t)||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,e):void 0}function _arrayLikeToArray(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,o=Array(e);t<e;t++)o[t]=r[t];return o}function _iterableToArrayLimit(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var o,n,a,i,l=[],u=!0,s=!1;try{if(a=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(o=a.call(t)).done)&&(l.push(o.value),l.length!==e);u=!0);}catch(r){s=!0,n=r}finally{try{if(!u&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(s)throw n}}return l}}function _arrayWithHoles(r){if(Array.isArray(r))return r}(()=>{function r(n,r,e,a){r.defineAddOn("bootstrapDecorator","fileUpload",":::PLUGIN_PATH:::/ui/schemaForm/customFieldTypes/fileUpload.html",e.stdBuilders),n.defaults.string.unshift(function(r,e,t){var o;return"string"===e.type&&"file"===e.format&&((o=n.stdFormObj(r,e,t)).allowedFileType=_.get(e,"x-schema-form.allowedFileType",[]),o.key=t.path,o.type="fileUpload",o.getFilePickerFilesFromModelValue=function(r){return[{file:r}]},o.getModelValueFromFilePickerFiles=function(r){return _slicedToArray(r,1)[0].file},o.onFileSelected=function(r,e){var t,e=_slicedToArray(e,1)[0].file;e&&(t=e,(e=new FileReader).onload=function(r){_.set(t,"fileSrc",r.target.result)},e.readAsDataURL(t)),r.$setDirty()},o.onFileRemoved=function(r){r.$setDirty()},t.lookup[a.stringify(t.path)]=o),o})}r.$inject=["schemaFormProvider","schemaFormDecoratorsProvider","sfBuilderProvider","sfPathProvider"],angular.module("schemaForm").config(r)})();