mongo-express-leufu
Version:
Web-based admin interface for MongoDB
7 lines • 24.4 kB
JavaScript
webpackJsonp([0],[function(e,t,n){"use strict";function r(e){return"[object Array]"===T.call(e)}function o(e){return"[object ArrayBuffer]"===T.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function a(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return void 0===e}function l(e){return null!==e&&"object"==typeof e}function f(e){return"[object Date]"===T.call(e)}function d(e){return"[object File]"===T.call(e)}function p(e){return"[object Blob]"===T.call(e)}function h(e){return"[object Function]"===T.call(e)}function m(e){return l(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function g(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function v(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function w(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=w(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)b(arguments[n],e);return t}function x(e,t,n){return b(t,function(t,r){e[r]=n&&"function"==typeof t?S(t,n):t}),e}var S=n(9),E=n(50),T=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:E,isFormData:i,isArrayBufferView:a,isString:s,isNumber:u,isObject:l,isUndefined:c,isDate:f,isFile:d,isBlob:p,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:v,forEach:b,merge:w,extend:x,trim:g}},,,function(e,t,n){"use strict";(function(t){function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o=n(0),i=n(29),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(5):void 0!==t&&(e=n(5)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(a)}),e.exports=s}).call(t,n(51))},,function(e,t,n){"use strict";var r=n(0),o=n(21),i=n(24),a=n(30),s=n(28),u=n(8),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(23);e.exports=function(e){return new Promise(function(t,l){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||s(e.url)||(p=new window.XDomainRequest,h="onload",m=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var y=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+c(y+":"+g)}if(p.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[h]=function(){if(p&&(4===p.readyState||m)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?p.response:p.responseText,i={data:r,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:e,request:p};o(t,l,i),p=null}},p.onerror=function(){l(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){l(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var v=n(26),b=(e.withCredentials||s(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}if("setRequestHeader"in p&&r.forEach(d,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)}),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),l(e),p=null)}),void 0===f&&(f=null),p.send(f)})}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){e.exports=n(15)},,,,function(e,t,n){var r;!function(o,i){void 0!==(r=function(){return o.renderjson=i()}.call(t,n,t,e))&&(e.exports=r)}(this,function(){function e(u,c,l,f,d){var p=l?"":c,h=function(e,o,u,c,l){var h,m=a(c),y=function(){h||n(m.parentNode,h=r(l(),s(d.hide,"disclosure",function(){h.style.display="none",m.style.display="inline"}))),h.style.display="inline",m.style.display="none"};n(m,s(d.show,"disclosure",y),t(c+" syntax",e),s(o,null,y),t(c+" syntax",u));var g=n(a(),i(p.slice(0,-1)),m);return f>0&&y(),g};return null===u?t(null,p,"keyword","null"):void 0===u?t(null,p,"keyword","undefined"):"string"==typeof u&&u.length>d.max_string_length?h('"',u.substr(0,d.max_string_length)+" ...",'"',"string",function(){return n(a("string"),t(null,p,"string",JSON.stringify(u)))}):"object"!=typeof u||[Number,String,Boolean,Date].indexOf(u.constructor)>=0?t(null,p,typeof u,JSON.stringify(u)):u.constructor==Array?0==u.length?t(null,p,"array syntax","[]"):h("["," ... ","]","array",function(){for(var r=n(a("array"),t("array syntax","[",null,"\n")),o=0;o<u.length;o++)n(r,e(d.replacer.call(u,o,u[o]),c+" ",!1,f-1,d),o!=u.length-1?t("syntax",","):[],i("\n"));return n(r,t(null,c,"array syntax","]")),r}):o(u,d.property_list)?t(null,p,"object syntax","{}"):h("{","...","}","object",function(){var r=n(a("object"),t("object syntax","{",null,"\n"));for(var o in u)var s=o;var l=d.property_list||Object.keys(u);d.sort_objects&&(l=l.sort());for(var p in l){var o=l[p];o in u&&n(r,t(null,c+" ","key",'"'+o+'"',"object syntax",": "),e(d.replacer.call(u,o,u[o]),c+" ",!0,f-1,d),o!=s?t("syntax",","):[],i("\n"))}return n(r,t(null,c,"object syntax","}")),r})}var t=function(){for(var e=[];arguments.length;)e.push(n(a(Array.prototype.shift.call(arguments)),i(Array.prototype.shift.call(arguments))));return e},n=function(){for(var e=Array.prototype.shift.call(arguments),t=0;t<arguments.length;t++)arguments[t].constructor==Array?n.apply(this,[e].concat(arguments[t])):e.appendChild(arguments[t]);return e},r=function(e,t){return e.insertBefore(t,e.firstChild),e},o=function(e,t){var n=t||Object.keys(e);for(var r in n)if(Object.hasOwnProperty.call(e,n[r]))return!1;return!0},i=function(e){return document.createTextNode(e)},a=function(e){var t=document.createElement("span");return e&&(t.className=e),t},s=function(e,t,n){var r=document.createElement("a");return t&&(r.className=t),r.appendChild(i(e)),r.href="#",r.onclick=function(e){return n(),e&&e.stopPropagation(),!1},r},u=function t(r){var o=Object.assign({},t.options);o.replacer="function"==typeof o.replacer?o.replacer:function(e,t){return t};var i=n(document.createElement("pre"),e(r,"",!1,o.show_to_level,o));return i.className="renderjson",i};return u.set_icons=function(e,t){return u.options.show=e,u.options.hide=t,u},u.set_show_to_level=function(e){return u.options.show_to_level="string"==typeof e&&"all"===e.toLowerCase()?Number.MAX_VALUE:e,u},u.set_max_string_length=function(e){return u.options.max_string_length="string"==typeof e&&"none"===e.toLowerCase()?Number.MAX_VALUE:e,u},u.set_sort_objects=function(e){return u.options.sort_objects=e,u},u.set_replacer=function(e){return u.options.replacer=e,u},u.set_property_list=function(e){return u.options.property_list=e,u},u.set_show_by_default=function(e){return u.options.show_to_level=e?Number.MAX_VALUE:0,u},u.options={},u.set_icons("⊕","⊖"),u.set_show_by_default(!1),u.set_sort_objects(!1),u.set_max_string_length("none"),u.set_replacer(void 0),u.set_property_list(void 0),u})},function(e,t,n){"use strict";function r(e){var t=new a(e),n=i(a.prototype.request,t);return o.extend(n,a.prototype,t),o.extend(n,t),n}var o=n(0),i=n(9),a=n(17),s=n(3),u=r(s);u.Axios=a,u.create=function(e){return r(o.merge(s,e))},u.Cancel=n(6),u.CancelToken=n(16),u.isCancel=n(7),u.all=function(e){return Promise.all(e)},u.spread=n(31),e.exports=u,e.exports.default=u},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(6);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new a,response:new a}}var o=n(3),i=n(0),a=n(18),s=n(19);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(0),i=n(22),a=n(7),s=n(3),u=n(27),c=n(25);e.exports=function(e){return r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}function o(e){for(var t,n,o=String(e),a="",s=0,u=i;o.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&t>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=o},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(0);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var a=[];o.forEach(t,function(e,t){null!==e&&void 0!==e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){e=e.replace(/\[/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)"),n=t.exec(location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}function a(){var e=ME_SETTINGS;return"".concat(e.baseHref,"db/").concat(encodeURIComponent(e.dbName),"/").concat(encodeURIComponent(e.collectionName),"/")}var s=r(n(10)),u=r(n(1)),c=r(n(14)),l=r(n(2)),f=(0,u.default)(document);f.ready(function(){(0,u.default)("#tabs").tab(),document.location.href.indexOf("query=")>=0&&""!==i("query")&&(0,u.default)('#tabs a[href="#advanced"]').tab("show")});var d=l.default.fromTextArea(document.getElementById("document"),{mode:{name:"javascript",json:!0},indentUnit:4,electricChars:!0,matchBrackets:!0,lineNumbers:!0,theme:ME_SETTINGS.codeMirrorEditorTheme}),p=l.default.fromTextArea(document.getElementById("index"),{mode:{name:"javascript",json:!0},indentUnit:4,electricChars:!0,matchBrackets:!0,lineNumbers:!0,theme:ME_SETTINGS.codeMirrorEditorTheme});window.checkValidJSON=function(){return u.default.ajax({type:"POST",url:"".concat(ME_SETTINGS.baseHref,"checkValid"),data:{document:d.getValue()}}).done(function(e){"Valid"===e?((0,u.default)("#documentInvalidJSON").remove(),(0,u.default)("#addDocumentForm").submit()):0===(0,u.default)("#documentInvalidJSON").length&&(0,u.default)("#document-modal-body").parent().append('<div id="documentInvalidJSON" class="alert alert-danger"><strong>Invalid JSON</strong></div>')}),!1},window.checkValidIndexJSON=function(){return u.default.ajax({type:"POST",url:"".concat(ME_SETTINGS.baseHref,"checkValid"),data:{document:p.getValue()}}).done(function(e){"Valid"===e?((0,u.default)("#indexInvalidJSON").remove(),(0,u.default)("#addIndexForm").submit()):0===(0,u.default)("#indexInvalidJSON").length&&(0,u.default)("#index-modal-body").parent().append('<div id="indexInvalidJSON" class="alert alert-danger"><strong>Invalid JSON</strong></div>')}),!1},(0,u.default)("#addDocument").on("shown.bs.modal",function(){d.refresh(),d.focus()}),(0,u.default)("#addIndex").on("shown.bs.modal",function(){p.refresh(),p.focus()}),ME_SETTINGS.collapsibleJSON&&((0,u.default)(function(){(0,u.default)("div.tableContent pre").each(function(){var e=(0,u.default)(this),t=u.default.trim(e.text());t&&e.html((0,c.default)(JSON.parse(t)))})}),c.default.set_show_to_level(ME_SETTINGS.collapsibleJSONDefaultUnfold)),window.loadDocument=function(e){""===window.getSelection().toString()&&(location.href=e)},f.ready(function(){var e=(0,u.default)(".tableWrapper");(0,u.default)(".tableHeaderFooterBars").width()===e.width()?(0,u.default)(".fadeToWhite").remove():(0,u.default)(".fadeToWhite").height((0,u.default)(".tableWrapper").height()),(0,u.default)(".deleteButtonCollection").tooltip({title:"Are you sure you want to delete this collection? All documents will be deleted."}),e.scroll(function(){var t=(0,u.default)(".tableWrapper table").width()-e.scrollLeft()-e.width();document.getElementById("fadeToWhiteID").style.opacity=Math.min(Math.max(t-50,50)-50,100)/100}),(0,u.default)(".tooDamnBig").bind("click",function(t){t.preventDefault(),t.stopPropagation();var n=(0,u.default)(this),r=n.attr("doc_id"),i=n.attr("doc_prop"),s='<img src="'.concat(ME_SETTINGS.baseHref,'public/img/gears.gif" />'),l=e.scrollLeft();n.html(s),u.default.get("".concat(a()).concat(encodeURIComponent(r),"/").concat(i),function(e){"string"!=typeof e||"data:image/png;base64,"!==e.substr(0,22)&&"data:image/gif;base64,"!==e.substr(0,22)&&"data:image/jpg;base64,"!==e.substr(0,22)&&"data:image/jpeg;base64,"!==e.substr(0,23)||(e='<img src="'+e+'" style="max-height:100%; max-width:100%; "/>'),"string"!=typeof e||"data:audio/ogg;base64,"!==e.substr(0,22)&&"data:audio/mp3;base64,"!==e.substr(0,22)||(e='<audio controls style="width:45px;" src="'+e+'">Your browser does not support the audio element.</audio>'),"string"!=typeof e||"data:video/webm;base64,"!==e.substr(0,23)&&"data:video/mp4;base64,"!==e.substr(0,22)&&"data:video/ogv;base64,"!==e.substr(0,22)||(e='<video controls><source type="'+e.substring(e.indexOf(":")+1,e.indexOf(";"))+'" src="'+e+'"/>Your browser does not support the video element.</video>'),"object"!==o(e)||"[object Object]"!==e.toString()&&"[object"!==e.toString().substr(0,7)||(e=(0,c.default)(e)),n.parent().html(e),(0,u.default)(".tableWrapper").scrollLeft(l)})}),(0,u.default)(".deleteButtonDocument").on("click",function(e){var t=(0,u.default)(this).closest("form");e.stopPropagation(),e.preventDefault(),(0,u.default)("#confirm-deletion-document").modal({backdrop:"static",keyboard:!1}).one("click","#delete",function(){t.trigger("submit")})}),(0,u.default)("#deleteListConfirmButton").on("click",function(){(0,u.default)("#deleteListForm").trigger("submit")}),(0,u.default)(".deleteButtonCollection").on("click",function(e){(0,u.default)(".deleteButtonCollection").tooltip("hide"),e.preventDefault();var t=(0,u.default)(this),n=t.parent();(0,u.default)("#confirmation-input").attr("shouldbe",t.attr("collection-name")),(0,u.default)("#modal-collection-name").text(t.attr("collection-name")),(0,u.default)("#confirm-deletion-collection").modal({backdrop:"static",keyboard:!1}).one("shown.bs.modal",function(){(0,u.default)("#confirmation-input").focus()}).one("click","#delete",function(){var e=(0,u.default)("#confirmation-input");e.val().toLowerCase()===e.attr("shouldbe").toLowerCase()&&n.trigger("submit")})});var t={1:-1,"-1":0,0:1,undefined:1};(0,u.default)(".sorting-button").on("click",function(){var e=(0,u.default)(this),n=e.data("column"),r=t[e.data("direction")];(0,u.default)("input.sort-"+n).val(r).prop("checked",0!==r),(0,u.default)((0,u.default)("#tabs li.active a").attr("href")+" form").find('button[type="submit"]').click()});var n=(0,u.default)(".import-input-file"),r=(0,u.default)(".import-file-link");u.default.each(r,function(e,t){(0,u.default)(t).on("click",function(){(0,u.default)(n[e]).trigger("click")})}),n.on("change",function(e){console.log("EVENT",e);var t=e.target.files,n=(0,u.default)(e.target).attr("collection-name"),r=new FormData;u.default.each(t,function(e,t){r.append("file_".concat(e),t)}),s.default.post("".concat(ME_SETTINGS.baseHref,"db/").concat(ME_SETTINGS.dbName,"/import/").concat(n),r).then(function(e){console.log("val :",e),(0,u.default)("#pageTitle").parent().append('<div class="alert alert-success"><strong>'+e.data+"</strong></div>"),setTimeout(function(){return location.reload(!0)},2e3)}).catch(function(e){console.error("err",e)})})})},,,,,,,,,,,,,,,,,,function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&p&&(m=!1,p.length?h=p.concat(h):y=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(p=h,h=[];++y<t;)p&&p[y].run();y=-1,t=h.length}p=null,m=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,d=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var p,h=[],m=!1,y=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||m||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.prependListener=c,d.prependOnceListener=c,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}}],[32]);