2 lines
38 KiB
JavaScript
Raw Normal View History

2023-01-15 20:48:50 +01:00
/*! For license information please see dropins_sdk_v2.js.LICENSE */
!function(e,o){for(var t in o)e[t]=o[t]}(window,function(e){var o={};function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var i in e)t.d(n,i,function(o){return e[o]}.bind(null,i));return n},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=3)}([function(e,o,t){"use strict";t.d(o,"i",(function(){return n})),t.d(o,"g",(function(){return i})),t.d(o,"e",(function(){return r})),t.d(o,"j",(function(){return a})),t.d(o,"b",(function(){return p})),t.d(o,"d",(function(){return u})),t.d(o,"c",(function(){return d})),t.d(o,"f",(function(){return h})),t.d(o,"k",(function(){return b})),t.d(o,"a",(function(){return m})),t.d(o,"h",(function(){return v}));var n,i,r,s=t(1);function a(e,o){var t=window.screenX+((window.outerWidth||document.documentElement.offsetWidth)-e)/2,n=window.screenY+((window.outerHeight||document.documentElement.offsetHeight)-o)/2;return"width=".concat(e,",height=").concat(o,",left=").concat(t,",top=").concat(n)}function c(e,o,t){var n=-1===e.indexOf("?")?"?":"&";return"".concat(e).concat(n).concat(o,"=").concat(t)}function l(e){return c(e,"version",encodeURIComponent(Dropbox.VERSION))}function p(e,o){var t,n,i=encodeURIComponent(window.location.protocol+"//"+window.location.host),r=encodeURIComponent(Dropbox.appKey),s=Dropbox.productKey?encodeURIComponent(Dropbox.productKey):null,a=encodeURIComponent(e.linkType||""),p=encodeURIComponent(e._trigger||"js"),u=Boolean(e.multiselect),d=encodeURIComponent(m(e.extensions,"join",(function(e){return e.join(" ")}))||""),f=Boolean(e.folderselect);o=Boolean(o);var h="".concat(Dropbox.baseUrl,"/chooser?origin=").concat(i,"&app_key=").concat(r,"&link_type=").concat(a,"&trigger=").concat(p,"&multiselect=").concat(u,"&extensions=").concat(d,"&folderselect=").concat(f,"&iframe=").concat(o);if(void 0!==e.fileselect&&(h=c(h,"fileselect",Boolean(e.fileselect))),void 0!==e.sizeLimit&&(h=c(h,"size_limit",e.sizeLimit)),null!=e.initialNavigation){if(null!=e.initialNavigation.mode)h=c(h,"initial_navigation_mode",encodeURIComponent(e.initialNavigation.mode));if(null!=e.initialNavigation.role)h=c(h,"initial_navigation_role",encodeURIComponent(e.initialNavigation.role));if(e.initialNavigation.cursor)h=c(h,"initial_navigation_cursor",encodeURIComponent(e.initialNavigation.cursor))}null!=e.initialViewType&&(h=c(h,"initial_view_type",encodeURIComponent(e.initialViewType)));null!=e.fields&&(h=c(h,"fields",encodeURIComponent("function"==typeof e.fields.join?e.fields.join(" "):void 0)));(!1===e.showSignOut&&(h=c(h,"show_sign_out","false")),e.initialNavigationPath)&&(h=c(h,"initial_navigation_path",encodeURIComponent(e.initialNavigationPath)));e.requiredPermissions&&(h=c(h,"required_permissions",encodeURIComponent(m(e.requiredPermissions,"join",(function(e){return e.join(" ")}))||"")));(s&&(h=c(h,"product_key",s)),null===(t=e.suggestions)||void 0===t?void 0:t.experimentGroup)&&(h=c(h,"suggestions_experiment_group",encodeURIComponent(null===(n=e.suggestions)||void 0===n?void 0:n.experimentGroup)));return l(h)}function u(){/\bTrident\b/.test(navigator.userAgent)&&null!=document.body&&null==i&&((i=document.createElement("iframe")).setAttribute("id","dropbox_xcomm"),i.setAttribute("src",Dropbox.baseUrl+"/static/api/1/xcomm.html"),i.style.display="none",document.body.appendChild(i))}function d(e){var o={options:Object(s.a)(Object(s.a)({},e),{success:function(t,n){"function"==typeof e.success&&e.