box-ui-elements 19.0.0-beta.8 → 19.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/explorer.js CHANGED
@@ -29,7 +29,7 @@
29
29
  object-assign
30
30
  (c) Sindre Sorhus
31
31
  @license MIT
32
- */function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(r({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,l=s(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(l[u]=n[u]);if(i){r=i(n);for(var d=0;d<r.length;d++)a.call(n,r[d])&&(l[r[d]]=n[r[d]])}}return l}},function(e,t,n){"use strict";var r=n(201);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";(function(e){let n;class r{static getUserAgent(){return e.navigator.userAgent}static isMobile(){const e=r.getUserAgent();return/iphone|ipad|ipod|android|blackberry|bb10|mini|windows\sce|palm/i.test(e)||/Mobi/i.test(e)}static isIE(){return/Trident/i.test(r.getUserAgent())}static isFirefox(){const e=r.getUserAgent();return/Firefox/i.test(e)&&!/Seamonkey\//i.test(e)}static isSafari(){const e=r.getUserAgent();return/AppleWebKit/i.test(e)&&!/Chrome\//i.test(e)}static isMobileSafari(){return r.isMobile()&&r.isSafari()&&!r.isMobileChromeOniOS()}static isMobileChromeOniOS(){const e=r.getUserAgent();return r.isMobile()&&/AppleWebKit/i.test(e)&&/CriOS\//i.test(e)}static canPlayDash(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(void 0===n||t){const t=e.MediaSource;n=!!t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.64001E"')}return n}static canWriteToClipboard(){return!(!e.navigator.clipboard||!e.navigator.clipboard.writeText)}static canReadFromClipboard(){return!(!e.navigator.clipboard||!e.navigator.clipboard.readText)}}t.a=r}).call(this,n(44))},function(e,t,n){var r=n(94),i=n(379),o=n(380),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:l&&l in Object(e)?i(e):o(e)}},function(e,t,n){"use strict";var r=n(82),i=n(1),o=n(18);class a extends r.a{getCacheKey(e){return"".concat(i.u).concat(e)}getUrl(e){const t=e?"/".concat(e):"";return"".concat(this.getBaseApiUrl(),"/web_links").concat(t)}async getWeblink(e,t,n){let{fields:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.isDestroyed())return;const a=this.getCache(),s=this.getCacheKey(e);if(this.errorCode=i.dc,this.successCallback=t,this.errorCallback=n,a.has(s)){if(0===Object(o.k)(a.get(s),r).length)return void t(a.get(s))}const l={url:this.getUrl(e)};r&&(l.params={fields:r.toString()});try{const{data:e}=await this.xhr.get(l);if(this.isDestroyed())return;a.has(s)?a.merge(s,e):a.set(s,e),this.successHandler(a.get(s))}catch(e){this.errorHandler(e)}}}t.a=a},function(e,t,n){var r=n(701)();e.exports=r},function(e,t,n){"use strict";var r=n(1);const i=new Error("Bad id or auth token. ID should be typed id like file_123 or folder_123! Token should be a string or function.");class o{static async getToken(e,t){if(null!=t&&"string"!=typeof t&&"function"!=typeof t||!e.startsWith(r.hg)&&!e.startsWith(r.gg))throw i;if(!t||"string"==typeof t)return t;const n=await t(e);if(!n||"string"==typeof n||"object"==typeof n&&(n.read||n.write))return n;throw i}static async getReadToken(e,t){const n=await o.getToken(e,t);return n&&"object"==typeof n?n.read:n}static async getReadTokens(e,t){const n=Array.isArray(e)?e:[e],r=n.map(e=>o.getReadToken(e,t)),i=await Promise.all(r),a={};return i.forEach((e,t)=>{a[n[t]]=e}),Promise.resolve(a)}static async getWriteToken(e,t){const n=await o.getToken(e,t);return n&&"object"==typeof n?n.write||n.read:n}static async cacheTokens(e,t){if(null!=t&&"string"!=typeof t&&"function"!=typeof t||!e.every(e=>e.startsWith(r.hg)||e.startsWith(r.gg)))throw i;return"function"==typeof t&&await t(e),Promise.resolve()}}t.a=o},function(e,t,n){"use strict";var r=n(483),i=n(57),o=n(484);function a(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function l(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),a=t.length>0?t.join("="):void 0;a=void 0===a?null:o(a),n(o(i),a,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r}t.extract=s,t.parse=l,t.stringify=function(e,t){!1===(t=i({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[a(t,e),"[",r,"]"].join(""):[a(t,e),"[",a(r,e),"]=",a(n,e)].join("")};case"bracket":return function(t,n){return null===n?a(t,e):[a(t,e),"[]=",a(n,e)].join("")};default:return function(t,n){return null===n?a(t,e):[a(t,e),"=",a(n,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return a(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return a(r,t)+"="+a(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:l(s(e),t)}}},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:i.k,fillRule:"evenodd",d:"M8 6.586l4.182-4.182a.5.5 0 01.707 0l.707.707a.5.5 0 010 .707L9.414 8l4.182 4.182a.5.5 0 010 .707l-.707.707a.5.5 0 01-.707 0L8 9.414l-4.182 4.182a.5.5 0 01-.707 0l-.707-.707a.5.5 0 010-.707L6.586 8 2.404 3.818a.5.5 0 010-.707l.707-.707a.5.5 0 01.707 0L8 6.586z"}))},function(e,t,n){"use strict";e.exports=n(659)},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(21),s=n.n(a),l=n(145);function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}class u extends r.Component{constructor(){var e,t,n;super(...arguments),n=e=>{const{isDisabled:t,onClick:n}=this.props;if(t)return e.stopPropagation(),void e.preventDefault();n&&n(e)},(t="onClickHandler")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}render(){const e=this.props,{children:t,className:n,isDisabled:i,isSelectItem:a,isSelected:u,showRadar:d}=e,h=c(e,["children","className","isDisabled","isSelectItem","isSelected","showRadar"]),f=s()(h,["role","tabIndex","onClick"]);f.className=o()("menu-item",n,{"is-select-item":a,"is-selected":u}),f.role=a?"menuitemradio":"menuitem",f.tabIndex=-1,f.onClick=this.onClickHandler,a&&(f["aria-checked"]=u),i&&(f["aria-disabled"]="true");let p=r.createElement("li",f,t);return d&&(p=r.createElement(l.a,null,p)),p}}t.a=u},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(8);const i="function"==typeof n.n(r)()(window,"performance.mark"),o=e=>i&&window.performance.mark(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l}));const r="date",i="enum",o="integer",a="float",s="multiSelect",l="string"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=(n(58),i.a.createContext());function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var s=e=>r.forwardRef((t,n)=>r.createElement(o.Consumer,null,i=>r.createElement(e,a({ref:n},t,{api:i}))));n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}))},function(e,t,n){"use strict";var r=n(126);n.d(t,"b",(function(){return r.a}));var i=n(143);n.d(t,"a",(function(){return i.a}))},function(e,t,n){"use strict";var r=n(794),i=n(315),o=n(106),a=n(810),s=n(199),l=n(517),c=n(520),u=n(582),d=n(811),h=n(584),f=n(352),p=n(95),m=n(580),g=n(46),b=n(527),v=n(598),y=n(248),w=n(872),E={Editor:d,EditorBlock:h,EditorState:g,CompositeDecorator:a,Entity:f,EntityInstance:m,BlockMapBuilder:i,CharacterMetadata:o,ContentBlock:s,ContentState:l,SelectionState:y,AtomicBlockUtils:r,KeyBindingUtil:b,Modifier:p,RichUtils:v,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:u,convertFromHTML:n(596),convertFromRaw:n(875),convertToRaw:w,genKey:n(154),getDefaultKeyBinding:n(599),getVisibleSelectionRect:n(880)};e.exports=E},function(e,t,n){var r=n(378),i=n(383);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(109),i=n.n(r);t.a=class{constructor(){this.cache={}}set(e,t){this.cache[e]=t}merge(e,t){if(!this.has(e))throw new Error("Key ".concat(e," not in cache!"));this.set(e,i()({},this.get(e),t))}unset(e){delete this.cache[e]}unsetAll(e){Object.keys(this.cache).forEach(t=>{t.startsWith(e)&&delete this.cache[t]})}has(e){return{}.hasOwnProperty.call(this.cache,e)}get(e){if(this.has(e))return this.cache[e]}}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(81),a=n(18),s=n(7),l=n(82),c=n(55),u=n(61),d=n(1);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends l.a{constructor(){super(...arguments),p(this,"folderSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const{item_collection:n}=t;if(!n)throw Object(s.a)();const{entries:r,total_count:i,limit:a,offset:l}=n;if(!Array.isArray(r)||"number"!=typeof i||"number"!=typeof a||"number"!=typeof l)throw Object(s.a)();const d=Object(o.a)(r,new m(this.options),new c.a(this.options),new u.a(this.options));this.itemCache=(this.itemCache||[]).concat(d),this.getCache().set(this.key,f({},t,{item_collection:f({},n,{entries:this.itemCache})})),this.finish()}),p(this,"folderDetailsSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const n=f({},this.getCache().get(this.key),{},t);this.getCache().set(this.key,n),this.successCallback(n)}),p(this,"createSuccessHandler",e=>{let{data:t}=e;const{id:n}=t;if(this.isDestroyed()||!n)return;const r=this.getCacheKey(n),i=this.getCache(),o=i.get(this.key);if(!o)return void this.successCallback(t);const{item_collection:a}=o;if(!a)throw Object(s.a)();const{total_count:l,entries:c}=a;if(!Array.isArray(c)||"number"!=typeof l)throw Object(s.a)();i.set(r,t),a.entries=[r].concat(c),a.total_count=l+1,this.successCallback(t)})}getCacheKey(e){return"".concat(d.p).concat(e)}getUrl(e){const t=e?"/".concat(e):"";return"".concat(this.getBaseApiUrl(),"/folders").concat(t)}isLoaded(){return this.getCache().has(this.key)}finish(){if(this.isDestroyed())return;const e=this.getCache(),t=e.get(this.key),{id:n,name:r,permissions:i,path_collection:o,item_collection:a}=t;if(!a||!o)throw Object(s.a)();const{entries:l,offset:c,total_count:u}=a;if(!Array.isArray(l)||"number"!=typeof u)throw Object(s.a)();const d={id:n,name:r,offset:c,percentLoaded:100,permissions:i,boxItem:t,breadcrumbs:o.entries,items:l.map(t=>e.get(t)),sortBy:this.sortBy,sortDirection:this.sortDirection,totalCount:u};this.successCallback(d)}folderRequest(){let{fields:e,noPagination:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.folderSuccessHandler;if(this.isDestroyed())return Promise.reject();const r=e||a.g;this.errorCode=d.Sb;let i={fields:r.toString()};return t||(i=f({},i,{direction:this.sortDirection.toLowerCase(),limit:this.limit,offset:this.offset,fields:r.toString(),sort:this.sortBy.toLowerCase()})),this.xhr.get({url:this.getUrl(this.id),params:i,headers:r.includes(d.xd)?{"X-Rep-Hints":d.Eg}:{}}).then(n).catch(this.errorHandler)}getFolderFields(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.isDestroyed()||(this.id=e,this.key=this.getCacheKey(e),this.successCallback=t,this.errorCallback=n,this.folderRequest(f({},r,{noPagination:!0}),this.folderDetailsSuccessHandler))}getFolder(e,t,n,r,i,o,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};this.isDestroyed()||(this.id=e,this.key=this.getCacheKey(e),this.limit=t,this.offset=n,this.sortBy=r,this.sortDirection=i,this.successCallback=o,this.errorCallback=a,s.forceFetch&&this.getCache().unset(this.key),this.isLoaded()?this.finish():this.folderRequest(s))}folderCreateRequest(e){if(this.isDestroyed())return Promise.reject();this.errorCode=d.rb;const t="".concat(this.getUrl(),"?fields=").concat(a.g.toString());return this.xhr.post({url:t,data:{name:e,parent:{id:this.id}}}).then(this.createSuccessHandler).catch(this.errorHandler)}create(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a;this.isDestroyed()||(this.id=e,this.key=this.getCacheKey(e),this.successCallback=n,this.errorCallback=r,this.folderCreateRequest(t))}}t.a=m},function(e,t,n){"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=0,o=n;return new Promise((n,a)=>{function s(l){setTimeout(()=>{i+=1,new Promise((t,n)=>{e(t,n,a)}).then(n).catch(e=>{i<t?s(o*=r):a(e)})},l)}s(o)})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(119),o=n(490),a=n(17);var s=e=>{let{className:t="",iconProps:n,tooltipText:i}=e;return r.createElement("span",{key:"infoIcon",className:"".concat(t," tooltip-icon-container")},r.createElement(a.c,{position:a.a.TOP_CENTER,text:i},r.createElement("span",{className:"info-icon-container"},r.createElement(o.a,n))))},l=n(4),c=n.n(l);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var h=e=>{let{children:t,className:n,labelContent:i}=e,o=d(e,["children","className","labelContent"]);return r.createElement("label",null,r.createElement("span",u({className:c()("label bdl-Label",n)},o),i),t)};var f=e=>{let{children:t,labelContent:n,tooltip:i}=e;const o=r.createElement(h,{labelContent:n},t);return i?r.createElement(a.c,{position:a.a.TOP_RIGHT,text:i},o):o};var p=e=>{let{children:t,labelContent:n}=e;return r.createElement(h,{className:"accessibility-hidden",labelContent:n},t)},m=n(30);n(647);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=()=>r.createElement("span",{className:"label-optional bdl-Label-optional"},"(",r.createElement(i.a,m.a.optional),")");t.a=e=>{let{text:t,tooltip:n,infoTooltip:i,infoIconProps:o,showOptionalText:a,hideLabel:l,children:c}=e;const u=[r.createElement("span",{key:"labelText"},t),a?r.createElement(y,{key:"optionalMessage"}):null];return i&&u.push(r.createElement(s,{key:"infoTooltip",iconProps:b({className:"tooltip-icon"},o),tooltipText:i})),l?r.createElement(p,{labelContent:u},c):r.createElement(f,{labelContent:u,tooltip:n},c)}},function(e,t,n){var r=n(446);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._=function(e){return e},t.defineMessages=function(e){return e}},function(e,t,n){var r=n(172),i=n(173);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),a?i(n,c,u):r(n,c,u)}return n}},function(e,t,n){"use strict";var r=n(7),i=n(1);t.a=function(e,t,n,o){const a=[];return e.forEach(e=>{const{id:s,type:l}=e;if(!s||!l)throw Object(r.a)();let c;switch(l){case i.jg:c=t;break;case i.ig:c=n;break;case i.kg:c=o;break;default:throw new Error("Unknown Type!")}const u=c.getCache(),d=c.getCacheKey(s);u.has(d)?u.merge(d,e):u.set(d,e),a.push(d)}),a}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(78),a=n.n(o),s=n(7),l=n(18),c=n(15),u=n(1);function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f extends c.a{constructor(){super(...arguments),h(this,"deleteSuccessHandler",()=>{if(this.isDestroyed())return;const e=this.getParentCacheKey(this.parentId),t=this.getCache().get(e);if(!t)return void this.postDeleteCleanup();const{item_collection:n}=t;if(!n)return void this.postDeleteCleanup();const{entries:r,total_count:i}=n;if(!Array.isArray(r)||"number"!=typeof i)throw Object(s.a)();const o=this.getCacheKey(this.id),a=r.length,l=r.filter(e=>e!==o),c=l.length,u=this.merge(e,"item_collection",d(n,{entries:l,total_count:i-(a-c)}));this.successCallback(u),this.postDeleteCleanup()}),h(this,"renameSuccessHandler",e=>{let{data:t}=e;if(!this.isDestroyed()){this.getCache().unsetAll(u.t);const e=this.merge(this.getCacheKey(this.id),"name",t.name);this.successCallback(e)}}),h(this,"shareSuccessHandler",(e,t)=>{if(!this.isDestroyed()){const n=t?Object(l.j)(e,t):e,r=this.getCache(),i=this.getCacheKey(this.id);r.has(i)?r.merge(i,n):r.set(i,n),this.successCallback(r.get(i))}})}getParentCacheKey(e){return"".concat(u.p).concat(e)}getCacheKey(e){return"getCacheKey(".concat(e,") should be overriden")}getUrl(e){return"getUrl(".concat(e,") should be overriden")}merge(e,t,n){const r=this.getCache();return r.merge(e,a()({},t,n)),r.get(e)}postDeleteCleanup(){this.isDestroyed()||(this.getCache().unsetAll(u.t),this.successCallback())}deleteItem(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.a;if(this.isDestroyed())return Promise.reject();this.errorCode=u.Ab;const{id:r,permissions:o,parent:a,type:l}=e;if(!(r&&o&&a&&l))return n(Object(s.a)(),this.errorCode),Promise.reject();const{id:c}=a,{can_delete:d}=o;if(!d||!c)return n(Object(s.b)(),this.errorCode),Promise.reject();this.id=r,this.parentId=c,this.successCallback=t,this.errorCallback=n;const h="".concat(this.getUrl(r)).concat(l===u.jg?"?recursive=true":"");return this.xhr.delete({url:h}).then(this.deleteSuccessHandler).catch(e=>{this.errorHandler(e)})}rename(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a;if(this.isDestroyed())return Promise.reject();this.errorCode=u.lc;const{id:o,permissions:a}=e;if(!o||!a)return r(Object(s.a)(),this.errorCode),Promise.reject();const{can_rename:l}=a;return l?(this.id=o,this.successCallback=n,this.errorCallback=r,this.xhr.put({url:"".concat(this.getUrl(o)),data:{name:t}}).then(this.renameSuccessHandler).catch(e=>{this.errorHandler(e)})):(r(Object(s.b)(),this.errorCode),Promise.reject())}validateSharedLinkRequest(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!t)throw this.errorCode=u.oc,Object(s.a)();const{can_share:r,can_set_share_access:i}=t;if(!r||!n&&!i)throw this.errorCode=u.oc,Object(s.b)()}async share(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(this.isDestroyed())return Promise.reject();try{const{id:i,permissions:a,shared_link:s}=e;this.id=i,this.successCallback=n,this.errorCallback=r;const l=!s&&void 0===t;this.validateSharedLinkRequest(i,a,l);const{fields:c}=o,d={url:this.getUrl(this.id),data:{shared_link:t===u.c?null:{access:t}}};c&&(d.params={fields:c.toString()});const{data:h}=await this.xhr.put(d);return this.shareSuccessHandler(h,c)}catch(e){return this.errorHandler(e)}}async updateSharedLink(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(this.isDestroyed())return Promise.reject();try{const{id:i,permissions:a}=e;this.id=i,this.successCallback=n,this.errorCallback=r,this.validateSharedLinkRequest(i,a);const{fields:s}=o,l={url:this.getUrl(this.id),data:{shared_link:t}};s&&(l.params={fields:s.toString()});const{data:c}=await this.xhr.put(l);return this.shareSuccessHandler(c,s)}catch(e){return this.errorHandler(e)}}}t.a=f},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const r="data_ready",i="js_ready"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var a=n[o];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0}},function(e,t,n){e.exports=n(447)},function(e,t,n){var r=n(275),i=1,o=4;e.exports=function(e){return r(e,i|o)}},function(e,t,n){var r=n(171),i=n(174);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=24,title:a,width:s=24}=e;return r.createElement(i.a,{className:"icon-close ".concat(t),height:o,title:a,viewBox:"0 0 24 24",width:s},r.createElement("path",{className:"fill-color",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:n}),r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}},function(e,t,n){"use strict";var r=n(79);const i=Object(r.defineMessages)({customAdd:{id:"boxui.metadataInstanceFields.customAdd",defaultMessage:"Add"},customRemove:{id:"boxui.metadataInstanceFields.customRemove",defaultMessage:"Remove"},invalidMetadataFieldType:{id:"boxui.metadataInstanceFields.invalidMetadataFieldType",defaultMessage:"Invalid metadata field type!"},metadataFieldNoValue:{id:"boxui.metadataInstanceFields.fieldNoValue",defaultMessage:"No Value"},metadataFieldSelectValue:{id:"boxui.metadataInstanceFields.fieldSelectValue",defaultMessage:"Select Value"},metadataFieldMultiSelectValue:{id:"boxui.metadataInstanceFields.fieldMultiSelectValue",defaultMessage:"Select Values"},metadataFieldSetValue:{id:"boxui.metadataInstanceFields.fieldSetValue",defaultMessage:"Set Value"},metadataFieldSetDate:{id:"boxui.metadataInstanceFields.fieldSetDate",defaultMessage:"Set Date"}});t.a=i},function(e,t,n){var r=n(338);e.exports=function(e,t){return r(e,t)}},function(e,t,n){e.exports=n(615)()},,function(e,t,n){var r=n(42).Symbol;e.exports=r},function(e,t,n){"use strict";var r=n(106),i=n(796),o=n(185),a=n(35),s=n(797),l=n(799),c=n(351),u=n(802),d=n(803),h=n(36),f=n(804),p=n(576),m=n(805),g=n(806),b=a.OrderedSet,v={replaceText:function(e,t,n,i,o){var a=p(e,t),s=m(a,t),l=r.create({style:i||b(),entity:o||null});return d(s,s.getSelectionAfter(),n,l)},insertText:function(e,t,n,r,i){return t.isCollapsed()||h(!1),v.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=c(e,t),i=v.removeRange(e,t,"backward");return v.replaceWithFragment(i,n,r)},replaceWithFragment:function(e,t,n){var r=p(e,t),i=m(r,t);return u(i,i.getSelectionAfter(),n)},removeRange:function(e,t,n){var r,i,a=void 0,s=void 0;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),i=t.getFocusKey(),a=e.getBlockForKey(r),s=e.getBlockForKey(i);var c=t.getStartOffset(),u=t.getEndOffset(),d=a.getEntityAt(c),h=s.getEntityAt(u-1);if(r===i&&d&&d===h){var f=l(e.getEntityMap(),a,s,t,n);return m(e,f)}var g=t;o.draft_segmented_entities_behavior&&(g=l(e.getEntityMap(),a,s,t,n));var b=p(e,g);return m(b,g)},splitBlock:function(e,t){var n=p(e,t),r=m(n,t);return g(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return i.add(e,t,n)},removeInlineStyle:function(e,t,n){return i.remove(e,t,n)},setBlockType:function(e,t,n){return f(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return f(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return f(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=p(e,t);return s(r,t,n)}};e.exports=v},function(e,t,n){"use strict";var r=n(0),i=n(157);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(i.a,o({},e,{type:"error"}))},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n.n(i),a=n(1),s=n(190);function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends r.Component{constructor(){var e;super(...arguments),e=this,d(this,"state",{}),d(this,"handleError",(function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.props.errorOrigin;if(!t||!n||!i)return;const o={type:"error",code:n,message:t.message,origin:i,context_info:u({[a.Ae]:!0},r)};e.props.onError(o)}))}componentDidCatch(e,t){this.setState({error:e},()=>{this.handleError(e,a.pc,u({},t),this.props.errorOrigin)})}render(){const e=this.props,{children:t,errorComponent:n}=e,i=l(e,["children","errorComponent"]),{error:o}=this.state;return o?r.createElement(n,{error:o}):r.cloneElement(t,u({},i,{onError:this.handleError}))}}d(h,"defaultProps",{errorComponent:s.a,onError:o.a});var f=h;function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.a;return n=>r.forwardRef((i,o)=>r.createElement(f,p({errorComponent:t,errorOrigin:e},i),r.createElement(n,{ref:o})))};n.d(t,"a",(function(){return m}))},function(e,t,n){"use strict";var r=n(0),i=n(43);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{let{children:t,isDisabled:n,text:s}=e,l=a(e,["children","isDisabled","text"]);return n||!s?t:r.createElement(i.c,o({text:s},l),t)}},function(e,t,n){"use strict";var r=n(53);n.d(t,"a",(function(){return r.a}))},function(e,t,n){var r=n(424);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(138),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,n){var r=n(39),i=n(502),o=n(267),a="Expected a function",s=Math.max,l=Math.min;e.exports=function(e,t,n){var c,u,d,h,f,p,m=0,g=!1,b=!1,v=!0;if("function"!=typeof e)throw new TypeError(a);function y(t){var n=c,r=u;return c=u=void 0,m=t,h=e.apply(r,n)}function w(e){var n=e-p;return void 0===p||n>=t||n<0||b&&e-m>=d}function E(){var e=i();if(w(e))return C(e);f=setTimeout(E,function(e){var n=t-(e-p);return b?l(n,d-(e-m)):n}(e))}function C(e){return f=void 0,v&&c?y(e):(c=u=void 0,h)}function S(){var e=i(),n=w(e);if(c=arguments,u=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(E,t),g?y(e):h}(p);if(b)return clearTimeout(f),f=setTimeout(E,t),y(p)}return void 0===f&&(f=setTimeout(E,t)),h}return t=o(t)||0,r(n)&&(g=!!n.leading,d=(b="maxWait"in n)?s(o(n.maxWait)||0,t):d,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==f&&clearTimeout(f),m=0,c=p=u=f=void 0},S.flush=function(){return void 0===f?h:C(i())},S}},function(e,t,n){"use strict";var r=n(74);const i="localStore",o="0";t.a=class{constructor(){this.memoryStore=new r.a;try{this.localStorage=window.localStorage,this.isLocalStorageAvailable=this.canUseLocalStorage()}catch(e){this.isLocalStorageAvailable=!1}}buildKey(e){return"".concat(i,"/").concat(o,"/").concat(e)}canUseLocalStorage(){if(!this.localStorage)return!1;try{return this.localStorage.setItem(this.buildKey("TestKey"),"testValue"),this.localStorage.removeItem(this.buildKey("TestKey")),!0}catch(e){return!1}}setItem(e,t){if(this.isLocalStorageAvailable)try{this.localStorage.setItem(this.buildKey(e),JSON.stringify(t))}catch(e){}else this.memoryStore.set(e,t)}getItem(e){if(!this.isLocalStorageAvailable)return this.memoryStore.get(e);try{const t=this.localStorage.getItem(this.buildKey(e));return t?JSON.parse(t):null}catch(e){return null}}removeItem(e){if(this.isLocalStorageAvailable)try{this.localStorage.removeItem(this.buildKey(e))}catch(e){}else this.memoryStore.unset(e)}}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(34),i=n(214),o=n(421),a=n(100);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},function(e,t,n){"use strict";var r=n(35),i=r.Map,o=r.OrderedSet,a=r.Record,s=o(),l={style:s,entity:null},c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getStyle=function(){return this.get("style")},t.prototype.getEntity=function(){return this.get("entity")},t.prototype.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return u;var n=i({style:s,entity:null}).merge(e),r=d.get(n);if(r)return r;var o=new t(n);return d=d.set(n,o),o},t}(a(l)),u=new c,d=i([[i(l),u]]);c.EMPTY=u,e.exports=c},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return f}));var r=n(0),i=n(265),o=n(11),a=n(142);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){return Object.keys(e).reduce((n,r)=>(n[r]=s({timeZone:t},e[r]),n),{})}function c(e,t){return Object.keys(s(s({},e),t)).reduce((n,r)=>(n[r]=s(s({},e[r]||{}),t[r]||{}),n),{})}function u(e,t){if(!t)return e;const n=a.a.formats;return s(s(s({},n),e),{date:c(l(n.date,t),l(e.date||{},t)),time:c(l(n.time,t),l(e.time||{},t))})}const d=e=>r.createElement(r.Fragment,null,...e);function h(e,t){let{locale:n,formats:r,messages:a,defaultLocale:s,defaultFormats:l,onError:c,timeZone:h}=e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{id:m,defaultMessage:g}=f;Object(i.a)(!!m,"[React Intl] An `id` must be provided to format a message.");const b=a&&a[String(m)];r=u(r,h),l=u(l,h);let v=[];if(b)try{v=t.getMessageFormat(b,n,r,{formatters:t}).formatHTMLMessage(p)}catch(e){c(Object(o.b)('Error formatting message: "'.concat(m,'" for locale: "').concat(n,'"')+(g?", using default message as fallback.":""),e))}else(!g||n&&n.toLowerCase()!==s.toLowerCase())&&c(Object(o.b)('Missing message: "'.concat(m,'" for locale: "').concat(n,'"')+(g?", using default message as fallback.":"")));if(!v.length&&g)try{v=t.getMessageFormat(g,s,l).formatHTMLMessage(p)}catch(e){c(Object(o.b)('Error formatting the default message for: "'.concat(m,'"'),e))}return v.length?1===v.length&&"string"==typeof v[0]?v[0]||g||String(m):d(v):(c(Object(o.b)('Cannot format message: "'.concat(m,'", ')+"using message ".concat(b||g?"source":"id"," as fallback."))),"string"==typeof b?b||g||String(m):g||String(m))}function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return h(e,t,n,Object.keys(r).reduce((e,t)=>{const n=r[t];return e[t]="string"==typeof n?Object(o.e)(n):n,e},{}))}},function(e,t,n){var r=n(224),i=n(307),o=n(88);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(476),i=n(481)((function(e,t,n){r(e,t,n)}));e.exports=i},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=24,title:a,width:s=24}=e;return r.createElement(i.a,{className:"icon-info ".concat(t),height:o,title:a,viewBox:"-603 389 16 16",width:s},r.createElement("path",{className:"fill-color",d:"M-595 403c5.5 0 8-7.1 3.9-10.6-4.2-3.6-10.8.3-9.8 5.7.5 2.8 3 4.9 5.9 4.9zm.9-6.7v3.7h-1.4v-3.7h1.4zm.1-2.2c0 1-1.7 1.1-1.7 0 .1-1.1 1.7-1.1 1.7 0z",fill:n,fillRule:"evenodd"}))}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(399),i=n(45),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t,n){"use strict";var r=n(106),i=n(35),o=n(316),a=i.List,s=i.Map,l=i.OrderedSet,c=i.Record,u=i.Repeat,d=l(),h={parent:null,characterList:a(),data:s(),depth:0,key:"",text:"",type:"unstyled",children:a(),prevSibling:null,nextSibling:null},f=function(e,t){return e.getStyle()===t.getStyle()},p=function(e,t){return e.getEntity()===t.getEntity()},m=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(u(r.EMPTY,n.length))),e},g=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,m(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.getChildKeys=function(){return this.get("children")},t.prototype.getParentKey=function(){return this.get("parent")},t.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},t.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},t.prototype.findStyleRanges=function(e,t){o(this.getCharacterList(),f,e,t)},t.prototype.findEntityRanges=function(e,t){o(this.getCharacterList(),p,e,t)},t}(c(h));e.exports=g},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);n(736);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const l=e=>{let{actions:t,children:n,className:i,elementId:l,sidebarView:c,title:u}=e,d=s(e,["actions","children","className","elementId","sidebarView","title"]);const h="".concat(l).concat(""===l?"":"_").concat(c),f="".concat(h,"-content");return r.createElement("div",a({"aria-labelledby":h,className:o()("bcs-content",i),"data-testid":"bcs-content",id:f,role:"tabpanel"},d),r.createElement("div",{className:"bcs-content-header"},u&&r.createElement("h3",{className:"bcs-title"},u),t),r.createElement("div",{className:"bcs-scroll-content-wrapper"},r.createElement("div",{className:"bcs-scroll-content"},n)))};l.defaultProps={elementId:"",sidebarView:""},t.a=l},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(22),s=n(155),l=n(1);n(737);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u extends r.PureComponent{constructor(e){super(e),c(this,"toggleVisibility",()=>{this.setState(e=>({isOpen:!e.isOpen}))}),this.state={isOpen:e.isOpen}}render(){const{isOpen:e}=this.state,{children:t,className:n,title:i,interactionTarget:c}=this.props,u=o()("bcs-section",{"bcs-section-open":e},n);return r.createElement("div",{className:u},i&&r.createElement(a.a,{"aria-expanded":e,className:"bcs-section-title",onClick:this.toggleVisibility,type:"button"},i,r.createElement(s.a,{color:l.M,width:8})),(e||!i)&&r.createElement("div",{className:"bcs-section-content"},t))}}c(u,"defaultProps",{className:"",isOpen:!0}),t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return u}));const r="file",i="web_link",o="add",a="remove",s="replace",l="test",c="enum",u="multiSelect"},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n.n(i);t.a=r.createContext({closeMenu:o.a})},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(21),s=n.n(a),l=n(12),c=n.n(l);n(658);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}class h extends r.Component{constructor(e){var t,n,r;super(e),r=()=>{const{setActiveItemID:e}=this.props;e&&e(this.id)},(n="setActiveItemID")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.id=c()("datalistitem")}componentDidMount(){this.props.isActive&&this.setActiveItemID()}componentDidUpdate(e){this.props.isActive&&!e.isActive&&this.setActiveItemID()}render(){const e=this.props,{children:t,className:n,isActive:i,isSelected:a}=e,l=d(e,["children","className","isActive","isSelected"]),c=o()("datalist-item",{"is-active":i},n),h=s()(l,["closeDropdown","setActiveItemID"]);return r.createElement("li",u({},h,{className:c,id:this.id,role:"option","aria-selected":a}),t)}}var f=h;n.d(t,"a",(function(){return f}))},function(e,t,n){"use strict";var r=n(0),i=n(54),o=n(107),a=n(11),s=n(85);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const u=n.n(s).a||s,d=(e,t)=>Object(o.b)(l(l({},a.a),{locale:"en"}),Object(a.c)(),e,t);class h extends r.Component{shouldComponentUpdate(e){const t=this.props,{values:n}=t,r=c(t,["values"]),{values:i}=e,o=c(e,["values"]);return!u(i,n)||!u(r,o)}render(){return r.createElement(i.a.Consumer,null,e=>{this.props.defaultMessage||Object(a.h)(e);const{formatMessage:t=d,textComponent:n=r.Fragment}=e||{},{id:i,description:o,defaultMessage:s,values:l,children:c,tagName:u=n}=this.props;let h=t({id:i,description:o,defaultMessage:s},l);return Array.isArray(h)||(h=[h]),"function"==typeof c?c(...h):u?r.createElement(u,null,...h):h})}}h.displayName="FormattedMessage",h.defaultProps={values:{}},t.a=h},function(e,t,n){var r=n(485);e.exports=function(e){return r(e)&&e!=+e}},function(e,t,n){"use strict";var r,i=n(0),o=n(3),a=n.n(o),s=new Uint8Array(16);function l(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)}var c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(e){return"string"==typeof e&&c.test(e)},d=[],h=0;h<256;++h)d.push((h+256).toString(16).substr(1));var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n};var p=function(e,t,n){var r=(e=e||{}).random||(e.rng||l)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return f(r)},m=n(68),g=n(84),b=n(1);function v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=p(),S=new Set;class O extends i.Component{constructor(e){super(e),E(this,"handlePreviewMetric",e=>{const{onMetric:t}=this.props;t(w({},e,{type:b.Je}))}),E(this,"handleDataReadyMetric",(e,t)=>{m.a&&this.logUniqueMetric(b.Ie,g.a,e,t)}),E(this,"handleReadyMetric",e=>{if(!m.a)return;const{startMarkName:t}=this.props,n=w({},e,{startMarkName:t});this.logUniqueMetric(b.Ie,g.b,n)}),this.loggerProps={onDataReadyMetric:this.handleDataReadyMetric,onPreviewMetric:this.handlePreviewMetric,onReadyMetric:this.handleReadyMetric}}get uniqueEvents(){return S}get sessionId(){return C}createEventName(e,t){const{source:n}=this.props,r="".concat(n,"::").concat(e);return t?"".concat(r,"::").concat(t):r}hasLoggedEvent(e){return this.uniqueEvents.has(e)}logMetric(e,t,n){const{onMetric:r,source:i}=this.props;r(w({},n,{component:i,name:t,timestamp:this.getTimestamp(),sessionId:this.sessionId,type:e}))}logUniqueMetric(e,t,n,r){const i=this.createEventName(t,r);this.hasLoggedEvent(i)||(this.logMetric(e,t,n),this.uniqueEvents.add(i))}getTimestamp(){return(new Date).toISOString()}render(){const e=this.props,{children:t,onMetric:n,startMarkName:r}=e,o=v(e,["children","onMetric","startMarkName"]);return i.cloneElement(t,w({},o,{logger:this.loggerProps}))}}E(O,"defaultProps",{onMetric:a.a});var k=O;function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var x=e=>t=>i.forwardRef((n,r)=>i.createElement(k,_({},n,{source:e}),i.createElement(t,{ref:r})));n.d(t,"a",(function(){return x}))},function(e,t,n){"use strict";var r=n(0);var i=n(131),o=(n(13),{ASC:"ASC",DESC:"DESC"});function a(e){var t=e.sortDirection,n=Object(i.a)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===o.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===o.DESC});return r.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===o.ASC?r.createElement("path",{d:"M7 14l5-5 5 5z"}):r.createElement("path",{d:"M7 10l5 5 5-5z"}),r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}a.propTypes={};var s=n(191),l=n.n(s);var c=n(83),u=n.n(c),d=n(146),h=n.n(d),f=n(147),p=n.n(f),m=n(148),g=n.n(m),b=n(16),v=n.n(b),y=function(e){function t(){return u()(this,t),h()(this,p()(t).apply(this,arguments))}return g()(t,e),t}(r.Component);v()(y,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,n=e.rowData;return"function"==typeof n.get?n.get(t):n[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:o.ASC,flexGrow:0,flexShrink:1,headerRenderer:function(e){var t=e.dataKey,n=e.label,i=e.sortBy,o=e.sortDirection,s=i===t,l=[r.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof n?n:null},n)];return s&&l.push(r.createElement(a,{key:"SortIndicator",sortDirection:o})),l},headerRole:"columnheader",role:"gridcell",style:{}}),y.propTypes={};var w=n(104),E=n.n(w),C=n(23),S=n.n(C),O=n(40),k=n(337);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(n,!0).forEach((function(t){v()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=function(e){function t(e){var n;return u()(this,t),(n=h()(this,p()(t).call(this,e))).state={scrollbarWidth:0},n._createColumn=n._createColumn.bind(S()(n)),n._createRow=n._createRow.bind(S()(n)),n._onScroll=n._onScroll.bind(S()(n)),n._onSectionRendered=n._onSectionRendered.bind(S()(n)),n._setRef=n._setRef.bind(S()(n)),n}return g()(t,e),E()(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=Object(O.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.className,a=t.disableHeader,s=t.gridClassName,c=t.gridContainerRole,u=t.gridStyle,d=t.headerHeight,h=t.headerRowRenderer,f=t.height,p=t.id,m=t.noRowsRenderer,g=t.role,b=t.rowClassName,v=t.rowStyle,y=t.scrollToIndex,w=t.style,E=t.width,C=this.state.scrollbarWidth,S=a?f:f-d,O="function"==typeof b?b({index:-1}):b,_="function"==typeof v?v({index:-1}):v;return this._cachedColumnStyles=[],r.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=x({overflow:"hidden"},r)})),r.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":r.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Object(i.a)("ReactVirtualized__Table",o),id:p,role:g,style:w},!a&&h({className:Object(i.a)("ReactVirtualized__Table__headerRow",O),columns:this._getHeaderColumns(),style:x({height:d,overflow:"hidden",paddingRight:C,width:E},_)}),r.createElement(k.b,l()({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Object(i.a)("ReactVirtualized__Table__Grid",s),cellRenderer:this._createRow,columnWidth:E,columnCount:1,containerRole:c,height:S,id:void 0,noContentRenderer:m,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:C,scrollToRow:y,style:x({},u,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,o=e.isScrolling,a=e.parent,s=e.rowData,l=e.rowIndex,c=this.props.onColumnClick,u=t.props,d=u.cellDataGetter,h=u.cellRenderer,f=u.className,p=u.columnData,m=u.dataKey,g=u.id,b=u.role,v=h({cellData:d({columnData:p,dataKey:m,rowData:s}),columnData:p,columnIndex:n,dataKey:m,isScrolling:o,parent:a,rowData:s,rowIndex:l}),y=this._cachedColumnStyles[n],w="string"==typeof v?v:null;return r.createElement("div",{"aria-colindex":n+1,"aria-describedby":g,className:Object(i.a)("ReactVirtualized__Table__rowColumn",f),key:"Row"+l+"-Col"+n,onClick:function(e){c&&c({columnData:p,dataKey:m,event:e})},role:b,style:y,title:w},v)}},{key:"_createHeader",value:function(e){var t,n,a,s,l,c=e.column,u=e.index,d=this.props,h=d.headerClassName,f=d.headerStyle,p=d.onHeaderClick,m=d.sort,g=d.sortBy,b=d.sortDirection,v=c.props,y=v.columnData,w=v.dataKey,E=v.defaultSortDirection,C=v.disableSort,S=v.headerRenderer,O=v.headerRole,k=v.id,_=v.label,P=!C&&m,I=Object(i.a)("ReactVirtualized__Table__headerColumn",h,c.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:P}),A=this._getFlexStyleForColumn(c,x({},f,{},c.props.headerStyle)),T=S({columnData:y,dataKey:w,disableSort:C,label:_,sortBy:g,sortDirection:b});if(P||p){var M=g!==w?E:b===o.DESC?o.ASC:o.DESC,D=function(e){P&&m({defaultSortDirection:E,event:e,sortBy:w,sortDirection:M}),p&&p({columnData:y,dataKey:w,event:e})};l=c.props["aria-label"]||_||w,s="none",a=0,t=D,n=function(e){"Enter"!==e.key&&" "!==e.key||D(e)}}return g===w&&(s=b===o.ASC?"ascending":"descending"),r.createElement("div",{"aria-label":l,"aria-sort":s,className:I,id:k,key:"Header-Col"+u,onClick:t,onKeyDown:n,role:O,style:A,tabIndex:a},T)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,o=e.isScrolling,a=e.key,s=e.parent,l=e.style,c=this.props,u=c.children,d=c.onRowClick,h=c.onRowDoubleClick,f=c.onRowRightClick,p=c.onRowMouseOver,m=c.onRowMouseOut,g=c.rowClassName,b=c.rowGetter,v=c.rowRenderer,y=c.rowStyle,w=this.state.scrollbarWidth,E="function"==typeof g?g({index:n}):g,C="function"==typeof y?y({index:n}):y,S=b({index:n}),O=r.Children.toArray(u).map((function(e,r){return t._createColumn({column:e,columnIndex:r,isScrolling:o,parent:s,rowData:S,rowIndex:n,scrollbarWidth:w})})),k=Object(i.a)("ReactVirtualized__Table__row",E),_=x({},l,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:w},C);return v({className:k,columns:O,index:n,isScrolling:o,key:a,onRowClick:d,onRowDoubleClick:h,onRowRightClick:f,onRowMouseOver:p,onRowMouseOut:m,rowData:S,style:_})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=x({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:r.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(r.PureComponent);v()(P,"defaultProps",{disableHeader:!1,estimatedRowSize:30,gridContainerRole:"",headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:k.a,overscanRowCount:10,role:"grid",rowRenderer:function(e){var t=e.className,n=e.columns,i=e.index,o=e.key,a=e.onRowClick,s=e.onRowDoubleClick,c=e.onRowMouseOut,u=e.onRowMouseOver,d=e.onRowRightClick,h=e.rowData,f=e.style,p={"aria-rowindex":i+1};return(a||s||c||u||d)&&(p.tabIndex=0,a&&(p.onClick=function(e){return a({event:e,index:i,rowData:h})}),s&&(p.onDoubleClick=function(e){return s({event:e,index:i,rowData:h})}),c&&(p.onMouseOut=function(e){return c({event:e,index:i,rowData:h})}),u&&(p.onMouseOver=function(e){return u({event:e,index:i,rowData:h})}),d&&(p.onContextMenu=function(e){return d({event:e,index:i,rowData:h})})),r.createElement("div",l()({},p,{className:t,key:o,role:"row",style:f}),n)},headerRowRenderer:function(e){var t=e.className,n=e.columns,i=e.style;return r.createElement("div",{role:"rowgroup",className:"ReactVirtualized__Table__headerRowGroup"},r.createElement("div",{className:t,role:"row",style:i},n))},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),P.propTypes={},n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return P}));t.c=P},function(e,t,n){(function(e){var r=n(42),i=n(400),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l}).call(this,n(163)(e))},function(e,t,n){var r=n(409),i=n(170),o=n(410),a=n(347),s=n(330),l=n(60),c=n(222),u=c(r),d=c(i),h=c(o),f=c(a),p=c(s),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case p:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){"use strict";var r=n(0),i=n(51),o=n.n(i),a=n(4),s=n.n(a),l=n(3),c=n.n(l),u=n(12),d=n.n(u),h=n(1);n(503);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends r.Component{constructor(){super(...arguments),f(this,"menuID",d()("menu")),f(this,"menuButtonID",d()("menubutton")),f(this,"state",{initialFocusIndex:null,isOpen:!1}),f(this,"openMenuAndSetFocusIndex",e=>{this.setState({initialFocusIndex:e,isOpen:!0})}),f(this,"closeMenu",e=>{const{onMenuClose:t=c.a}=this.props;this.setState({isOpen:!1},()=>t(e))}),f(this,"focusButton",()=>{const e=document.getElementById(this.menuButtonID);e&&e.focus()}),f(this,"handleButtonClick",e=>{const{isOpen:t}=this.state;e.stopPropagation(),e.preventDefault(),t?this.closeMenu(e):this.openMenuAndSetFocusIndex(null)}),f(this,"handleButtonKeyDown",e=>{const{isOpen:t}=this.state;switch(e.key){case h.Be.space:case h.Be.enter:case h.Be.arrowDown:e.stopPropagation(),e.preventDefault(),this.openMenuAndSetFocusIndex(0);break;case h.Be.arrowUp:e.stopPropagation(),e.preventDefault(),this.openMenuAndSetFocusIndex(-1);break;case h.Be.escape:t&&e.stopPropagation(),e.preventDefault(),this.closeMenu(e)}}),f(this,"handleMenuClose",(e,t)=>{this.closeMenu(t),this.focusButton()}),f(this,"handleDocumentClick",e=>{const t=document.getElementById(this.menuID),n=document.getElementById(this.menuButtonID);t&&n&&e.target instanceof Node&&!t.contains(e.target)&&!n.contains(e.target)&&this.closeMenu(e)})}componentDidUpdate(e,t){const{useBubble:n}=this.props;if(!t.isOpen&&this.state.isOpen){document.addEventListener("click",this.handleDocumentClick,!n),document.addEventListener("contextmenu",this.handleDocumentClick,!n);const{onMenuOpen:e}=this.props;e&&e()}else t.isOpen&&!this.state.isOpen&&(document.removeEventListener("contextmenu",this.handleDocumentClick,!n),document.removeEventListener("click",this.handleDocumentClick,!n))}componentWillUnmount(){const{useBubble:e}=this.props;this.state.isOpen&&(document.removeEventListener("contextmenu",this.handleDocumentClick,!e),document.removeEventListener("click",this.handleDocumentClick,!e))}render(){const{bodyElement:e,children:t,className:n,constrainToScrollParent:i,constrainToWindow:a,constrainToWindowWithPin:l,isResponsive:c,isRightAligned:u,tetherAttachment:d,tetherTargetAttachment:h}=this.props,{isOpen:f,initialFocusIndex:p}=this.state,m=r.Children.toArray(t);if(2!==m.length)throw new Error("DropdownMenu must have exactly two children: A button component and a <Menu>");const g=m[0],b=m[1],v={id:this.menuButtonID,key:this.menuButtonID,onClick:this.handleButtonClick,onKeyDown:this.handleButtonKeyDown,"aria-expanded":f?"true":"false"};void 0===g.props["aria-haspopup"]&&(v["aria-haspopup"]="true"),f&&(v["aria-controls"]=this.menuID);const y={id:this.menuID,key:this.menuID,initialFocusIndex:p,onClose:this.handleMenuClose,"aria-labelledby":this.menuButtonID};let w="top left",E="bottom left";u&&(w="top right",E="bottom right");const C=[];i&&C.push({to:"scrollParent",attachment:"together"}),a&&C.push({to:"window",attachment:"together"}),l&&C.push({to:"window",attachment:"together",pin:!0});const S=e instanceof HTMLElement?e:document.body;return r.createElement(o.a,{attachment:d||w,bodyElement:S,className:s()({"bdl-DropdownMenu--responsive":c},n),classPrefix:"dropdown-menu",constraints:C,enabled:f,targetAttachment:h||E},r.cloneElement(g,v),f&&r.cloneElement(b,y))}}f(p,"defaultProps",{constrainToScrollParent:!1,constrainToWindow:!1,isResponsive:!1,isRightAligned:!1}),t.a=p},function(e,t,n){"use strict";var r=n(0),i=n(21),o=n.n(i),a=n(4),s=n.n(a),l=n(117);n(504);function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=".menu-item:not([aria-disabled])",h="ul:not(.submenu) > ".concat(d,", ul:not(.submenu) > li > ").concat(d,", ul:not(.submenu) > span > ").concat(d),f="ul.submenu > ".concat(d,", ul.submenu > li > ").concat(d,", ul.submenu > span > ").concat(d);function p(e){e.stopPropagation(),e.preventDefault()}class m extends r.Component{constructor(e){var t;super(e),t=this,u(this,"setInitialFocusIndex",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.props;const{initialFocusIndex:n,isHidden:r}=e;r||void 0===n||("number"==typeof n?setTimeout(()=>{t.setFocus(n)},0):null===n&&setTimeout(()=>{t.menuEl&&t.menuEl.focus()},0))})),u(this,"setMenuItemEls",()=>{const{isSubmenu:e,menuItemSelector:t}=this.props,n=t||(e?f:h);this.menuItemEls=this.menuEl?[].slice.call(this.menuEl.querySelectorAll(n)):[]}),u(this,"getMenuItemElFromEventTarget",e=>{let t=null,n=-1;for(let r=0;r<this.menuItemEls.length;r+=1)if(this.menuItemEls[r].contains(e)){t=this.menuItemEls[r],n=r;break}return{menuItemEl:t,menuIndex:n}}),u(this,"setFocus",e=>{if(!this.menuItemEls.length)return;const t=this.menuItemEls.length;this.focusIndex=e>=t?0:e<0?t-1:e,this.menuItemEls[this.focusIndex].focus()}),u(this,"focusFirstItem",()=>{this.setFocus(0)}),u(this,"focusLastItem",()=>{this.setFocus(-1)}),u(this,"focusNextItem",()=>{this.setFocus(this.focusIndex+1)}),u(this,"focusPreviousItem",()=>{this.setFocus(this.focusIndex-1)}),u(this,"fireOnCloseHandler",(e,t)=>{const{onClose:n}=this.props;n&&n(e,t)}),u(this,"handleClick",e=>{const{menuItemEl:t}=e.target instanceof Node?this.getMenuItemElFromEventTarget(e.target):{};t&&this.fireOnCloseHandler(!1,e)}),u(this,"handleKeyDown",e=>{const{isSubmenu:t,initialFocusIndex:n}=this.props;switch(e.key){case"ArrowDown":p(e),null!==n||this.keyboardPressed?this.focusNextItem():this.focusFirstItem();break;case"ArrowUp":p(e),this.focusPreviousItem();break;case"ArrowLeft":if(!t)return;p(e),this.fireOnCloseHandler(!0,e);break;case"Home":case"PageUp":p(e),this.focusFirstItem();break;case"End":case"PageDown":p(e),this.focusLastItem();break;case"Escape":p(e),this.fireOnCloseHandler(!0,e);break;case"Tab":this.fireOnCloseHandler(!0,e);break;case" ":case"Enter":p(e),e.target instanceof HTMLElement&&e.target.click()}this.keyboardPressed=!0}),this.focusIndex=0,this.menuEl=null,this.menuItemEls=[]}componentDidMount(){this.setMenuItemEls(),this.setInitialFocusIndex()}componentDidUpdate(e){let{isHidden:t,children:n}=e;const{children:i,isHidden:o,isSubmenu:a}=this.props;if(a&&t&&!o&&(this.setMenuItemEls(),this.setInitialFocusIndex(this.props)),r.Children.toArray(n).length!==r.Children.toArray(i).length){const e=this.menuItemEls[this.focusIndex];this.setMenuItemEls();const{menuIndex:t}=this.getMenuItemElFromEventTarget(e),n=-1===t,r=this.focusIndex>=this.menuItemEls.length;this.setFocus(n&&!r?this.focusIndex:t)}}render(){const e=this.props,{children:t,className:n,isHidden:i,setRef:a,shouldOutlineFocus:u}=e,d=c(e,["children","className","isHidden","setRef","shouldOutlineFocus"]),h=o()(d,["onClose","initialFocusIndex","isSubmenu","menuItemSelector"]);return h.className=s()("aria-menu",n,{"is-hidden":i,"should-outline-focus":u}),h.ref=e=>{this.menuEl=e,a&&a(e)},void 0===h.role&&(h.role="menu"),h.tabIndex=-1,h.onClick=this.handleClick,h.onKeyDown=this.handleKeyDown,r.createElement("ul",h,r.createElement(l.a.Provider,{value:{closeMenu:this.fireOnCloseHandler}},t))}}u(m,"defaultProps",{className:"",isSubmenu:!1,isHidden:!1}),t.a=m},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(188);t.a=e=>{let{language:t,messages:n,children:a}=e;return!!t&&!!n?i.a.createElement(o.a,{locale:t,messages:n},a):r.Children.only(a)}},function(e,t,n){"use strict";var r=n(77);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(1);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a={getVersionAction:e=>{let{restored_at:t,trashed_at:n,version_promoted:i}=e,o=r.rg;return n&&(o=r.lg),t&&(o=r.ng),i&&(o=r.mg),o},getVersionUser:e=>{let{modified_by:t,restored_by:n,trashed_by:s,uploader_display_name:l}=e;const c=n||s||t||r.jf,{name:u,id:d}=c;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a(c,["name","id"]),{id:d,name:d===r.jf.id&&l?l:u})}}},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){var r=n(368),i=n(369),o=n(370),a=n(371),s=n(372);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(111);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(73)(Object,"create");e.exports=r},function(e,t,n){var r=n(392);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(224),i=n(404),o=n(88);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(60),i=n(45),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&r(e)==o}},function(e,t,n){"use strict";(function(t){var r=n(32),i=n(452),o=n(238),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?l=n(239):void 0!==t&&"[object process]"===Object.prototype.toString.call(t)&&(l=n(239)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(a)})),e.exports=c}).call(this,n(198))},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";var r=n(0),i=n(4),o=n.n(i),a=n(12),s=n.n(a),l=n(323),c=n(129),u=n(47),d=n(17);n(655);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const p=e=>{let{className:t="",description:n,error:i,errorPosition:a,hideLabel:p,hideOptionalLabel:m,icon:g,inputRef:b,isLoading:v,isRequired:y,isValid:w,label:E,labelTooltip:C,tooltipTetherClassName:S}=e,O=f(e,["className","description","error","errorPosition","hideLabel","hideOptionalLabel","icon","inputRef","isLoading","isRequired","isValid","label","labelTooltip","tooltipTetherClassName"]);const k=!!i,_=o()(t,"text-input-container",{"show-error":k}),x=r.useRef(s()("description")).current,P={"aria-invalid":k,"aria-required":y,"aria-describedby":n?x:void 0};return r.createElement("div",{className:_},r.createElement(c.a,{hideLabel:p,showOptionalText:!m&&!y,text:E,tooltip:C},!!n&&r.createElement("div",{id:x,className:"text-input-description"},n),r.createElement(d.c,{isShown:k,position:a||"middle-right",tetherElementClassName:S,text:i||"",theme:"error"},r.createElement("input",h({ref:b,required:y},P,O))),v&&!w&&r.createElement(u.b,{className:"text-input-loading"}),w&&!v&&r.createElement(l.a,{className:"text-input-verified"}),v||w||!g?null:g))};p.displayName="TextInput",t.a=p},function(e,t,n){"use strict";var r;function i(e){return e.type===r.literal}function o(e){return e.type===r.argument}function a(e){return e.type===r.number}function s(e){return e.type===r.date}function l(e){return e.type===r.time}function c(e){return e.type===r.select}function u(e){return e.type===r.plural}function d(e){return e.type===r.pound}function h(e){return!(!e||"object"!=typeof e||0!==e.type)}function f(e){return!(!e||"object"!=typeof e||1!==e.type)}!function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound"}(r||(r={}));var p,m=(p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},b=function(e){function t(n,r,i,o){var a=e.call(this)||this;return a.message=n,a.expected=r,a.found=i,a.location=o,a.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return m(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(o);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+((a=t)?'"'+r(a)+'"':"end of input")+" found.";var a},t}(Error);var v=function(e,t){t=void 0!==t?t:{};var n,i={},o={start:ut},a=ut,s=function(e){return e.join("")},l=function(e){return g({type:r.literal,value:e},Dt())},c="#",u=rt("#",!1),d=function(){return g({type:r.pound},Dt())},h=ot("argumentElement"),f="{",p=rt("{",!1),m="}",v=rt("}",!1),y=function(e){return g({type:r.argument,value:e},Dt())},w=ot("numberSkeletonId"),E=/^['\/{}]/,C=it(["'","/","{","}"],!1,!1),S={type:"any"},O=ot("numberSkeletonTokenOption"),k="/",_=rt("/",!1),x=function(e){return e},P=ot("numberSkeletonToken"),I=function(e,t){return{stem:e,options:t}},A=function(e){return g({type:0,tokens:e},Dt())},T="::",M=rt("::",!1),D=function(e){return e},R=function(){return Tt.push("numberArgStyle"),!0},j=function(e){return Tt.pop(),e.replace(/\s*$/,"")},N=",",L=rt(",",!1),F="number",z=rt("number",!1),U=function(e,t,n){return g({type:"number"===t?r.number:"date"===t?r.date:r.time,style:n&&n[2],value:e},Dt())},B="'",H=rt("'",!1),V=/^[^']/,W=it(["'"],!0,!1),K=/^[^a-zA-Z'{}]/,q=it([["a","z"],["A","Z"],"'","{","}"],!0,!1),G=/^[a-zA-Z]/,Q=it([["a","z"],["A","Z"]],!1,!1),Y=function(e){return g({type:1,pattern:e},Dt())},$=function(){return Tt.push("dateOrTimeArgStyle"),!0},X="date",Z=rt("date",!1),J="time",ee=rt("time",!1),te="plural",ne=rt("plural",!1),re="selectordinal",ie=rt("selectordinal",!1),oe="offset:",ae=rt("offset:",!1),se=function(e,t,n,i){return g({type:r.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:n?n[2]:0,options:i.reduce((function(e,t){var n=t.id,r=t.value,i=t.location;return n in e&&nt('Duplicate option "'+n+'" in plural element: "'+et()+'"',tt()),e[n]={value:r,location:i},e}),{})},Dt())},le="select",ce=rt("select",!1),ue=function(e,t){return g({type:r.select,value:e,options:t.reduce((function(e,t){var n=t.id,r=t.value,i=t.location;return n in e&&nt('Duplicate option "'+n+'" in select element: "'+et()+'"',tt()),e[n]={value:r,location:i},e}),{})},Dt())},de="=",he=rt("=",!1),fe=function(e){return Tt.push("select"),!0},pe=function(e,t){return Tt.pop(),g({id:e,value:t},Dt())},me=function(e){return Tt.push("plural"),!0},ge=function(e,t){return Tt.pop(),g({id:e,value:t},Dt())},be=ot("whitespace"),ve=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ye=it([["\t","\r"]," ","…"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),we=ot("syntax pattern"),Ee=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,Ce=it([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),Se=ot("optional whitespace"),Oe=ot("number"),ke="-",_e=rt("-",!1),xe=function(e,t){return t?e?-t:t:0},Pe=(ot("apostrophe"),ot("double apostrophes")),Ie="''",Ae=rt("''",!1),Te=function(){return"'"},Me=function(e,t){return e+t.replace("''","'")},De=function(e){return!("{"===e||Mt()&&"#"===e||Tt.length>1&&"}"===e)},Re="\n",je=rt("\n",!1),Ne=function(e){return"{"===e||"}"===e||Mt()&&"#"===e},Le=ot("argNameOrNumber"),Fe=ot("argNumber"),ze="0",Ue=rt("0",!1),Be=function(){return 0},He=/^[1-9]/,Ve=it([["1","9"]],!1,!1),We=/^[0-9]/,Ke=it([["0","9"]],!1,!1),qe=function(e){return parseInt(e.join(""),10)},Ge=ot("argName"),Qe=0,Ye=0,$e=[{line:1,column:1}],Xe=0,Ze=[],Je=0;if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function et(){return e.substring(Ye,Qe)}function tt(){return st(Ye,Qe)}function nt(e,t){throw function(e,t){return new b(e,[],"",t)}(e,t=void 0!==t?t:st(Ye,Qe))}function rt(e,t){return{type:"literal",text:e,ignoreCase:t}}function it(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function ot(e){return{type:"other",description:e}}function at(t){var n,r=$e[t];if(r)return r;for(n=t-1;!$e[n];)n--;for(r={line:(r=$e[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return $e[t]=r,r}function st(e,t){var n=at(e),r=at(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function lt(e){Qe<Xe||(Qe>Xe&&(Xe=Qe,Ze=[]),Ze.push(e))}function ct(e,t,n){return new b(b.buildMessage(e,t),e,t,n)}function ut(){return dt()}function dt(){var e,t;for(e=[],t=ht();t!==i;)e.push(t),t=ht();return e}function ht(){var t;return(t=function(){var e,t;e=Qe,(t=ft())!==i&&(Ye=e,t=l(t));return e=t}())===i&&(t=function(){var t,n,r,o;Je++,t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));n!==i&&St()!==i&&(r=Pt())!==i&&St()!==i?(125===e.charCodeAt(Qe)?(o=m,Qe++):(o=i,0===Je&&lt(v)),o!==i?(Ye=t,n=y(r),t=n):(Qe=t,t=i)):(Qe=t,t=i);Je--,t===i&&(n=i,0===Je&&lt(h));return t}())===i&&(t=function(){var t;(t=function(){var t,n,r,o,a,s,l,c,u;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));n!==i&&St()!==i&&(r=Pt())!==i&&St()!==i?(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i&&St()!==i?(e.substr(Qe,6)===F?(a=F,Qe+=6):(a=i,0===Je&&lt(z)),a!==i&&St()!==i?(s=Qe,44===e.charCodeAt(Qe)?(l=N,Qe++):(l=i,0===Je&&lt(L)),l!==i&&(c=St())!==i&&(u=function(){var t,n,r;t=Qe,e.substr(Qe,2)===T?(n=T,Qe+=2):(n=i,0===Je&&lt(M));n!==i&&(r=function(){var e,t,n;if(e=Qe,t=[],(n=gt())!==i)for(;n!==i;)t.push(n),n=gt();else t=i;t!==i&&(Ye=e,t=A(t));return e=t}())!==i?(Ye=t,n=D(r),t=n):(Qe=t,t=i);t===i&&(t=Qe,Ye=Qe,(n=(n=R())?void 0:i)!==i&&(r=ft())!==i?(Ye=t,n=j(r),t=n):(Qe=t,t=i));return t}())!==i?s=l=[l,c,u]:(Qe=s,s=i),s===i&&(s=null),s!==i&&(l=St())!==i?(125===e.charCodeAt(Qe)?(c=m,Qe++):(c=i,0===Je&&lt(v)),c!==i?(Ye=t,n=U(r,a,s),t=n):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i);return t}())===i&&(t=function(){var t,n,r,o,a,s,l,c,u;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));n!==i&&St()!==i&&(r=Pt())!==i&&St()!==i?(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i&&St()!==i?(e.substr(Qe,4)===X?(a=X,Qe+=4):(a=i,0===Je&&lt(Z)),a===i&&(e.substr(Qe,4)===J?(a=J,Qe+=4):(a=i,0===Je&&lt(ee))),a!==i&&St()!==i?(s=Qe,44===e.charCodeAt(Qe)?(l=N,Qe++):(l=i,0===Je&&lt(L)),l!==i&&(c=St())!==i&&(u=function(){var t,n,r;t=Qe,e.substr(Qe,2)===T?(n=T,Qe+=2):(n=i,0===Je&&lt(M));n!==i&&(r=function(){var t,n,r,o;t=Qe,n=Qe,r=[],(o=bt())===i&&(o=vt());if(o!==i)for(;o!==i;)r.push(o),(o=bt())===i&&(o=vt());else r=i;n=r!==i?e.substring(n,Qe):r;n!==i&&(Ye=t,n=Y(n));return t=n}())!==i?(Ye=t,n=D(r),t=n):(Qe=t,t=i);t===i&&(t=Qe,Ye=Qe,(n=(n=$())?void 0:i)!==i&&(r=ft())!==i?(Ye=t,n=j(r),t=n):(Qe=t,t=i));return t}())!==i?s=l=[l,c,u]:(Qe=s,s=i),s===i&&(s=null),s!==i&&(l=St())!==i?(125===e.charCodeAt(Qe)?(c=m,Qe++):(c=i,0===Je&&lt(v)),c!==i?(Ye=t,n=U(r,a,s),t=n):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i);return t}());return t}())===i&&(t=function(){var t,n,r,o,a,s,l,c,u,d,h;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));if(n!==i)if(St()!==i)if((r=Pt())!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i)if(St()!==i)if(e.substr(Qe,6)===te?(a=te,Qe+=6):(a=i,0===Je&&lt(ne)),a===i&&(e.substr(Qe,13)===re?(a=re,Qe+=13):(a=i,0===Je&&lt(ie))),a!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(s=N,Qe++):(s=i,0===Je&&lt(L)),s!==i)if(St()!==i)if(l=Qe,e.substr(Qe,7)===oe?(c=oe,Qe+=7):(c=i,0===Je&&lt(ae)),c!==i&&(u=St())!==i&&(d=Ot())!==i?l=c=[c,u,d]:(Qe=l,l=i),l===i&&(l=null),l!==i)if((c=St())!==i){if(u=[],(d=wt())!==i)for(;d!==i;)u.push(d),d=wt();else u=i;u!==i&&(d=St())!==i?(125===e.charCodeAt(Qe)?(h=m,Qe++):(h=i,0===Je&&lt(v)),h!==i?(Ye=t,n=se(r,a,l,u),t=n):(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,l,c,u;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));if(n!==i)if(St()!==i)if((r=Pt())!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i)if(St()!==i)if(e.substr(Qe,6)===le?(a=le,Qe+=6):(a=i,0===Je&&lt(ce)),a!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(s=N,Qe++):(s=i,0===Je&&lt(L)),s!==i)if(St()!==i){if(l=[],(c=yt())!==i)for(;c!==i;)l.push(c),c=yt();else l=i;l!==i&&(c=St())!==i?(125===e.charCodeAt(Qe)?(u=m,Qe++):(u=i,0===Je&&lt(v)),u!==i?(Ye=t,n=ue(r,l),t=n):(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;return t}())===i&&(t=function(){var t,n;t=Qe,35===e.charCodeAt(Qe)?(n=c,Qe++):(n=i,0===Je&&lt(u));n!==i&&(Ye=t,n=d());return t=n}()),t}function ft(){var e,t,n;if(e=Qe,t=[],(n=kt())===i&&(n=_t())===i&&(n=xt()),n!==i)for(;n!==i;)t.push(n),(n=kt())===i&&(n=_t())===i&&(n=xt());else t=i;return t!==i&&(Ye=e,t=s(t)),e=t}function pt(){var t,n,r,o,a;if(Je++,t=Qe,n=[],r=Qe,o=Qe,Je++,(a=Et())===i&&(E.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(C))),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i),r!==i)for(;r!==i;)n.push(r),r=Qe,o=Qe,Je++,(a=Et())===i&&(E.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(C))),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i);else n=i;return t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(w)),t}function mt(){var t,n,r;return Je++,t=Qe,47===e.charCodeAt(Qe)?(n=k,Qe++):(n=i,0===Je&&lt(_)),n!==i&&(r=pt())!==i?(Ye=t,t=n=x(r)):(Qe=t,t=i),Je--,t===i&&(n=i,0===Je&&lt(O)),t}function gt(){var e,t,n,r;if(Je++,e=Qe,St()!==i)if((t=pt())!==i){for(n=[],r=mt();r!==i;)n.push(r),r=mt();n!==i?(Ye=e,e=I(t,n)):(Qe=e,e=i)}else Qe=e,e=i;else Qe=e,e=i;return Je--,e===i&&(i,0===Je&&lt(P)),e}function bt(){var t,n,r,o;if(t=Qe,39===e.charCodeAt(Qe)?(n=B,Qe++):(n=i,0===Je&&lt(H)),n!==i){if(r=[],(o=kt())===i&&(V.test(e.charAt(Qe))?(o=e.charAt(Qe),Qe++):(o=i,0===Je&&lt(W))),o!==i)for(;o!==i;)r.push(o),(o=kt())===i&&(V.test(e.charAt(Qe))?(o=e.charAt(Qe),Qe++):(o=i,0===Je&&lt(W)));else r=i;r!==i?(39===e.charCodeAt(Qe)?(o=B,Qe++):(o=i,0===Je&&lt(H)),o!==i?t=n=[n,r,o]:(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;if(t===i)if(t=[],(n=kt())===i&&(K.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(q))),n!==i)for(;n!==i;)t.push(n),(n=kt())===i&&(K.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(q)));else t=i;return t}function vt(){var t,n;if(t=[],G.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(Q)),n!==i)for(;n!==i;)t.push(n),G.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(Q));else t=i;return t}function yt(){var t,n,r,o,a;return t=Qe,St()!==i&&(n=At())!==i&&St()!==i?(123===e.charCodeAt(Qe)?(r=f,Qe++):(r=i,0===Je&&lt(p)),r!==i?(Ye=Qe,(fe(n)?void 0:i)!==i&&(o=dt())!==i?(125===e.charCodeAt(Qe)?(a=m,Qe++):(a=i,0===Je&&lt(v)),a!==i?(Ye=t,t=pe(n,o)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i),t}function wt(){var t,n,r,o,a;return t=Qe,St()!==i&&(n=function(){var t,n,r,o;return t=Qe,n=Qe,61===e.charCodeAt(Qe)?(r=de,Qe++):(r=i,0===Je&&lt(he)),r!==i&&(o=Ot())!==i?n=r=[r,o]:(Qe=n,n=i),(t=n!==i?e.substring(t,Qe):n)===i&&(t=At()),t}())!==i&&St()!==i?(123===e.charCodeAt(Qe)?(r=f,Qe++):(r=i,0===Je&&lt(p)),r!==i?(Ye=Qe,(me(n)?void 0:i)!==i&&(o=dt())!==i?(125===e.charCodeAt(Qe)?(a=m,Qe++):(a=i,0===Je&&lt(v)),a!==i?(Ye=t,t=ge(n,o)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i),t}function Et(){var t;return Je++,ve.test(e.charAt(Qe))?(t=e.charAt(Qe),Qe++):(t=i,0===Je&&lt(ye)),Je--,t===i&&(i,0===Je&&lt(be)),t}function Ct(){var t;return Je++,Ee.test(e.charAt(Qe))?(t=e.charAt(Qe),Qe++):(t=i,0===Je&&lt(Ce)),Je--,t===i&&(i,0===Je&&lt(we)),t}function St(){var t,n,r;for(Je++,t=Qe,n=[],r=Et();r!==i;)n.push(r),r=Et();return t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(Se)),t}function Ot(){var t,n,r;return Je++,t=Qe,45===e.charCodeAt(Qe)?(n=ke,Qe++):(n=i,0===Je&&lt(_e)),n===i&&(n=null),n!==i&&(r=It())!==i?(Ye=t,t=n=xe(n,r)):(Qe=t,t=i),Je--,t===i&&(n=i,0===Je&&lt(Oe)),t}function kt(){var t,n;return Je++,t=Qe,e.substr(Qe,2)===Ie?(n=Ie,Qe+=2):(n=i,0===Je&&lt(Ae)),n!==i&&(Ye=t,n=Te()),Je--,(t=n)===i&&(n=i,0===Je&&lt(Pe)),t}function _t(){var t,n,r,o,a,s;if(t=Qe,39===e.charCodeAt(Qe)?(n=B,Qe++):(n=i,0===Je&&lt(H)),n!==i)if((r=function(){var t,n,r,o;t=Qe,n=Qe,e.length>Qe?(r=e.charAt(Qe),Qe++):(r=i,0===Je&&lt(S));r!==i?(Ye=Qe,(o=(o=Ne(r))?void 0:i)!==i?n=r=[r,o]:(Qe=n,n=i)):(Qe=n,n=i);t=n!==i?e.substring(t,Qe):n;return t}())!==i){for(o=Qe,a=[],e.substr(Qe,2)===Ie?(s=Ie,Qe+=2):(s=i,0===Je&&lt(Ae)),s===i&&(V.test(e.charAt(Qe))?(s=e.charAt(Qe),Qe++):(s=i,0===Je&&lt(W)));s!==i;)a.push(s),e.substr(Qe,2)===Ie?(s=Ie,Qe+=2):(s=i,0===Je&&lt(Ae)),s===i&&(V.test(e.charAt(Qe))?(s=e.charAt(Qe),Qe++):(s=i,0===Je&&lt(W)));(o=a!==i?e.substring(o,Qe):a)!==i?(39===e.charCodeAt(Qe)?(a=B,Qe++):(a=i,0===Je&&lt(H)),a===i&&(a=null),a!==i?(Ye=t,t=n=Me(r,o)):(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;else Qe=t,t=i;return t}function xt(){var t,n,r,o;return t=Qe,n=Qe,e.length>Qe?(r=e.charAt(Qe),Qe++):(r=i,0===Je&&lt(S)),r!==i?(Ye=Qe,(o=(o=De(r))?void 0:i)!==i?n=r=[r,o]:(Qe=n,n=i)):(Qe=n,n=i),n===i&&(10===e.charCodeAt(Qe)?(n=Re,Qe++):(n=i,0===Je&&lt(je))),t=n!==i?e.substring(t,Qe):n}function Pt(){var t,n;return Je++,t=Qe,(n=It())===i&&(n=At()),t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(Le)),t}function It(){var t,n,r,o,a;if(Je++,t=Qe,48===e.charCodeAt(Qe)?(n=ze,Qe++):(n=i,0===Je&&lt(Ue)),n!==i&&(Ye=t,n=Be()),(t=n)===i){if(t=Qe,n=Qe,He.test(e.charAt(Qe))?(r=e.charAt(Qe),Qe++):(r=i,0===Je&&lt(Ve)),r!==i){for(o=[],We.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(Ke));a!==i;)o.push(a),We.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(Ke));o!==i?n=r=[r,o]:(Qe=n,n=i)}else Qe=n,n=i;n!==i&&(Ye=t,n=qe(n)),t=n}return Je--,t===i&&(n=i,0===Je&&lt(Fe)),t}function At(){var t,n,r,o,a;if(Je++,t=Qe,n=[],r=Qe,o=Qe,Je++,(a=Et())===i&&(a=Ct()),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i),r!==i)for(;r!==i;)n.push(r),r=Qe,o=Qe,Je++,(a=Et())===i&&(a=Ct()),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i);else n=i;return t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(Ge)),t}var Tt=["root"];function Mt(){return"plural"===Tt[Tt.length-1]}function Dt(){return t&&t.captureLocation?{location:tt()}:{}}if((n=a())!==i&&Qe===e.length)return n;throw n!==i&&Qe<e.length&&lt({type:"end"}),ct(Ze,Xe<e.length?e.charAt(Xe):null,Xe<e.length?st(Xe,Xe+1):st(Xe,Xe))},y=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},w=/(^|[^\\])#/g;function E(e,t){var n=v(e,t);return t&&!1===t.normalizeHashtagInPlural||function e(t){t.forEach((function(t){(u(t)||c(t))&&Object.keys(t.options).forEach((function(n){for(var r,o=t.options[n],a=-1,s=void 0,l=0;l<o.value.length;l++){var c=o.value[l];if(i(c)&&w.test(c.value)){a=l,s=c;break}}if(s){var u=s.value.replace(w,"$1{"+t.value+", number}"),d=v(u);(r=o.value).splice.apply(r,y([a,1],d))}e(o.value)}))}))}(n),n}var C=n(49),S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},O=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function k(e){var t={};return e.replace(O,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead")}return""})),t}var _=/^\.(?:(0+)(\+|#+)?)?$/g,x=/^(@+)?(\+|#+)?$/g;function P(e){var t={};return e.replace(x,(function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function I(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function A(e){var t=I(e);return t||{}}function T(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":t.style="percent";continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":t.useGrouping=!1;continue;case"precision-integer":t.maximumFractionDigits=0;continue;case"measure-unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=S(S(S({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return S(S({},e),A(t))}),{}));continue;case"engineering":t=S(S(S({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return S(S({},e),A(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue}if(_.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(_,(function(e,n,r){return"."===e?t.maximumFractionDigits=0:"+"===r?t.minimumFractionDigits=r.length:"#"===n[0]?t.maximumFractionDigits=n.length:(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length+("string"==typeof r?r.length:0)),""})),i.options.length&&(t=S(S({},t),P(i.options[0])))}else if(x.test(i.stem))t=S(S({},t),P(i.stem));else{var o=I(i.stem);o&&(t=S(S({},t),o))}}return t}var M,D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},j=function(e){function t(t,n){var r=e.call(this,t)||this;return r.variableId=n,r}return D(t,e),t}(Error);function N(e,t,n,r,p,m,g){if(1===e.length&&i(e[0]))return[{type:0,value:e[0].value}];for(var b,v=[],y=0,w=e;y<w.length;y++){var E=w[y];if(i(E))v.push({type:0,value:E.value});else if(d(E))"number"==typeof m&&v.push({type:0,value:n.getNumberFormat(t).format(m)});else{var C=E.value;if(!(p&&C in p))throw new j('The intl string context variable "'+C+'" was not provided to the string "'+g+'"');var S=p[C];if(o(E))S&&"string"!=typeof S&&"number"!=typeof S||(S="string"==typeof S||"number"==typeof S?String(S):""),v.push({type:1,value:S});else if(s(E)){var O="string"==typeof E.style?r.date[E.style]:void 0;v.push({type:0,value:n.getDateTimeFormat(t,O).format(S)})}else if(l(E)){O="string"==typeof E.style?r.time[E.style]:f(E.style)?k(E.style.pattern):void 0;v.push({type:0,value:n.getDateTimeFormat(t,O).format(S)})}else if(a(E)){O="string"==typeof E.style?r.number[E.style]:h(E.style)?T(E.style.tokens):void 0;v.push({type:0,value:n.getNumberFormat(t,O).format(S)})}else if(c(E)){if(!(_=E.options[S]||E.options.other))throw new RangeError('Invalid values for "'+E.value+'": "'+S+'". Options are "'+Object.keys(E.options).join('", "')+'"');v.push.apply(v,N(_.value,t,n,r,p))}else if(u(E)){var _;if(!(_=E.options["="+S])){if(!Intl.PluralRules)throw new j('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n');var x=n.getPluralRules(t,{type:E.pluralType}).select(S-(E.offset||0));_=E.options[x]||E.options.other}if(!_)throw new RangeError('Invalid values for "'+E.value+'": "'+S+'". Options are "'+Object.keys(E.options).join('", "')+'"');v.push.apply(v,N(_.value,t,n,r,p,S-(E.offset||0)))}else;}}return(b=v).length<2?b:b.reduce((function(e,t){var n=e[e.length-1];return n&&0===n.type&&0===t.type?n.value+=t.value:e.push(t),e}),[])}var L="@@",F=/@@(\d+_\d+)@@/g,z=0;function U(e,t){return e.split(F).filter(Boolean).map((function(e){return null!=t[e]?t[e]:e})).reduce((function(e,t){return e.length&&"string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e}),[])}var B=/(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,H=Date.now()+"@@",V=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function W(e,t,n,r,i,o){var a=N(e,t,n,r,i,void 0,o),s={},l=a.reduce((function(e,t){if(0===t.type)return e+t.value;var n=Date.now()+"_"+ ++z;return s[n]=t.value,e+""+L+n+L}),"");if(!B.test(l))return U(l,s);if(!i)throw new j("Message has placeholders but no values was given");if("undefined"==typeof DOMParser)throw new j("Cannot format XML message without DOMParser");M||(M=new DOMParser);var c=M.parseFromString('<formatted-message id="'+H+'">'+l+"</formatted-message>","text/html").getElementById(H);if(!c)throw new j("Malformed HTML message "+l);var u=Object.keys(i).filter((function(e){return!!c.getElementsByTagName(e).length}));if(!u.length)return U(l,s);var d=u.filter((function(e){return e!==e.toLowerCase()}));if(d.length)throw new j("HTML tag must be lowercased but the following tags are not: "+d.join(", "));return Array.prototype.slice.call(c.childNodes).reduce((function(e,t){return e.concat(function e(t,n,r){var i=t.tagName,o=t.outerHTML,a=t.textContent,s=t.childNodes;if(!i)return U(a||"",n);i=i.toLowerCase();var l=~V.indexOf(i),c=r[i];if(c&&l)throw new j(i+" is a self-closing tag and can not be used, please use another tag name.");if(!s.length)return[o];var u=Array.prototype.slice.call(s).reduce((function(t,i){return t.concat(e(i,n,r))}),[]);return c?"function"==typeof c?[c.apply(void 0,u)]:[c]:R(["<"+i+">"],u,["</"+i+">"])}(t,s,i))}),[])}var K=function(){return(K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function q(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?K(K(K({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=K(K({},i[t]),o[t]||{}),e}),{})):i),n}),K({},e)):e}var G=function(){function e(t,n,r,i){var o,a=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){return function(e,t,n,r,i,o){var a=N(e,t,n,r,i,void 0,o);return 1===a.length?a[0].value:a.reduce((function(e,t){return e+t.value}),"")}(a.ast,a.locales,a.formatters,a.formats,e,a.message)},this.formatToParts=function(e){return N(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.formatHTMLMessage=function(e){return W(a.ast,a.locales,a.formatters,a.formats,e,a.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{normalizeHashtagInPlural:!1})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=q(e.formats,r),this.locales=n,this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Object(C.a)(Intl.NumberFormat,o.number),getDateTimeFormat:Object(C.a)(Intl.DateTimeFormat,o.dateTime),getPluralRules:Object(C.a)(Intl.PluralRules,o.pluralRules)})}return e.defaultLocale=(new Intl.NumberFormat).resolvedOptions().locale,e.__parse=E,e.formats={number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();t.a=G},function(e,t,n){"use strict";var r=n(0),i=n(155);n(506);t.a=e=>{let{children:t}=e;return r.createElement("span",{className:"menu-toggle"},t,r.createElement(i.a,{className:"toggle-arrow",width:7}))}},function(e,t,n){"use strict";var r=n(817),i=n(819),o=n(820),a=n(821);function s(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return!!t&&(o=r?r(o):o,i.contains(o,t))}function l(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}var c={isBrowser:function(e){return s(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return s(r.browserArchitecture,null,e)},isDevice:function(e){return s(r.deviceName,null,e)},isEngine:function(e){return s(r.engineName,r.engineVersion,e)},isPlatform:function(e){return s(r.platformName,r.platformFullVersion,e,l)},isPlatformArchitecture:function(e){return s(r.platformArchitecture,null,e)}};e.exports=o(c,a)},function(e,t,n){"use strict";var r=n(0),i=n(12),o=n.n(i),a=n(51),s=n.n(a);n(443);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let d;!function(e){e.BOTTOM_CENTER="bottom-center",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.MIDDLE_CENTER="middle-center",e.MIDDLE_LEFT="middle-left",e.MIDDLE_RIGHT="middle-right",e.TOP_CENTER="top-center",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right"}(d||(d={}));const h={[d.BOTTOM_CENTER]:{attachment:"top center",targetAttachment:"bottom center"},[d.BOTTOM_LEFT]:{attachment:"top left",targetAttachment:"bottom left"},[d.BOTTOM_RIGHT]:{attachment:"top right",targetAttachment:"bottom right"},[d.MIDDLE_CENTER]:{attachment:"middle center",targetAttachment:"middle center"},[d.MIDDLE_LEFT]:{attachment:"middle right",targetAttachment:"middle left"},[d.MIDDLE_RIGHT]:{attachment:"middle left",targetAttachment:"middle right"},[d.TOP_CENTER]:{attachment:"bottom center",targetAttachment:"top center"},[d.TOP_LEFT]:{attachment:"bottom left",targetAttachment:"top left"},[d.TOP_RIGHT]:{attachment:"bottom right",targetAttachment:"top right"}};class f extends r.Component{constructor(){super(...arguments),u(this,"tetherRef",r.createRef()),u(this,"radarAnimationID",o()("radarAnimation")),u(this,"position",()=>{const{isShown:e}=this.props;this.tetherRef.current&&e&&this.tetherRef.current.position()})}render(){const e=this.props,{children:t,className:n="",constrainToScrollParent:i,constrainToWindow:o,position:a,isShown:u,offset:d,tetherElementClassName:f}=e,p=c(e,["children","className","constrainToScrollParent","constrainToWindow","position","isShown","offset","tetherElementClassName"]),m=[];i&&m.push({to:"scrollParent",attachment:"together"}),o&&m.push({to:"window",attachment:"together"});const{attachment:g,targetAttachment:b}=h[a],v=r.Children.only(t),y=r.cloneElement(v,{"aria-describedby":this.radarAnimationID}),w={attachment:g,classPrefix:"radar-animation",constraints:m,targetAttachment:b};return f&&(w.className=f),d&&(w.offset=d),r.createElement(s.a,l({ref:this.tetherRef},w),y,u&&r.createElement("div",l({className:"radar ".concat(n),id:this.radarAnimationID},p),r.createElement("div",{className:"radar-dot"}),r.createElement("div",{className:"radar-circle"})))}}u(f,"defaultProps",{constrainToScrollParent:!1,constrainToWindow:!0,isShown:!0,position:d.MIDDLE_RIGHT});var p=f;n.d(t,"a",(function(){return p}))},function(e,t,n){var r=n(686),i=n(23);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(8),i=n.n(r);n(314);function o(e,t){return!!i()(e,t,!1)}function a(e,t){return i()(e,t,{})}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="data-resin-target"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}));const r="auto",i="bottom-end",o="bottom-start"},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";var r={},i=Math.pow(2,24);e.exports=function(){for(var e=void 0;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*i).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000",height:o=6,title:a,width:s=10}=e;return r.createElement(i.a,{className:"icon-caret-down ".concat(t),height:o,title:a,viewBox:"0 0 10 6",width:s},r.createElement("path",{className:"fill-color",d:"M0 .5l5 5 5-5H0z",fill:n,fillRule:"evenodd"}))}},function(e,t,n){"use strict";var r=n(0);const i=r.createContext({});t.a=i},function(e,t,n){"use strict";var r=n(252);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(321),i=n(0);n(4),n(219);var o,a,s;class l extends i.Component{render(){const{title:e,children:t,className:n}=this.props;return i.createElement("div",{className:"link-group ".concat(n)},e?i.createElement("div",{className:"link-group-title"},e):null,i.createElement("ul",null,i.Children.map(t,(e,t)=>e?i.createElement("li",{key:t},e," "):null)))}}s={title:"",className:""},(a="defaultProps")in(o=l)?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s;n.d(t,"a",(function(){return r.a}))},function(e,t,n){var r=n(348),i=n(88),o=n(269),a=n(313),s=n(466),l=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var u=e.length;return n<0&&(n=l(u+n,0)),o(e)?n<=u&&e.indexOf(t,n)>-1:!!u&&r(e,t,n)>-1}},function(e,t,n){"use strict";t.a="__clear__"},function(e,t,n){"use strict";var r=n(79);const i=Object(r.defineMessages)({clearAll:{id:"boxui.selectField.clearAll",defaultMessage:"Clear All"},searchPlaceholder:{id:"boxui.selectField.searchPlaceholder",defaultMessage:"Search"},noResults:{id:"boxui.selectField.noResults",defaultMessage:"No Results"}});t.a=i},function(e,t,n){var r=n(132),i=n(373),o=n(374),a=n(375),s=n(376),l=n(377);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(401),i=n(175),o=n(176),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},function(e,t,n){"use strict";var r=n(0),i=n(31);function o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{const t=t=>{let{isLoading:n=!1,loadingIndicatorProps:a={}}=t,s=o(t,["isLoading","loadingIndicatorProps"]);return n?r.createElement(i.b,a):r.createElement(e,s)};return t.displayName="Loadable".concat(e.displayName||e.name||"Component"),t}},function(e,t,n){"use strict";var r=n(0),i=n(280),o=n(281),a=n(282),s=n(283),l=n(211),c=n(284),u=n(285),d=n(286),h=n(287),f=n(288),p=n(289),m=n(290),g=n(291),b=n(292),v=n(293),y=n(294),w=n(295),E=n(296),C=n(297),S=n(298),O=n(299),k=n(207),_=n(300),x=n(301),P=n(212),I=n(302),A=n(303),T=n(304),M=n(305);const D={IconFileAudio:i.a,IconFileBoxCanvas:o.a,IconFileBoxNote:a.a,IconFileCode:s.a,IconFileDefault:l.a,IconFileDocument:k.a,IconFileDwg:c.a,IconFileExcelSpreadsheet:u.a,IconFileGoogleDocs:d.a,IconFileGoogleSheets:h.a,IconFileGoogleSlides:f.a,IconFileIllustrator:p.a,IconFileImage:m.a,IconFileIndesign:g.a,IconFileKeynote:b.a,IconFileNumbers:v.a,IconFilePages:y.a,IconFilePDF:w.a,IconFilePhotoshop:E.a,IconFilePowerpointPresentation:C.a,IconFilePresentation:S.a,IconFileSpreadsheet:O.a,IconFileText:k.a,IconFileThreeD:_.a,IconFileVector:x.a,IconFileVideo:P.a,IconFileWordDocument:I.a,IconFileXbd:A.a,IconFileXdw:T.a,IconFileZip:M.a},R=e=>e.reduce((e,t)=>(e[t]=t,e),{}),j={IconFileAudio:R(["aac","aif","aifc","aiff","amr","au","flac","m3u","m4a","mid","mp3","ra","wav","wma","wpl"]),IconFileBoxCanvas:R(["boxcanvas"]),IconFileBoxNote:R(["boxnote"]),IconFileCode:R(["as","as3","asm","aspx","c","cpp","bat","c","cc","cmake","cs","css","cxx","db","diff","erb","groovy","h","haml","hh","htm","html","java","js","less","m","make","md","ml","mm","php","pl","plist","properties","py","rb","sass","scala","script","scm","sml","sql","sh","wabba","yaml"]),IconFileDocument:R(["dot","dotx","msg","odt","rtf","wpd","xhtml","xml","xsd","xsl"]),IconFileDwg:R(["dwg","dwgzip"]),IconFileExcelSpreadsheet:R(["xls","xlsx","xlsm","xlsb"]),IconFileGoogleDocs:R(["gdoc"]),IconFileGoogleSheets:R(["gsheet"]),IconFileGoogleSlides:R(["gslide","gslides"]),IconFileVector:R(["eps"]),IconFileIllustrator:R(["ai"]),IconFileIndesign:R(["idml","indd","indt","inx"]),IconFileKeynote:R(["key"]),IconFileNumbers:R(["numbers"]),IconFilePages:R(["pages"]),IconFileImage:R(["bmp","gif","gdraw","jpeg","jpg","png","ps","svs","svg","tif","tiff","heic","heif"]),IconFilePDF:R(["pdf"]),IconFilePresentation:R(["odp","otp","pot","potx"]),IconFilePowerpointPresentation:R(["ppt","pptx","pptm"]),IconFilePhotoshop:R(["psd"]),IconFileSpreadsheet:R(["csv","ods","tsv","xlt","xltx"]),IconFileText:R(["txt","vi","vim","webdoc"]),IconFileThreeD:R(["3ds","dae","fbx","obj","ply","stl"]),IconFileVideo:R(["3g2","3gp","avi","flv","m2v","m2ts","m4v","mkv","mov","mp4","mpeg","mpg","ogg","mts","qt","wmv"]),IconFileWordDocument:R(["docx","doc","docm"]),IconFileXbd:R(["xbd"]),IconFileXdw:R(["xdw"]),IconFileZip:R(["rar","tgz","zip"])};t.a=e=>{let{dimension:t=32,extension:n="",title:i}=e;const o=D[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=Object.keys(j).filter(t=>!!j[t][e.toLowerCase()])[0];return t||"IconFileDefault"}(n)];return r.createElement(o,{height:t,title:i,width:t})}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=20,title:a,width:s=20}=e;return r.createElement(i.a,{className:"icon-ellipsis ".concat(t),height:o,title:a,viewBox:"0 0 10 2",width:s},r.createElement("path",{className:"fill-color",d:"M1 2c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zm8 0c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zM5 2c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z",fill:n,fillRule:"evenodd"}))}},function(e,t,n){"use strict";var r=n(0);var i=e=>{let{className:t="",url:n,onError:i}=e;return r.createElement("img",{alt:"",className:"avatar-image ".concat(t),onError:e=>{"function"==typeof i&&i(e)},src:n})},o=n(2);var a=e=>{let{className:t="",id:n=0,name:i}=e;const a=(parseInt(n,10)||0)%o.a.length;return r.createElement("span",{className:"avatar-initials ".concat(t),"data-bg-idx":a},(e=>{const t=e.replace(/[[({<]+.*[\])}>]+/g,"").trim();return(t.slice(0,1)+t.slice(t.lastIndexOf(" ")+1,t.lastIndexOf(" ")+2)).toUpperCase()})(i))},s=n(9);var l=e=>{let{className:t="",height:n=28,title:i,width:a=28}=e;return r.createElement(s.a,{className:"unknown-user-avatar ".concat(t),height:n,title:i,viewBox:"0 0 16 16",width:a},r.createElement("path",{fill:o.k,fillRule:"evenodd",d:"M8 0a8 8 0 110 16A8 8 0 018 0zm0 9.5c-1.21 0-2.293.413-3.232 1.096-.56.407-.953.817-1.168 1.104a.5.5 0 00.8.6c.035-.047.114-.141.234-.267.205-.214.447-.428.722-.629.78-.567 1.665-.904 2.644-.904.979 0 1.865.337 2.644.904.275.2.517.415.722.63.12.125.199.219.234.266a.5.5 0 00.8-.6c-.215-.287-.607-.697-1.168-1.104C10.293 9.913 9.21 9.5 8 9.5zm0-6a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm0 1a1.5 1.5 0 11-.001 3.001A1.5 1.5 0 018 4.5z"}))},c=n(54),u=n(4),d=n.n(u),h=n(271);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=e=>r.createElement(s.a,f({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:o.k,fillRule:"evenodd",d:"M8 0a7.988 7.988 0 00-5.662 2.338A7.992 7.992 0 000 8a7.988 7.988 0 002.338 5.662A7.992 7.992 0 008 16a7.988 7.988 0 005.662-2.338A7.992 7.992 0 0016 8a7.988 7.988 0 00-2.338-5.662A7.992 7.992 0 008 0zm-.862 14.4C4.062 13.908 1.6 11.323 1.6 8c0-.492.123-.984.123-1.477L5.54 10.34v.861c0 .862.738 1.6 1.6 1.6v1.6zm5.539-2.092c-.247-.616-.861-1.108-1.477-1.108h-.862V8.738c0-.368-.246-.738-.738-.738H4.8V6.4h1.6c.492 0 .862-.37.862-.862V4.062h1.6c.861 0 1.6-.739 1.6-1.6v-.37C12.8 3.077 14.4 5.292 14.4 8c0 1.723-.616 3.2-1.723 4.308z"})),m=n(79);var g=Object(m.defineMessages)({externalUser:{id:"boxui.avatar.externalUser",defaultMessage:"External user"}});n(645);const b={small:!0,large:!0};var v=Object(c.c)((function(e){let{avatarUrl:t,badgeIcon:n,className:o,name:s,id:c,intl:u,isExternal:f,shouldShowExternal:m=!1,size:v=""}=e;const{formatMessage:y}=u,[w,E]=r.useState(!1),[C,S]=r.useState(null),O=d()(["avatar",o,{["avatar--".concat(v)]:v&&b[v],"avatar--isExternal":m&&f,"avatar--iconBadge":!!n}]);let k;t!==C&&(E(!1),S(t)),k=t&&!w?r.createElement(i,{onError:()=>{E(!0)},url:t}):s?r.createElement(a,{id:c,name:s}):r.createElement(l,{className:"avatar-icon"});let _=null;return m&&f?_=r.createElement(p,{className:"bdl-Avatar-externalBadge",title:y(g.externalUser)}):n&&(_=r.createElement("div",{className:"bdl-Avatar-badge bdl-Avatar-iconBadge"},n)),r.createElement(h.a,{className:O,bottomRight:_},r.createElement("span",null,k))}));n.d(t,"a",(function(){return v}))},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(73)(n(42),"Map");e.exports=r},function(e,t,n){var r=n(60),i=n(39),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==a||t==s||t==o||t==l}},function(e,t,n){var r=n(173),i=n(111),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(223);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(221),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(163)(e))},function(e,t,n){var r=n(407),i=n(227),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(225)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(309);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var r=n(434),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var b=a[g];if(!(o[b]||r&&r[b]||m&&m[b]||s&&s[b])){var v=h(n,b);try{c(t,b,v)}catch(e){}}}}return t}},function(e,t,n){var r=n(445),i=n(311);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){"use strict";var r=n(319);n.d(t,"a",(function(){return r.a}));var i=n(320);n.d(t,"b",(function(){return i.a}));n(270)},function(e,t,n){"use strict";var r=n(795);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(2);t.a=e=>{let{className:t="",color:n=o.l,height:a=14,title:s,width:l=14}=e;return r.createElement(i.a,{className:"icon-edit ".concat(t),height:a,title:s,viewBox:"0 0 14 14",width:l},r.createElement("path",{className:"fill-color",d:"M3.21 7.89l6.47-6.48a2 2 0 0 1 2.88 2.78h-.05L6 10.72 3.21 7.89zM2.24 9l2.83 2.83L1.67 13c-.52.18-.79-.1-.62-.61z",fill:n}))}},function(e,t,n){"use strict";var r=n(0),i=n(119),o=n(204),a=n(96),s=n(115);function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>t=>{let{maskError:n,inlineError:c,errorCode:u}=t,d=l(t,["maskError","inlineError","errorCode"]);return n?r.createElement(s.a,null,r.createElement(o.a,{errorHeader:r.createElement(i.a,n.errorHeader),errorSubHeader:n.errorSubHeader?r.createElement(i.a,n.errorSubHeader):void 0})):c?r.createElement(r.Fragment,null,r.createElement(a.a,{title:r.createElement(i.a,c.title)},r.createElement(i.a,c.content)),r.createElement(e,d)):r.createElement(e,d)}},function(e,t,n){"use strict";var r=n(0),i=n(54),o=n(11);const a=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay"];function s(e,t){let{locale:n,formats:r,onError:i}=e,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:l}=s,c=l&&Object(o.g)(r,"number",l,i)||{};return t(n,Object(o.f)(s,a,c))}function l(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return s(e,t,r).format(n)}catch(t){e.onError(Object(o.b)("Error formatting number.",t))}return String(n)}function c(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return s(e,t,r).formatToParts(n)}catch(t){e.onError(Object(o.b)("Error formatting number.",t))}return[]}const u=["numeric","style"];function d(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r||(r="second"),Intl.RelativeTimeFormat||e.onError(Object(o.b)('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n'));try{return function(e,t){let{locale:n,formats:r,onError:i}=e,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:s}=a,l=!!s&&Object(o.g)(r,"relative",s,i)||{};return t(n,Object(o.f)(a,u,l))}(e,t,i).format(n,r)}catch(t){e.onError(Object(o.b)("Error formatting relative time.",t))}return String(n)}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const f=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function p(e,t,n){let{locale:r,formats:i,onError:a,timeZone:s}=e,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{format:c}=l,u=h(h({},s&&{timeZone:s}),c&&Object(o.g)(i,t,c,a));let d=Object(o.f)(l,f,u);return"time"!==t||d.hour||d.minute||d.second||(d=h(h({},d),{hour:"numeric",minute:"numeric"})),n(r,d)}function m(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"date",t,r).format(i)}catch(t){e.onError(Object(o.b)("Error formatting date.",t))}return String(i)}function g(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"time",t,r).format(i)}catch(t){e.onError(Object(o.b)("Error formatting time.",t))}return String(i)}function b(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"date",t,r).formatToParts(i)}catch(t){e.onError(Object(o.b)("Error formatting date.",t))}return[]}function v(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"time",t,r).formatToParts(i)}catch(t){e.onError(Object(o.b)("Error formatting time.",t))}return[]}const y=["localeMatcher","type"];function w(e,t,n){let{locale:r,onError:i}=e,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Intl.PluralRules||i(Object(o.b)('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n'));const s=Object(o.f)(a,y);try{return t(r,s).select(n)}catch(e){i(Object(o.b)("Error formatting plural.",e))}return"other"}var E=n(107),C=n(85),S=n.n(C);const O=["localeMatcher","type","style"],k=Date.now();function _(e,t,n){let{locale:r,onError:i}=e,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Intl.ListFormat||i(Object(o.b)('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n'));const s=Object(o.f)(a,O);try{const e={},i=n.map((t,n)=>{if("object"==typeof t){const r=function(e){return"".concat(k,"_").concat(e,"_").concat(k)}(n);return e[r]=t,r}return String(t)});return Object.keys(e).length?t(r,s).formatToParts(i).reduce((t,n)=>{const r=n.value;return e[r]?t.push(e[r]):"string"==typeof t[t.length-1]?t[t.length-1]+=r:t.push(r),t},[]):t(r,s).format(i)}catch(e){i(Object(o.b)("Error formatting list.",e))}return n}function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return T}));const P=S.a||C;function I(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError}}function A(e,t){const n=Object(o.c)(t),r=x(x({},o.a),e);if(!r.locale||!function(e,t){if("undefined"==typeof Intl)return!1;if(!e)throw new Error("locales must be supplied.");Array.isArray(e)||(e=[e]);var n=t||[Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules];return!(0===(n=n.filter(Boolean)).length||t&&n.length!==t.length)&&n.every((function(t){return t.supportedLocalesOf(e).length===e.length}))}(r.locale)){const{locale:e,defaultLocale:t,onError:n}=r;"function"==typeof n&&n(Object(o.b)('Missing locale data for locale: "'.concat(e,'". ')+'Using default locale: "'.concat(t,'" as fallback.'))),r.locale=r.defaultLocale||"en"}return x(x({},r),{formatters:n,formatNumber:l.bind(null,r,n.getNumberFormat),formatNumberToParts:c.bind(null,r,n.getNumberFormat),formatRelativeTime:d.bind(null,r,n.getRelativeTimeFormat),formatDate:m.bind(null,r,n.getDateTimeFormat),formatDateToParts:b.bind(null,r,n.getDateTimeFormat),formatTime:g.bind(null,r,n.getDateTimeFormat),formatTimeToParts:v.bind(null,r,n.getDateTimeFormat),formatPlural:w.bind(null,r,n.getPluralRules),formatMessage:E.b.bind(null,r,n),formatHTMLMessage:E.a.bind(null,r,n),formatList:_.bind(null,r,n.getListFormat)})}class T extends r.PureComponent{constructor(){super(...arguments),this.cache=Object(o.d)(),this.state={cache:this.cache,intl:A(I(this.props),this.cache),prevConfig:I(this.props)}}static getDerivedStateFromProps(e,t){let{prevConfig:n,cache:r}=t;const i=I(e);return P(n,i)?null:{intl:A(i,r),prevConfig:i}}render(){return Object(o.h)(this.state.intl),r.createElement(i.b,{value:this.state.intl},this.props.children)}}T.displayName="IntlProvider",T.defaultProps=o.a},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#F7931D",height:o=26,title:a,width:s=26}=e;return r.createElement(i.a,{className:"icon-alert-default ".concat(t),title:a,height:o,width:s,viewBox:"0 0 26 26"},r.createElement("defs",null,r.createElement("circle",{id:"b",cx:"8",cy:"8",r:"8"}),r.createElement("filter",{x:"-46.9%",y:"-46.9%",width:"193.8%",height:"193.8%",filterUnits:"objectBoundingBox",id:"a"},r.createElement("feMorphology",{radius:".5",operator:"dilate",in:"SourceAlpha",result:"shadowSpreadOuter1"}),r.createElement("feOffset",{in:"shadowSpreadOuter1",result:"shadowOffsetOuter1"}),r.createElement("feGaussianBlur",{stdDeviation:"2",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r.createElement("feColorMatrix",{values:"0 0 0 0 0.733285502 0 0 0 0 0.733285502 0 0 0 0 0.733285502 0 0 0 0.5 0",in:"shadowBlurOuter1"}))),r.createElement("g",{transform:"translate(5 5)",fill:"none",fillRule:"evenodd"},r.createElement("use",{fill:"#000",filter:"url(#a)",xlinkHref:"#b"}),r.createElement("use",{fill:n,xlinkHref:"#b"}),r.createElement("path",{d:"M8.047 4.706v4.111",stroke:"#FFF",strokeWidth:"1.412",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("circle",{fill:"#FFF",cx:"8.047",cy:"11.294",r:"1"})))}},function(e,t,n){"use strict";var r=n(0),i=n(119),o=n(204),a=n(5);n(637);t.a=()=>r.createElement("section",{className:"be-default-error"},r.createElement(o.a,{errorHeader:r.createElement(i.a,a.a.defaultErrorMaskHeaderMessage),errorSubHeader:r.createElement(i.a,a.a.defaultErrorMaskSubHeaderMessage)}))},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(384),i=n(391),o=n(393),a=n(394),s=n(395);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(105),i=n(101);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(678),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){var r=n(552)();e.exports=r},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.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];c.push(new p(e,t)),1!==c.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(106),i=n(35),o=n(316),a=i.List,s=i.Map,l=i.OrderedSet,c=i.Record,u=i.Repeat,d=l(),h=c({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:s()}),f=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(u(r.EMPTY,n.length))),e},p=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,f(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.findStyleRanges=function(e,t){o(this.getCharacterList(),m,e,t)},t.prototype.findEntityRanges=function(e,t){o(this.getCharacterList(),g,e,t)},t}(h);function m(e,t){return e.getStyle()===t.getStyle()}function g(e,t){return e.getEntity()===t.getEntity()}e.exports=p},function(e,t,n){"use strict";var r=n(36),i=55296,o=56319,a=56320,s=57343,l=/[\uD800-\uDFFF]/;function c(e){return i<=e&&e<=s}function u(e){return l.test(e)}function d(e,t){return 1+c(e.charCodeAt(t))}function h(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!u(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var i=0;if(t>0){for(;t>0&&i<r;t--)i+=d(e,i);if(i>=r)return""}else if(t<0){for(i=r;t<0&&0<i;t++)i-=d(e,i-1);i<0&&(i=0)}var o=r;if(n<r)for(o=i;n>0&&o<r;n--)o+=d(e,o);return e.substring(i,o)}var f={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=d(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:d,hasSurrogateUnit:u,isCodeUnitInSurrogateRange:c,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||r(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),l=e.charCodeAt(t+1);return i<=n&&n<=o&&a<=l&&l<=s},strlen:function(e){if(!u(e))return e.length;for(var t=0,n=0;n<e.length;n+=d(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return h(e,t=t<n?t:n,r)},substr:h};e.exports=f},function(e,t,n){"use strict";var r=n(74),i=n(3),o=n.n(i),a=n(120),s=n.n(a),l=n(25),c=n(76),u=n(255),d=n.n(u);function h(){return window.crypto||window.msCrypto}function f(e,t){const n=h();return n!==window.msCrypto?n.subtle.digest(e,t):new Promise((r,i)=>{if("SHA-1"===e)try{const e=d.a.arrayBuffer(t);r(e)}catch(e){i(e)}else{const o=n.subtle.digest({name:e},t);o.oncomplete=e=>{r(e.target.result)},o.onerror=i}})}function p(e,t,n){"use asm";var r=new e.Int32Array(n);function i(e,t){e=e|0;t=t|0;var n=0,i=0,o=0,a=0,s=0,l=0,c=0,u=0,d=0,h=0,f=0,p=0,m=0,g=0;o=r[t+320>>2]|0;s=r[t+324>>2]|0;c=r[t+328>>2]|0;d=r[t+332>>2]|0;f=r[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){a=o;l=s;u=c;h=d;p=f;for(i=0;(i|0)<64;i=i+4|0){g=r[n+i>>2]|0;m=((o<<5|o>>>27)+(s&c|~s&d)|0)+((g+f|0)+1518500249|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[e+i>>2]=g}for(i=e+64|0;(i|0)<(e+80|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s&c|~s&d)|0)+((g+f|0)+1518500249|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}for(i=e+80|0;(i|0)<(e+160|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s^c^d)|0)+((g+f|0)+1859775393|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}for(i=e+160|0;(i|0)<(e+240|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s&c|s&d|c&d)|0)+((g+f|0)-1894007588|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}for(i=e+240|0;(i|0)<(e+320|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s^c^d)|0)+((g+f|0)-899497514|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}o=o+a|0;s=s+l|0;c=c+u|0;d=d+h|0;f=f+p|0}r[t+320>>2]=o;r[t+324>>2]=s;r[t+328>>2]=c;r[t+332>>2]=d;r[t+336>>2]=f}return{hash:i}}var m=()=>{const e=new Blob(["const RushaCore = ".concat(p.toString()),";\n",'function Rusha(e){for(var r=function(e){if("string"==typeof e)return"string";if(e instanceof Array)return"array";if("undefined"!=typeof global&&global.Buffer&&global.Buffer.isBuffer(e))return"buffer";if(e instanceof ArrayBuffer)return"arraybuffer";if(e.buffer instanceof ArrayBuffer)return"view";if(e instanceof Blob)return"blob";throw new Error("Unsupported data type.")},n={fill:0},t=function(e){for(e+=9;e%64>0;e+=1);return e},a=function(e,r,n,t,a){var f,s=this,i=a%4,h=(t+i)%4,u=t-h;switch(i){case 0:e[a]=s[n+3];case 1:e[a+1-(i<<1)|0]=s[n+2];case 2:e[a+2-(i<<1)|0]=s[n+1];case 3:e[a+3-(i<<1)|0]=s[n]}if(!(t<h+i)){for(f=4-i;f<u;f=f+4|0)r[a+f>>2|0]=s[n+f]<<24|s[n+f+1]<<16|s[n+f+2]<<8|s[n+f+3];switch(h){case 3:e[a+u+1|0]=s[n+u+2];case 2:e[a+u+2|0]=s[n+u+1];case 1:e[a+u+3|0]=s[n+u]}}},f=function(e){switch(r(e)){case"string":return function(e,r,n,t,a){var f,s=this,i=a%4,h=(t+i)%4,u=t-h;switch(i){case 0:e[a]=s.charCodeAt(n+3);case 1:e[a+1-(i<<1)|0]=s.charCodeAt(n+2);case 2:e[a+2-(i<<1)|0]=s.charCodeAt(n+1);case 3:e[a+3-(i<<1)|0]=s.charCodeAt(n)}if(!(t<h+i)){for(f=4-i;f<u;f=f+4|0)r[a+f>>2]=s.charCodeAt(n+f)<<24|s.charCodeAt(n+f+1)<<16|s.charCodeAt(n+f+2)<<8|s.charCodeAt(n+f+3);switch(h){case 3:e[a+u+1|0]=s.charCodeAt(n+u+2);case 2:e[a+u+2|0]=s.charCodeAt(n+u+1);case 1:e[a+u+3|0]=s.charCodeAt(n+u)}}}.bind(e);case"array":case"buffer":return a.bind(e);case"arraybuffer":return a.bind(new Uint8Array(e));case"view":return a.bind(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));case"blob":return function(e,r,n,t,a){var f,s=a%4,i=(t+s)%4,h=t-i,u=new Uint8Array(reader.readAsArrayBuffer(this.slice(n,n+t)));switch(s){case 0:e[a]=u[3];case 1:e[a+1-(s<<1)|0]=u[2];case 2:e[a+2-(s<<1)|0]=u[1];case 3:e[a+3-(s<<1)|0]=u[0]}if(!(t<i+s)){for(f=4-s;f<h;f=f+4|0)r[a+f>>2|0]=u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3];switch(i){case 3:e[a+h+1|0]=u[h+2];case 2:e[a+h+2|0]=u[h+1];case 1:e[a+h+3|0]=u[h]}}}.bind(e)}},s=new Array(256),i=0;i<256;i++)s[i]=(i<16?"0":"")+i.toString(16);var h=function(e){for(var r=new Uint8Array(e),n=new Array(e.byteLength),t=0;t<n.length;t++)n[t]=s[r[t]];return n.join("")};!function(e){if(e%64>0)throw new Error("Chunk size must be a multiple of 128 bit");n.offset=0,n.maxChunkLen=e,n.padMaxChunkLen=t(e),n.heap=new ArrayBuffer(function(e){var r;if(e<=65536)return 65536;if(e<16777216)for(r=1;r<e;r<<=1);else for(r=16777216;r<e;r+=16777216);return r}(n.padMaxChunkLen+320+20)),n.h32=new Int32Array(n.heap),n.h8=new Int8Array(n.heap),n.core=new RushaCore({Int32Array:Int32Array,DataView:DataView},{},n.heap),n.buffer=null}(e||65536);var u=function(e,r){n.offset=0;var t=new Int32Array(e,r+320,5);t[0]=1732584193,t[1]=-271733879,t[2]=-1732584194,t[3]=271733878,t[4]=-1009589776},c=function(e,r){var a,f,s,i=t(e),h=new Int32Array(n.heap,0,i>>2);return function(e,r){var n=new Uint8Array(e.buffer),t=r%4,a=r-t;switch(t){case 0:n[a+3]=0;case 1:n[a+2]=0;case 2:n[a+1]=0;case 3:n[a+0]=0}for(var f=1+(r>>2);f<e.length;f++)e[f]=0}(h,e),s=r,(a=h)[(f=e)>>2]|=128<<24-(f%4<<3),a[14+(2+(f>>2)&-16)]=s/(1<<29)|0,a[15+(2+(f>>2)&-16)]=s<<3,i},o=function(e,r,t,a){f(e)(n.h8,n.h32,r,t,a||0)},d=function(e,r,t,a,f){var s=t;o(e,r,t),f&&(s=c(t,a)),n.core.hash(s,n.padMaxChunkLen)},y=function(e,r){var n=new Int32Array(e,r+320,5),t=new Int32Array(5),a=new DataView(t.buffer);return a.setInt32(0,n[0],!1),a.setInt32(4,n[1],!1),a.setInt32(8,n[2],!1),a.setInt32(12,n[3],!1),a.setInt32(16,n[4],!1),t},w=this.rawDigest=function(e){var r=e.byteLength||e.length||e.size||0;u(n.heap,n.padMaxChunkLen);var t=0,a=n.maxChunkLen;for(t=0;r>t+a;t+=a)d(e,t,a,r,!1);return d(e,t,r-t,r,!0),y(n.heap,n.padMaxChunkLen)};this.digest=this.digestFromString=this.digestFromBuffer=this.digestFromArrayBuffer=function(e){return h(w(e).buffer)},this.resetState=function(){return u(n.heap,n.padMaxChunkLen),this},this.append=function(e){var r,t=0,a=e.byteLength||e.length||e.size||0,f=n.offset%n.maxChunkLen;for(n.offset+=a;t<a;)r=Math.min(a-t,n.maxChunkLen-f),o(e,t,r,f),t+=r,(f+=r)===n.maxChunkLen&&(n.core.hash(n.maxChunkLen,n.padMaxChunkLen),f=0);return this},this.getState=function(){var e;if(n.offset%n.maxChunkLen)e=n.heap.slice(0);else{var r=new Int32Array(n.heap,n.padMaxChunkLen+320,5);e=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)}return{offset:n.offset,heap:e}},this.setState=function(e){(n.offset=e.offset,20===e.heap.byteLength)?new Int32Array(n.heap,n.padMaxChunkLen+320,5).set(new Int32Array(e.heap)):n.h32.set(new Int32Array(e.heap));return this};var p=this.rawEnd=function(){var e=n.offset,r=e%n.maxChunkLen,t=c(r,e);n.core.hash(t,n.padMaxChunkLen);var a=y(n.heap,n.padMaxChunkLen);return u(n.heap,n.padMaxChunkLen),a};this.end=function(){return h(p().buffer)}}',";\n","var setupWorker = ",function(){const e=new Rusha;e.resetState();let t=0;self.onmessage=n=>{const{data:r}=n,{part:i,fileSize:o,partContents:a}=r,s=Date.now();try{if(i.offset!==t)throw new Error("Out of order parts given to worker");if(e.append(a),self.postMessage({type:"partDone",part:r.part,duration:Date.now()-s,partContents:a},[a]),t+=i.size,i.offset+i.size===o){const t=e.end();self.postMessage({type:"done",sha1:t})}}catch(e){const t={type:"error",name:e.name,message:e.message,part:i};self.postMessage(t)}}}.toString(),";\n","setupWorker();"],{type:"text/javascript"}),t=(window.URL||window.webkitURL).createObjectURL(e),n=new Worker(t);return n.oldTerminate=n.terminate,n.terminate=()=>{(window.URL||window.webkitURL).revokeObjectURL(t),n.oldTerminate()},n},g=n(59),b=n(1),v=n(8),y=n.n(v),w=n(256),E=n.n(w);var C=n(15);function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=5,k=10;class _ extends C.a{constructor(){super(...arguments),S(this,"retryCount",0),S(this,"reachabilityRetryCount",0),S(this,"isUploadFallbackLogicEnabled",!1),S(this,"makePreflightRequest",()=>{if(this.isDestroyed())return;let e="".concat(this.getBaseApiUrl(),"/files/content");if(this.fileId&&(e=e.replace("content","".concat(this.fileId,"/content"))),this.isUploadFallbackLogicEnabled){const t=this.uploadsReachability.getUnreachableHostsUrls();0!==t.length&&(e+="?unreachable_hosts=".concat(t.join(",")))}const{size:t,name:n}=this.file,r={name:this.fileName||n,parent:{id:this.folderId},description:this.fileDescription,size:t};this.xhr.options({url:e,data:r,successHandler:e=>{this.isUploadFallbackLogicEnabled?this.preflightSuccessReachabilityHandler(e):this.preflightSuccessHandler(e)},errorHandler:this.preflightErrorHandler})}),S(this,"preflightSuccessReachabilityHandler",async e=>{let{data:t}=e;if(this.isDestroyed())return;const{upload_url:n}=t;if(!n)return void this.preflightSuccessHandler({data:t});const r=this.getUploadHostFromUrl(n);r!=="".concat(b.X,"/")&&r!=="".concat(b.Y,"/")&&r!=="".concat(b.Z,"/")?await this.uploadsReachability.isReachable(r)?this.preflightSuccessHandler({data:t}):this.reachabilityRetryCount>=k?this.preflightSuccessHandler({data:{}}):(this.reachabilityRetryCount+=1,this.makePreflightRequest()):this.preflightSuccessHandler({data:t})}),S(this,"preflightErrorHandler",e=>{if(this.isDestroyed())return;this.fileName=this.file?this.file.name:"";let t=e;const{response:n}=e;if(n&&n.data&&(t=n.data),this.retryCount>=O)this.errorCallback(t);else if(t&&409===t.status){if(this.overwrite){const e=t.context_info.conflicts.id;!this.fileId&&e&&(this.fileId=e)}else if(this.conflictCallback)this.fileName=this.conflictCallback(this.fileName);else{const e=this.fileName.substr(this.fileName.lastIndexOf("."))||"";this.fileName="".concat(this.fileName.substr(0,this.fileName.lastIndexOf(".")),"-").concat(Date.now()).concat(e)}this.makePreflightRequest(),this.retryCount+=1}else if(!t||429!==t.status&&"too_many_requests"!==t.code)t&&(t.status||"Failed to fetch"===t.message)&&"function"==typeof this.errorCallback?this.errorCallback(t):(this.retryTimeout=setTimeout(this.makePreflightRequest,2**this.retryCount*b.Ke),this.retryCount+=1);else{let e=b.hb;if(t.headers){const n=parseInt(t.headers["retry-after"]||t.headers.get("Retry-After"),10);Number.isNaN(n)||(e=n*b.Ke)}this.retryTimeout=setTimeout(this.makePreflightRequest,e),this.retryCount+=1}})}readFile(e,t){return new Promise((n,r)=>{e.readAsArrayBuffer(t),e.onload=()=>{n({buffer:e.result,readCompleteTimestamp:Date.now()})},e.onerror=r})}getUploadHostFromUrl(e){const t=e.split("/");return"".concat(t[0],"//").concat(t[2],"/")}}var x=_;function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A={digestReadahead:5,initialRetryDelayMs:5e3,maxRetryDelayMs:6e4,parallelism:4,requestTimeoutMs:12e4,retries:5};var T=class extends x{constructor(e,t,n){super(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{shouldRetry:!1})),I(this,"logEvent",(e,t)=>{const n={event_type:e};return t&&(n.event_info=t),this.xhr.post({url:this.sessionEndpoints.logEvent,data:n})}),this.config=n||A,this.sessionEndpoints=t}};function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=0,R=1,j=2,N=3;var L=class extends T{constructor(e,t,n,r,i,a,s,u,d,h,f,p){super(e,s,u),M(this,"toJSON",()=>JSON.stringify({index:this.index,offset:this.offset,partSize:this.partSize,state:this.state,uploadedBytes:this.uploadedBytes,numUploadRetriesPerformed:this.numUploadRetriesPerformed,numDigestRetriesPerformed:this.numDigestRetriesPerformed,sha256:this.sha256,timing:this.timing})),M(this,"getPart",()=>this.data.part||{}),M(this,"upload",()=>{if(this.isDestroyedOrPaused())return;if(!this.sha256)throw new Error("Part SHA-256 unavailable");if(!this.blob)throw new Error("Part blob unavailable");const e={documentHidden:document.hidden,digest_retries:this.numDigestRetriesPerformed,timing:this.timing,parts_uploading:this.getNumPartsUploading()},t={"Content-Type":"application/octet-stream",Digest:"sha-256=".concat(this.sha256),"Content-Range":"bytes ".concat(this.offset,"-").concat(this.rangeEnd,"/").concat(this.fileSize),"X-Box-Client-Event-Info":JSON.stringify(e)};this.state=j,this.startTimestamp=Date.now(),this.xhr.uploadFile({url:this.sessionEndpoints.uploadPart,data:this.blob,headers:t,method:b.oe,successHandler:this.uploadSuccessHandler,errorHandler:this.uploadErrorHandler,progressHandler:this.uploadProgressHandler,withIdleTimeout:!0,idleTimeoutDuration:this.config.requestTimeoutMs})}),M(this,"uploadSuccessHandler",e=>{let{data:t}=e;this.isDestroyedOrPaused()||(this.state=N,this.consoleLog("Upload completed: ".concat(this.toJSON(),".")),this.data=t,this.blob=null,this.timing.uploadTime=Date.now()-this.startTimestamp,this.onSuccess(this),this.uploadedBytes=this.partSize)}),M(this,"uploadProgressHandler",e=>{if(this.isDestroyedOrPaused())return;const t=parseInt(e.loaded,10),n=this.uploadedBytes;this.uploadedBytes=t,this.onProgress(n,t)}),M(this,"uploadErrorHandler",async e=>{if(this.isDestroyedOrPaused())return;const t=y()(this.xhr,"xhr.readyState",null),n=y()(this.xhr,"xhr.statusText","");this.consoleLog("Upload failure ".concat(e.message," for part ").concat(this.toJSON(),". XHR state: ").concat(t,"."));const r={message:e.message,part:{uploadedBytes:this.uploadedBytes,id:this.id,index:this.index,offset:this.offset},xhr_ready_state:t,xhr_status_text:n},i=JSON.stringify(r);if(this.sessionEndpoints.logEvent?Object(c.a)((e,t)=>{this.logEvent("part_failure",i).then(e).catch(t)},this.config.retries,this.config.initialRetryDelayMs).catch(e=>this.consoleLog("Failure in logEvent: ".concat(e.message))):this.consoleLog("logEvent endpoint not found"),this.numUploadRetriesPerformed>=this.config.retries)return void this.onError(e,i);const o=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,this.numUploadRetriesPerformed);this.numUploadRetriesPerformed+=1,this.consoleLog("Retrying uploading part ".concat(this.toJSON()," in ").concat(o," ms")),this.retryTimeout=setTimeout(this.retryUpload,o)}),M(this,"retryUpload",async()=>{if(!this.isDestroyedOrPaused())try{const e=await this.listParts(this.index,1);if(e&&1===e.length&&e[0].offset===this.offset&&e[0].part_id)return this.consoleLog("Part ".concat(this.toJSON()," is available on server. Not re-uploading.")),this.id=e[0].part_id,void this.uploadSuccessHandler({data:{part:e[0]}});throw this.consoleLog("Part ".concat(this.toJSON()," is not available on server. Re-uploading.")),new Error("Part not found on the server")}catch(e){const{response:t}=e;t&&t.status&&this.consoleLog("Error ".concat(t.status," while listing part ").concat(this.toJSON(),". Re-uploading.")),this.numUploadRetriesPerformed+=1,this.upload()}}),M(this,"listParts",async(e,t)=>{const n={offset:e,limit:t},r=function(e,t){if(!t)return e;const n=new E.a(e);return Object.keys(t).forEach(e=>{const r=t[e];r&&(n.hasQueryParam(e)?n.replaceQueryParam(e,r):n.addQueryParam(e,r))}),n.toString()}(this.sessionEndpoints.listParts,n);return(await this.xhr.get({url:r})).data.entries}),this.index=t,this.numDigestRetriesPerformed=0,this.numUploadRetriesPerformed=0,this.offset=n,this.partSize=r,this.fileSize=i,this.state=D,this.timing={},this.uploadedBytes=0,this.data={},this.config=u,this.rangeEnd=n+r-1,this.rangeEnd>i-1&&(this.rangeEnd=i-1),this.isPaused=!1,this.onSuccess=h||o.a,this.onError=p||o.a,this.onProgress=f||o.a,this.getNumPartsUploading=d}cancel(){clearTimeout(this.retryTimeout),this.blob=null,this.data={},this.destroy()}pause(){clearTimeout(this.retryTimeout),this.isPaused=!0,this.state=R,this.xhr.abort()}unpause(){this.isPaused=!1,this.state=j,this.retryUpload()}reset(){this.numUploadRetriesPerformed=0,this.timing={},this.uploadedBytes=0}isDestroyedOrPaused(){return this.isDestroyed()||this.isPaused}};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B="create_session_misc_error",H="create_session_retries_exceeded",V="file_changed_during_upload",W="part_upload_retries_exceeded",K="commit_retries_exceeded",q="web_worker_error",G="file_reader_received_not_found_error",Q="part_digest_retries_exceeded";var Y=class extends T{constructor(e,t){super(e,{createSession:null,uploadPart:null,listParts:null,commit:null,abort:null,logEvent:null},t),U(this,"getBaseUploadUrlFromPreflightResponse",e=>{let{data:t}=e;if(!t||!t.upload_url)return this.getBaseUploadUrl();const n=t.upload_url.split("/");return this.uploadHost="".concat(n[0],"//").concat(n[2]),this.getBaseUploadUrl()}),U(this,"preflightSuccessHandler",async e=>{if(this.isDestroyed())return;const t=this.getBaseUploadUrlFromPreflightResponse(e);let n="".concat(t,"/files/upload_sessions");n.includes("fupload-ec2")&&(this.config.parallelism=1);const r={file_size:this.file.size,file_name:this.fileName};this.fileId?n=n.replace("upload_sessions","".concat(this.fileId,"/upload_sessions")):r.folder_id=this.folderId;try{const e=await this.xhr.post({url:n,data:r});this.createSessionSuccessHandler(e.data)}catch(e){const t=this.getErrorResponse(e);if(t&&t.status>=500&&t.status<600)return void this.createSessionErrorHandler(e);if(t&&409===t.status&&"session_conflict"===t.code)return void this.createSessionSuccessHandler(t.context_info.session);if(t&&t.status===b.re&&t.code===b.Cc||t.status===b.re&&"access_denied_insufficient_permissions"===t.code)return void this.errorCallback(t);if(t&&409===t.status)return this.resolveConflict(t),void this.createSessionRetry();this.sessionErrorHandler(e,B,JSON.stringify(e))}}),U(this,"createSessionErrorHandler",e=>{this.isDestroyed()||(this.createSessionNumRetriesPerformed<this.config.retries?this.createSessionRetry():(this.consoleLog("Too many create session failures, failing upload"),this.sessionErrorHandler(e,H,JSON.stringify(e))))}),U(this,"getSessionInfo",async()=>{const e=this.getBaseUploadUrl(),t="".concat(e,"/files/upload_sessions/").concat(this.sessionId);try{const e=await this.xhr.get({url:t});this.getSessionSuccessHandler(e.data)}catch(e){this.getSessionErrorHandler(e)}}),U(this,"partUploadSuccessHandler",e=>{this.numPartsUploading-=1,this.numPartsUploaded+=1,this.updateProgress(e.uploadedBytes,this.partSize),this.processNextParts()}),U(this,"partUploadErrorHandler",(e,t)=>{if(this.sessionErrorHandler(e,W,t),this.isResumableUploadsEnabled){let e=this.firstUnuploadedPartIndex;for(;this.numPartsUploading>0;){const t=this.parts[e];t&&t.state===j&&(t.reset(),t.pause(),this.numPartsUploading-=1,this.numPartsDigestReady+=1),e+=1}}}),U(this,"updateProgress",(e,t)=>{this.isDestroyed()||(this.totalUploadedBytes+=t-e,this.progressCallback({loaded:this.totalUploadedBytes,total:this.file.size}))}),U(this,"processNextParts",()=>{if(!this.failSessionIfFileChangeDetected())if(this.numPartsUploaded===this.parts.length&&this.fileSha1)this.commitSession();else{for(this.updateFirstUnuploadedPartIndex();this.canStartMorePartUploads();)this.uploadNextPart();this.shouldComputeDigestForNextPart()&&this.computeDigestForNextPart()}}),U(this,"onWorkerMessage",e=>{if(this.isDestroyed())return;const{data:t}=e;if("partDone"===t.type){this.numPartsDigestComputing-=1;const{part:e}=t;this.parts[e.index].timing.fileDigestTime=t.duration,this.processNextParts()}else"done"===t.type?(this.fileSha1=function(e){return btoa(String.fromCharCode.apply(null,e.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")))}(t.sha1),this.sha1Worker.terminate(),this.processNextParts()):"error"===t.type&&this.sessionErrorHandler(null,q,JSON.stringify(t))}),U(this,"sendPartToWorker",(e,t)=>{if(this.isDestroyed())return;const n={index:e.index,offset:e.offset,size:e.partSize};this.sha1Worker.postMessage({part:n,fileSize:this.file.size,partContents:t},[t]),this.consoleLog("Part sent to worker: ".concat(JSON.stringify(e),".}"))}),U(this,"onPartDigestError",(e,t)=>{if(this.consoleLog("Error computing digest for part ".concat(JSON.stringify(t),": ").concat(JSON.stringify(e))),"NotFoundError"===e.name||"NOT_FOUND_ERR"===e.name)return void this.sessionErrorHandler(null,G,JSON.stringify(e));if(this.failSessionIfFileChangeDetected())return;if(t.numDigestRetriesPerformed>=this.config.retries)return void this.sessionErrorHandler(null,Q,JSON.stringify(e));const n=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,t.numDigestRetriesPerformed);t.numDigestRetriesPerformed+=1,this.consoleLog("Retrying digest work for part ".concat(JSON.stringify(t)," in ").concat(n," ms")),setTimeout(()=>{this.computeDigestForPart(t)},n)}),U(this,"commitSession",()=>{if(this.isDestroyed())return;const e={totalPartReadTime:0,totalPartDigestTime:0,totalFileDigestTime:0,totalPartUploadTime:0},t={parts:this.parts.map(t=>(e.totalPartReadTime+=t.timing.readTime,e.totalPartDigestTime+=t.timing.subtleCryptoTime,e.totalFileDigestTime+=t.timing.fileDigestTime,e.totalPartUploadTime+=t.timing.uploadTime,t.getPart())).sort((e,t)=>e.offset-t.offset),attributes:{}},n=Object(l.k)(this.file);n&&(t.attributes.content_modified_at=n),this.fileDescription&&(t.attributes.description=this.fileDescription);const r={avg_part_read_time:Math.round(e.totalPartReadTime/this.parts.length),avg_part_digest_time:Math.round(e.totalPartDigestTime/this.parts.length),avg_file_digest_time:Math.round(e.totalFileDigestTime/this.parts.length),avg_part_upload_time:Math.round(e.totalPartUploadTime/this.parts.length)},i=this.fileSha1,o={Digest:"sha=".concat(i),"X-Box-Client-Event-Info":JSON.stringify(r)};this.xhr.post({url:this.sessionEndpoints.commit,data:t,headers:o}).then(this.commitSessionSuccessHandler).catch(this.commitSessionErrorHandler)}),U(this,"commitSessionSuccessHandler",e=>{if(this.isDestroyed())return;const{status:t,data:n}=e;if(202===t)return void this.commitSessionRetry(e);let{entries:r}=n;!r&&n.id&&(r=[n]),this.destroy(),this.successCallback&&r&&this.successCallback(r)}),U(this,"commitSessionErrorHandler",e=>{if(this.isDestroyed())return;const{response:t}=e;if(t)return this.commitRetryCount>=this.config.retries?(this.consoleLog("Too many commit failures, failing upload"),void this.sessionErrorHandler(e,K,JSON.stringify(e))):void this.commitSessionRetry(t);this.consoleError(e)}),U(this,"getNumPartsUploading",()=>this.numPartsUploading),this.parts=[],this.options=e,this.fileSha1=null,this.totalUploadedBytes=0,this.numPartsNotStarted=0,this.numPartsDigestComputing=0,this.numPartsDigestReady=0,this.numPartsUploading=0,this.numPartsUploaded=0,this.firstUnuploadedPartIndex=0,this.createSessionNumRetriesPerformed=0,this.partSize=0,this.commitRetryCount=0,this.clientId=null,this.isResumableUploadsEnabled=!1,this.numResumeRetries=0}reset(){this.parts=[],this.fileSha1=null,this.totalUploadedBytes=0,this.numPartsNotStarted=0,this.numPartsDigestComputing=0,this.numPartsDigestReady=0,this.numPartsUploading=0,this.numPartsUploaded=0,this.firstUnuploadedPartIndex=0,this.createSessionNumRetriesPerformed=0,this.partSize=0,this.commitRetryCount=0,this.numResumeRetries=0}setFileInfo(e){let{file:t,folderId:n,errorCallback:r,progressCallback:i,successCallback:a,overwrite:s=!0,conflictCallback:l,fileId:c}=e;this.file=t,this.fileName=this.file.name,this.folderId=n,this.errorCallback=r||o.a,this.progressCallback=i||o.a,this.successCallback=a||o.a,this.overwrite=s,this.conflictCallback=l,this.fileId=c}upload(e){let{file:t,fileDescription:n,folderId:r,errorCallback:i,progressCallback:a,successCallback:s,overwrite:c=!0,conflictCallback:u,fileId:d}=e;this.file=t,this.fileName=this.file.name,this.initialFileSize=this.file.size,this.initialFileLastModified=Object(l.k)(this.file),this.folderId=r,this.errorCallback=i||o.a,this.progressCallback=a||o.a,this.successCallback=s||o.a,this.sha1Worker=m(),this.sha1Worker.addEventListener("message",this.onWorkerMessage),this.conflictCallback=u,this.overwrite=c,this.fileId=d,this.fileDescription=n,this.makePreflightRequest()}createSessionRetry(){const e=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,this.createSessionNumRetriesPerformed);this.createSessionNumRetriesPerformed+=1,this.consoleLog("Retrying create session in ".concat(e," ms")),this.createSessionTimeout=setTimeout(this.makePreflightRequest,e)}createSessionSuccessHandler(e){if(this.isDestroyed())return;const{id:t,part_size:n,session_endpoints:r}=e;this.sessionId=t,this.partSize=n,this.sessionEndpoints=z({},this.sessionEndpoints,{uploadPart:r.upload_part,listParts:r.list_parts,commit:r.commit,abort:r.abort,logEvent:r.log_event}),this.populateParts(),this.processNextParts()}resume(e){let{file:t,folderId:n,errorCallback:r,progressCallback:i,sessionId:o,successCallback:a,overwrite:s=!0,conflictCallback:l,fileId:c}=e;this.setFileInfo({file:t,folderId:n,errorCallback:r,progressCallback:i,successCallback:a,conflictCallback:l,overwrite:s,fileId:c}),this.sessionId=o,this.sha1Worker||(this.sha1Worker=m()),this.sha1Worker.addEventListener("message",this.onWorkerMessage),this.getSessionInfo()}getSessionSuccessHandler(e){const{part_size:t,session_endpoints:n}=e;this.partSize=t,this.sessionEndpoints=z({},this.sessionEndpoints,{uploadPart:n.upload_part,listParts:n.list_parts,commit:n.commit,abort:n.abort,logEvent:n.log_event}),this.processNextParts()}getSessionErrorHandler(e){if(this.isDestroyed())return;const t=this.getErrorResponse(e);if(this.numResumeRetries>this.config.retries)this.errorCallback(t);else if(t&&429===t.status){let e=b.hb;if(t.headers){const n=parseInt(t.headers["retry-after"]||t.headers.get("Retry-After"),10);s()(n)||(e=n*b.Ke)}this.retryTimeout=setTimeout(this.getSessionInfo,e),this.numResumeRetries+=1}else if(t&&t.status>=400&&t.status<500){this.parts.forEach(e=>{e.cancel()}),this.reset(),clearTimeout(this.createSessionTimeout),clearTimeout(this.commitSessionTimeout),this.abortSession();const e={file:this.file,folderId:this.folderId,errorCallback:this.errorCallback,progressCallback:this.progressCallback,successCallback:this.successCallback,overwrite:this.overwrite,fileId:this.fileId};this.upload(e)}else this.retryTimeout=setTimeout(this.getSessionInfo,2**this.numResumeRetries*b.Ke),this.numResumeRetries+=1}async sessionErrorHandler(e,t,n){this.isResumableUploadsEnabled||this.destroy();const r=this.getErrorResponse(e);this.errorCallback(r);try{if(!this.sessionEndpoints.logEvent)throw new Error("logEvent endpoint not found");await Object(c.a)((e,r)=>{this.logEvent(t,n).then(e).catch(r)},this.config.retries,this.config.initialRetryDelayMs),this.isResumableUploadsEnabled||this.abortSession()}catch(e){this.isResumableUploadsEnabled||this.abortSession()}}abortSession(){this.sha1Worker&&this.sha1Worker.terminate(),this.sessionEndpoints.abort&&this.sessionId&&this.xhr.delete({url:this.sessionEndpoints.abort}).then(()=>{this.sessionId=""})}shouldComputeDigestForNextPart(){return!this.isDestroyed()&&0===this.numPartsDigestComputing&&this.numPartsNotStarted>0&&this.numPartsDigestReady<this.config.digestReadahead}computeDigestForNextPart(){for(let e=this.firstUnuploadedPartIndex;e<this.parts.length;e+=1){const t=this.parts[e];if(t.state===D)return this.numPartsNotStarted-=1,this.numPartsDigestComputing+=1,void this.computeDigestForPart(t)}}async computeDigestForPart(e){const t=this.file.slice(e.offset,e.offset+this.partSize),n=new window.FileReader,r=Date.now();try{const{buffer:i,readCompleteTimestamp:o}=await this.readFile(n,t),a=await f("SHA-256",i),s=btoa([].reduce.call(new Uint8Array(a),(e,t)=>e+String.fromCharCode(t),""));this.sendPartToWorker(e,i),e.sha256=s,e.state=R,e.blob=t,this.numPartsDigestReady+=1;const l=Date.now();e.timing={partDigestTime:l-r,readTime:o-r,subtleCryptoTime:l-o},this.processNextParts()}catch(t){this.onPartDigestError(t,e)}}commitSessionRetry(e){const{status:t,headers:n}=e;let r=b.hb;if(n){const e=parseInt(n["retry-after"],10);Number.isNaN(e)||(r=1e3*e)}const i=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,this.commitRetryCount);202!==t&&(this.commitRetryCount+=1);const o=r||i;this.consoleLog("Retrying commit in ".concat(o," ms")),this.commitSessionTimeout=setTimeout(this.commitSession,o)}uploadNextPart(){for(let e=this.firstUnuploadedPartIndex;e<this.parts.length;e+=1){const t=this.parts[e];if(t.state===R){this.numPartsDigestReady-=1,this.numPartsUploading+=1,t.isPaused?t.unpause():t.upload();break}}}canStartMorePartUploads(){return!this.isDestroyed()&&this.numPartsUploading<this.config.parallelism&&this.numPartsDigestReady>0}updateFirstUnuploadedPartIndex(){let e=this.parts[this.firstUnuploadedPartIndex];for(;e&&e.state===N;)this.firstUnuploadedPartIndex+=1,e=this.parts[this.firstUnuploadedPartIndex]}populateParts(){this.numPartsNotStarted=Math.ceil(this.file.size/this.partSize);for(let e=0;e<this.numPartsNotStarted;e+=1){const t=e*this.partSize,n=Math.min(t+this.partSize,this.file.size)-t,r=new L(this.options,e,t,n,this.file.size,this.sessionId,this.sessionEndpoints,this.config,this.getNumPartsUploading,this.partUploadSuccessHandler,this.updateProgress,this.partUploadErrorHandler);this.parts.push(r)}}failSessionIfFileChangeDetected(){const e=this.file.size,t=Object(l.k)(this.file);if(e!==this.initialFileSize||t!==this.initialFileLastModified){const n=JSON.stringify({oldSize:this.initialFileSize,newSize:e,oldLastModified:this.initialFileLastModified,newLastModified:t});return g.a.isIE()?(this.sessionErrorHandler(null,V,n),!0):(this.consoleLog("file properties changed during upload: ".concat(n)),!1)}return!1}cancel(){this.isDestroyed()||(this.parts.forEach(e=>{e.cancel()}),this.parts=[],clearTimeout(this.createSessionTimeout),clearTimeout(this.commitSessionTimeout),this.abortSession(),this.destroy())}async resolveConflict(e){if(this.overwrite&&e.context_info)return void(this.fileId=e.context_info.conflicts.id);if(this.conflictCallback)return void(this.fileName=this.conflictCallback(this.fileName));const t=this.fileName.substr(this.fileName.lastIndexOf("."))||"";this.fileName="".concat(this.fileName.substr(0,this.fileName.lastIndexOf(".")),"-").concat(Date.now()).concat(t)}getErrorResponse(e){if(!e)return{};const{response:t}=e;return t?401===t.status?t:t.data:{}}};function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const X="Content-MD5";var Z=class extends x{constructor(){super(...arguments),$(this,"uploadSuccessHandler",e=>{let{data:t}=e;const{entries:n}=t;this.isDestroyed()||"function"==typeof this.successCallback&&this.successCallback(n)}),$(this,"uploadProgressHandler",e=>{this.isDestroyed()||"function"==typeof this.progressCallback&&this.progressCallback(e)}),$(this,"preflightSuccessHandler",async e=>{let{data:t}=e;if(this.isDestroyed())return;let n=t.upload_url;n||(n="".concat(this.getBaseUploadUrl(),"/files/content"),this.fileId&&(n=n.replace("content","".concat(this.fileId,"/content"))));const r={url:n,data:{attributes:JSON.stringify({name:this.fileName,parent:{id:this.folderId},description:this.fileDescription,content_modified_at:Object(l.k)(this.file)}),file:this.file},headers:{},successHandler:this.uploadSuccessHandler,errorHandler:this.preflightErrorHandler,progressHandler:this.uploadProgressHandler},i=await this.computeSHA1(this.file);i&&(r.headers={[X]:i}),this.xhr.uploadFile(r)})}upload(e){let{folderId:t,fileId:n,file:r,fileDescription:i,successCallback:a=o.a,errorCallback:s=o.a,progressCallback:l=o.a,conflictCallback:c,overwrite:u=!0}=e;this.isDestroyed()||(this.folderId=t,this.fileId=n,this.file=r,this.fileDescription=i,this.fileName=this.file.name,this.successCallback=a,this.errorCallback=s,this.progressCallback=l,this.overwrite=u,this.conflictCallback=c,this.makePreflightRequest())}cancel(){this.isDestroyed()||(clearTimeout(this.retryTimeout),this.destroy())}async computeSHA1(e){let t="";try{const n=new window.FileReader,{buffer:r}=await this.readFile(n,e),i=await f("SHA-1",r);t=Array.from(new Uint8Array(i)).map(e=>"00".concat(e.toString(16)).slice(-2)).join("")}catch(e){}return t}},J=n(75),ee=n(55),te=n(61),ne=n(81),re=n(18),ie=n(7);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class le extends C.a{constructor(){super(...arguments),se(this,"searchSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const{entries:n,total_count:r,limit:i,offset:o}=t;if(!Array.isArray(n)||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)throw Object(ie.a)();const a=Object(ne.a)(n,new J.a(this.options),new ee.a(this.options),new te.a(this.options));this.itemCache=(this.itemCache||[]).concat(a),this.getCache().set(this.key,{item_collection:ae({},t,{entries:this.itemCache})}),this.finish()}),se(this,"searchErrorHandler",e=>{this.isDestroyed()||this.errorCallback(e,this.errorCode)})}getEncodedQuery(e){return encodeURIComponent(e)}getCacheKey(e,t){return"".concat(b.t).concat(e,"|").concat(t)}getUrl(){return"".concat(this.getBaseApiUrl(),"/search")}isLoaded(){return this.getCache().has(this.key)}finish(){if(this.isDestroyed())return;const e=this.getCache(),t=e.get(this.key),{item_collection:n}=t;if(!n)throw Object(ie.a)();const{entries:r,total_count:i}=n;if(!Array.isArray(r)||"number"!=typeof i)throw Object(ie.a)();const o={id:this.id,items:r.map(t=>e.get(t)),offset:this.offset,percentLoaded:100,sortBy:b.vd,sortDirection:b.Lf,totalCount:i};this.successCallback(o)}searchRequest(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isDestroyed())return Promise.reject();const{fields:t}=e,n=t||re.g;return this.errorCode=b.nc,this.xhr.get({url:this.getUrl(),params:{offset:this.offset,query:this.query,ancestor_folder_ids:this.id,limit:this.limit,fields:n.toString()},headers:n.includes(b.xd)?{"X-Rep-Hints":b.Eg}:{}}).then(this.searchSuccessHandler).catch(this.searchErrorHandler)}search(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.isDestroyed()||(this.limit=n,this.offset=r,this.query=t,this.id=e,this.key=this.getCacheKey(e,this.getEncodedQuery(this.query)),this.successCallback=i,this.errorCallback=o,a.forceFetch&&this.getCache().unset(this.key),this.isLoaded()?this.finish():this.searchRequest(a))}}var ce=le;function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class he extends C.a{constructor(){super(...arguments),de(this,"recentsSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const{entries:n,order:{by:r,direction:i}}=t,o=[];n.forEach(e=>{let{item:t,interacted_at:n}=e;const{path_collection:r}=t;(this.id===b.ib||!!r&&-1!==r.entries.findIndex(e=>e.id===this.id))&&o.push(ue(t,{interacted_at:n}))});const a=Object(ne.a)(o,new J.a(this.options),new ee.a(this.options),new te.a(this.options));this.getCache().set(this.key,{item_collection:{entries:a,order:[{by:r,direction:i}]}}),this.finish()}),de(this,"recentsErrorHandler",e=>{this.isDestroyed()||this.errorCallback(e,this.errorCode)})}getCacheKey(e){return"".concat(b.s).concat(e)}getUrl(){return"".concat(this.getBaseApiUrl(),"/recent_items")}finish(){if(this.isDestroyed())return;const e=this.getCache(),t=e.get(this.key),{item_collection:n}=t;if(!n)throw Object(ie.a)();const{entries:r}=n;if(!Array.isArray(r))throw Object(ie.a)();const i={id:this.id,items:r.map(t=>e.get(t)),percentLoaded:100,sortBy:b.Tc,sortDirection:b.Lf};this.successCallback(i)}recentsRequest(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isDestroyed())return Promise.reject();const{fields:t}=e,n=t||re.g;return this.errorCode=b.Wb,this.xhr.get({url:this.getUrl(),params:{fields:n.toString()},headers:n.includes(b.xd)?{"X-Rep-Hints":b.Eg}:{}}).then(this.recentsSuccessHandler).catch(this.recentsErrorHandler)}recents(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.isDestroyed())return;this.id=e,this.successCallback=t,this.errorCallback=n;const i=this.getCache();this.key=this.getCacheKey(this.id),r.forceFetch&&i.unset(this.key),i.has(this.key)?this.finish():this.recentsRequest(r)}}var fe=he,pe=n(20);function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class be extends C.a{getQueryParameters(e,t,n){const r={offset:e,limit:t};return n&&n.length>0&&(r.fields=n.toString()),r}hasMoreItems(e,t){return void 0===t||e<t}async offsetGetRequest(e,t,n,r,i){if(!this.isDestroyed())try{const o=this.getQueryParameters(t,n,i),a=this.getUrl(e),{data:s}=await this.xhr.get({url:a,id:Object(pe.b)(e),params:o}),l=this.data?this.data.entries:[];this.data=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s,{entries:l.concat(s.entries)});const c=s.total_count,u=t+n;if(r&&this.hasMoreItems(u,c))return void this.offsetGetRequest(e,u,n,r,i);this.successHandler(this.data)}catch(e){this.errorHandler(e)}}async offsetGet(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b.T,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.S,o=arguments.length>5?arguments[5]:void 0,a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];return this.successCallback=t,this.errorCallback=n,this.offsetGetRequest(e,r,i,a,o)}}var ve=be;function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Se=class extends ve{constructor(){super(...arguments),Ce(this,"successHandler",e=>{this.isDestroyed()||"function"!=typeof this.successCallback||this.successCallback(e)})}getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/versions")}getVersionUrl(e,t){if(!t)throw new Error("Missing version id!");return"".concat(this.getUrl(e),"/").concat(t)}addPermissions(e,t){if(!e)return e;const{entries:n,total_count:r}=e,i=y()(t,["permissions",b.hf],!1);return{entries:n.map(e=>{let{permissions:t}=e;return we({},Ee(e,["permissions"]),{permissions:we({can_upload:i},t)})}),total_count:r}}deleteVersion(e){let{errorCallback:t,fileId:n,permissions:r,successCallback:i,versionId:o}=e;this.errorCode=b.Eb;try{this.checkApiCallValidity(b.af,r,n)}catch(e){return void t(e,this.errorCode)}this.delete({id:n,url:this.getVersionUrl(n,o),successCallback:i,errorCallback:t})}getVersions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b.T,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.S,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:re.e,a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];this.errorCode=b.cc,this.offsetGet(e,t,n,r,i,o,a)}getVersion(e,t,n,r){this.errorCode=b.bc,this.get({id:e,successCallback:n,errorCallback:r,url:this.getVersionUrl(e,t),requestData:{params:{fields:re.e.toString()}}})}addCurrentVersion(e,t,n){if(!e)return t||{entries:[],total_count:0};if(!t)return{entries:[e],total_count:1};const r=y()(n,"restored_from.id"),i=t.entries.find(e=>e.id===r);return i&&(e.version_promoted=i.version_number),{entries:[...t.entries,e],total_count:t.total_count+1}}promoteVersion(e){let{errorCallback:t,fileId:n,permissions:r,successCallback:i,versionId:o}=e;this.errorCode=b.kc;try{this.checkApiCallValidity(b.hf,r,n)}catch(e){return void t(e,this.errorCode)}this.post({id:n,data:{data:{id:o,type:"file_version"}},url:this.getVersionUrl(n,"current"),successCallback:i,errorCallback:t})}restoreVersion(e){let{errorCallback:t,fileId:n,permissions:r,successCallback:i,versionId:o}=e;this.errorCode=b.mc;try{this.checkApiCallValidity(b.af,r,n)}catch(e){return void t(e,this.errorCode)}this.put({id:n,data:{data:{trashed_at:null}},url:this.getVersionUrl(n,o),successCallback:i,errorCallback:t})}};function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=class extends ve{constructor(){super(...arguments),_e(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;if(!e)return void this.successCallback();if(!e.entries)return void this.successCallback(this.format(e));const t=e.entries.map(this.format);this.successCallback(ke({},e,{entries:t}))})}getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/comments")}commentsUrl(e){const t="".concat(this.getBaseApiUrl(),"/comments");return e?"".concat(t,"/").concat(e):t}format(e){return ke({},e,{tagged_message:""!==e.tagged_message?e.tagged_message:e.message})}createComment(e){let{file:t,message:n,taggedMessage:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.qb;const{id:a="",permissions:s}=t;try{this.checkApiCallValidity(b.Ye,s,a)}catch(e){return void o(e,this.errorCode)}const l={data:{item:{id:a,type:"file"},message:n,tagged_message:r},params:{fields:re.b.toString()}};this.post({id:a,url:this.commentsUrl(),data:l,successCallback:i,errorCallback:o})}updateComment(e){let{file:t,commentId:n,message:r,tagged_message:i,permissions:o,successCallback:a,errorCallback:s}=e;this.errorCode=b.rc;const{id:l=""}=t;try{this.checkApiCallValidity(b.cf,o,l)}catch(e){return void s(e,this.errorCode)}const c={data:{message:r,tagged_message:i}};this.put({id:l,url:this.commentsUrl(n),data:c,successCallback:a,errorCallback:s})}deleteComment(e){let{file:t,commentId:n,permissions:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.zb;const{id:a=""}=t;try{this.checkApiCallValidity(b.af,r,a)}catch(e){return void o(e,this.errorCode)}this.delete({id:a,url:this.commentsUrl(n),successCallback:i,errorCallback:o})}getComments(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:re.b,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0;this.errorCode=b.Mb;try{this.checkApiCallValidity(b.Ye,t,e)}catch(e){return void r(e,this.errorCode)}this.offsetGet(e,n,r,o,a,i,s)}};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const Te=[b.we,b.te,b.ve,b.pe,b.xe,b.se];class Me extends C.a{constructor(e){let{retryableStatusCodes:t=Te}=e;super(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Ae(e,["retryableStatusCodes"]),{retryableStatusCodes:t}))}}var De=Me;function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){Ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Fe=class extends De{getUrlForFileTasks(e){return"".concat(this.getBaseApiUrl(),"/undoc/files/").concat(e,"/linked_tasks?limit=").concat(b.l)}getUrlForTaskCreateWithDeps(){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/with_dependencies")}getUrlForTask(e){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/").concat(e)}getUrlForTaskWithDeps(e){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/").concat(e,"/with_dependencies")}updateTaskWithDeps(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.uc;const o=i.addedAssignees.map(e=>({op:e.item&&"group"===e.item.type?"add_task_collaborators_expand_group":"add_task_collaborator",payload:{target:{type:e.item&&"group"===e.item.type?"group":"user",id:e.id}}})),a=i.removedAssignees.map(e=>({op:"delete_task_collaborator",id:e.id})),{id:s,addedAssignees:l,removedAssignees:c}=i,u=Le(i,["id","addedAssignees","removedAssignees"]);this.put({id:n.id,url:this.getUrlForTaskWithDeps(i.id),data:{data:[{op:"update_task",payload:je({},u)},...o,...a]},successCallback:r,errorCallback:t})}deleteTask(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.Cb,this.delete({id:n.id,url:this.getUrlForTask(i.id),successCallback:r,errorCallback:t})}getTasksForFile(e){let{errorCallback:t,file:n,successCallback:r}=e;this.errorCode=b.Zb,this.get({id:n.id,url:this.getUrlForFileTasks(n.id),successCallback:r,errorCallback:t})}getTask(e){let{errorCallback:t,file:n,id:r,successCallback:i}=e;this.errorCode=b.Zb,this.get({id:n.id,url:this.getUrlForTask(r),successCallback:i,errorCallback:t})}createTaskWithDeps(e){let{errorCallback:t,file:n,successCallback:r,task:i,assignees:o}=e;this.errorCode=b.ub;const a=o.map(e=>({target:{type:e.item&&"group"===e.item.type?"group":"user",id:e.id}})),s=[{target:{id:n.id,type:"file"}}],l={task:je({},i),assigned_to:a,task_links:s};this.post({id:n.id,url:this.getUrlForTaskCreateWithDeps(),data:{data:je({},l)},successCallback:r,errorCallback:t})}},ze=n(21),Ue=n.n(ze);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var We=class extends De{getUrlForTaskCollaborators(e){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/").concat(e,"/task_collaborators?role=ASSIGNEE&limit=").concat(b.l)}getUrlForTaskCollaboratorCreate(){return"".concat(this.getBaseApiUrl(),"/undoc/task_collaborators")}getUrlForTaskCollaborator(e){return"".concat(this.getBaseApiUrl(),"/undoc/task_collaborators/").concat(e)}getUrlForTaskGroupCreate(){return"".concat(this.getBaseApiUrl(),"/undoc/task_collaborators/expand_group")}createTaskCollaborator(e){let{errorCallback:t,file:n,successCallback:r,task:i,user:o}=e;this.errorCode=b.vb;const a={data:{task:{type:"task",id:i.id},target:{type:"user",id:o.id}}};this.post({id:n.id,url:this.getUrlForTaskCollaboratorCreate(),data:He({},a),successCallback:r,errorCallback:t})}createTaskCollaboratorsforGroup(e){let{errorCallback:t,file:n,successCallback:r,task:i,group:o}=e;this.errorCode=b.vb;const a={data:{task:{type:"task",id:i.id},target:{type:"group",id:o.id}}};this.post({id:n.id,url:this.getUrlForTaskGroupCreate(),data:He({},a),successCallback:r,errorCallback:t})}getTaskCollaborators(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.ac;const o=this.getUrlForTaskCollaborators(i.id);this.get({id:n.id,successCallback:r,errorCallback:t,url:o})}updateTaskCollaborator(e){let{errorCallback:t,file:n,successCallback:r,taskCollaborator:i}=e;this.errorCode=b.vc;const o={data:Ue()(i,"id")};this.put({id:n.id,url:this.getUrlForTaskCollaborator(i.id),data:He({},o),successCallback:r,errorCallback:t})}deleteTaskCollaborator(e){let{errorCallback:t,file:n,successCallback:r,taskCollaborator:i}=e;this.errorCode=b.Db,this.delete({id:n.id,url:this.getUrlForTaskCollaborator(i.id),successCallback:r,errorCallback:t})}};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){Ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qe=class extends De{getUrlForTaskLinkCreate(){return"".concat(this.getBaseApiUrl(),"/undoc/task_links")}createTaskLink(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.wb;const o={data:{target:{id:n.id,type:"file"},task:{id:i.id,type:"task"}}};this.post({id:n.id,url:this.getUrlForTaskLinkCreate(),data:qe({},o),successCallback:r,errorCallback:t})}};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ze extends C.a{hasMoreItems(e){return null!==e&&""!==e}async markerGetRequest(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDestroyed())try{const o=this.getUrl(e),a=$e({},i,{marker:t,limit:n}),{data:s}=await this.xhr.get({url:o,id:Object(pe.b)(e),params:a}),l=this.data?this.data.entries:[];this.data=$e({},s,{entries:l.concat(s.entries)});const c=s.next_marker;if(r&&this.hasMoreItems(c))return void this.markerGetRequest(e,c,n,r,i);this.successHandler(this.data)}catch(e){this.errorHandler(e)}}async markerGet(e){let{id:t,successCallback:n,errorCallback:r,marker:i="",limit:o=1e3,requestData:a,shouldFetchAll:s=!0}=e;return this.successCallback=n,this.errorCallback=r,this.markerGetRequest(t,i,o,s,a)}}var Je=Ze;function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nt=e=>{const t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{tagged_message:e.message});return e.replies&&e.replies.length&&(t.replies=e.replies.map(nt)),t};function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var at=class extends Je{constructor(){super(...arguments),ot(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;if(!e)return void this.successCallback();if(!e.entries)return void this.successCallback(nt(e));const t=e.entries.map(nt);this.successCallback(it({},e,{entries:t}))})}getUrl(e){return"".concat(this.getBaseApiUrl(),"/undoc/comments").concat(e?"?file_id=".concat(e):"")}getUrlForId(e){return"".concat(this.getUrl(),"/").concat(e)}getUrlWithRepliesForId(e,t){return"".concat(this.getUrlForId(e),"/replies").concat(t?"?file_id=".concat(t):"")}createComment(e){let{file:t,message:n,successCallback:r,errorCallback:i}=e;this.errorCode=b.qb;const{id:o,permissions:a}=t;try{this.checkApiCallValidity(b.Ye,a,o)}catch(e){return void i(e,this.errorCode)}this.post({id:o,url:this.getUrl(o),data:{data:{message:n}},successCallback:r,errorCallback:i})}updateComment(e){let{fileId:t,commentId:n,status:r,message:i,permissions:o,successCallback:a,errorCallback:s}=e;if(this.errorCode=b.rc,i)try{this.checkApiCallValidity(b.cf,o,t)}catch(e){return void s(e,this.errorCode)}if(r)try{this.checkApiCallValidity(b.ff,o,t)}catch(e){return void s(e,this.errorCode)}const l={data:{status:r,message:i}};this.put({id:t,url:this.getUrlForId(n),data:l,successCallback:a,errorCallback:s})}deleteComment(e){let{fileId:t,commentId:n,permissions:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.zb;try{this.checkApiCallValidity(b.af,r,t)}catch(e){return void o(e,this.errorCode)}this.delete({id:t,url:this.getUrlForId(n),successCallback:i,errorCallback:o})}getComment(e){let{commentId:t,errorCallback:n,fileId:r,permissions:i,successCallback:o}=e;this.errorCode=b.Lb;try{this.checkApiCallValidity(b.Ye,i,r)}catch(e){return void n(e,this.errorCode)}this.get({id:r,errorCallback:n,successCallback:o,url:this.getUrlForId(t)})}getComments(e){let{fileId:t,permissions:n,successCallback:r,errorCallback:i,marker:o,limit:a,shouldFetchAll:s,repliesCount:l}=e;this.errorCode=b.Mb;try{this.checkApiCallValidity(b.Ye,n,t)}catch(e){return void i(e,this.errorCode)}this.markerGet({id:t,successCallback:r,errorCallback:i,marker:o,limit:a,requestData:it({},l?{replies_count:l}:null),shouldFetchAll:s})}getCommentReplies(e){let{fileId:t,commentId:n,permissions:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.Xb;try{this.checkApiCallValidity(b.Ye,r,t)}catch(e){return void o(e,this.errorCode)}this.get({id:t,errorCallback:o,successCallback:i,url:this.getUrlWithRepliesForId(n)})}createCommentReply(e){let{fileId:t,commentId:n,permissions:r,successCallback:i,errorCallback:o,message:a}=e;this.errorCode=b.tb;try{this.checkApiCallValidity(b.Ye,r,t)}catch(e){return void o(e,this.errorCode)}this.post({id:t,data:{data:{message:a}},errorCallback:o,successCallback:i,url:this.getUrlWithRepliesForId(n,t)})}};class st extends C.a{getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/file_access_stats/").concat(e)}getFileAccessStats(e,t,n){this.errorCode=b.Hb,this.get({id:e,successCallback:t,errorCallback:n})}}var lt=st;function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ht=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="/file_activities?file_id=".concat(e),i=!!t&&!!t.length,o=n?"true":"false",a="&enable_replies=".concat(o,"&reply_limit=").concat(1),s=i?"&activity_types=".concat(t.join()):"";return"".concat(r).concat(s).concat(a)};class ft extends C.a{getFilteredUrl(e,t,n){return"".concat(this.getBaseApiUrl()).concat(ht(e,t,n))}getActivities(e){let{activityTypes:t,errorCallback:n,fileID:r,permissions:i,repliesCount:o,shouldShowReplies:a,successCallback:s}=e;this.errorCode=b.Ib;try{if(!r)throw new Error("Missing file id!");t.includes(b.Ud)&&this.checkApiCallValidity(b.Ye,i,r),t.includes(b.Sd)&&this.checkApiCallValidity(b.if,i,r)}catch(e){return void n(e,this.errorCode)}this.get({id:r,successCallback:s,errorCallback:n,requestData:ut({},o?{replies_count:o}:null),url:this.getFilteredUrl(r,t,a)})}}var pt=ft;function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){bt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vt=class extends Je{getUrl(){return"".concat(this.getBaseApiUrl(),"/groups")}getGroupsInEnterprise(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.cb;this.errorCode=b.Ob,this.markerGet({id:e,limit:i,successCallback:t,errorCallback:n,requestData:gt({usemarker:!0},r),shouldFetchAll:!1})}};function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ct=class extends Je{getUrl(){return"".concat(this.getBaseApiUrl(),"/users")}getUsersInEnterprise(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.cb;this.errorCode=b.Pb,this.markerGet({id:e,limit:i,successCallback:t,errorCallback:n,requestData:wt({usemarker:!0},r),shouldFetchAll:!1})}};class St extends C.a{getUrlForGroupCount(e){return"".concat(this.getBaseApiUrl(),"/groups/").concat(e,"/memberships")}getGroupCount(e){let{errorCallback:t=o.a,successCallback:n=o.a,group:r,file:i}=e;return new Promise((e,o)=>this.get({id:i.id,url:this.getUrlForGroupCount(r.id),successCallback:function(){n(...arguments),e(...arguments)},errorCallback:function(){t(...arguments),o()},requestData:{params:{limit:1}}}))}}var Ot=St,kt=n(64),_t=n.n(kt),xt=n(63);class Pt extends C.a{getUrl(){return"".concat(this.getBaseApiUrl(),"/users/me")}getAvatarUrl(e){if(!e)throw new Error("Missing user id");return"".concat(this.getBaseApiUrl(),"/users/").concat(e,"/avatar")}async getAvatarUrlWithAccessToken(e,t){if(!e)return null;const n=this.getCache();if(n.has(e))return n.get(e);const r=await xt.a.getReadToken(Object(pe.b)(t),this.options.token);if("string"==typeof r){const t={access_token:r,pic_type:"large"},i=_t.a.stringify(t),o="".concat(this.getAvatarUrl(e),"?").concat(i);return n.set(e,o),o}return null}getUser(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.errorCode=b.Nb,this.get({id:e,successCallback:t,errorCallback:n,requestData:r})}}var It=Pt,At=n(12),Tt=n.n(At);class Mt extends ee.a{getMetadataCacheKey(e){return"".concat(b.q).concat(e)}getSkillsCacheKey(e){return"".concat(this.getMetadataCacheKey(e),"_skills")}getClassificationCacheKey(e){return"".concat(this.getMetadataCacheKey(e),"_classification")}getMetadataUrl(e,t,n){const r="".concat(this.getUrl(e),"/metadata");return t&&n?"".concat(r,"/").concat(t,"/").concat(n):r}getMetadataTemplateUrl(){return"".concat(this.getBaseApiUrl(),"/metadata_templates")}getMetadataTemplateUrlForInstance(e){return"".concat(this.getMetadataTemplateUrl(),"?metadata_instance_id=").concat(e)}getMetadataTemplateSchemaUrl(e){return"".concat(this.getMetadataTemplateUrl(),"/enterprise/").concat(e,"/schema")}getMetadataTemplateUrlForScope(e){return"".concat(this.getMetadataTemplateUrl(),"/").concat(e)}getCustomPropertiesTemplate(){return{id:Tt()("metadata_template_"),scope:b.De,templateKey:b.Ge,hidden:!1}}createEditor(e,t,n){const r={};return Object.keys(e).forEach(t=>{t.startsWith("$")||(r[t]=e[t])}),{template:t,instance:{id:e.$id,canEdit:e.$canEdit&&n,data:r}}}async getTemplates(e,t,n){this.errorCode=b.Vb;let r={};const i=n?this.getMetadataTemplateUrlForInstance(n):this.getMetadataTemplateUrlForScope(t);try{r=await this.xhr.get({url:i,id:Object(pe.b)(e),params:{limit:b.Fe}})}catch(e){const{status:t}=e;if(Object(ie.e)(t))throw e}return y()(r,"data.entries",[])}getSchemaByTemplateKey(e){const t=this.getMetadataTemplateSchemaUrl(e);return this.xhr.get({url:t})}async getInstances(e){this.errorCode=b.Ub;let t={};try{t=await this.xhr.get({url:this.getMetadataUrl(e),id:Object(pe.b)(e)})}catch(e){const{status:t}=e;if(Object(ie.e)(t))throw e}return y()(t,"data.entries",[])}getUserAddableTemplates(e,t,n,r){let i=[];return n&&(i=r?[e]:[e].concat(t)),i.filter(e=>!e.hidden&&e.templateKey!==b.Ee)}extractClassification(e,t){const n=t.find(e=>e.$template===b.Ee);if(n){t.splice(t.indexOf(n),1);const r=this.getCache(),i=this.getClassificationCacheKey(e);r.set(i,n)}return t}async getTemplateForInstance(e,t,n){const r=t.$id,i=t.$template,o=t.$scope;let a=n.find(e=>e.templateKey===i&&e.scope===o);if(!a&&o.startsWith(b.Ce)){a=(await this.getTemplates(e,o,r))[0]}return a}async getEditors(e,t,n,r,i,o){const a=[n].concat(r,i),s=this.extractClassification(e,t),l=[];return await Promise.all(s.map(async t=>{const n=await this.getTemplateForInstance(e,t,a);n&&l.push(this.createEditor(t,n,o))})),l}async getMetadata(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{id:o,permissions:a,is_externally_owned:s}=e;if(this.errorCode=b.Ub,this.successCallback=t,this.errorCallback=n,!o||!a)return void this.errorHandler(Object(ie.a)());const l=this.getCache(),c=this.getMetadataCacheKey(o);if(i.forceFetch&&l.unset(c),!l.has(c)||(this.successHandler(l.get(c)),i.refreshCache))try{const e=this.getCustomPropertiesTemplate(),[t,n,i]=await Promise.all([this.getInstances(o),this.getTemplates(o,b.De),r?this.getTemplates(o,b.Ce):Promise.resolve([])]),u={editors:await this.getEditors(o,t,e,i,n,!!a.can_upload),templates:this.getUserAddableTemplates(e,i,r,s)};l.set(c,u),this.isDestroyed()||this.successHandler(u)}catch(e){this.errorHandler(e)}}async getSkills(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.errorCode=b.Yb;const{id:i}=e;if(!i)return void n(Object(ie.a)(),this.errorCode);const o=this.getCache(),a=this.getSkillsCacheKey(i);if(this.successCallback=t,this.errorCallback=n,r&&o.unset(a),o.has(a))return void this.successHandler(o.get(a));let s={data:y()(e,b.kd)};try{if(s.data||(s=await this.xhr.get({url:this.getMetadataUrl(i,b.De,b.He),id:Object(pe.b)(i)})),!this.isDestroyed()){const e=s.data.cards||[];o.set(a,e),this.successHandler(e)}}catch(e){this.errorHandler(e)}}async updateSkills(e,t,n,r){this.errorCode=b.tc;const{id:i,permissions:o}=e;if(i&&o)if(o.can_upload){this.successCallback=n,this.errorCallback=r;try{const e=await this.xhr.put({url:this.getMetadataUrl(i,b.De,b.He),headers:{[b.ie]:"application/json-patch+json"},id:Object(pe.b)(i),data:t});if(!this.isDestroyed()){const t=e.data.cards||[];this.merge(this.getCacheKey(i),b.kd,e.data),this.getCache().set(this.getSkillsCacheKey(i),t),this.successHandler(t)}}catch(e){this.errorHandler(e)}}else r(Object(ie.b)(),this.errorCode);else r(Object(ie.a)(),this.errorCode)}async updateMetadata(e,t,n,r,i){this.errorCode=b.sc,this.successCallback=r,this.errorCallback=i;const{id:o,permissions:a}=e;if(!o||!a)return void this.errorHandler(Object(ie.a)());const s=!!a.can_upload;if(s)try{const e=await this.xhr.put({url:this.getMetadataUrl(o,t.scope,t.templateKey),headers:{[b.ie]:"application/json-patch+json"},id:Object(pe.b)(o),data:n});if(!this.isDestroyed()){const n=this.getCache(),r=this.getMetadataCacheKey(o),i=n.get(r),a=this.createEditor(e.data,t,s);i&&i.editors&&i.editors.splice(i.editors.findIndex(e=>{let{instance:t}=e;return t.id===a.instance.id}),1,a),this.successHandler(a)}}catch(e){this.errorHandler(e)}else this.errorHandler(Object(ie.b)())}async createMetadata(e,t,n,r){if(this.errorCode=b.sb,!e||!t)return void r(Object(ie.a)(),this.errorCode);const{id:i,permissions:o,is_externally_owned:a}=e;if(!i||!o)return void r(Object(ie.a)(),this.errorCode);const s=!!o.can_upload,l=t.templateKey===b.Ge&&t.scope===b.De;if(!s||a&&!l)r(Object(ie.b)(),this.errorCode);else{this.successCallback=n,this.errorCallback=r;try{const e=await this.xhr.post({url:this.getMetadataUrl(i,t.scope,t.templateKey),id:Object(pe.b)(i),data:{}});if(!this.isDestroyed()){const n=this.getCache(),r=this.getMetadataCacheKey(i),o=n.get(r),a=this.createEditor(e.data,t,s);o.editors.push(a),this.successHandler(a)}}catch(e){this.errorHandler(e)}}}async deleteMetadata(e,t,n,r){if(this.errorCode=b.Bb,!e||!t)return void r(Object(ie.a)(),this.errorCode);const{scope:i,templateKey:o}=t,{id:a,permissions:s}=e;if(a&&s)if(s.can_upload){this.successCallback=n,this.errorCallback=r;try{if(await this.xhr.delete({url:this.getMetadataUrl(a,i,o),id:Object(pe.b)(a)}),!this.isDestroyed()){const e=this.getCache(),t=this.getMetadataCacheKey(a),n=e.get(t);n.editors.splice(n.editors.findIndex(e=>e.template.scope===i&&e.template.templateKey===o),1),this.successHandler()}}catch(e){this.errorHandler(e)}}else r(Object(ie.b)(),this.errorCode);else r(Object(ie.a)(),this.errorCode)}}var Dt=Mt;function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nt=class extends Je{constructor(){var e;super(...arguments),e=this,jt(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;const t=e.entries.map(e=>{let t;return"group"===e.type?t=e:(t=e).email=t.login,{id:e.id,name:e.name,item:t}});this.successCallback(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){jt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{entries:t}))}),jt(this,"getCollaboratorsWithQuery",(function(t,n,r,i){let{includeGroups:o=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};i&&""!==i.trim()&&e.getFileCollaborators(t,n,r,{filter_term:i,include_groups:o,include_uploader_collabs:!1})}))}getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/collaborators")}getFileCollaborators(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.bb;this.markerGet({id:e,limit:i,successCallback:t,errorCallback:n,requestData:r})}};function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=class extends Je{constructor(){var e;super(...arguments),e=this,Lt(this,"getCollaborations",(function(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.bb;e.markerGet({id:t,limit:o,successCallback:n,errorCallback:r,requestData:i})})),Lt(this,"successHandler",e=>{this.isDestroyed()||"function"!=typeof this.successCallback||this.successCallback(e)})}getUrl(e){return"getUrl(".concat(e,") should be overridden")}};var zt=class extends Ft{getUrl(e){if(!e)throw new Error("Missing file ID!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/collaborations")}};var Ut=class extends Ft{getUrl(e){if(!e)throw new Error("Missing folder ID!");return"".concat(this.getBaseApiUrl(),"/folders/").concat(e,"/collaborations")}};function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Wt extends C.a{constructor(){super(...arguments),Vt(this,"addCollaboration",(e,t,n,r)=>{const{id:i}=e;this.post({id:i,data:{data:Ht({item:e},t)},errorCallback:r,successCallback:n,url:this.getUrl()})})}getUrl(){return"".concat(this.getBaseApiUrl(),"/collaborations")}}var Kt=Wt,qt=n(5),Gt=n(28);var Qt=n(109),Yt=n.n(Qt);function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach((function(t){Zt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Jt extends Je{constructor(){super(...arguments),Zt(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;if(!e)return void this.successCallback();if(!e.entries)return e.type&&"comment"===e.type?void this.successCallback(nt(e)):void this.successCallback(this.formatReplies(e));if(e.entries.length&&"comment"===e.entries[0].type){const t=e.entries.map(nt);return void this.successCallback(Xt({},e,{entries:t}))}const t=e.entries.map(this.formatReplies);this.successCallback(Xt({},e,{entries:t}))})}formatReplies(e){return e.replies&&e.replies.length?Xt({},e,{replies:e.replies.map(nt)}):e}getUrl(){return"".concat(this.getBaseApiUrl(),"/undoc/annotations")}getUrlForId(e){return"".concat(this.getUrl(),"/").concat(e)}getUrlWithRepliesForId(e){return"".concat(this.getUrlForId(e),"/replies")}createAnnotation(e,t,n,r,i,o){this.errorCode=b.pb;try{this.checkApiCallValidity(b.Ze,r,e)}catch(e){return void o(e,this.errorCode)}const a={description:{type:"reply"},file_version:{id:t,type:"file_version"}};this.post({id:e,data:{data:Yt()(a,n)},errorCallback:o,successCallback:i,url:this.getUrl()})}updateAnnotation(e,t,n,r,i,o){this.errorCode=b.Fb;const{message:a,status:s}=r;if(a)try{this.checkApiCallValidity(b.cf,n,e)}catch(e){return void o(e,this.errorCode)}if(s)try{this.checkApiCallValidity(b.ff,n,e)}catch(e){return void o(e,this.errorCode)}this.put({id:e,data:{data:{description:a?{message:a}:void 0,status:s}},errorCallback:o,successCallback:i,url:this.getUrlForId(t)})}deleteAnnotation(e,t,n,r,i){this.errorCode=b.xb;try{this.checkApiCallValidity(b.af,n,e)}catch(e){return void i(e,this.errorCode)}this.delete({id:e,errorCallback:i,successCallback:r,url:this.getUrlForId(t)})}getAnnotation(e,t,n,r,i,o){this.errorCode=b.Jb;try{this.checkApiCallValidity(b.if,n,e)}catch(e){return void i(e,this.errorCode)}const a=o?{params:{fields:"replies"}}:void 0;this.get({id:e,errorCallback:i,successCallback:r,url:this.getUrlForId(t),requestData:a})}getAnnotations(e,t,n,r,i,o,a,s){this.errorCode=b.Kb;try{this.checkApiCallValidity(b.if,n,e)}catch(e){return void i(e,this.errorCode)}const l=Xt({file_id:e,file_version_id:t},s?{fields:"replies"}:null);this.markerGet({id:e,errorCallback:i,limit:o,requestData:l,shouldFetchAll:a,successCallback:r})}getAnnotationReplies(e,t,n,r,i){this.errorCode=b.Xb;try{this.checkApiCallValidity(b.if,n,e)}catch(e){return void i(e,this.errorCode)}this.get({id:e,errorCallback:i,successCallback:r,url:this.getUrlWithRepliesForId(t)})}createAnnotationReply(e,t,n,r,i,o){this.errorCode=b.tb;try{this.checkApiCallValidity(b.Ze,n,e)}catch(e){return void o(e,this.errorCode)}this.post({id:e,data:{data:{message:r}},errorCallback:o,successCallback:i,url:"".concat(this.getUrlWithRepliesForId(t),"?file_id=").concat(e)})}}function en(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tn=class extends Je{constructor(){super(...arguments),en(this,"permissions",{}),en(this,"mapAppActivityItem",e=>{const{activity_template:t,app:n,created_by:r,id:i,occurred_at:o,rendered_text:a,type:s}=e,{can_delete:l}=this.permissions;return{activity_template:t,app:n,created_at:o,created_by:r,id:i,permissions:{can_delete:l},rendered_text:a,type:s}}),en(this,"successHandler",e=>{let{entries:t=[]}=e;if(this.isDestroyed()||"function"!=typeof this.successCallback)return;const n=t.map(this.mapAppActivityItem);this.successCallback({entries:n,total_count:n.length})}),en(this,"errorHandler",e=>{if(this.isDestroyed()&&"function"!=typeof this.errorCallback)return;const{response:t}=e;t.status===b.ue?this.successHandler({entries:[],total_count:0}):this.errorCallback(e,t.status)})}getUrl(){return"".concat(this.getBaseApiUrl(),"/app_activities")}getDeleteUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getUrl(),"/").concat(e)}getAppActivity(e,t,n,r){const i={item_id:e,item_type:"file",fields:re.a.toString()};this.permissions=t,this.markerGet({id:e,successCallback:n,errorCallback:r,requestData:i})}deleteAppActivity(e){let{id:t,appActivityId:n,successCallback:r,errorCallback:i}=e;this.errorCode=b.yb,this.delete({id:t,url:this.getDeleteUrl(n),successCallback:r,errorCallback:i})}};function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach((function(t){on(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const sn=b.bg,ln=(e,t)=>{const{replies:n=[]}=e,r=an(e,["replies"]);return rn({replies:n.filter(e=>{let{id:n}=e;return n!==t})},r)},cn=(e,t)=>{const{replies:n=[]}=e;return rn({replies:[...n,t]},an(e,["replies"]))},un=e=>{return[...e].map(e=>rn({},e,{tagged_message:e.tagged_message||e.message||""}))},dn=e=>{if(!e||!e.entries||!e.entries.length)return[];return e.entries.map(e=>{if(!e.source)return null;const t=rn({},e.source);switch(e.activity_type){case b.Vd:{var n;const e=rn({},t[b.Vd]);if(null===(n=e.assigned_to)||void 0===n?void 0:n.entries){const t=e.assigned_to.entries.map(e=>{const t=rn({},e);return t.role=e.role.toUpperCase(),t.status=e.status.toUpperCase(),t});e.assigned_to.entries=t}return e.completion_rule&&(e.completion_rule=e.completion_rule.toUpperCase()),e.status&&(e.status=e.status.toUpperCase()),e.task_type&&(e.task_type=e.task_type.toUpperCase()),e.created_by={target:e.created_by},e}case b.Ud:{const e=rn({},t[b.Ud]);if(e.replies&&e.replies.length){const t=un(e.replies);e.replies=t}return e.tagged_message=e.tagged_message||e.message||"",e}case b.Sd:{const e=rn({},t[b.Sd]);if(e.replies&&e.replies.length){const t=un(e.replies);e.replies=t}return e}case b.Td:{const e=rn({},t[b.Td]);return e.created_at=e.occurred_at,e}case b.Wd:{var r,i;const e=rn({},t[b.Wd]);if(e.type=b.Hc,e.action_by){const t={};1===e.action_by.length&&(e.uploader_display_name=e.action_by[0].name),e.action_by.map(e=>(t[e.id]=rn({},e),e)),e.collaborators=t}var o,a,s,l,c,u;if((null===(r=e.end)||void 0===r?void 0:r.number)&&(e.version_end=e.end.number,e.id=e.end.id),(null===(i=e.start)||void 0===i?void 0:i.number)&&(e.version_start=e.start.number),e.version_start===e.version_end)e.version_number=e.version_start,e.action_type===b.e&&(null===(o=e.start)||void 0===o?void 0:o.created_at)&&(null===(a=e.start)||void 0===a?void 0:a.created_by)&&(e.modified_at=e.start.created_at,e.modified_by=rn({},e.start.created_by)),e.action_type===b.g&&(null===(s=e.start)||void 0===s?void 0:s.trashed_at)&&(null===(l=e.start)||void 0===l?void 0:l.trashed_by)&&(e.trashed_at=e.start.trashed_at,e.trashed_by=rn({},e.start.trashed_by)),e.action_type===b.f&&(null===(c=e.start)||void 0===c?void 0:c.restored_at)&&(null===(u=e.start)||void 0===u?void 0:u.restored_by)&&(e.restored_at=e.start.restored_at,e.restored_by=rn({},e.start.restored_by));return e}default:return null}}).filter(e=>!!e).reverse()};class hn extends C.a{constructor(e){var t;super(e),t=this,on(this,"updateAnnotation",(e,t,n,r,i,o,a)=>{if(!e.id)throw Object(ie.a)();if(!n&&!r)throw Object(ie.d)();this.annotationsAPI=new Jt(this.options),this.file=e,this.errorCallback=a;const s={};n&&(s.message=n),r&&(s.status=r),this.updateFeedItem(rn({},s,{isPending:!0}),t),this.annotationsAPI.updateAnnotation(this.file.id,t,i,s,e=>{const{replies:n,total_reply_count:r}=e,i=an(e,["replies","total_reply_count"]);this.updateFeedItem(rn({},i,{isPending:!1}),t),this.isDestroyed()||o(e)},(e,n)=>{this.updateCommentErrorCallback(e,n,t)})}),on(this,"updateCommentErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.commentUpdateErrorMessage),n),this.feedErrorCallback(!0,e,t)}),on(this,"updateReplyErrorCallback",(e,t,n,r)=>{this.updateReplyItem(this.createFeedError(Gt.a.commentUpdateErrorMessage),r,n),this.feedErrorCallback(!0,e,t)}),on(this,"fetchRepliesErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.repliesFetchErrorMessage),n),this.feedErrorCallback(!0,e,t)}),on(this,"deleteAnnotation",(e,t,n,r,i)=>{if(this.annotationsAPI=new Jt(this.options),!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isPending:!0},t),this.annotationsAPI.deleteAnnotation(this.file.id,t,n,this.deleteFeedItem.bind(this,t,r),(e,n)=>{this.deleteCommentErrorCallback(e,n,t)})}),on(this,"fetchThreadedCommentSuccessCallback",(e,t,n)=>{t(n),e()}),on(this,"updateTaskCollaborator",(e,t,n,r,i,o)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=o,this.updateFeedItem({isPending:!0},t);const a=new We(this.options);this.taskCollaboratorsAPI.push(a);const s={id:n,status:r},l=(e,n)=>{let i;switch(r){case b.Yf:i=Gt.a.taskApproveErrorMessage;break;case b.Zf:i=Gt.a.taskCompleteErrorMessage;break;case b.cg:i=Gt.a.taskRejectErrorMessage;break;default:i=Gt.a.taskCompleteErrorMessage}this.updateFeedItem(this.createFeedError(i,Gt.a.taskActionErrorTitle),t),this.feedErrorCallback(!0,e,n)};a.updateTaskCollaborator({file:e,taskCollaborator:s,successCallback:n=>{this.updateTaskCollaboratorSuccessCallback(t,e,n,i,l)},errorCallback:l})}),on(this,"updateTaskCollaboratorSuccessCallback",(e,t,n,r,i)=>{this.tasksNewAPI=new Fe(this.options),this.tasksNewAPI.getTask({id:e,file:t,successCallback:t=>{this.updateFeedItem(rn({},t,{isPending:!1}),e),r(n)},errorCallback:i})}),on(this,"updateTaskNew",(async function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.a;if(!e.id)throw Object(ie.a)();t.file=e,t.errorCallback=i,t.tasksNewAPI=new Fe(t.options),t.updateFeedItem({isPending:!0},n.id);try{const i=n.addedAssignees.filter(e=>e.item&&"group"===e.item.type).map(e=>e.id).map(n=>new Ot(t.options).getGroupCount({file:e,group:{id:n}})),o=(await Promise.all(i)).some(e=>e.total_count>b.Xf),a={code:b.fc,type:"warning"};if(o)return void t.feedErrorCallback(!1,a,b.fc);await new Promise((r,i)=>{t.tasksNewAPI.updateTaskWithDeps({file:e,task:n,successCallback:r,errorCallback:i})}),await new Promise((r,i)=>{t.tasksNewAPI.getTask({file:e,id:n.id,successCallback:e=>{t.updateFeedItem(rn({},e,{isPending:!1}),n.id),r()},errorCallback:e=>{t.updateFeedItem({isPending:!1},n.id),t.feedErrorCallback(!1,e,b.uc),i()}})}),t.isDestroyed()||r()}catch(e){t.updateFeedItem({isPending:!1},n.id),t.feedErrorCallback(!1,e,b.uc)}})),on(this,"deleteComment",(e,t,n,r,i)=>{if(this.commentsAPI=new xe(this.options),!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isPending:!0},t),this.commentsAPI.deleteComment({file:e,commentId:t,permissions:n,successCallback:this.deleteFeedItem.bind(this,t,r),errorCallback:(e,n)=>{this.deleteCommentErrorCallback(e,n,t)}})}),on(this,"deleteThreadedComment",(e,t,n,r,i)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isPending:!0},t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.deleteComment({fileId:e.id,commentId:t,permissions:n,successCallback:this.deleteFeedItem.bind(this,t,r),errorCallback:(e,n)=>{this.deleteCommentErrorCallback(e,n,t)}})}),on(this,"deleteReply",(e,t,n,r,i,o)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=o,this.updateReplyItem({isPending:!0},n,t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.deleteComment({fileId:e.id,commentId:t,permissions:r,successCallback:this.deleteReplySuccessCallback.bind(this,t,n,i),errorCallback:(e,r)=>{this.deleteReplyErrorCallback(e,r,t,n)}})}),on(this,"deleteReplySuccessCallback",(e,t,n)=>{this.modifyFeedItemRepliesCountBy(t,-1),this.deleteReplyItem(e,t,n)}),on(this,"deleteCommentErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.commentDeleteErrorMessage),n),this.feedErrorCallback(!0,e,t)}),on(this,"deleteReplyErrorCallback",(e,t,n,r)=>{this.updateReplyItem(this.createFeedError(Gt.a.commentDeleteErrorMessage),r,n),this.feedErrorCallback(!0,e,t)}),on(this,"createTaskNew",(e,t,n,r,i,o,a,s,l)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=l;const c=Tt()("task_");let u;if(o){u=new Date(o).toISOString()}const d={created_by:{type:"task_collaborator",target:t,id:Tt()(),role:"CREATOR",status:sn},completion_rule:a,created_at:(new Date).toISOString(),due_at:u,id:c,description:n,type:b.Gc,assigned_to:{entries:r.map(e=>({id:Tt()(),target:rn({},e,{avatar_url:"",type:"user"}),status:sn,permissions:{can_delete:!1,can_update:!1},role:"ASSIGNEE",type:"task_collaborator"})),limit:10,next_marker:null},permissions:{can_update:!1,can_delete:!1,can_create_task_collaborator:!1,can_create_task_link:!1},task_links:{entries:[{id:Tt()(),type:"task_link",target:rn({type:"file"},e),permissions:{can_delete:!1,can_update:!1}}],limit:1,next_marker:null},task_type:i,status:b.bg},h={description:n,due_at:u,task_type:i,completion_rule:a},f=r.filter(e=>"group"===(e.item&&e.item.type)).map(e=>e.id).map(t=>new Ot(this.options).getGroupCount({file:e,group:{id:t}}));Promise.all(f).then(n=>{const i=n.some(e=>e.total_count>b.Xf),o={code:b.fc,type:"warning"};i?this.feedErrorCallback(!1,o,b.fc):(this.tasksNewAPI=new Fe(this.options),this.tasksNewAPI.createTaskWithDeps({file:e,task:h,assignees:r,successCallback:e=>{this.addPendingItem(this.file.id,t,d),this.updateFeedItem(rn({},e,{task_links:{entries:e.task_links,next_marker:null,limit:1},assigned_to:{entries:e.assigned_to,next_marker:null,limit:e.assigned_to.length},isPending:!1}),c),s(e)},errorCallback:(e,t)=>{this.feedErrorCallback(!1,e,t)}}))}).catch(e=>{this.feedErrorCallback(!1,e,b.ub)})}),on(this,"deleteTaskNew",(function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.a;if(!e.id)throw Object(ie.a)();t.file=e,t.errorCallback=i,t.tasksNewAPI=new Fe(t.options),t.updateFeedItem({isPending:!0},n.id),t.tasksNewAPI.deleteTask({file:e,task:n,successCallback:t.deleteFeedItem.bind(t,n.id,r),errorCallback:(e,r)=>{t.updateFeedItem(t.createFeedError(Gt.a.taskDeleteErrorMessage),n.id),t.feedErrorCallback(!0,e,r)}})})),on(this,"deleteFeedItem",(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.a;const r=t.getCachedItems(t.file.id);if(r){const i=r.items.filter(t=>t.id!==e);t.setCachedItems(t.file.id,i),t.isDestroyed()||n(e)}})),on(this,"deleteReplyItem",(function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a;const i=t.getCachedItems(t.file.id)||{items:[],errors:[]},a=i.items.map(t=>t.id!==n?t:t.type===b.Dc?ln(t,e):t.type===b.Fc?ln(t,e):t);t.setCachedItems(t.file.id,a),t.isDestroyed()||r(e,n)})),on(this,"feedErrorCallback",(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;e&&t.errors.push(rn({},n,{code:r})),!t.isDestroyed()&&t.errorCallback&&t.errorCallback(n,r,{error:n,[b.Ae]:e}),console.error(n)})),on(this,"addPendingItem",(e,t,n)=>{if(!t)throw Object(ie.c)();const r=(new Date).toISOString(),i=rn({created_at:r,created_by:t,modified_at:r,isPending:!0},n),o=this.getCachedItems(this.file.id),a=[...o?o.items:[],i];return this.setCachedItems(e,a),i}),on(this,"addPendingReply",(e,t,n)=>{if(!this.file.id)throw Object(ie.a)();if(!t)throw Object(ie.c)();const r=(new Date).toISOString(),i=rn({created_at:r,created_by:t,modified_at:r,isPending:!0},n),o=this.getCachedItems(this.file.id);if(o){const t=o.items.map(t=>t.id===e&&t.type===b.Fc?cn(t,i):t.id===e&&t.type===b.Dc?cn(t,i):t);this.setCachedItems(this.file.id,t)}return i}),on(this,"createCommentSuccessCallback",(e,t,n)=>{const{message:r="",tagged_message:i=""}=e;e.tagged_message=i||r,this.updateFeedItem(rn({},e,{isPending:!1}),t),this.isDestroyed()||n(e)}),on(this,"createCommentErrorCallback",(e,t,n)=>{const r=e.status===b.qe?Gt.a.commentCreateConflictMessage:Gt.a.commentCreateErrorMessage;this.updateFeedItem(this.createFeedError(r),n),this.feedErrorCallback(!1,e,t)}),on(this,"createReplySuccessCallback",(e,t,n,r)=>{this.updateReplyItem(rn({},e,{isPending:!1}),t,n),this.isDestroyed()||r(e)}),on(this,"createReplyErrorCallback",(e,t,n,r)=>{const i=e.status===b.qe?Gt.a.commentCreateConflictMessage:Gt.a.commentCreateErrorMessage;this.updateReplyItem(this.createFeedError(i),n,r),this.feedErrorCallback(!1,e,t)}),on(this,"updateFeedItem",(e,t)=>{if(!this.file.id)throw Object(ie.a)();const n=this.getCachedItems(this.file.id);if(n){const r=n.items.map(n=>n.id===t?rn({},n,{},e):n);return this.setCachedItems(this.file.id,r),r}return null}),on(this,"updateReplyItem",(e,t,n)=>{if(!this.file.id)throw Object(ie.a)();const r=(e,t,n)=>{const r=rn({},e);return r.replies&&(r.replies=r.replies.map(e=>e.id===t?rn({},e,{},n):e)),r},i=this.getCachedItems(this.file.id);if(i){const o=i.items.map(i=>i.id===t&&i.type===b.Fc?r(i,n,e):i.id===t&&i.type===b.Dc?r(i,n,e):i);this.setCachedItems(this.file.id,o)}}),on(this,"createComment",(e,t,n,r,i,o)=>{const a=Tt()("comment_"),s={id:a,tagged_message:n,type:b.Fc};if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=o,this.addPendingItem(this.file.id,t,s);const l={};r?l.taggedMessage=n:l.message=n,this.commentsAPI=new xe(this.options),this.commentsAPI.createComment(rn({file:e},l,{successCallback:e=>{this.createCommentSuccessCallback(e,a,i)},errorCallback:(e,t)=>{this.createCommentErrorCallback(e,t,a)}}))}),on(this,"createThreadedComment",(e,t,n,r,i)=>{if(!e.id)throw Object(ie.a)();const o=Tt()("comment_"),a={id:o,tagged_message:n,type:b.Fc};this.file=e,this.errorCallback=i,this.addPendingItem(this.file.id,t,a),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.createComment({file:e,message:n,successCallback:e=>{this.createCommentSuccessCallback(e,o,r)},errorCallback:(e,t)=>{this.createCommentErrorCallback(e,t,o)}})}),on(this,"updateComment",(e,t,n,r,i,o,a)=>{const s={tagged_message:n};if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=a,this.updateFeedItem(rn({},s,{isPending:!0}),t);const l={};r?l.tagged_message=n:l.message=n,this.commentsAPI=new xe(this.options),this.commentsAPI.updateComment(rn({file:e,commentId:t,permissions:i},l,{successCallback:e=>{this.updateFeedItem(rn({},l,{isPending:!1}),t),this.isDestroyed()||o(e)},errorCallback:(e,n)=>{this.updateCommentErrorCallback(e,n,t)}}))}),on(this,"updateThreadedComment",(e,t,n,r,i,o,a)=>{if(!e.id)throw Object(ie.a)();if(!n&&!r)throw Object(ie.d)();const s={};n&&(s.tagged_message=n),r&&(s.status=r),this.file=e,this.errorCallback=a,this.updateFeedItem(rn({},s,{isPending:!0}),t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.updateComment({fileId:e.id,commentId:t,permissions:i,message:n,status:r,successCallback:e=>{const{replies:n,total_reply_count:r}=e,i=an(e,["replies","total_reply_count"]);this.updateFeedItem(rn({},i,{isPending:!1}),t),this.isDestroyed()||o(e)},errorCallback:(e,n)=>{this.updateCommentErrorCallback(e,n,t)}})}),on(this,"updateReply",(e,t,n,r,i,o,a)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=a,this.updateReplyItem({tagged_message:r,isPending:!0},n,t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.updateComment({fileId:e.id,commentId:t,permissions:i,message:r,undefined:void 0,successCallback:e=>{this.updateReplyItem(rn({},e,{isPending:!1}),n,t),this.isDestroyed()||o(e)},errorCallback:(e,r)=>{this.updateReplyErrorCallback(e,r,t,n)}})}),on(this,"modifyFeedItemRepliesCountBy",(e,t)=>{if(!this.file.id)throw Object(ie.a)();const{items:n=[]}=this.getCachedItems(this.file.id)||{},r=n.find(t=>{let{id:n}=t;return n===e});if(!r||"annotation"!==r.type&&"comment"!==r.type)return;const i=(r.total_reply_count||0)+t;i>=0&&this.updateFeedItem({total_reply_count:i},e)}),on(this,"deleteAppActivity",(e,t,n,r)=>{const{id:i}=e;if(!i)throw Object(ie.a)();this.appActivityAPI=new tn(this.options),this.file=e,this.errorCallback=r,this.updateFeedItem({isPending:!0},t),this.appActivityAPI.deleteAppActivity({id:i,appActivityId:t,successCallback:this.deleteFeedItem.bind(this,t,n),errorCallback:(e,n)=>{this.deleteAppActivityErrorCallback(e,n,t)}})}),on(this,"deleteAppActivityErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.appActivityDeleteErrorMessage),n),this.feedErrorCallback(!0,e,t)}),this.taskCollaboratorsAPI=[],this.taskLinksAPI=[],this.errors=[]}addAnnotation(e,t,n,r,i){if(!e.id)throw Object(ie.a)();if(this.file=e,i){const e=rn({},n,{created_by:t,id:r,type:b.Dc});this.addPendingItem(this.file.id,t,e)}else this.updateFeedItem(rn({},n,{isPending:!1}),r)}getCacheKey(e){return"".concat(b.fg).concat(e)}getCachedItems(e){const t=this.getCache(),n=this.getCacheKey(e);return t.get(n)}setCachedItems(e,t){const n=this.getCache(),r=this.getCacheKey(e);n.set(r,{errors:this.errors,items:t})}feedItems(e,t,n,r,i){let{shouldShowAnnotations:o=!1,shouldShowAppActivity:a=!1,shouldShowReplies:s=!1,shouldShowTasks:l=!0,shouldShowVersions:c=!0,shouldUseUAA:u=!1}=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const{id:d,permissions:h={}}=e,f=this.getCachedItems(d);if(f){const{errors:e,items:i}=f;if(e.length?r(i,e):n(i),!t)return}this.file=e,this.errors=[],this.errorCallback=i;const p=!u&&o?this.fetchAnnotations(h,s):Promise.resolve(),m=()=>u?Promise.resolve():s?this.fetchThreadedComments(h):this.fetchComments(h),g=!u&&l?this.fetchTasksNew():Promise.resolve(),v=!u&&a?this.fetchAppActivity(h):Promise.resolve(),y=!u&&c?this.fetchVersions():Promise.resolve(),w=!u&&c?this.fetchCurrentVersion():Promise.resolve(),E=o&&h[b.if]?[b.Sd]:[],C=a?[b.Td]:[],S=l?[b.Vd]:[],O=c?[b.Wd]:[],k=[...E,...C,b.Ud,...S,...O],_=u?this.fetchFileActivities(h,k,s):Promise.resolve(),x=e=>{this.isDestroyed()||(this.setCachedItems(d,e),this.errors.length?r(e,this.errors):n(e))};u?_.then(e=>{if(!e)return;const t=dn(e);x(t)}):Promise.all([y,w,m(),g,v,p]).then(e=>{let[t,n,...r]=e;const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>t?e.concat(t.entries):e,[]).sort((e,t)=>Date.parse(e.created_at)-Date.parse(t.created_at))}(n?this.versionsAPI.addCurrentVersion(n,t,this.file):void 0,...r);x(i)})}fetchAnnotations(e,t){return this.annotationsAPI=new Jt(this.options),new Promise(n=>{this.annotationsAPI.getAnnotations(this.file.id,void 0,e,n,this.fetchFeedItemErrorCallback.bind(this,n),void 0,void 0,t)})}fetchComments(e){return this.commentsAPI=new xe(this.options),new Promise(t=>{this.commentsAPI.getComments(this.file.id,e,t,this.fetchFeedItemErrorCallback.bind(this,t))})}fetchThreadedComment(e,t,n,r){const{id:i,permissions:o}=e;if(!i||!o)throw Object(ie.a)();return this.threadedCommentsAPI=new at(this.options),new Promise(e=>{this.threadedCommentsAPI.getComment({commentId:t,errorCallback:r,fileId:i,permissions:o,successCallback:this.fetchThreadedCommentSuccessCallback.bind(this,e,n)})})}fetchThreadedComments(e){return this.threadedCommentsAPI=new at(this.options),new Promise(t=>{this.threadedCommentsAPI.getComments({errorCallback:this.fetchFeedItemErrorCallback.bind(this,t),fileId:this.file.id,permissions:e,successCallback:t})})}fetchFileActivities(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.fileActivitiesAPI=new pt(this.options),new Promise(r=>{this.fileActivitiesAPI.getActivities({errorCallback:this.fetchFeedItemErrorCallback.bind(this,r),fileID:this.file.id,permissions:e,successCallback:r,activityTypes:t,shouldShowReplies:n})})}fetchReplies(e,t,n,r,i){const{id:o,permissions:a}=e;if(!o||!a)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isRepliesLoading:!0},t);const s=e=>{let{entries:n}=e;this.updateFeedItem({isRepliesLoading:!1,replies:n,total_reply_count:n.length},t),r(n)},l=(e,n)=>{this.fetchRepliesErrorCallback(e,n,t)};n===b.Dc?(this.annotationsAPI=new Jt(this.options),this.annotationsAPI.getAnnotationReplies(e.id,t,a,s,l)):n===b.Fc&&(this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.getCommentReplies({fileId:e.id,commentId:t,permissions:a,successCallback:s,errorCallback:l}))}fetchVersions(){return this.versionsAPI=new Se(this.options),new Promise(e=>{this.versionsAPI.getVersions(this.file.id,e,this.fetchFeedItemErrorCallback.bind(this,e),void 0,void 0,re.c)})}fetchCurrentVersion(){return this.versionsAPI=new Se(this.options),new Promise(e=>{const{file_version:t={}}=this.file;this.versionsAPI.getVersion(this.file.id,t.id,e,this.fetchFeedItemErrorCallback.bind(this,e))})}fetchTasksNew(){return this.tasksNewAPI=new Fe(this.options),new Promise(e=>{this.tasksNewAPI.getTasksForFile({file:{id:this.file.id},successCallback:e,errorCallback:(t,n)=>this.fetchFeedItemErrorCallback(e,t,n)})})}fetchFeedItemErrorCallback(e,t,n){const{status:r}=t,i=Object(ie.e)(r);this.feedErrorCallback(i,t,n),e()}createTaskCollaboratorsforGroup(e,t,n){if(!e.id)throw Object(ie.a)();return this.file=e,new Promise((r,i)=>{const o=new We(this.options);this.taskCollaboratorsAPI.push(o),o.createTaskCollaboratorsforGroup({file:e,task:t,group:n,successCallback:r,errorCallback:e=>{i(e)}})})}createTaskCollaborator(e,t,n){if(!e.id)throw Object(ie.a)();return this.file=e,new Promise((r,i)=>{const o=new We(this.options);this.taskCollaboratorsAPI.push(o),o.createTaskCollaborator({file:e,task:t,user:n,successCallback:r,errorCallback:e=>{i(e)}})})}deleteTaskCollaborator(e,t,n){if(!e.id)throw Object(ie.a)();return this.file.id=e.id,new Promise((r,i)=>{const o=new We(this.options);this.taskCollaboratorsAPI.push(o),o.deleteTaskCollaborator({file:e,task:t,taskCollaborator:{id:n.id},successCallback:r,errorCallback:e=>{i(e)}})})}createTaskLink(e,t){if(!e.id)throw Object(ie.a)();return this.file=e,new Promise((n,r)=>{const i=new Qe(this.options);this.taskLinksAPI.push(i),i.createTaskLink({file:e,task:t,successCallback:n,errorCallback:r})})}createFeedError(e){return{error:{message:e,title:arguments.length>1&&void 0!==arguments[1]?arguments[1]:qt.a.errorOccured}}}createReply(e,t,n,r,i,o,a){const{id:s,permissions:l}=e;if(!s||!l)throw Object(ie.a)();const c=Tt()("comment_"),u={id:c,tagged_message:i,type:b.Fc};this.file=e,this.errorCallback=a,this.addPendingReply(n,t,u),this.modifyFeedItemRepliesCountBy(n,1);const d=e=>{this.createReplySuccessCallback(e,n,c,o)},h=(e,t)=>{this.createReplyErrorCallback(e,t,n,c)};r===b.Dc?(this.annotationsAPI=new Jt(this.options),this.annotationsAPI.createAnnotationReply(e.id,n,l,i,d,h)):r===b.Fc&&(this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.createCommentReply({fileId:e.id,commentId:n,permissions:l,message:i,successCallback:d,errorCallback:h}))}destroyTaskCollaborators(){Array.isArray(this.taskCollaboratorsAPI)&&(this.taskCollaboratorsAPI.forEach(e=>e.destroy()),this.taskCollaboratorsAPI=[])}destroyTaskLinks(){Array.isArray(this.taskLinksAPI)&&(this.taskLinksAPI.forEach(e=>e.destroy()),this.taskLinksAPI=[])}fetchAppActivity(e){return this.appActivityAPI=new tn(this.options),new Promise(t=>{this.appActivityAPI.getAppActivity(this.file.id,e,t,this.fetchFeedItemErrorCallback.bind(this,t))})}destroy(){super.destroy(),this.annotationsAPI&&(this.annotationsAPI.destroy(),delete this.annotationsAPI),this.commentsAPI&&(this.commentsAPI.destroy(),delete this.commentsAPI),this.threadedCommentsAPI&&(this.threadedCommentsAPI.destroy(),delete this.threadedCommentsAPI),this.versionsAPI&&(this.versionsAPI.destroy(),delete this.versionsAPI),this.appActivityAPI&&(this.appActivityAPI.destroy(),delete this.appActivityAPI),this.tasksNewAPI&&(this.tasksNewAPI.destroy(),delete this.tasksNewAPI),this.destroyTaskCollaborators(),this.destroyTaskLinks()}}var fn=hn;class pn extends C.a{getUrl(e){if(!e)throw new Error("Missing app integration id!");return"".concat(this.getBaseApiUrl(),"/app_integrations/").concat(e)}execute(e,t,n,r){if(!e)throw new Error("Missing integration id!");if(!t)throw new Error("Missing file id!");this.errorCode=b.Gb;const i="".concat(this.getUrl(e),"/execute"),o={data:{item:{id:t,type:b.ig}}};this.post({id:t,url:i,data:o,successCallback:n,errorCallback:r})}}var mn=pn;class gn extends C.a{getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/open_with_integrations")}getOpenWithIntegrations(e,t,n){this.errorCode=b.Tb,this.get({id:e,successCallback:e=>{const n=this.formatOpenWithData(e),r=this.consolidateBoxEditIntegrations(n);t(r)},errorCallback:n})}consolidateBoxEditIntegrations(e){let t=[...e];return e.some(e=>e.appIntegrationId===b.m)&&(t=e.filter(e=>e.appIntegrationId!==b.n)),t}formatOpenWithData(e){const{items:t,default_app_integration:n}=e;return t.map(e=>{let{app_integration:t,disabled_reasons:r,display_name:i,display_description:o,display_order:a,is_disabled:s,should_show_consent_popup:l}=e;const{id:c,type:u}=t;return{appIntegrationId:c,displayDescription:o,disabledReasons:r||[],displayOrder:a,isDefault:!!n&&c===n.id,isDisabled:s,displayName:i,requiresConsent:l,type:u}}).sort((e,t)=>e.displayOrder-t.displayOrder)}}var bn=gn;class vn extends C.a{constructor(){var e,t,n;super(...arguments),n=e=>{let{data:t}=e;this.getCache().set(this.key,t),this.finish()},(t="queryMetadataSuccessHandler")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}getCacheKey(e){return"".concat(b.r).concat(e)}getUrl(){return"".concat(this.getBaseApiUrl(),"/metadata_queries/execute_read")}isLoaded(){return this.getCache().has(this.key)}finish(){if(this.isDestroyed())return;const e=this.getCache().get(this.key);this.successCallback(e)}queryMetadataRequest(e){this.isDestroyed()||(this.errorCode=b.jc,this.xhr.post({url:this.getUrl(),data:e}).then(this.queryMetadataSuccessHandler).catch(this.errorHandler))}queryMetadata(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.isDestroyed())return;const{context:i={}}=r;this.key=this.getCacheKey(i.id),this.successCallback=t,this.errorCallback=n,r.forceFetch&&this.getCache().unset(this.key),this.isLoaded()?this.finish():this.queryMetadataRequest(e)}}var yn=vn;const wn={CHROME:"Chrome",EDGE:"Edge",FIREFOX:"Firefox",MAC:"Mac",SAFARI:"Safari",IE:"Explorer"},En=[{key:"userAgent",subString:wn.EDGE,identity:wn.EDGE},{key:"userAgent",subString:wn.CHROME,identity:wn.CHROME},{key:"userAgent",subString:"criOS",identity:wn.CHROME,versionSearch:"criOS"},{key:"vendor",subString:"Apple",identity:wn.SAFARI,versionSearch:"Version"},{key:"userAgent",subString:wn.FIREFOX,identity:wn.FIREFOX},{key:"userAgent",subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{key:"userAgent",subString:"Trident",identity:"Explorer",versionSearch:"rv"},{key:"userAgent",subString:"Gecko",identity:"Mozilla",versionSearch:"rv"}],Cn=[{key:"platform",subString:"Win",identity:"Windows"},{key:"userAgent",subString:"iPod",identity:"iOS",device:"iPod"},{key:"userAgent",subString:"iPhone",identity:"iOS",device:"iPhone"},{key:"userAgent",subString:"iPad",identity:"iOS",device:"iPad"},{key:"platform",subString:wn.MAC,identity:wn.MAC},{key:"userAgent",subString:"Android",identity:"Android"},{key:"platform",subString:"Linux",identity:"Linux"}];function Sn(e,t){let n,r=null,i=null,o="";for(let a=0,s=t.length;a<s;a+=1)if(n=e[t[a].key],o=t[a].versionSearch||t[a].identity,n&&-1!==n.indexOf(t[a].subString)){r=t[a].identity,i=t[a].device;break}return{identity:r,device:i,versionSearchString:o}}function On(e,t){const n=e.indexOf(t);if(-1===n)return"";const r=e.substring(n+t.length+1).match(/[0-9]+(?:\.[0-9]*)?/);return r&&r.length?r[0]:""}var kn=new class{constructor(){const{navigator:e}=window,t=Sn(e,En),n=Sn(e,Cn);this.browser=t.identity||"unknown",this.version=On(e.userAgent,t.versionSearchString)||On(e.appVersion,t.versionSearchString)||"unknown",this.OS=n.identity||"unknown",this.device=n.device||"unknown"}getName(){return this.browser}getVersion(){return this.version}isMinBrowser(e,t){return this.browser.toLowerCase()===e.toLowerCase()&&parseFloat(this.version)>=parseFloat(t)}isSafari(){return this.browser===wn.SAFARI}isFirefox(){return this.browser===wn.FIREFOX}isChrome(){return this.browser===wn.CHROME}isIE(){return this.browser===wn.IE}isEdge(){return this.browser===wn.EDGE}isIEAndSpecificBrowserPluginSupported(e){return this.isIE()&&function(e){const t=e||"htmlfile";let n=!1;try{if("ActiveXObject"in window){const{ActiveXObject:e}=window;n=!!new e(t)}}catch(e){n=!1}return n}(e)}};var _n=function(e){const t=[];let n,r=0;return new Promise((i,o)=>{e.forEach((a,s)=>{a.then(i).catch((i=>a=>{t[i]=a,(r+=1)===e.length&&(n=new Error("no promises resolved"),o(n))})(s))})})};var xn={SAFARI_CHANNEL_NAME:"safari_channel",SECRET_STORE_COOKIE_NAME:"box-edit-secret-cookie-name",BOX_EDIT_APP_NAME:"BoxEdit",BOX_EDIT_NOT_SUPPORTED_ERROR:"box_edit_not_supported_error",BOX_EDIT_UNINSTALLED_ERROR:"box_edit_uninstalled_error",BOX_EDIT_UPGRADE_BROWSER_ERROR:"box_edit_upgrade_browser_error",BOX_EDIT_SAFARI_ERROR:"box_edit_safari_error",BOX_EDIT_INSECURE_REQUESTS_UPGRADED_ERROR:"box_edit_insecure_requests_upgraded_error",BOX_TOOLS_PLUGIN_NAME:"Box.BoxTools",BOX_SECURE_LOCAL_BASE_URL:"https://edit.boxlocalhost.com:",BOX_UNSECURE_LOCAL_BASE_URL:"http://127.0.0.1:",ACTIVEX_CHANNEL_NAME:"activex_channel",HTTP_CHANNEL_NAME:"http_channel",HTTPS_CHANNEL_NAME:"https_channel",OPERATION_STATUS:"status",OPERATION_REQUEST:"application_request",OPERATION_COMMAND:"application_command",UNCREATED_STATUS:"uncreated",CREATED_STATUS:"created",ACTIVE_STATUS:"active",HIVE_TABLE_WEBAPP_BOXTOOLS_ANALYTICS:"webapp_boxtools_analytics",KEY_LENGTH:16,KEY_ID_LENGTH:8,IV:"75392C57F66CE7E7EF47110410280DD7",OUTPUT_EVENT:"box_extension_output",REQUEST_ID_PRE:"BOX-EXT-REQ-ID-",REQUEST_TIMEOUT_RESPONSE_CODE:408,EXTENSION_BLACKLIST:{A6P:1,AC:1,AS:1,ACR:1,ACTION:1,AIR:1,APP:1,AWK:1,BAT:1,BOXNOTE:1,CGI:1,CHM:1,CMD:1,COM:1,CSH:1,DEK:1,DLD:1,DS:1,EBM:1,ESH:1,EXE:1,EZS:1,FKY:1,FRS:1,FXP:1,GADGET:1,HMS:1,HTA:1,ICD:1,INX:1,IPF:1,ISU:1,JAR:1,JS:1,JSE:1,JSX:1,KIX:1,LNK:1,LUA:1,MCR:1,MEM:1,MPX:1,MS:1,MSI:1,MST:1,OBS:1,PAF:1,PEX:1,PIF:1,PL:1,PRC:1,PRG:1,PVD:1,PWC:1,PY:1,PYC:1,PYO:1,QPX:1,RBX:1,REG:1,RGS:1,ROX:1,RPJ:1,SCAR:1,SCR:1,SCRIPT:1,SCPT:1,SCT:1,SH:1,SHB:1,SHS:1,SPR:1,TLB:1,TMS:1,U3P:1,UDF:1,URL:1,VB:1,VBE:1,VBS:1,VBSCRIPT:1,WCM:1,WPK:1,WS:1,WSF:1,XQT:1}};function Pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In=class{constructor(e){Pn(this,"buildNextRequestID",()=>"".concat(xn.REQUEST_ID_PRE).concat(this.window.performance.now())),Pn(this,"buildDetailsObj",(e,t,n)=>{const r=n.toString(),i={data:void 0,operation:e,properties:{application:this.appName,timeout:r},req_id:this.buildNextRequestID()};if(e!==xn.OPERATION_STATUS){if(!t)throw new TypeError("Data cannot be undefined for ".concat(e));i.data=t}return i}),this.appName=e,this.window=window}sendCommand(e,t,n){return Promise.resolve("TODO")}sendRequest(e,t,n){return Promise.resolve("TODO")}getComServerStatus(e,t){return Promise.resolve("TODO")}destroy(){}};function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tn=2;var Mn=class extends In{constructor(e,t){var n;super(e),n=this,An(this,"executeOperation",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new Promise((o,a)=>{const s=n.buildDetailsObj(e,t,i),l=setTimeout(()=>{a(new Error({status_code:xn.REQUEST_TIMEOUT_RESPONSE_CODE}))},r);n.reqIdToPromiseMap.set(s.req_id,{resolve:o,rejectTimeout:l}),n.executeActiveXEvent({detail:s})})})),An(this,"repairActiveXConnection",e=>{kn.isIEAndSpecificBrowserPluginSupported(xn.BOX_TOOLS_PLUGIN_NAME)&&(this.retryAttempt>=Tn||(this.retryAttempt+=1,setTimeout(()=>{this.executeActiveXEvent(e)},100)))}),An(this,"executeActiveXEvent",e=>{const t=this.createActiveXObjectJSRef(),n="ExecuteSync"in t;try{this.isSynchronous&&n?t.ExecuteSync(JSON.stringify(e)):t.Execute(JSON.stringify(e))}catch(t){this.repairActiveXConnection(e)}}),An(this,"createActiveXObjectJSRef",()=>{const{ActiveXObject:e}=this.window;return new e(xn.BOX_TOOLS_PLUGIN_NAME)}),An(this,"setupActiveXCommunication",()=>{this.isActiveXExtensionListenerAttached||(this.document.addEventListener(xn.OUTPUT_EVENT,this.appExtensionEventResponseHandler),this.isActiveXExtensionListenerAttached=!0)}),An(this,"tearDownActiveXCommunication",()=>{this.isActiveXExtensionListenerAttached&&(this.document.removeEventListener(xn.OUTPUT_EVENT,this.appExtensionEventResponseHandler),this.isActiveXExtensionListenerAttached=!1)}),An(this,"appExtensionEventResponseHandler",e=>{this.retryAttempt>0&&(this.retryAttempt=0);const t="string"==typeof e.detail?JSON.parse(e.detail):e.detail;if(this.reqIdToPromiseMap.has(t.req_id)){const e=this.reqIdToPromiseMap.get(t.req_id);if(e){clearTimeout(e.rejectTimeout),this.reqIdToPromiseMap.delete(t.req_id);const n="string"==typeof t.com_server_response.data?JSON.parse(t.com_server_response.data):t.com_server_response.data;e.resolve(n)}}}),An(this,"getComServerStatus",(e,t)=>this.executeOperation(xn.OPERATION_STATUS,null,e,t)),An(this,"sendRequest",(e,t,n)=>this.executeOperation(xn.OPERATION_REQUEST,e,t,n)),An(this,"sendCommand",(e,t,n)=>this.executeOperation(xn.OPERATION_COMMAND,e,t,n)),An(this,"destroy",()=>{this.tearDownActiveXCommunication()}),this.isSynchronous=t,this.channelName=xn.ACTIVEX_CHANNEL_NAME,this.reqIdToPromiseMap=new Map,this.isActiveXExtensionListenerAttached=!1,this.retryAttempt=0,this.document=document,this.window=window,this.setupActiveXCommunication()}},Dn=n(103);function Rn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";const{document:o}=window,a=new Date,s=[];void 0===n&&(n=a.getTime()+5184e6),a.setTime(n),s.push("".concat(e,"=").concat(encodeURIComponent(t))),0!==n&&s.push("; expires=".concat(a.toUTCString())),s.push("; path=".concat(r)),i&&s.push("; domain=".concat(i)),s.push("; secure"),o.cookie=s.join("")}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Nn="GET",Ln="POST",Fn=31536e6,zn=17223,Un=17224,Bn="Content-Type",Hn="text/plain; charset=UTF-8",Vn="notrunning",Wn=new Dn.a;function Kn(){return Wn.getItem("comUseFallback")?{primary:Un,fallback:zn}:{primary:zn,fallback:Un}}var qn=class extends In{constructor(e,t,n){super(e),jn(this,"createCORSRequest",(e,t)=>{let n;try{const{XMLHttpRequest:r}=this.window;return(n=new r).open(e,t,!0),n}catch(n){if(this.retryCounter<3)return this.retryCounter+=1,this.createCORSRequest(e,t);throw new Error("could not create xhr")}}),jn(this,"getComServerStatusInstallationPromise",e=>{let t,n;const r=new Promise((e,r)=>{t=e,n=r}),i=(e,n)=>{this.currentPort=e,e===zn?Wn.removeItem("comUseFallback"):Wn.setItem("comUseFallback",1),this.comServerInstallationPromiseRejected=!1,t(n)},o=Kn(),a=o.primary,s=o.fallback;return this.checkInstallStatus(a,e).then(i.bind(this,a)).catch(t=>{if(t===Vn)return this.comServerInstallationPromiseRejected=!0,void n();this.checkInstallStatus(s,e).then(i.bind(this,s)).catch(()=>{this.comServerInstallationPromiseRejected=!0,n()})}),r}),jn(this,"sendComServerRequest",(e,t,n,r)=>new Promise((i,o)=>{try{const a=this.createCORSRequest(e,t);a.setRequestHeader(Bn,Hn),a.onload=()=>{i(a)},a.onerror=()=>{o(a)},r>0&&(a.timeout=r,a.ontimeout=()=>{o(a)}),setTimeout(()=>{a.send(n)},0)}catch(e){o()}})),jn(this,"checkInstallStatus",(e,t)=>this.sendComServerRequest(Nn,"".concat(this.url).concat(e,"/status"),null,t).then(e=>{const t=JSON.parse(e.responseText);if(t.running)return t;throw this.comServerInstallationPromiseRejected=!0,new Error(Vn)})),jn(this,"getComChannel",e=>(function(e){const{document:t}=window,n=t.cookie.split("; "),r=n.length;let i,o;for(o=0;o<r;o+=1)if((i=n[o].split("="))[0]===e)return i[1]?decodeURIComponent(i[1]):"";return""})("".concat(e,"-bgp-id"))),jn(this,"setComChannel",e=>{const t=this.getComChannel(e)||this.generateId(),n="bgp-".concat(t),r=(new Date).getTime()+Fn;return Rn("".concat(e,"-bgp-id"),t,r),Rn("bgp-".concat(t),"generic",r),n}),jn(this,"getComServerStatus",e=>!this.comServerInstallationPromise||this.comServerInstallationPromiseRejected?(this.comServerInstallationPromise=null,this.comServerInstallationPromise=this.getComServerStatusInstallationPromise(e),this.comServerInstallationPromise):this.comServerInstallationPromise),jn(this,"sendRequest",(e,t,n)=>{const r="".concat(this.url).concat(this.currentPort,"/application_request?application=").concat(this.appName,"&com=").concat(this.comChannelName,"&timeout=").concat(n);return this.sendComServerRequest(Ln,r,e,t).then(e=>{const t=JSON.parse(e.responseText);if(t.response_type&&"error"===t.response_type)throw new Error("Communication error: ".concat(t.message));return t})}),jn(this,"sendCommand",(e,t,n)=>{const r="".concat(this.url).concat(this.currentPort,"/application_command?application=").concat(this.appName,"&com=").concat(this.comChannelName,"&timeout=").concat(n);return this.sendComServerRequest(Ln,r,e,t).then(e=>JSON.parse(e.responseText))}),jn(this,"generateId",()=>{const e=(new Date).getTime();return"xxxxxxxx".replace(/x/g,()=>{return Math.floor((e+16*Math.random())%16).toString(16)})}),this.url=t,this.comChannelName=this.setComChannel(e),this.channelName=n,this.comServerInstallationPromise=null,this.comServerInstallationPromiseRejected=!1,this.retryCounter=0,this.sendCount=0,this.currentPort=Kn().primary,this.window=window}};function Gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qn="box_extension_input",Yn="box_extension_output";var $n=class extends In{constructor(e){var t;super(e),t=this,Gn(this,"executeOperation",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new Promise((o,a)=>{const s=t.buildDetailsObj(e,n,i),l=setTimeout(()=>{a(new Error({status_code:xn.REQUEST_TIMEOUT_RESPONSE_CODE}))},r);t.reqIdToPromiseMap.set(s.req_id,{resolve:o,rejectTimeout:l}),t.createAndDispatchAppExtensionEvent({detail:s})})})),Gn(this,"setupSafariExtensionCommunication",()=>{this.isAppExtensionListenerAttached||(this.isAppExtensionListenerAttached=!0,this.document.addEventListener(Yn,this.appExtensionEventResponseHandler))}),Gn(this,"tearDownSafariExtensionCommunication",()=>{this.isAppExtensionListenerAttached&&(this.isAppExtensionListenerAttached=!1,this.document.removeEventListener(Yn,this.appExtensionEventResponseHandler))}),Gn(this,"appExtensionEventResponseHandler",e=>{const t="string"==typeof e.detail?JSON.parse(e.detail):e.detail;if(this.reqIdToPromiseMap.has(t.req_id)){const e=this.reqIdToPromiseMap.get(t.req_id);if(e){clearTimeout(e.rejectTimeout),this.reqIdToPromiseMap.delete(t.req_id);const n="string"==typeof t.com_server_response.data?JSON.parse(t.com_server_response.data):t.com_server_response.data;e.resolve(n)}}}),Gn(this,"createAndDispatchAppExtensionEvent",e=>{const{CustomEvent:t}=this.window,n=new t(Qn,e);this.document.dispatchEvent(n)}),Gn(this,"getComServerStatus",(e,t)=>this.executeOperation(xn.OPERATION_STATUS,null,e,t)),Gn(this,"sendRequest",(e,t,n)=>this.executeOperation(xn.OPERATION_REQUEST,e,t,n)),Gn(this,"sendCommand",(e,t,n)=>this.executeOperation(xn.OPERATION_COMMAND,e,t,n)),Gn(this,"destroy",()=>{this.tearDownSafariExtensionCommunication()}),this.reqIdToPromiseMap=new Map,this.channelName=xn.SAFARI_CHANNEL_NAME,this.window=window,this.document=document,this.setupSafariExtensionCommunication()}};const Xn=55,Zn="16.16299",Jn="17.17134",er=5e3;let tr;function nr(e){const{BOX_UNSECURE_LOCAL_BASE_URL:t,CREATED_STATUS:n,HTTP_CHANNEL_NAME:r}=xn;return tr.http_channel_status=n,new qn(e,t,r)}function rr(e){const{CREATED_STATUS:t}=xn;return tr.safari_channel_status=t,new $n(e)}function ir(e){const{CREATED_STATUS:t}=xn;return tr.activex_channel_status=t,new Mn(e,!0)}function or(){const{EDGE:e}=wn;return kn.isMinBrowser(e,Jn)||kn.isMinBrowser(e,Zn)&&kn.getVersion().startsWith("16.")}function ar(){return kn.isEdge()&&!or()}function sr(){const{CHROME:e,FIREFOX:t}=wn;return kn.isMinBrowser(e,53)||kn.isMinBrowser(t,Xn)||or()}function lr(){return kn.isMinBrowser(wn.SAFARI,10)}function cr(){return kn.isMinBrowser(wn.IE,11)}function ur(e){const{BOX_EDIT_NOT_SUPPORTED_ERROR:t,BOX_EDIT_SAFARI_ERROR:n,BOX_EDIT_UNINSTALLED_ERROR:r,BOX_EDIT_UPGRADE_BROWSER_ERROR:i}=xn;let o=t;return sr()?o=r:cr()?o=r:kn.isFirefox()||kn.isChrome()||kn.isSafari()&&!lr()||ar()?o=i:lr()&&(o=n),tr.error_message=o,e(new Error(o))}function dr(e){let t=er;return"number"==typeof e&&e>=0&&(t=Math.floor(e)),t}function hr(e){let t=+(e/1e3).toFixed(2);return e<2?t/=2:t-=1,t}var fr=class{constructor(e){var t,n,r;r=!1,(n="isInitialized")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.channels=[],this.isInitialized=!0,function(){const e=kn.getName(),t=kn.getVersion(),{UNCREATED_STATUS:n}=xn;tr={box_tools_version:null,browser_name:e,browser_version:t,error_message:null,installation_type:null,http_channel_status:n,https_channel_status:n,activex_channel_status:n,safari_channel_status:n}}(),sr()?this.channels.push(nr(e)):lr()?this.channels.push(rr(e)):cr()&&kn.isIEAndSpecificBrowserPluginSupported(xn.BOX_TOOLS_PLUGIN_NAME)?this.channels.push(function(e){const{CREATED_STATUS:t}=xn;return tr.activex_channel_status=t,new Mn(e,!1)}(e)):kn.isFirefox()&&!kn.isMinBrowser(wn.FIREFOX,Xn)||ar()||(this.channels=this.channels.concat([nr(e),rr(e),ir(e)]))}getComServerStatus(e){const{ACTIVE_STATUS:t}=xn,n=dr(e),r=hr(n),i=ar();return new Promise((e,o)=>i?ur.call(null,o):this.channels.length?_n(this.channels.map(i=>i.getComServerStatus(n,r).then(n=>(this.activeChannel=i,n&&(tr.installation_type=n.installation_type,tr.box_tools_version=n.version),tr["".concat(i.channelName,"_status")]=t,e(n))))).catch(ur.bind(null,o)):ur.call(null,o))}sendRequest(e,t,n){const r=dr(n),i=hr(r);return this.activeChannel?this.activeChannel.sendRequest(e,r,i):this.getComServerStatus().then(()=>this.activeChannel.sendRequest(e,r,i))}sendCommand(e,t){const n=dr(t),r=hr(n);return this.activeChannel?this.activeChannel.sendCommand(e,n,r):this.getComServerStatus().then(()=>this.activeChannel.sendCommand(e,n,r))}};const pr=5e3,mr=100;let gr;let br=null;class vr{constructor(){return br instanceof vr||(br=this),this.extensionRequestQueue=new Map,br}queueGetNativeAppNameFromLocal(e){if(this.extensionRequestQueue.has(e)){const t=this.extensionRequestQueue.get(e);if(!t)throw new Error("Race condition re: queueGetNativeAppNameFromLocal");return t.promise}const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});return t.promise=n,this.extensionRequestQueue.set(e,t),n}checkBoxEditAvailability(){return this.getBoxEditAvailability()}getBoxEditAvailability(){return this.client=new fr(xn.BOX_EDIT_APP_NAME),this.client.getComServerStatus()}async canOpenWithBoxEdit(e){const t=await Promise.all(e.map(async e=>{try{return[e,await this.getAppForExtension(e)]}catch(t){return[e,""]}})),n=new Map;return t.forEach(e=>n.set(...e)),Promise.resolve(n)}openFile(e,t){const n=function(e,t,n,r){return JSON.stringify({auth_code:n,auth_token:t,browser_type:kn.getName(),command_type:"launch_application",file_id:e.toString(),token_scope:r})}(e,t.data.token,t.data.auth_code,t.data.token_scope);return this.client.sendCommand(n,pr)}getAppForExtension(e){try{if(function(e){const{EXTENSION_BLACKLIST:t}=xn;let n=e.toUpperCase();return"."===n.charAt(0)&&(n=n.substr(1)),n in t}(e))throw new Error("blacklisted");const t=this.queueGetNativeAppNameFromLocal(e);return gr||(gr=setTimeout(()=>{this.processExtensionRequestQueue()},mr)),t}catch(e){return Promise.reject()}}processExtensionRequestQueue(){const e=new Map,t=[];this.extensionRequestQueue.forEach((n,r)=>{e.set(r,n),t.push(r)}),this.extensionRequestQueue.clear(),gr=null;const n=function(e){return JSON.stringify({request_type:"get_default_application",extension:e})}(t);return this.client.sendRequest(n).then(n=>{if(n&&n.default_application_name){let t=n.default_application_name;"[object Object]"===Object.prototype.toString.call(t)&&(t=[t]),t.forEach(t=>{const n=Object.keys(t)[0],r=decodeURIComponent(t[n]);if(r){const t=e.get(n);t&&(t.resolve(r),e.delete(n))}})}t.forEach(t=>{const n=e.get(t);n&&n.reject()})})}}var yr=vr;function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.a=class{constructor(e){this.options=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(n),!0).forEach((function(t){Er(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{apiHost:e.apiHost||b.U,uploadHost:e.uploadHost||b.X,cache:e.cache||new r.a,language:e.language})}destroy(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.fileAPI&&(this.fileAPI.destroy(),delete this.fileAPI),this.weblinkAPI&&(this.weblinkAPI.destroy(),delete this.weblinkAPI),this.plainUploadAPI&&(this.plainUploadAPI.destroy(),delete this.plainUploadAPI),this.chunkedUploadAPI&&(this.chunkedUploadAPI.destroy(),delete this.chunkedUploadAPI),this.folderAPI&&(this.folderAPI.destroy(),delete this.folderAPI),this.searchAPI&&(this.searchAPI.destroy(),delete this.searchAPI),this.recentsAPI&&(this.recentsAPI.destroy(),delete this.recentsAPI),this.versionsAPI&&(this.versionsAPI.destroy(),delete this.versionsAPI),this.fileAccessStatsAPI&&(this.fileAccessStatsAPI.destroy(),delete this.fileAccessStatsAPI),this.fileActivitiesAPI&&(this.fileActivitiesAPI.destroy(),delete this.fileActivitiesAPI),this.tasksNewAPI&&(this.tasksNewAPI.destroy(),delete this.tasksNewAPI),this.taskCollaboratorsAPI&&(this.taskCollaboratorsAPI.destroy(),delete this.taskCollaboratorsAPI),this.taskLinksAPI&&(this.taskLinksAPI.destroy(),delete this.taskLinksAPI),this.commentsAPI&&(this.commentsAPI.destroy(),delete this.commentsAPI),this.threadedCommentsAPI&&(this.threadedCommentsAPI.destroy(),delete this.threadedCommentsAPI),this.markerBasedGroupsAPI&&(this.markerBasedGroupsAPI.destroy(),delete this.markerBasedGroupsAPI),this.markerBasedUsersAPI&&(this.markerBasedUsersAPI.destroy(),delete this.markerBasedUsersAPI),this.groupsAPI&&(this.groupsAPI.destroy(),delete this.groupsAPI),this.usersAPI&&(this.usersAPI.destroy(),delete this.usersAPI),this.metadataAPI&&(this.metadataAPI.destroy(),delete this.metadataAPI),this.fileCollaboratorsAPI&&(this.fileCollaboratorsAPI.destroy(),delete this.fileCollaboratorsAPI),this.fileCollaborationsAPI&&(this.fileCollaborationsAPI.destroy(),delete this.fileCollaborationsAPI),this.folderCollaborationsAPI&&(this.folderCollaborationsAPI.destroy(),delete this.folderCollaborationsAPI),this.collaborationsAPI&&(this.collaborationsAPI.destroy(),delete this.collaborationsAPI),this.appIntegrationsAPI&&(this.appIntegrationsAPI.destroy(),delete this.appIntegrationsAPI),this.metadataQueryAPI&&(this.metadataQueryAPI.destroy(),delete this.metadataQueryAPI),this.openWithAPI&&(this.openWithAPI.destroy(),delete this.openWithAPI),this.annotationsAPI&&(this.annotationsAPI.destroy(),delete this.annotationsAPI),e&&(this.options.cache=new r.a)}getCache(){return this.options.cache}getAPI(e){let t;switch(e){case b.jg:t=this.getFolderAPI();break;case b.ig:t=this.getFileAPI();break;case b.kg:t=this.getWebLinkAPI();break;default:throw new Error("Unknown Type!")}return t}getFileAPI(){return(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.destroy(),this.fileAPI=new ee.a(this.options),this.fileAPI}getWebLinkAPI(){return this.destroy(),this.weblinkAPI=new te.a(this.options),this.weblinkAPI}getPlainUploadAPI(){return this.destroy(),this.plainUploadAPI=new Z(this.options),this.plainUploadAPI}getChunkedUploadAPI(){return this.destroy(),this.chunkedUploadAPI=new Y(this.options),this.chunkedUploadAPI}getFolderAPI(){return this.destroy(),this.folderAPI=new J.a(this.options),this.folderAPI}getSearchAPI(){return this.destroy(),this.searchAPI=new ce(this.options),this.searchAPI}getRecentsAPI(){return this.destroy(),this.recentsAPI=new fe(this.options),this.recentsAPI}getMetadataAPI(e){return e&&this.destroy(),this.metadataAPI=new Dt(this.options),this.metadataAPI}getVersionsAPI(e){return e&&this.destroy(),this.versionsAPI=new Se(this.options),this.versionsAPI}getCommentsAPI(e){return e&&this.destroy(),this.commentsAPI=new xe(this.options),this.commentsAPI}getThreadedCommentsAPI(e){return e&&this.destroy(),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI}getTasksNewAPI(e){return e&&this.destroy(),this.tasksNewAPI=new Fe(this.options),this.tasksNewAPI}getTaskCollaboratorsAPI(e){return e&&this.destroy(),this.taskCollaboratorsAPI=new We(this.options),this.taskCollaboratorsAPI}getTaskLinksAPI(e){return e&&this.destroy(),this.taskLinksAPI=new Qe(this.options),this.taskLinksAPI}getFileAccessStatsAPI(e){return e&&this.destroy(),this.fileAccessStatsAPI=new lt(this.options),this.fileAccessStatsAPI}getFileActivitiesAPI(e){return e&&this.destroy(),this.fileActivitiesAPI=new pt(this.options),this.fileActivitiesAPI}getFileCollaboratorsAPI(e){return e&&this.destroy(),this.fileCollaboratorsAPI=new Nt(this.options),this.fileCollaboratorsAPI}getFileCollaborationsAPI(e){return e&&this.destroy(),this.fileCollaborationsAPI=new zt(this.options),this.fileCollaborationsAPI}getFolderCollaborationsAPI(e){return e&&this.destroy(),this.folderCollaborationsAPI=new Ut(this.options),this.folderCollaborationsAPI}getCollaborationsAPI(e){return e&&this.destroy(),this.collaborationsAPI=new Kt(this.options),this.collaborationsAPI}getMarkerBasedGroupsAPI(e){return e&&this.destroy(),this.markerBasedGroupsAPI=new vt(this.options),this.markerBasedGroupsAPI}getMarkerBasedUsersAPI(e){return e&&this.destroy(),this.markerBasedUsersAPI=new Ct(this.options),this.markerBasedUsersAPI}getGroupsAPI(e){return e&&this.destroy(),this.groupsAPI=new Ot(this.options),this.groupsAPI}getUsersAPI(e){return e&&this.destroy(),this.usersAPI=new It(this.options),this.usersAPI}getFeedAPI(e){return e&&this.destroy(),this.feedItemsAPI=new fn(this.options),this.feedItemsAPI}getOpenWithAPI(e){return e&&this.destroy(),this.openWithAPI=new bn(this.options),this.openWithAPI}getAppIntegrationsAPI(e){return e&&this.destroy(),this.appIntegrationsAPI=new mn(this.options),this.appIntegrationsAPI}getMetadataQueryAPI(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.destroy(),this.metadataQueryAPI=new yn(this.options),this.metadataQueryAPI}getBoxEditAPI(){return this.boxEditAPI=new yr,this.boxEditAPI}getAnnotationsAPI(e){return e&&this.destroy(),this.annotationsAPI=new Jt(this.options),this.annotationsAPI}}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=24,title:a,width:s=24}=e;return r.createElement(i.a,{className:"icon-check ".concat(t),height:o,title:a,viewBox:"0 0 24 24",width:s},r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),r.createElement("path",{className:"fill-color",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",fill:n}))}},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(12),s=n.n(a),l=n(52),c=n(273),u=n(152),d=n(3),h=n.n(d),f=n(217),p=n.n(f);n(664);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class v extends r.Component{constructor(e){super(e),b(this,"state",{shouldShowTopScrollShadow:!1,shouldShowBottomScrollShadow:!1}),b(this,"componentDidMount",()=>{const e=this.getScrollShadowState();this.setState(e),this.scrollRef&&(this.scrollRef.addEventListener("transitionend",this.throttledOnContentScroll),this.scrollRef&&this.observer.observe(this.scrollRef,{attributes:!0,childlist:!0,subtree:!0}))}),b(this,"onContentScroll",()=>{const e=this.getScrollShadowState();this.setState(e)}),b(this,"getScrollShadowState",()=>{const{scrollTop:e,scrollHeight:t,clientHeight:n}=this.scrollRef||{},r={};return e>0&&e<t-n&&(r.shouldShowTopScrollShadow=!0,r.shouldShowBottomScrollShadow=!0),0===e&&(r.shouldShowTopScrollShadow=!1),e<t-n&&(r.shouldShowBottomScrollShadow=!0),e===t-n&&(r.shouldShowBottomScrollShadow=!1),r}),b(this,"scrollRef",null),b(this,"throttledOnContentScroll",p()(this.onContentScroll,100)),this.observer=new MutationObserver(this.throttledOnContentScroll)}componentWillUnmount(){this.observer.disconnect(),this.scrollRef&&this.scrollRef.removeEventListener("transitionend",this.throttledOnContentScroll)}render(){const e=this.props,{children:t,className:n="",scrollRefFn:i,shadowSize:a}=e,s=g(e,["children","className","scrollRefFn","shadowSize"]),{shouldShowTopScrollShadow:l,shouldShowBottomScrollShadow:c}=this.state,u=o()("scroll-container",n,{"is-showing-top-shadow":l,"is-showing-bottom-shadow":c});return r.createElement("div",m({className:u},s),r.createElement("div",{className:o()("scroll-wrap-container","style--".concat(a)),onScroll:this.throttledOnContentScroll,ref:e=>{this.scrollRef=e,i(e)}},t))}}b(v,"defaultProps",{scrollRefFn:h.a,shadowSize:"cover"});var y=v,w=n(1);n(665);function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){e.preventDefault(),e.stopPropagation()}class S extends r.Component{constructor(e){super(e),E(this,"setActiveItem",e=>{this.setState({activeItemIndex:e}),-1===e&&this.setActiveItemID(null)}),E(this,"setActiveItemID",e=>{const{scrollBoundarySelector:t}=this.props,n=e?document.getElementById(e):null,r={block:"nearest"};void 0!==t&&(r.boundary=document.querySelector(t)),this.setState({activeItemID:e},()=>{Object(l.e)(n,r)})}),E(this,"haveChildrenChanged",e=>{const{children:t}=this.props,n=r.Children.count(t);if(n!==r.Children.count(e))return!0;if(0===n)return!1;const i=r.Children.map(t,e=>e.key),o=r.Children.map(e,e=>e.key);return i.some((e,t)=>e!==o[t])}),E(this,"resetActiveItem",()=>{this.setState({activeItemID:null,activeItemIndex:-1})}),E(this,"handleFocus",()=>{this.openDropdown()}),E(this,"handleDocumentClick",e=>{const t=this.selectorDropdownRef.current;t&&e.target instanceof Node&&t.contains(e.target)||t===e.target||this.closeDropdown()}),E(this,"handleInput",()=>{this.openDropdown()}),E(this,"handleKeyDown",e=>{const{children:t,isAlwaysOpen:n,onEnter:i}=this.props,{activeItemIndex:o}=this.state,a=r.Children.count(t);switch(e.key){case"ArrowDown":if(this.isDropdownOpen()){a&&C(e);const t=o===a-1?-1:o+1;this.setActiveItem(t)}else this.openDropdown();break;case"ArrowUp":if(this.isDropdownOpen()){a&&C(e);const t=-1===o?a-1:o-1;this.setActiveItem(t)}else this.openDropdown();break;case"Enter":-1!==o&&this.isDropdownOpen()?(C(e),this.selectItem(o,e)):i&&i(e);break;case"Tab":this.isDropdownOpen()&&(this.closeDropdown(),this.resetActiveItem());break;case"Escape":!n&&this.isDropdownOpen()&&(C(e),this.closeDropdown(),this.resetActiveItem());break;default:this.handleInput()}}),E(this,"isDropdownOpen",()=>{const{children:e,isAlwaysOpen:t}=this.props,{shouldOpen:n}=this.state;return r.Children.count(e)>0&&(!!t||n)}),E(this,"openDropdown",()=>{if(!this.state.shouldOpen){const{shouldSetActiveItemOnOpen:e}=this.props;e&&this.setActiveItem(0),this.setState({shouldOpen:!0}),document.addEventListener("click",this.handleDocumentClick,!0)}}),E(this,"closeDropdown",()=>{this.setState({shouldOpen:!1}),document.removeEventListener("click",this.handleDocumentClick,!0)}),E(this,"selectItem",(e,t)=>{const{onSelect:n}=this.props;n&&n(e,t),this.closeDropdown()}),this.listboxID=s()("listbox"),this.state={activeItemID:null,activeItemIndex:-1,shouldOpen:!1},this.selectorDropdownRef=r.createRef()}componentDidUpdate(e){let{shouldSetActiveItemOnOpen:t,children:n}=e;this.haveChildrenChanged(n)&&(t?this.setActiveItem(0):this.resetActiveItem())}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick,!0)}render(){const{listboxID:e,selectItem:t,setActiveItem:n,setActiveItemID:i,closeDropdown:a}=this,{dividerIndex:s,overlayTitle:l,children:d,className:h,isPositionDynamic:f,title:p,selector:m,shouldScroll:g}=this.props,{activeItemID:b,activeItemIndex:v}=this.state,E=this.isDropdownOpen(),C={"aria-activedescendant":b,"aria-autocomplete":"list","aria-expanded":E,role:"combobox"};E&&(C["aria-owns"]=e);const S=r.createElement("ul",{className:o()("overlay",l?l.toLowerCase():""),id:e,role:"listbox"},l&&r.createElement("h5",{className:"SelectorDropdown-title"},l),r.Children.map(d,(e,o)=>{const l={onClick:e=>{t(o,e)},onMouseDown:e=>{e.preventDefault()},onMouseEnter:()=>{n(o)},closeDropdown:()=>{a()},setActiveItemID:i};o===v&&(l.isActive=!0);const c=o===s;return r.createElement(r.Fragment,null,c&&r.createElement("hr",{className:"SelectorDropdown-divider"}),r.cloneElement(e,l))}));return(r.createElement("div",{className:o()("SelectorDropdown",h),onFocus:this.handleFocus,onKeyDown:this.handleKeyDown,onPaste:this.handleInput,ref:this.selectorDropdownRef},r.createElement(c.a,{isPositionDynamic:f,isOpen:E,placement:u.c},r.cloneElement(m,{inputProps:C}),r.createElement("div",{className:"SelectorDropdown-overlay ".concat(w.Xe," is-visible")},p,g?r.createElement(y,null,S):S))))}}E(S,"defaultProps",{isPositionDynamic:!1});var O=S;n.d(t,"a",(function(){return O}))},function(e,t,n){"use strict";var r=n(0),i=n(79),o=n(119),a=n(10);var s=e=>{let{className:t="",color:n="#979797",height:i=64,title:o,width:s=64}=e;return r.createElement(a.a,{className:"icon-sad-cloud ".concat(t),height:i,title:o,viewBox:"0 0 1224 792",width:s},r.createElement("g",{transform:"translate(1 1)"},r.createElement("path",{className:"fill-color",d:"M273.7 788.9c-142 0-257.6-116.5-257.6-259.7 0-140.3 110.9-255 249-259.6 4.6-70.2 33.9-135.4 83.6-185.3C402.8 29.7 475-.3 551.9-.3c56.8 0 110.7 11.3 156 32.7 43.7 20.7 78.4 50.5 101.3 86.9 7.8-1.9 16.2-2.9 25.1-2.9 43.4 0 97.3 23.8 128.2 56.6l.2.2c23.9 26 41.2 59.1 48.9 93.1 4.1 18.3 5 35.1 2.8 49.2 15.8 3.5 32.3 9.8 48.9 18.7 25.1 13.5 49.9 32.7 71.7 55.4 48.9 51.2 77 113.7 77 171.7 0 61.1-23.4 118.4-66 161.3-42.5 42.8-99.1 66.4-159.5 66.4l-712.8-.1zm0-479.5c-120 0-217.6 98.6-217.6 219.7 0 121.2 97.6 219.7 217.6 219.7h712.8c49.6 0 96.2-19.4 131.1-54.6 35.1-35.3 54.4-82.6 54.4-133.1 0-47.7-24-100.2-65.9-144-37.8-39.5-84.7-65-119.6-65-7.9 0-15.1-4.6-18.3-11.9-3.2-7.2-1.9-15.6 3.4-21.5 2.8-3.1 6.8-18 1-43.8-6.1-26.9-20.4-54.1-39.3-74.8-23.2-24.6-66.7-43.9-99-43.9-9.9 0-18.3 1.7-24.8 5.2-4.7 2.5-10.3 3-15.3 1.4-5.1-1.6-9.3-5.2-11.8-9.9-18.2-35.5-49.9-64.7-91.6-84.4-40-18.9-88-28.9-138.9-28.9-66.2 0-128.3 25.8-175 72.8-46.8 47.1-72.6 109.9-72.6 176.9 0 11-9 20-20 20h-10.6z",fill:n}),r.createElement("path",{className:"fill-color",d:"M442.7 585.5c-2.9 0-5.9-.6-8.7-2-10-4.8-14.1-16.7-9.3-26.7 15.4-32 39.7-59.1 70.3-78.1 31-19.3 66.9-29.5 104-29.5 75.5 0 141.4 40 176.2 107.1 5.1 9.8 1.3 21.9-8.5 27-9.8 5.1-21.9 1.3-27-8.5-27.8-53.6-80.3-85.5-140.6-85.5-29.6 0-58.2 8.1-82.8 23.5-24.1 15.1-43.3 36.3-55.4 61.5-3.6 7-10.7 11.2-18.2 11.2z",fill:n}),r.createElement("circle",{className:"fill-color",cx:"496.3",cy:"351.5",fill:n,r:"32.1"}),r.createElement("circle",{className:"fill-color",cx:"688.9",cy:"351.5",fill:n,r:"32.1"})))};n(636);const l=Object(i.defineMessages)({errorMaskIconSadCloudText:{id:"boxui.errorMask.iconSadCloudText",defaultMessage:"Sad Box Cloud"}});t.a=e=>{let{errorHeader:t,errorSubHeader:n}=e;return r.createElement("div",{className:"error-mask"},r.createElement(s,{className:"error-mask-sad-cloud",height:50,title:r.createElement(o.a,l.errorMaskIconSadCloudText)}),r.createElement("h4",null,t),r.createElement("h5",null,n))}},function(e,t,n){"use strict";var r=n(0),i=n(208),o=n.n(i),a=n(4),s=n.n(a);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends r.Component{constructor(){super(...arguments),u(this,"focusFirstElement",()=>{if(!this.el)return;const e=o()(this.el);e.length>3?e[1].focus():this.trapEl&&this.trapEl.focus()}),u(this,"focusLastElement",()=>{if(!this.el)return;const e=o()(this.el);e.length>3?e[e.length-3].focus():this.trapEl&&this.trapEl.focus()}),u(this,"handleElKeyDown",e=>{const{handleOverlayKeyDown:t}=this.props;this.el===document.activeElement&&"Tab"===e.key&&(this.focusFirstElement(),e.stopPropagation(),e.preventDefault()),t&&t(e)}),u(this,"handleTrapElKeyDown",e=>{"Tab"===e.key&&(e.stopPropagation(),e.preventDefault())})}componentDidMount(){this.props.shouldDefaultFocus?setTimeout(()=>{this.previousFocusEl=document.activeElement,this.focusFirstElement()},0):setTimeout(()=>{this.el&&this.el.focus()},0)}componentWillUnmount(){setTimeout(()=>{this.previousFocusEl&&this.previousFocusEl.focus()},0)}render(){const e=this.props,{children:t,className:n,getRef:i,handleOverlayKeyDown:o,shouldDefaultFocus:a,shouldOutlineFocus:u}=e,d=c(e,["children","className","getRef","handleOverlayKeyDown","shouldDefaultFocus","shouldOutlineFocus"]);return(r.createElement("div",l({ref:e=>{this.el=e,i&&i(e)},className:s()(n,{"should-outline-focus":u}),onKeyDown:this.handleElKeyDown},d),r.createElement("i",{"aria-hidden":!0,onFocus:this.focusLastElement,tabIndex:"0"}),t,r.createElement("i",{"aria-hidden":!0,onFocus:this.focusFirstElement,tabIndex:"0"}),r.createElement("i",{ref:e=>{this.trapEl=e},"aria-hidden":!0,onKeyDown:this.handleTrapElKeyDown,tabIndex:"0"})))}}var h=d;n.d(t,"a",(function(){return h}))},function(e,t,n){"use strict";var r=n(0),i=n(12),o=n.n(i),a=n(4),s=n.n(a),l=n(79),c=n(119),u=n(110),d=n(17);const h=Object(l.defineMessages)({checkboxTooltipIconInfoText:{id:"boxui.checkboxTooltip.iconInfoText",defaultMessage:"Info"}});var f=e=>{let{tooltip:t}=e;return r.createElement("div",{className:"checkbox-tooltip-wrapper"},r.createElement(d.c,{text:t},r.createElement("div",{className:"info-tooltip"},r.createElement(u.a,{height:16,title:r.createElement(c.a,h.checkboxTooltipIconInfoText),width:16}))))};n(558);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var g=e=>{let{className:t="",description:n,fieldLabel:i,hideLabel:a,id:l,inputClassName:c,isChecked:u,isDisabled:d,label:h,name:g,onFocus:b,onChange:v,subsection:y,tooltip:w}=e,E=m(e,["className","description","fieldLabel","hideLabel","id","inputClassName","isChecked","isDisabled","label","name","onFocus","onChange","subsection","tooltip"]);const C=r.useRef(o()("checkbox")).current,S=l||C,O=r.createElement("span",{className:"checkbox-label"},r.createElement("input",p({"aria-describedby":n?"description_".concat(S):"",checked:u,className:c,disabled:d,id:S,name:g,onFocus:b,onChange:v,type:"checkbox"},E)),r.createElement("span",{className:"checkbox-pointer-target"}),r.createElement("span",{className:s()("bdl-Checkbox-labelTooltipWrapper",{"accessibility-hidden":a})},h&&r.createElement("label",{htmlFor:S},h),w&&r.createElement(f,{tooltip:w})));return r.createElement("div",{className:s()("checkbox-container",t,{"is-disabled bdl-is-disabled":d})},i&&r.createElement("div",{className:"label"},i),O,n?r.createElement("div",{id:"description_".concat(S),className:"checkbox-description"},n):null,y?r.createElement("div",{className:"checkbox-subsection"},y):null)};n.d(t,"a",(function(){return g}))},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:32,height:32,viewBox:"0 0 32 32"},e),r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{fill:i.b,fillRule:"nonzero",d:"M9 3h9.586a1 1 0 01.707.293l6.415 6.414a1 1 0 01.293.707V26A3 3 0 0123 29H9a3 3 0 01-3-3V6a3 3 0 013-3z"}),r.createElement("path",{fill:i.D,fillOpacity:.5,fillRule:"nonzero",d:"M19.286 3.286l5.01 5.009 1.412 1.412a1 1 0 01.203.293H21a2 2 0 01-2-2V3.09a1 1 0 01.286.196z"}),r.createElement("path",{fill:i.D,d:"M17.5 21c.245 0 .45.183.492.412L18 21.5c0 .276-.23.5-.5.5h-7a.505.505 0 01-.5-.5c0-.276.23-.5.5-.5h7zm4-3c.245 0 .45.183.492.412L22 18.5c0 .276-.229.5-.5.5h-11a.505.505 0 01-.5-.5c0-.276.229-.5.5-.5h11zm-1.001-3c.246 0 .45.183.493.412L21 15.5c0 .276-.23.5-.501.5H10.5a.506.506 0 01-.501-.5c0-.276.23-.5.501-.5h10z"})))},function(e,t){e.exports=function(e,t){t=t||{};var n,r,i,o=e.ownerDocument||e,a=[],s=[],l=function(e){var t=[];return function(n){if(n===e.documentElement)return!1;var r=e.defaultView.getComputedStyle(n);return!!function n(r,i){if(r===e.documentElement)return!1;for(var o=0,a=t.length;o<a;o++)if(t[o][0]===r)return t[o][1];var s=!1;return"none"===(i=i||e.defaultView.getComputedStyle(r)).display?s=!0:r.parentNode&&(s=n(r.parentNode)),t.push([r,s]),s}(n,r)||"hidden"===r.visibility}}(o),c=["input","select","a[href]","textarea","button","[tabindex]"],u=e.querySelectorAll(c.join(","));if(t.includeContainer){var d=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;c.some((function(t){return d.call(e,t)}))&&(u=Array.prototype.slice.apply(u)).unshift(e)}for(var h=0,f=u.length;h<f;h++)n=u[h],r=parseInt(n.getAttribute("tabindex"),10),(i=isNaN(r)?n.tabIndex:r)<0||"INPUT"===n.tagName&&"hidden"===n.type||n.disabled||l(n,o)||(0===i?a.push(n):s.push({index:h,tabIndex:i,node:n}));var p=s.sort((function(e,t){return e.tabIndex===t.tabIndex?e.index-t.index:e.tabIndex-t.tabIndex})).map((function(e){return e.node}));return Array.prototype.push.apply(p,a),p}},function(e,t,n){var r=n(42).isFinite;e.exports=function(e){return"number"==typeof e&&r(e)}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:32,height:32,viewBox:"0 0 32 32"},e),r.createElement("g",{fill:"none"},r.createElement("path",{fill:i.i,d:"M9 3h9.586a1 1 0 01.707.293l6.415 6.414a1 1 0 01.293.707V26A3 3 0 0123 29H9a3 3 0 01-3-3V6a3 3 0 013-3z"}),r.createElement("path",{fill:i.D,fillOpacity:.5,d:"M19.286 3.286l5.01 5.009 1.412 1.412a1 1 0 01.203.293H21a2 2 0 01-2-2V3.09a1 1 0 01.286.196z"})))},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:32,height:32,viewBox:"0 0 32 32"},e),r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{fill:"#009AED",fillRule:"nonzero",d:"M9 3h9.586a1 1 0 01.707.293l6.415 6.414a1 1 0 01.293.707V26A3 3 0 0123 29H9a3 3 0 01-3-3V6a3 3 0 013-3z"}),r.createElement("path",{fill:i.D,fillOpacity:.5,fillRule:"nonzero",d:"M19.286 3.286l5.01 5.009 1.412 1.412a1 1 0 01.203.293H21a2 2 0 01-2-2V3.09a1 1 0 01.286.196z"}),r.createElement("path",{fill:i.D,d:"M19.723 18.973l-5.914 3.957a.543.543 0 01-.809-.473v-7.914a.543.543 0 01.809-.473l5.914 3.957a.543.543 0 010 .946z"})))},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:i.k,fillRule:"evenodd",d:"M7.646 7.646L4.354 4.354a.5.5 0 010-.708l1.292-1.292a.5.5 0 01.708 0l5.292 5.292a.5.5 0 010 .708l-5.292 5.292a.5.5 0 01-.708 0l-1.292-1.292a.5.5 0 010-.708l3.292-3.292a.5.5 0 000-.708z"}))},function(e,t,n){var r=n(34),i=n(138),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){"use strict";var r=n(0),i=n(79),o=n(119),a=n(54),s=n(4),l=n.n(s),c=n(3),u=n.n(c),d=n(196),h=n.n(d),f=n(12),p=n.n(f),m=n(151),g=n(2),b=n(9);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var y=e=>r.createElement(b.a,v({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:g.k,fillRule:"evenodd",d:"M8 1a7 7 0 110 14A7 7 0 018 1zm0 10a1 1 0 100 2 1 1 0 000-2zm0-8a1 1 0 00-1 1v5a1 1 0 002 0V4a1 1 0 00-1-1z"}));function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var E=e=>r.createElement(b.a,w({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("g",{fill:g.k,fillRule:"evenodd"},r.createElement("path",{d:"M13.436 0c.892 0 1.215.093 1.54.267.327.174.583.43.757.756.174.326.267.65.267 1.54v10.873c0 .892-.093 1.215-.267 1.54-.174.327-.43.583-.756.757-.326.174-.65.267-1.54.267H2.563c-.892 0-1.215-.093-1.54-.267a1.817 1.817 0 01-.757-.756C.093 14.65 0 14.327 0 13.437V2.563c0-.892.093-1.215.267-1.54.174-.327.43-.583.756-.757C1.35.093 1.673 0 2.563 0h10.873zM13 4H3a1 1 0 00-1 1v8a1 1 0 001 1h10a1 1 0 001-1V5a1 1 0 00-1-1z"}),r.createElement("g",{transform:"translate(3 5.5)"},r.createElement("rect",{width:1.5,height:1.5,x:2.833,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:5.667,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:8.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:2.83,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:5.67,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:8.5,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,y:5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:2.83,y:5,rx:.5})))),C=n(272),S=n(535),O=n.n(S);function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class _ extends O.a{constructor(e){super(e),k(this,"handleBlur",()=>{this.hide()}),k(this,"handleClickOutside",e=>{if(!(this.isVisible()&&this.datePickerButtonEl&&this.datePickerButtonEl.contains(e.target))&&this.isVisible()&&!this.el.contains(e.target)){this.hide();const e=document.activeElement;this.accessibleFieldEl&&e&&e.tabIndex<0&&this.accessibleFieldEl.focus()}}),this.accessibleFieldEl=e.accessibleFieldEl,this.datePickerButtonEl=e.datePickerButtonEl,this.accessibleFieldEl&&(this.el.classList.add("is-bound"),document.body.appendChild(this.el),this.accessibleFieldEl.addEventListener("blur",this.handleBlur),this.hide())}show(){super.show(),this.accessibleFieldEl&&(document.addEventListener("click",this.handleClickOutside,!0),this.adjustPosition())}hide(){super.hide(),this.accessibleFieldEl&&document.removeEventListener("click",this.handleClickOutside)}destroy(){super.destroy(),this.accessibleFieldEl&&(this.accessibleFieldEl.removeEventListener("blur",this.handleBlur),document.removeEventListener("click",this.handleClickOutside))}}var x=_,P=n(24),I=n(129),A=n(14),T=n(17),M=n(33);n(663);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(){return(R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N=Object(i.defineMessages)({previousMonth:{id:"boxui.base.previousMonth",defaultMessage:"Previous Month"},nextMonth:{id:"boxui.base.nextMonth",defaultMessage:"Next Month"},iconAlertText:{id:"boxui.datePicker.iconAlertText",defaultMessage:"Invalid Date"},dateClearButton:{id:"boxui.datePicker.dateClearButton",defaultMessage:"Clear Date"},chooseDate:{id:"boxui.datePicker.chooseDate",defaultMessage:"Choose Date"},dateInputRangeError:{id:"boxui.datePicker.dateInputRangeError",defaultMessage:"Please enter a date between {minLocaleDate} and {maxLocaleDate}"},dateInputMaxError:{id:"boxui.datePicker.dateInputMaxError",defaultMessage:"Please enter a date before {maxLocaleDate}"},dateInputMinError:{id:"boxui.datePicker.dateInputMinError",defaultMessage:"Please enter a date after {minLocaleDate}"}}),L=300,F="Enter",z="Escape",U="Tab",B=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/;let H;function V(e,t){if(!e)return"";let n;switch(t){case H.ISO_STRING_DATE_FORMAT:return e.toISOString();case H.LOCALE_DATE_STRING_DATE_FORMAT:return e.toLocaleDateString();case H.UTC_TIME_DATE_FORMAT:return Object(M.b)(e);case H.UTC_ISO_STRING_DATE_FORMAT:return(n=new Date(Object(M.b)(e))).toISOString();default:return e.getTime()}}!function(e){e.ISO_STRING_DATE_FORMAT="isoString",e.LOCALE_DATE_STRING_DATE_FORMAT="localeDateString",e.UTC_TIME_DATE_FORMAT="utcTime",e.UNIX_TIME_DATE_FORMAT="unixTime",e.UTC_ISO_STRING_DATE_FORMAT="utcISOString"}(H||(H={}));const W=["en-US","en-CA","jp-JP"];class K extends r.Component{constructor(){var e;super(...arguments),e=this,j(this,"state",{isDateInputInvalid:!1,showDateInputError:!1}),j(this,"errorMessageID",p()("errorMessage")),j(this,"descriptionID",p()("description")),j(this,"onSelectHandler",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{onChange:n,isAccessible:r}=e.props,{isDateInputInvalid:i}=e.state;if(n){n(t,e.formatValue(t))}r&&(e.dateInputEl&&e.datePicker&&(e.dateInputEl.value=e.datePicker.toString()),e.datePicker&&e.datePicker.isVisible()&&(e.datePicker.hide(),e.focusDatePicker())),i&&e.setState({isDateInputInvalid:!1,showDateInputError:!1})})),j(this,"datePicker",null),j(this,"canUseDateInputType",!0),j(this,"shouldStayClosed",!1),j(this,"focusDatePicker",()=>{this.dateInputEl&&this.dateInputEl.focus()}),j(this,"getDateInputError",()=>{const{intl:e,maxDate:t=null,minDate:n=null}=this.props,{showDateInputError:r}=this.state,{formatMessage:i}=e;if(!r)return"";let o="";const a=V(t,H.LOCALE_DATE_STRING_DATE_FORMAT),s=V(n,H.LOCALE_DATE_STRING_DATE_FORMAT);return a&&s?o=i(N.dateInputRangeError,{maxLocaleDate:a,minLocaleDate:s}):a?o=i(N.dateInputMaxError,{maxLocaleDate:a}):s&&(o=i(N.dateInputMinError,{minLocaleDate:s})),o}),j(this,"handleInputKeyDown",e=>{const{isKeyboardInputAllowed:t,isTextInputAllowed:n,isAccessible:r}=this.props;!t&&this.datePicker&&this.datePicker.isVisible()&&e.stopPropagation(),n||r||e.key===U||e.preventDefault(),(n||r&&!this.canUseDateInputType)&&e.key===F&&e.preventDefault(),!r||e.key!==F&&" "!==e.key||e.preventDefault(),e.key!==F&&e.key!==z&&" "!==e.key||this.datePicker&&this.datePicker.isVisible()&&this.datePicker.hide()}),j(this,"handleOnChange",e=>{const{isAccessible:t,maxDate:n,minDate:r,onChange:i}=this.props,{isDateInputInvalid:o}=this.state;if(!t||!this.canUseDateInputType)return;this.datePicker&&this.datePicker.isVisible()&&e.stopPropagation();const{value:a}=e.target;if(this.datePicker&&a){const e=this.parseDisplayDateType(a);if(e){if(r&&e<r||n&&e>n)return this.datePicker.setDate(null),void this.setState({isDateInputInvalid:!0});o&&this.setState({isDateInputInvalid:!1,showDateInputError:!1})}else this.setState({isDateInputInvalid:!0});if(this.datePicker.setDate(e,!0),i){i(e,this.formatValue(e))}}else o&&this.setState({isDateInputInvalid:!1,showDateInputError:!1})}),j(this,"handleInputBlur",e=>{const{isAccessible:t,isTextInputAllowed:n,onBlur:r}=this.props,{isDateInputInvalid:i}=this.state,o=e.relatedTarget||document.activeElement;this.datePicker&&this.datePicker.isVisible()&&o&&o===this.datePickerButtonEl&&(this.shouldStayClosed=!0,setTimeout(()=>{this.shouldStayClosed=!1},L)),r&&r(e);let a=null;if(this.dateInputEl){let e=null;t&&!this.canUseDateInputType&&(e=this.parseDisplayDateType(this.dateInputEl.value)),a=new Date(e||this.dateInputEl.value)}(n||t&&!this.canUseDateInputType)&&a&&a.getDate()&&this.onSelectHandler(a),t&&i&&this.setState({showDateInputError:!0})}),j(this,"handleButtonClick",e=>{e.preventDefault(),e.stopPropagation();const{isAccessible:t,isDisabled:n}=this.props;if(t){if(n||!this.datePicker)return;this.datePicker.isVisible()?(this.datePicker.hide(),this.focusDatePicker()):this.datePicker.show()}else this.shouldStayClosed||this.focusDatePicker()}),j(this,"handleOnClick",e=>{const{isAccessible:t}=this.props;t&&(e.preventDefault(),e.stopPropagation())}),j(this,"formatDisplay",e=>{const{displayFormat:t,intl:n}=this.props;return e?n.formatDate(e,t):""}),j(this,"formatDisplayDateType",e=>e?V(e,H.UTC_ISO_STRING_DATE_FORMAT).slice(0,10):""),j(this,"parseDisplayDateType",e=>e&&B.test(e)?new Date("".concat(e,"T00:00:00")):null),j(this,"formatValue",e=>{const{dateFormat:t}=this.props;return t?V(e,t):""}),j(this,"clearDate",e=>{e.preventDefault();const{isAccessible:t}=this.props;this.datePicker&&this.datePicker.setDate(null),this.onSelectHandler(null),t&&this.focusDatePicker()}),j(this,"shouldUseAccessibleFallback",()=>{const e=document.createElement("input");try{e.type="date"}catch(e){}return"text"===e.type}),j(this,"renderCalendarButton",()=>{const{intl:e,isAccessible:t,isAlwaysVisible:n,isDisabled:i}=this.props,{formatMessage:o}=e;if(n)return null;const a=t?{"aria-hidden":!0,tabIndex:-1}:{};return r.createElement(A.a,R({"aria-label":o(N.chooseDate),className:"date-picker-open-btn",getDOMRef:e=>{this.datePickerButtonEl=e},isDisabled:i,onClick:this.handleButtonClick,type:P.a.BUTTON},a),r.createElement(E,null))})}componentDidMount(){const{customInput:e,dateFormat:t,displayFormat:n,intl:r,isAccessible:i,isAlwaysVisible:o,isTextInputAllowed:a,maxDate:s,minDate:l,onChange:c,value:d,yearRange:f}=this.props,{formatDate:p,formatMessage:m}=r,{nextMonth:g,previousMonth:b}=N;let v=d;if(i&&this.shouldUseAccessibleFallback()&&(this.canUseDateInputType=!1),t===H.UTC_TIME_DATE_FORMAT&&d&&(v=function(e){const t=e.toUTCString().slice(0,-4);return new Date(t)}(d),c)){c(v,this.formatValue(v))}const y=(new Date).getFullYear(),{timeZone:w}=n||{},E={previousMonth:m(b),nextMonth:m(g),months:h()(12).map(e=>p(new Date(y,e,15),{month:"long",timeZone:w})),weekdays:h()(1,8).map(e=>p(new Date(2016,4,e),{weekday:"long",timeZone:w})),weekdaysShort:h()(1,8).map(e=>p(new Date(2016,4,e),{weekday:"narrow",timeZone:w}))},C={bound:!e,blurFieldOnSelect:!1,setDefaultDate:!0,defaultDate:null===v?void 0:v,field:this.dateInputEl,firstDay:W.includes(r.locale)?0:1,maxDate:s,minDate:l,position:"bottom left",i18n:E,showDaysInNextAndPreviousMonths:!0,onSelect:this.onSelectHandler,yearRange:f,toString:this.formatDisplay};i&&(this.canUseDateInputType&&(delete C.field,C.trigger=this.dateInputEl,C.accessibleFieldEl=this.dateInputEl,C.datePickerButtonEl=this.datePickerButtonEl),C.parse=this.parseDisplayDateType,C.toString=this.formatDisplayDateType,C.keyboardInput=!1),this.datePicker=new x(C),a&&this.updateDateInputValue(this.formatDisplay(v)),o&&(this.datePicker.show(),this.datePicker.hide=u.a)}UNSAFE_componentWillReceiveProps(e){if(!this.datePicker)return;const{value:t=null,minDate:n=null,maxDate:r=null}=e,{value:i,minDate:o,maxDate:a,isTextInputAllowed:s}=this.props,l=this.datePicker&&this.datePicker.getDate();(t&&!i||!t&&i||t&&i&&t.getTime()!==i.getTime())&&this.datePicker.setDate(t),s&&this.updateDateInputValue(this.formatDisplay(t)),(n&&!o||n&&o||n&&o&&n.getTime()!==o.getTime())&&(this.datePicker.setMinDate(n),l&&l<n&&this.datePicker.gotoDate(n)),(r&&!a||!r&&a||r&&a&&r.getTime()!==a.getTime())&&(this.datePicker.setMaxDate(r),l&&r&&l>r&&this.datePicker.gotoDate(r))}componentWillUnmount(){this.datePicker&&this.datePicker.destroy()}updateDateInputValue(e){this.dateInputEl&&(this.dateInputEl.value=e)}render(){const{className:e,customInput:t,description:n,error:i,errorTooltipPosition:a,hideLabel:s,hideOptionalLabel:c,inputProps:d,intl:h,isAccessible:f,isClearable:p,isDisabled:g,isRequired:b,isTextInputAllowed:v,label:w,maxDate:E,minDate:S,name:O,onFocus:k,placeholder:_,resinTarget:x,value:M}=this.props,{isDateInputInvalid:L}=this.state,{formatMessage:F}=h,z=i||this.getDateInputError(),U=!!z||L,H=!!M||L,V=l()(e,"date-picker-wrapper",{"show-clear-btn":p&&H&&!g,"show-error":U}),W={"aria-invalid":U,"aria-required":b,"aria-errormessage":this.errorMessageID,"aria-describedby":n?this.descriptionID:void 0},K=x?{[m.a]:x}:{};let q,G,Q;return q=f?{defaultValue:this.formatDisplayDateType(M)}:v?{defaultValue:this.formatDisplay(M)}:{value:this.formatDisplay(M)},G=f&&this.canUseDateInputType?{onChange:this.handleOnChange}:v||f&&!this.canUseDateInputType?{}:{onChange:u.a},Q=f&&this.canUseDateInputType?{max:this.formatDisplayDateType(E)||"9999-12-31",min:this.formatDisplayDateType(S)||"0001-01-01"}:f&&!this.canUseDateInputType?{name:O,pattern:B.source,title:"YYYY-MM-DD"}:{},r.createElement("div",{className:V},r.createElement("span",{className:"date-picker-icon-holder"},r.createElement(I.a,{hideLabel:s,showOptionalText:!c&&!b,text:w},r.createElement(r.Fragment,null,!!n&&r.createElement("div",{id:this.descriptionID,className:"date-picker-description"},n),r.createElement(T.c,{className:"date-picker-error-tooltip",isShown:!!z,position:a,text:z||"",theme:T.b.ERROR},t?r.cloneElement(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({disabled:g,ref:e=>{this.dateInputEl=e},required:b},K,{},W)):r.createElement("input",R({ref:e=>{this.dateInputEl=e},className:"date-picker-input",disabled:g,onBlur:this.handleInputBlur,onClick:this.handleOnClick,placeholder:_||F(N.chooseDate),required:b,type:f&&this.canUseDateInputType?"date":"text"},G,{onFocus:k,onKeyDown:this.handleInputKeyDown},K,W,d,q,Q))),r.createElement("span",{id:this.errorMessageID,className:"accessibility-hidden",role:"alert"},z))),p&&H&&!g?r.createElement(A.a,{"aria-label":F(N.dateClearButton),className:"date-picker-clear-btn",onClick:this.clearDate,type:P.a.BUTTON},r.createElement(C.a,null)):null,U?r.createElement(y,{className:"date-picker-icon-alert",title:r.createElement(o.a,N.iconAlertText)}):null,this.renderCalendarButton(),r.createElement("input",{className:"date-picker-unix-time-input",name:O,readOnly:!0,type:"hidden",value:M?this.formatValue(M):""})))}}j(K,"defaultProps",{className:"",dateFormat:H.UNIX_TIME_DATE_FORMAT,displayFormat:{},error:"",errorTooltipPosition:T.a.BOTTOM_LEFT,inputProps:{},isClearable:!0,isKeyboardInputAllowed:!1,isTextInputAllowed:!1,yearRange:10});t.a=Object(a.c)(K)},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);n(656);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const l=r.forwardRef((e,t)=>{let{className:n="",description:i,isDisabled:l,isOn:c,isToggleRightAligned:u=!1,label:d,name:h,onBlur:f,onChange:p,onFocus:m,onMouseEnter:g,onMouseLeave:b}=e,v=s(e,["className","description","isDisabled","isOn","isToggleRightAligned","label","name","onBlur","onChange","onFocus","onMouseEnter","onMouseLeave"]);const y=o()("toggle-container",n,{"is-toggle-right-aligned":u}),w=[r.createElement("div",{key:"toggle-simple-switch",className:"toggle-simple-switch"}),r.createElement("div",{key:"toggle-simple-label",className:"toggle-simple-label"},d)];return u&&w.reverse(),r.createElement("div",{className:y,onMouseEnter:g,onMouseLeave:b},r.createElement("label",{className:"toggle-simple"},r.createElement("input",a({checked:c,className:"toggle-simple-input",disabled:l,name:h,onBlur:f,onChange:p,onFocus:m,ref:t,role:"switch",type:"checkbox"},v)),w),i?r.createElement("div",{className:"toggle-simple-description"},i):null)});l.displayName="Toggle",t.a=l},function(e,t,n){var r=n(102),i=n(39),o="Expected a function";e.exports=function(e,t,n){var a=!0,s=!0;if("function"!=typeof e)throw new TypeError(o);return i(n)&&(a="leading"in n?!!n.leading:a,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:a,maxWait:t,trailing:s})}},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(2);t.a=e=>{let{className:t="",color:n=o.m,height:a=16,title:s,width:l=16}=e;return r.createElement(i.a,{className:"icon-open-with ".concat(t),height:a,title:s,viewBox:"0 0 16 16",width:l},r.createElement("path",{className:"fill-color",fill:n,fillRule:"evenodd",d:"M12 2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm0 1H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm-1 2v6h-1V6.71l-4.65 4.64-.7-.7L9.29 6H5V5h6z"}))}},function(e,t,n){"use strict";var r=n(0);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{let{children:t,href:n="#",linkRef:a,target:s,rel:l,component:c,refProp:u}=e,d=o(e,["children","href","linkRef","target","rel","component","refProp"]);const h="_blank"!==s||l?l:"noopener",f=c||"a",p={[u||"ref"]:a};return r.createElement(f,i({href:n,rel:h,target:s},p,d),t)}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(6),a=n(119),s=n(33),l=n(77),c=n(31),u=n(14),d=n(17),h=n(4),f=n.n(h),p=n(10),m=n(2);var g=e=>{let{className:t="",height:n=12,color:i=m.g,title:o,width:a=12}=e;const s=f()("bdl-IconSecurityClassification",t);return r.createElement(p.a,{className:s,height:n,title:o,viewBox:"0 0 12 12",width:a},r.createElement("path",{d:"M6 0l4.875 2.438v2.856c0 2.645-2.309 5.792-4.79 6.366L6 11.68l-.084-.02c-2.482-.574-4.791-3.721-4.791-6.366V2.438L6 0zm0 .839L1.875 2.9v2.393c0 2.276 2.026 5.068 4.125 5.614 2.1-.546 4.125-3.338 4.125-5.614V2.901L6 .839zm2.25 2.58c.207 0 .375.168.375.375v3c0 .207-.168.375-.375.375s-.375-.168-.375-.375v-3c0-.207.168-.375.375-.375z",fill:i,fillRule:"evenodd"}))},b=n(189);n(648);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const w=e=>{let{className:t,color:n,icon:i,message:o}=e,a=y(e,["className","color","icon","message"]);return r.createElement("h1",v({className:f()("bdl-SecurityBadge",t),style:{backgroundColor:n}},a),i,r.createElement("span",{className:"bdl-SecurityBadge-name"},o))};w.defaultProps={icon:r.createElement(b.a,{color:m.y,height:22,width:22,strokeWidth:3})};var E=w;n(649);const C=e=>{let{color:t,name:n,onClick:i,tooltipPosition:o="bottom-center",tooltipText:a}=e;const s="function"==typeof i,l=!a,c=r.createElement(E,{className:"bdl-ClassifiedBadge",color:t,icon:r.createElement(g,{height:12,width:12}),message:n});return r.createElement(d.c,{isDisabled:l,isTabbable:!1,position:o,text:a},s?r.createElement(u.a,{className:"bdl-ClassifiedBadge-editButton",onClick:i,type:"button"},c):c)};C.defaultProps={color:m.y};var S=C,O=n(27),k=n(8),_=n.n(k),x=n(328),P=n.n(x),I=n(79);var A=Object(I.defineMessages)({securityControlsLabel:{id:"boxui.securityControls.securityControlsLabel",defaultMessage:"Restrictions"},shortSharing:{id:"boxui.securityControls.shortSharing",defaultMessage:"Sharing restriction applies"},shortDownload:{id:"boxui.securityControls.shortDownload",defaultMessage:"Download restrictions apply"},shortApp:{id:"boxui.securityControls.shortApp",defaultMessage:"Application restrictions apply"},shortWatermarking:{id:"boxui.securityControls.shortWatermarking",defaultMessage:"Watermarking applies"},shortSign:{id:"boxui.securityControls.shortSign",defaultMessage:"Sign restrictions apply"},shortSharingDownload:{id:"boxui.securityControls.shortSharingDownload",defaultMessage:"Sharing and download restrictions apply"},shortSharingApp:{id:"boxui.securityControls.shortSharingApp",defaultMessage:"Sharing and app restrictions apply"},shortDownloadApp:{id:"boxui.securityControls.shortDownloadApp",defaultMessage:"Download and app restrictions apply"},shortSharingSign:{id:"boxui.securityControls.shortSharingSign",defaultMessage:"Sharing and Sign restrictions apply"},shortDownloadSign:{id:"boxui.securityControls.shortDownloadSign",defaultMessage:"Download and Sign restrictions apply"},shortAppSign:{id:"boxui.securityControls.shortAppSign",defaultMessage:"App and Sign restrictions apply"},shortDownloadAppSign:{id:"boxui.securityControls.shortDownloadAppSign",defaultMessage:"Download, app and Sign restrictions apply"},shortSharingAppSign:{id:"boxui.securityControls.shortSharingAppSign",defaultMessage:"Sharing, app and Sign restrictions apply"},shortSharingDownloadSign:{id:"boxui.securityControls.shortSharingDownloadSign",defaultMessage:"Sharing, download and Sign restrictions apply"},shortSharingDownloadApp:{id:"boxui.securityControls.shortSharingDownloadApp",defaultMessage:"Sharing, download and app restrictions apply"},shortSharingDownloadAppSign:{id:"boxui.securityControls.shortSharingDownloadAppSign",defaultMessage:"Sharing, download, app and Sign restrictions apply"},sharingCollabOnly:{id:"boxui.securityControls.sharingCollabOnly",defaultMessage:"Shared links allowed for collaborators only."},sharingCollabAndCompanyOnly:{id:"boxui.securityControls.sharingCollabAndCompanyOnly",defaultMessage:"Shared links cannot be made publicly accessible."},watermarkingApplied:{id:"boxui.securityControls.watermarkingApplied",defaultMessage:"Watermarking will be applied."},externalCollabBlock:{id:"boxui.securityControls.externalCollabBlock",defaultMessage:"External collaboration restricted."},externalCollabDomainList:{id:"boxui.securityControls.externalCollabDomainList",defaultMessage:"External collaboration limited to approved domains."},appDownloadRestricted:{id:"boxui.securityControls.appDownloadRestricted",defaultMessage:"Download restricted for some applications."},appDownloadBlacklist:{id:"boxui.securityControls.appDownloadBlacklist",defaultMessage:"Download restricted for some applications: {appNames}"},appDownloadBlacklistOverflow:{id:"boxui.securityControls.appDownloadBlacklistOverflow",defaultMessage:"Download restricted for some applications: {appNames} +{remainingAppCount} more"},appDownloadWhitelist:{id:"boxui.securityControls.appDownloadWhitelist",defaultMessage:"Only select applications are allowed: {appNames}"},appDownloadWhitelistOverflow:{id:"boxui.securityControls.appDownloadWhitelistOverflow",defaultMessage:"Only select applications are allowed: {appNames} +{remainingAppCount} more"},allAppNames:{id:"boxui.securityControls.allAppNames",defaultMessage:"All applications: {appsList}"},webDownloadOwners:{id:"boxui.securityControls.webDownloadOwners",defaultMessage:"Download restricted on web, except Owners/Co-Owners."},webDownloadOwnersEditors:{id:"boxui.securityControls.webDownloadOwnersEditors",defaultMessage:"Download restricted on web, except Owners/Co-Owners/Editors."},webDownloadExternalOwners:{id:"boxui.securityControls.webDownloadExternalOwners",defaultMessage:"Download restricted on web, except Owners/Co-Owners. Also restricted for external users."},webDownloadExternalOwnersEditors:{id:"boxui.securityControls.webDownloadExternalOwnersEditors",defaultMessage:"Download restricted on web, except Owners/Co-Owners/Editors. Also restricted for external users."},webDownloadExternal:{id:"boxui.securityControls.webDownloadExternal",defaultMessage:"Download restricted on web for external users."},boxSignRequestRestricted:{id:"boxui.securityControls.boxSignRequestRestricted",defaultMessage:"Sign restrictions apply."},mobileDownloadOwners:{id:"boxui.securityControls.mobileDownloadOwners",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners."},mobileDownloadOwnersEditors:{id:"boxui.securityControls.mobileDownloadOwnersEditors",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners/Editors."},mobileDownloadExternalOwners:{id:"boxui.securityControls.mobileDownloadExternalOwners",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners. Also restricted for external users."},mobileDownloadExternalOwnersEditors:{id:"boxui.securityControls.mobileDownloadExternalOwnersEditors",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners/Editors. Also restricted for external users."},mobileDownloadExternal:{id:"boxui.securityControls.mobileDownloadExternal",defaultMessage:"Download restricted on mobile for external users."},desktopDownloadOwners:{id:"boxui.securityControls.desktopDownloadOwners",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners."},desktopDownloadOwnersEditors:{id:"boxui.securityControls.desktopDownloadOwnersEditors",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners/Editors."},desktopDownloadExternalOwners:{id:"boxui.securityControls.desktopDownloadExternalOwners",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners. Also restricted for external users."},desktopDownloadExternalOwnersEditors:{id:"boxui.securityControls.desktopDownloadExternalOwnersEditors",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners/Editors. Also restricted for external users."},desktopDownloadExternal:{id:"boxui.securityControls.downloadExternal",defaultMessage:"Download restricted on Box Drive for external users."},viewAll:{id:"boxui.securityControls.viewAll",defaultMessage:"View All"},modalTitle:{id:"boxui.securityControls.modalTitle",defaultMessage:"View Classification for '{itemName}'"},modalDescription:{id:"boxui.securityControls.modalDescription",defaultMessage:"Classification labels defined by your administrator can be used to label content and apply security policies."}});const{BLACKLIST:T,WHITELIST:M}=O.n,{DEFAULT:D,WITH_APP_LIST:R,WITH_OVERFLOWN_APP_LIST:j}=O.b;var N={[T]:{[D]:A.appDownloadRestricted,[R]:A.appDownloadBlacklist,[j]:A.appDownloadBlacklistOverflow},[M]:{[D]:A.appDownloadRestricted,[R]:A.appDownloadWhitelist,[j]:A.appDownloadWhitelistOverflow}};const{DESKTOP:L,MOBILE:F,WEB:z}=O.m,{OWNERS_AND_COOWNERS:U,OWNERS_COOWNERS_AND_EDITORS:B}=O.o;var H={[L]:{externalAllowed:{[U]:A.desktopDownloadOwners,[B]:A.desktopDownloadOwnersEditors},externalRestricted:{[U]:A.desktopDownloadExternalOwners,[B]:A.desktopDownloadExternalOwnersEditors,default:A.desktopDownloadExternal}},[F]:{externalAllowed:{[U]:A.mobileDownloadOwners,[B]:A.mobileDownloadOwnersEditors},externalRestricted:{[U]:A.mobileDownloadExternalOwners,[B]:A.mobileDownloadExternalOwnersEditors,default:A.mobileDownloadExternal}},[z]:{externalAllowed:{[U]:A.webDownloadOwners,[B]:A.webDownloadOwnersEditors},externalRestricted:{[U]:A.webDownloadExternalOwners,[B]:A.webDownloadExternalOwnersEditors,default:A.webDownloadExternal}}};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{APP:q,BOX_SIGN_REQUEST:G,DOWNLOAD:Q,EXTERNAL_COLLAB:Y,SHARED_LINK:$,WATERMARK:X}=O.a,{DEFAULT:Z,WITH_APP_LIST:J,WITH_OVERFLOWN_APP_LIST:ee}=O.b,{DESKTOP:te,MOBILE:ne,WEB:re}=O.m,{BLOCK:ie,WHITELIST:oe,BLACKLIST:ae}=O.n,{COLLAB_ONLY:se,COLLAB_AND_COMPANY_ONLY:le,PUBLIC:ce}=O.q,ue=e=>{const t=[],{app:n,boxSignRequest:r,download:i,externalCollab:o,sharedLink:a,watermark:s}=e,l=a&&a.accessLevel!==ce||o;return l&&i&&n&&r?t.push({message:A.shortSharingDownloadAppSign}):l&&i&&n?t.push({message:A.shortSharingDownloadApp}):i&&n&&r?t.push({message:A.shortDownloadAppSign}):l&&n&&r?t.push({message:A.shortSharingAppSign}):l&&i&&r?t.push({message:A.shortSharingDownloadSign}):l&&r?t.push({message:A.shortSharingSign}):i&&r?t.push({message:A.shortDownloadSign}):n&&r?t.push({message:A.shortAppSign}):l&&i?t.push({message:A.shortSharingDownload}):l&&n?t.push({message:A.shortSharingApp}):i&&n?t.push({message:A.shortDownloadApp}):r?t.push({message:A.shortSign}):l?t.push({message:A.shortSharing}):i?t.push({message:A.shortDownload}):n&&t.push({message:A.shortApp}),s&&t.push({message:A.shortWatermarking}),t},de=e=>{const t=[];switch(_()(e,"".concat($,".accessLevel"))){case se:t.push({message:A.sharingCollabOnly});break;case le:t.push({message:A.sharingCollabAndCompanyOnly})}return t},he=e=>{const t=[];return _()(e,"".concat(X,".enabled"),!1)&&t.push({message:A.watermarkingApplied}),t},fe=e=>{const t=[];switch(_()(e,"".concat(Y,".accessLevel"))){case ie:t.push({message:A.externalCollabBlock});break;case oe:case ae:t.push({message:A.externalCollabDomainList})}return t},pe=(e,t)=>{const n=[],r=_()(e,"".concat(q,".accessLevel"));switch(r){case ie:n.push({message:A.appDownloadRestricted});break;case oe:case ae:{const i=_()(e,"".concat(q,".apps"),[]);t=P()(t)?i.length:t;const o=i.slice(0,t),a=i.slice(t).length,s=o.map(e=>{let{displayText:t}=e;return t}).join(", ");if(a){const e=i.map(e=>{let{displayText:t}=e;return t}).join(", ");n.push({message:W({},N[r][ee],{values:{appNames:s,remainingAppCount:a}}),tooltipMessage:W({},A.allAppNames,{values:{appsList:e}})})}else{const e=i.length?J:Z;n.push({message:W({},N[r][e],{values:{appNames:s}})})}break}}return n},me=e=>{const t=[],{web:n,mobile:r,desktop:i}=_()(e,Q,{}),o={[re]:{platform:re,restrictions:n},[ne]:{platform:ne,restrictions:r},[te]:{platform:te,restrictions:i}};return Object.keys(o).forEach(e=>{const{platform:n,restrictions:r}=o[e];if(!r)return;const{restrictExternalUsers:i,restrictManagedUsers:a}=r;a&&i?t.push({message:H[n].externalRestricted[a]}):a?t.push({message:H[n].externalAllowed[a]}):i&&t.push({message:H[n].externalRestricted.default})}),t},ge=e=>{return _()(e,"".concat(G,".enabled"),!1)?[{message:A.boxSignRequestRestricted}]:[]},be=(e,t)=>{return[...de(e),...fe(e),...me(e),...pe(e,t),...he(e),...ge(e)]};var ve=n(110);n(650);var ye=e=>{let{message:t,tooltipMessage:n}=e;return r.createElement("li",{className:"bdl-SecurityControlsItem"},r.isValidElement(t)?t:r.createElement(a.a,t),n&&r.createElement(d.c,{className:"bdl-SecurityControlsItem-tooltip",text:r.createElement(a.a,n),position:"middle-right",isTabbable:!1},r.createElement("span",{className:"bdl-SecurityControlsItem-tooltipIcon"},r.createElement(ve.a,{color:m.b,width:13,height:13}))))},we=n(184),Ee=n(30),Ce=n(24);var Se=Object(I.defineMessages)({add:{id:"boxui.classification.add",defaultMessage:"Add"},classification:{id:"boxui.classification.classification",defaultMessage:"Classification"},definition:{id:"boxui.classification.definition",defaultMessage:"Definition"},edit:{id:"boxui.classification.edit",defaultMessage:"Edit"},missing:{id:"boxui.classification.missing",defaultMessage:"Not classified"},modifiedByLabel:{id:"boxui.classification.modifiedByLabel",defaultMessage:"Classification Label"},importedBy:{id:"boxui.classification.importedBy",defaultMessage:"Imported from {modifiedBy} on {modifiedAt}"},modifiedBy:{id:"boxui.classification.modifiedBy",defaultMessage:"Applied by {modifiedBy} on {modifiedAt}"},classificationYellow:{id:"boxui.classification.classificationYellow",defaultMessage:"Yellow"},classificationOrange:{id:"boxui.classification.classificationOrange",defaultMessage:"Orange"},classificationRed:{id:"boxui.classification.classificationRed",defaultMessage:"Red"},classificationPurple:{id:"boxui.classification.classificationPurple",defaultMessage:"Purple"},classificationLightBlue:{id:"boxui.classification.classificationLightBlue",defaultMessage:"Light Blue"},classificationDarkBlue:{id:"boxui.classification.classificationDarkBlue",defaultMessage:"Dark Blue"},classificationGreen:{id:"boxui.classification.classificationGreen",defaultMessage:"Green"},classificationGrey:{id:"boxui.classification.classificationGrey",defaultMessage:"Grey"}});n(652);function Oe(){return(Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const ke=e=>{let{closeModal:t,definition:n,classificationColor:i,classificationName:o,isSecurityControlsModalOpen:s,itemName:c,modalItems:u}=e;if(!c||!o||!n)return null;const d=r.createElement(a.a,Oe({},A.modalTitle,{values:{itemName:c}}));return r.createElement(we.a,{className:"bdl-SecurityControlsModal",title:d,onRequestClose:t,isOpen:s},r.createElement("p",null,r.createElement(a.a,A.modalDescription)),r.createElement(S,{color:i,name:o}),r.createElement(l.a,{text:r.createElement(a.a,Se.definition)},r.createElement("p",{className:"bdl-SecurityControlsModal-definition"},n)),r.createElement("ul",{className:"bdl-SecurityControlsModal-controlsItemList"},u.map((e,t)=>{let{message:n,tooltipMessage:i}=e;return r.createElement(ye,{key:t,message:n,tooltipMessage:i})})),r.createElement(we.b,null,r.createElement(Ce.b,{onClick:t,type:"button"},r.createElement(a.a,Ee.a.close))))};ke.defaultProps={isSecurityControlsModalOpen:!1,modalItems:[]};var _e=ke;n(653);function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{FULL:Pe,SHORT:Ie,SHORT_WITH_BTN:Ae}=O.p;class Te extends r.Component{constructor(){super(...arguments),xe(this,"state",{isSecurityControlsModalOpen:!1}),xe(this,"openModal",()=>this.setState({isSecurityControlsModalOpen:!0})),xe(this,"closeModal",()=>this.setState({isSecurityControlsModalOpen:!1}))}render(){const{classificationColor:e,classificationName:t,controls:n,controlsFormat:i,definition:o,itemName:s,maxAppCount:c,shouldRenderLabel:d}=this.props;let h,f=[];if(i===Pe?f=be(n,c):(f=ue(n)).length&&i===Ae&&(h=be(n,c)),!f.length)return null;const{isSecurityControlsModalOpen:p}=this.state,m=i===Ae&&!!s&&!!t&&!!o;let g=r.createElement("ul",{className:"bdl-SecurityControls"},f.map((e,t)=>{let{message:n,tooltipMessage:i}=e;return r.createElement(ye,{key:t,message:n,tooltipMessage:i})}));return d&&(g=r.createElement(l.a,{text:r.createElement(a.a,A.securityControlsLabel)},g)),r.createElement(r.Fragment,null,g,m&&r.createElement(r.Fragment,null,r.createElement(u.a,{className:"lnk",onClick:this.openModal,type:"button"},r.createElement(a.a,A.viewAll)),r.createElement(_e,{classificationColor:e,classificationName:t,closeModal:this.closeModal,definition:o,itemName:s,isSecurityControlsModalOpen:p,modalItems:h})))}}xe(Te,"defaultProps",{classificationName:"",definition:"",itemName:"",controls:{},controlsFormat:Ie,maxAppCount:O.l,shouldRenderLabel:!1});var Me=Te;n(654);function De(){return(De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Re=e=>{let{className:t="",color:n,controls:i,controlsFormat:u,definition:d,isImportedClassification:h=!1,isLoadingControls:f,itemName:p="",maxAppCount:m,messageStyle:g,modifiedAt:b,modifiedBy:v,name:y,onClick:w}=e;const E=!!y,C=!!d,O=!!b,k=!!v,_=E&&C&&"tooltip"===g,x=E&&C&&"inline"===g,P=!E&&"inline"===g,I=E&&f&&"inline"===g,A=E&&!f&&!!i&&"inline"===g,T=new Date(b||0),M=E&&O&&Object(s.j)(T)&&k&&"inline"===g,D=M&&r.createElement(o.a,{value:T,month:"long",year:"numeric",day:"numeric"}),R=h?Se.importedBy:Se.modifiedBy;return r.createElement("article",{className:"bdl-Classification ".concat(t)},E&&r.createElement(S,{color:n,name:y,onClick:w,tooltipText:_?d:void 0}),x&&r.createElement(l.a,{text:r.createElement(a.a,Se.definition)},r.createElement("p",{className:"bdl-Classification-definition"},d)),P&&r.createElement("span",{className:"bdl-Classification-missingMessage"},r.createElement(a.a,Se.missing)),M&&r.createElement(l.a,{text:r.createElement(a.a,Se.modifiedByLabel)},r.createElement("p",{className:"bdl-Classification-modifiedBy","data-testid":"classification-modifiedby"},r.createElement(a.a,De({},R,{values:{modifiedAt:D,modifiedBy:v}})))),A&&r.createElement(Me,{classificationColor:n,classificationName:y,controls:i,controlsFormat:u,definition:d,itemName:p,maxAppCount:m,shouldRenderLabel:!0}),I&&r.createElement(c.b,null))},je=n(22);function Ne(){return(Ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Le(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Fe=e=>{let{className:t="",isEditing:n,onEdit:r}=e,o=Le(e,["className","isEditing","onEdit"]);const s=n?Se.edit:Se.add;return i.a.createElement(je.a,Ne({className:"bdl-EditClassificationButton ".concat(t),onClick:r,type:"button"},o),i.a.createElement(a.a,s))};var ze={[O.c]:{name:Se.classificationYellow,color:m.y,tinycon:m.x},[O.d]:{name:Se.classificationOrange,color:m.s,tinycon:m.r},[O.e]:{name:Se.classificationRed,color:m.w,tinycon:m.v},[O.f]:{name:Se.classificationPurple,color:m.u,tinycon:m.t},[O.g]:{name:Se.classificationLightBlue,color:m.q,tinycon:m.p},[O.h]:{name:Se.classificationDarkBlue,color:m.f,tinycon:m.e},[O.i]:{name:Se.classificationGreen,color:m.o,tinycon:m.n},[O.j]:{name:Se.classificationGrey,color:m.i,tinycon:m.l}};function Ue(e){const t=_()(e,"colorID",O.k),{color:n}=ze[t]||ze[O.k];return n}n.d(t,"c",(function(){return Re})),n.d(t,"b",(function(){return Se})),n.d(t,"a",(function(){return Fe})),n.d(t,"d",(function(){return Ue}))},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(44))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(73),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(398),i=n(112),o=n(34),a=n(123),s=n(136),l=n(164),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&a(e),h=!n&&!u&&!d&&l(e),f=n||u||d||h,p=f?r(e.length,String):[],m=p.length;for(var g in e)!t&&!c.call(e,g)||f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||p.push(g);return p}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){(function(e){var r=n(42),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(163)(e))},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(178),i=n(179),o=n(177),a=n(227),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},function(e,t,n){var r=n(178),i=n(34);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(229),i=n(228),o=n(137);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(180);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(266),i=n(179),o=n(150);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(60),i=n(179),o=n(45),a="[object Object]",s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,d=c.call(Object);e.exports=function(e){if(!o(e)||r(e)!=a)return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}},function(e,t,n){var r=n(430),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(l),r(e,this,c)}}},function(e,t,n){var r=n(431),i=n(433)(r);e.exports=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){"use strict";var r=n(32);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},function(e,t,n){"use strict";var r=n(32),i=n(453),o=n(454),a=n(237),s=n(455),l=n(458),c=n(459),u=n(240),d=n(139),h=n(140);e.exports=function(e){return new Promise((function(t,n){var f,p=e.data,m=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(p)&&delete m["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(y+":"+w)}var E=s(e.baseURL,e.url);function C(){if(v){var r="getAllResponseHeaders"in v?l(v.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};i((function(e){t(e),b()}),(function(e){n(e),b()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(E,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(C)},v.onabort=function(){v&&(n(u("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(u("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var S=(e.withCredentials||c(E))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in v&&r.forEach(m,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete m[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){v&&(n(!e||e&&e.type?new h("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),p||(p=null),v.send(p)}))}},function(e,t,n){"use strict";var r=n(238);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},function(e,t){e.exports={version:"0.25.0"}},function(e,t,n){var r=n(468),i=n(469),o=n(472),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},function(e,t,n){var r=n(173),i=n(111);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){},function(e,t,n){"use strict";var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},t.prototype.getAnchorKey=function(){return this.get("anchorKey")},t.prototype.getAnchorOffset=function(){return this.get("anchorOffset")},t.prototype.getFocusKey=function(){return this.get("focusKey")},t.prototype.getFocusOffset=function(){return this.get("focusOffset")},t.prototype.getIsBackward=function(){return this.get("isBackward")},t.prototype.getHasFocus=function(){return this.get("hasFocus")},t.prototype.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset();return t<=this.getEndOffset()&&o<=n}if(e!==r&&e!==i)return!1;var a=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=a&&n>=a},t.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},t.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},t.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},t.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},t.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,n(35).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(54),s=n(24),l=n(89),c=n(2),u=n(30);n(554);t.a=Object(a.c)(e=>{let{className:t,intl:n,onClick:i}=e;return r.createElement(s.b,{"aria-label":n.formatMessage(u.a.close),className:o()("bdl-CloseButton",t),"data-testid":"bdl-CloseButton",onClick:i,type:s.a.BUTTON},r.createElement(l.a,{color:c.l,height:18,width:18}))})},function(e,t,n){"use strict";const r=n(156).a.Consumer;t.a=r},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{let{children:t,className:n="",title:i,type:l="warning"}=e,c=s(e,["children","className","title","type"]);return r.createElement("div",a({className:o()(n,"inline-alert","inline-alert-visible","inline-alert-".concat(l))},c),i?r.createElement("strong",null,i):null,r.createElement("div",null,t))}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function d(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return u(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return u(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(244)((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}));e.exports=r},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
32
+ */function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(r({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,l=s(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))o.call(n,u)&&(l[u]=n[u]);if(i){r=i(n);for(var d=0;d<r.length;d++)a.call(n,r[d])&&(l[r[d]]=n[r[d]])}}return l}},function(e,t,n){"use strict";var r=n(201);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";(function(e){let n;class r{static getUserAgent(){return e.navigator.userAgent}static isMobile(){const e=r.getUserAgent();return/iphone|ipad|ipod|android|blackberry|bb10|mini|windows\sce|palm/i.test(e)||/Mobi/i.test(e)}static isIE(){return/Trident/i.test(r.getUserAgent())}static isFirefox(){const e=r.getUserAgent();return/Firefox/i.test(e)&&!/Seamonkey\//i.test(e)}static isSafari(){const e=r.getUserAgent();return/AppleWebKit/i.test(e)&&!/Chrome\//i.test(e)}static isMobileSafari(){return r.isMobile()&&r.isSafari()&&!r.isMobileChromeOniOS()}static isMobileChromeOniOS(){const e=r.getUserAgent();return r.isMobile()&&/AppleWebKit/i.test(e)&&/CriOS\//i.test(e)}static canPlayDash(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(void 0===n||t){const t=e.MediaSource;n=!!t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.64001E"')}return n}static canWriteToClipboard(){return!(!e.navigator.clipboard||!e.navigator.clipboard.writeText)}static canReadFromClipboard(){return!(!e.navigator.clipboard||!e.navigator.clipboard.readText)}}t.a=r}).call(this,n(44))},function(e,t,n){var r=n(94),i=n(379),o=n(380),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:l&&l in Object(e)?i(e):o(e)}},function(e,t,n){"use strict";var r=n(82),i=n(1),o=n(18);class a extends r.a{getCacheKey(e){return"".concat(i.u).concat(e)}getUrl(e){const t=e?"/".concat(e):"";return"".concat(this.getBaseApiUrl(),"/web_links").concat(t)}async getWeblink(e,t,n){let{fields:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.isDestroyed())return;const a=this.getCache(),s=this.getCacheKey(e);if(this.errorCode=i.dc,this.successCallback=t,this.errorCallback=n,a.has(s)){if(0===Object(o.k)(a.get(s),r).length)return void t(a.get(s))}const l={url:this.getUrl(e)};r&&(l.params={fields:r.toString()});try{const{data:e}=await this.xhr.get(l);if(this.isDestroyed())return;a.has(s)?a.merge(s,e):a.set(s,e),this.successHandler(a.get(s))}catch(e){this.errorHandler(e)}}}t.a=a},function(e,t,n){var r=n(701)();e.exports=r},function(e,t,n){"use strict";var r=n(1);const i=new Error("Bad id or auth token. ID should be typed id like file_123 or folder_123! Token should be a string or function.");class o{static async getToken(e,t){if(null!=t&&"string"!=typeof t&&"function"!=typeof t||!e.startsWith(r.hg)&&!e.startsWith(r.gg))throw i;if(!t||"string"==typeof t)return t;const n=await t(e);if(!n||"string"==typeof n||"object"==typeof n&&(n.read||n.write))return n;throw i}static async getReadToken(e,t){const n=await o.getToken(e,t);return n&&"object"==typeof n?n.read:n}static async getReadTokens(e,t){const n=Array.isArray(e)?e:[e],r=n.map(e=>o.getReadToken(e,t)),i=await Promise.all(r),a={};return i.forEach((e,t)=>{a[n[t]]=e}),Promise.resolve(a)}static async getWriteToken(e,t){const n=await o.getToken(e,t);return n&&"object"==typeof n?n.write||n.read:n}static async cacheTokens(e,t){if(null!=t&&"string"!=typeof t&&"function"!=typeof t||!e.every(e=>e.startsWith(r.hg)||e.startsWith(r.gg)))throw i;return"function"==typeof t&&await t(e),Promise.resolve()}}t.a=o},function(e,t,n){"use strict";var r=n(483),i=n(57),o=n(484);function a(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function l(e,t){var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=i({arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),a=t.length>0?t.join("="):void 0;a=void 0===a?null:o(a),n(o(i),a,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))):r}t.extract=s,t.parse=l,t.stringify=function(e,t){!1===(t=i({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var n=function(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[a(t,e),"[",r,"]"].join(""):[a(t,e),"[",a(r,e),"]=",a(n,e)].join("")};case"bracket":return function(t,n){return null===n?a(t,e):[a(t,e),"[]=",a(n,e)].join("")};default:return function(t,n){return null===n?a(t,e):[a(t,e),"=",a(n,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return a(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return a(r,t)+"="+a(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:l(s(e),t)}}},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:i.k,fillRule:"evenodd",d:"M8 6.586l4.182-4.182a.5.5 0 01.707 0l.707.707a.5.5 0 010 .707L9.414 8l4.182 4.182a.5.5 0 010 .707l-.707.707a.5.5 0 01-.707 0L8 9.414l-4.182 4.182a.5.5 0 01-.707 0l-.707-.707a.5.5 0 010-.707L6.586 8 2.404 3.818a.5.5 0 010-.707l.707-.707a.5.5 0 01.707 0L8 6.586z"}))},function(e,t,n){"use strict";e.exports=n(659)},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(21),s=n.n(a),l=n(145);function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}class u extends r.Component{constructor(){var e,t,n;super(...arguments),n=e=>{const{isDisabled:t,onClick:n}=this.props;if(t)return e.stopPropagation(),void e.preventDefault();n&&n(e)},(t="onClickHandler")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}render(){const e=this.props,{children:t,className:n,isDisabled:i,isSelectItem:a,isSelected:u,showRadar:d}=e,h=c(e,["children","className","isDisabled","isSelectItem","isSelected","showRadar"]),f=s()(h,["role","tabIndex","onClick"]);f.className=o()("menu-item",n,{"is-select-item":a,"is-selected":u}),f.role=a?"menuitemradio":"menuitem",f.tabIndex=-1,f.onClick=this.onClickHandler,a&&(f["aria-checked"]=u),i&&(f["aria-disabled"]="true");let p=r.createElement("li",f,t);return d&&(p=r.createElement(l.a,null,p)),p}}t.a=u},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(8);const i="function"==typeof n.n(r)()(window,"performance.mark"),o=e=>i&&window.performance.mark(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l}));const r="date",i="enum",o="integer",a="float",s="multiSelect",l="string"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=(n(58),i.a.createContext());function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var s=e=>r.forwardRef((t,n)=>r.createElement(o.Consumer,null,i=>r.createElement(e,a({ref:n},t,{api:i}))));n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}))},function(e,t,n){"use strict";var r=n(126);n.d(t,"b",(function(){return r.a}));var i=n(143);n.d(t,"a",(function(){return i.a}))},function(e,t,n){"use strict";var r=n(794),i=n(315),o=n(106),a=n(810),s=n(199),l=n(517),c=n(520),u=n(582),d=n(811),h=n(584),f=n(352),p=n(95),m=n(580),g=n(46),b=n(527),v=n(598),y=n(248),w=n(872),E={Editor:d,EditorBlock:h,EditorState:g,CompositeDecorator:a,Entity:f,EntityInstance:m,BlockMapBuilder:i,CharacterMetadata:o,ContentBlock:s,ContentState:l,SelectionState:y,AtomicBlockUtils:r,KeyBindingUtil:b,Modifier:p,RichUtils:v,DefaultDraftBlockRenderMap:c,DefaultDraftInlineStyle:u,convertFromHTML:n(596),convertFromRaw:n(875),convertToRaw:w,genKey:n(154),getDefaultKeyBinding:n(599),getVisibleSelectionRect:n(880)};e.exports=E},function(e,t,n){var r=n(378),i=n(383);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(109),i=n.n(r);t.a=class{constructor(){this.cache={}}set(e,t){this.cache[e]=t}merge(e,t){if(!this.has(e))throw new Error("Key ".concat(e," not in cache!"));this.set(e,i()({},this.get(e),t))}unset(e){delete this.cache[e]}unsetAll(e){Object.keys(this.cache).forEach(t=>{t.startsWith(e)&&delete this.cache[t]})}has(e){return{}.hasOwnProperty.call(this.cache,e)}get(e){if(this.has(e))return this.cache[e]}}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(81),a=n(18),s=n(7),l=n(82),c=n(55),u=n(61),d=n(1);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends l.a{constructor(){super(...arguments),p(this,"folderSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const{item_collection:n}=t;if(!n)throw Object(s.a)();const{entries:r,total_count:i,limit:a,offset:l}=n;if(!Array.isArray(r)||"number"!=typeof i||"number"!=typeof a||"number"!=typeof l)throw Object(s.a)();const d=Object(o.a)(r,new m(this.options),new c.a(this.options),new u.a(this.options));this.itemCache=(this.itemCache||[]).concat(d),this.getCache().set(this.key,f({},t,{item_collection:f({},n,{entries:this.itemCache})})),this.finish()}),p(this,"folderDetailsSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const n=f({},this.getCache().get(this.key),{},t);this.getCache().set(this.key,n),this.successCallback(n)}),p(this,"createSuccessHandler",e=>{let{data:t}=e;const{id:n}=t;if(this.isDestroyed()||!n)return;const r=this.getCacheKey(n),i=this.getCache(),o=i.get(this.key);if(!o)return void this.successCallback(t);const{item_collection:a}=o;if(!a)throw Object(s.a)();const{total_count:l,entries:c}=a;if(!Array.isArray(c)||"number"!=typeof l)throw Object(s.a)();i.set(r,t),a.entries=[r].concat(c),a.total_count=l+1,this.successCallback(t)})}getCacheKey(e){return"".concat(d.p).concat(e)}getUrl(e){const t=e?"/".concat(e):"";return"".concat(this.getBaseApiUrl(),"/folders").concat(t)}isLoaded(){return this.getCache().has(this.key)}finish(){if(this.isDestroyed())return;const e=this.getCache(),t=e.get(this.key),{id:n,name:r,permissions:i,path_collection:o,item_collection:a}=t;if(!a||!o)throw Object(s.a)();const{entries:l,offset:c,total_count:u}=a;if(!Array.isArray(l)||"number"!=typeof u)throw Object(s.a)();const d={id:n,name:r,offset:c,percentLoaded:100,permissions:i,boxItem:t,breadcrumbs:o.entries,items:l.map(t=>e.get(t)),sortBy:this.sortBy,sortDirection:this.sortDirection,totalCount:u};this.successCallback(d)}folderRequest(){let{fields:e,noPagination:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.folderSuccessHandler;if(this.isDestroyed())return Promise.reject();const r=e||a.g;this.errorCode=d.Sb;let i={fields:r.toString()};return t||(i=f({},i,{direction:this.sortDirection.toLowerCase(),limit:this.limit,offset:this.offset,fields:r.toString(),sort:this.sortBy.toLowerCase()})),this.xhr.get({url:this.getUrl(this.id),params:i,headers:r.includes(d.xd)?{"X-Rep-Hints":d.Eg}:{}}).then(n).catch(this.errorHandler)}getFolderFields(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.isDestroyed()||(this.id=e,this.key=this.getCacheKey(e),this.successCallback=t,this.errorCallback=n,this.folderRequest(f({},r,{noPagination:!0}),this.folderDetailsSuccessHandler))}getFolder(e,t,n,r,i,o,a){let s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};this.isDestroyed()||(this.id=e,this.key=this.getCacheKey(e),this.limit=t,this.offset=n,this.sortBy=r,this.sortDirection=i,this.successCallback=o,this.errorCallback=a,s.forceFetch&&this.getCache().unset(this.key),this.isLoaded()?this.finish():this.folderRequest(s))}folderCreateRequest(e){if(this.isDestroyed())return Promise.reject();this.errorCode=d.rb;const t="".concat(this.getUrl(),"?fields=").concat(a.g.toString());return this.xhr.post({url:t,data:{name:e,parent:{id:this.id}}}).then(this.createSuccessHandler).catch(this.errorHandler)}create(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a;this.isDestroyed()||(this.id=e,this.key=this.getCacheKey(e),this.successCallback=n,this.errorCallback=r,this.folderCreateRequest(t))}}t.a=m},function(e,t,n){"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=0,o=n;return new Promise((n,a)=>{function s(l){setTimeout(()=>{i+=1,new Promise((t,n)=>{e(t,n,a)}).then(n).catch(e=>{i<t?s(o*=r):a(e)})},l)}s(o)})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(119),o=n(490),a=n(17);var s=e=>{let{className:t="",iconProps:n,tooltipText:i}=e;return r.createElement("span",{key:"infoIcon",className:"".concat(t," tooltip-icon-container")},r.createElement(a.c,{position:a.a.TOP_CENTER,text:i},r.createElement("span",{className:"info-icon-container"},r.createElement(o.a,n))))},l=n(4),c=n.n(l);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var h=e=>{let{children:t,className:n,labelContent:i}=e,o=d(e,["children","className","labelContent"]);return r.createElement("label",null,r.createElement("span",u({className:c()("label bdl-Label",n)},o),i),t)};var f=e=>{let{children:t,labelContent:n,tooltip:i}=e;const o=r.createElement(h,{labelContent:n},t);return i?r.createElement(a.c,{position:a.a.TOP_RIGHT,text:i},o):o};var p=e=>{let{children:t,labelContent:n}=e;return r.createElement(h,{className:"accessibility-hidden",labelContent:n},t)},m=n(30);n(647);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=()=>r.createElement("span",{className:"label-optional bdl-Label-optional"},"(",r.createElement(i.a,m.a.optional),")");t.a=e=>{let{text:t,tooltip:n,infoTooltip:i,infoIconProps:o,showOptionalText:a,hideLabel:l,children:c}=e;const u=[r.createElement("span",{key:"labelText"},t),a?r.createElement(y,{key:"optionalMessage"}):null];return i&&u.push(r.createElement(s,{key:"infoTooltip",iconProps:b({className:"tooltip-icon"},o),tooltipText:i})),l?r.createElement(p,{labelContent:u},c):r.createElement(f,{labelContent:u,tooltip:n},c)}},function(e,t,n){var r=n(446);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._=function(e){return e},t.defineMessages=function(e){return e}},function(e,t,n){var r=n(172),i=n(173);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),a?i(n,c,u):r(n,c,u)}return n}},function(e,t,n){"use strict";var r=n(7),i=n(1);t.a=function(e,t,n,o){const a=[];return e.forEach(e=>{const{id:s,type:l}=e;if(!s||!l)throw Object(r.a)();let c;switch(l){case i.jg:c=t;break;case i.ig:c=n;break;case i.kg:c=o;break;default:throw new Error("Unknown Type!")}const u=c.getCache(),d=c.getCacheKey(s);u.has(d)?u.merge(d,e):u.set(d,e),a.push(d)}),a}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(78),a=n.n(o),s=n(7),l=n(18),c=n(15),u=n(1);function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f extends c.a{constructor(){super(...arguments),h(this,"deleteSuccessHandler",()=>{if(this.isDestroyed())return;const e=this.getParentCacheKey(this.parentId),t=this.getCache().get(e);if(!t)return void this.postDeleteCleanup();const{item_collection:n}=t;if(!n)return void this.postDeleteCleanup();const{entries:r,total_count:i}=n;if(!Array.isArray(r)||"number"!=typeof i)throw Object(s.a)();const o=this.getCacheKey(this.id),a=r.length,l=r.filter(e=>e!==o),c=l.length,u=this.merge(e,"item_collection",d(n,{entries:l,total_count:i-(a-c)}));this.successCallback(u),this.postDeleteCleanup()}),h(this,"renameSuccessHandler",e=>{let{data:t}=e;if(!this.isDestroyed()){this.getCache().unsetAll(u.t);const e=this.merge(this.getCacheKey(this.id),"name",t.name);this.successCallback(e)}}),h(this,"shareSuccessHandler",(e,t)=>{if(!this.isDestroyed()){const n=t?Object(l.j)(e,t):e,r=this.getCache(),i=this.getCacheKey(this.id);r.has(i)?r.merge(i,n):r.set(i,n),this.successCallback(r.get(i))}})}getParentCacheKey(e){return"".concat(u.p).concat(e)}getCacheKey(e){return"getCacheKey(".concat(e,") should be overriden")}getUrl(e){return"getUrl(".concat(e,") should be overriden")}merge(e,t,n){const r=this.getCache();return r.merge(e,a()({},t,n)),r.get(e)}postDeleteCleanup(){this.isDestroyed()||(this.getCache().unsetAll(u.t),this.successCallback())}deleteItem(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.a;if(this.isDestroyed())return Promise.reject();this.errorCode=u.Ab;const{id:r,permissions:o,parent:a,type:l}=e;if(!(r&&o&&a&&l))return n(Object(s.a)(),this.errorCode),Promise.reject();const{id:c}=a,{can_delete:d}=o;if(!d||!c)return n(Object(s.b)(),this.errorCode),Promise.reject();this.id=r,this.parentId=c,this.successCallback=t,this.errorCallback=n;const h="".concat(this.getUrl(r)).concat(l===u.jg?"?recursive=true":"");return this.xhr.delete({url:h}).then(this.deleteSuccessHandler).catch(e=>{this.errorHandler(e)})}rename(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a;if(this.isDestroyed())return Promise.reject();this.errorCode=u.lc;const{id:o,permissions:a}=e;if(!o||!a)return r(Object(s.a)(),this.errorCode),Promise.reject();const{can_rename:l}=a;return l?(this.id=o,this.successCallback=n,this.errorCallback=r,this.xhr.put({url:"".concat(this.getUrl(o)),data:{name:t}}).then(this.renameSuccessHandler).catch(e=>{this.errorHandler(e)})):(r(Object(s.b)(),this.errorCode),Promise.reject())}validateSharedLinkRequest(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!t)throw this.errorCode=u.oc,Object(s.a)();const{can_share:r,can_set_share_access:i}=t;if(!r||!n&&!i)throw this.errorCode=u.oc,Object(s.b)()}async share(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(this.isDestroyed())return Promise.reject();try{const{id:i,permissions:a,shared_link:s}=e;this.id=i,this.successCallback=n,this.errorCallback=r;const l=!s&&void 0===t;this.validateSharedLinkRequest(i,a,l);const{fields:c}=o,d={url:this.getUrl(this.id),data:{shared_link:t===u.c?null:{access:t}}};c&&(d.params={fields:c.toString()});const{data:h}=await this.xhr.put(d);return this.shareSuccessHandler(h,c)}catch(e){return this.errorHandler(e)}}async updateSharedLink(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(this.isDestroyed())return Promise.reject();try{const{id:i,permissions:a}=e;this.id=i,this.successCallback=n,this.errorCallback=r,this.validateSharedLinkRequest(i,a);const{fields:s}=o,l={url:this.getUrl(this.id),data:{shared_link:t}};s&&(l.params={fields:s.toString()});const{data:c}=await this.xhr.put(l);return this.shareSuccessHandler(c,s)}catch(e){return this.errorHandler(e)}}}t.a=f},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const r="data_ready",i="js_ready"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var a=n[o];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0}},function(e,t,n){e.exports=n(447)},function(e,t,n){var r=n(275),i=1,o=4;e.exports=function(e){return r(e,i|o)}},function(e,t,n){var r=n(171),i=n(174);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=24,title:a,width:s=24}=e;return r.createElement(i.a,{className:"icon-close ".concat(t),height:o,title:a,viewBox:"0 0 24 24",width:s},r.createElement("path",{className:"fill-color",d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:n}),r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}},function(e,t,n){"use strict";var r=n(79);const i=Object(r.defineMessages)({customAdd:{id:"boxui.metadataInstanceFields.customAdd",defaultMessage:"Add"},customRemove:{id:"boxui.metadataInstanceFields.customRemove",defaultMessage:"Remove"},invalidMetadataFieldType:{id:"boxui.metadataInstanceFields.invalidMetadataFieldType",defaultMessage:"Invalid metadata field type!"},metadataFieldNoValue:{id:"boxui.metadataInstanceFields.fieldNoValue",defaultMessage:"No Value"},metadataFieldSelectValue:{id:"boxui.metadataInstanceFields.fieldSelectValue",defaultMessage:"Select Value"},metadataFieldMultiSelectValue:{id:"boxui.metadataInstanceFields.fieldMultiSelectValue",defaultMessage:"Select Values"},metadataFieldSetValue:{id:"boxui.metadataInstanceFields.fieldSetValue",defaultMessage:"Set Value"},metadataFieldSetDate:{id:"boxui.metadataInstanceFields.fieldSetDate",defaultMessage:"Set Date"}});t.a=i},function(e,t,n){var r=n(338);e.exports=function(e,t){return r(e,t)}},function(e,t,n){e.exports=n(615)()},,function(e,t,n){var r=n(42).Symbol;e.exports=r},function(e,t,n){"use strict";var r=n(106),i=n(796),o=n(185),a=n(35),s=n(797),l=n(799),c=n(351),u=n(802),d=n(803),h=n(36),f=n(804),p=n(576),m=n(805),g=n(806),b=a.OrderedSet,v={replaceText:function(e,t,n,i,o){var a=p(e,t),s=m(a,t),l=r.create({style:i||b(),entity:o||null});return d(s,s.getSelectionAfter(),n,l)},insertText:function(e,t,n,r,i){return t.isCollapsed()||h(!1),v.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=c(e,t),i=v.removeRange(e,t,"backward");return v.replaceWithFragment(i,n,r)},replaceWithFragment:function(e,t,n){var r=p(e,t),i=m(r,t);return u(i,i.getSelectionAfter(),n)},removeRange:function(e,t,n){var r,i,a=void 0,s=void 0;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),r=t.getAnchorKey(),i=t.getFocusKey(),a=e.getBlockForKey(r),s=e.getBlockForKey(i);var c=t.getStartOffset(),u=t.getEndOffset(),d=a.getEntityAt(c),h=s.getEntityAt(u-1);if(r===i&&d&&d===h){var f=l(e.getEntityMap(),a,s,t,n);return m(e,f)}var g=t;o.draft_segmented_entities_behavior&&(g=l(e.getEntityMap(),a,s,t,n));var b=p(e,g);return m(b,g)},splitBlock:function(e,t){var n=p(e,t),r=m(n,t);return g(r,r.getSelectionAfter())},applyInlineStyle:function(e,t,n){return i.add(e,t,n)},removeInlineStyle:function(e,t,n){return i.remove(e,t,n)},setBlockType:function(e,t,n){return f(e,t,(function(e){return e.merge({type:n,depth:0})}))},setBlockData:function(e,t,n){return f(e,t,(function(e){return e.merge({data:n})}))},mergeBlockData:function(e,t,n){return f(e,t,(function(e){return e.merge({data:e.getData().merge(n)})}))},applyEntity:function(e,t,n){var r=p(e,t);return s(r,t,n)}};e.exports=v},function(e,t,n){"use strict";var r=n(0),i=n(157);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(i.a,o({},e,{type:"error"}))},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n.n(i),a=n(1),s=n(190);function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends r.Component{constructor(){var e;super(...arguments),e=this,d(this,"state",{}),d(this,"handleError",(function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.props.errorOrigin;if(!t||!n||!i)return;const o={type:"error",code:n,message:t.message,origin:i,context_info:u({[a.Ae]:!0},r)};e.props.onError(o)}))}componentDidCatch(e,t){this.setState({error:e},()=>{this.handleError(e,a.pc,u({},t),this.props.errorOrigin)})}render(){const e=this.props,{children:t,errorComponent:n}=e,i=l(e,["children","errorComponent"]),{error:o}=this.state;return o?r.createElement(n,{error:o}):r.cloneElement(t,u({},i,{onError:this.handleError}))}}d(h,"defaultProps",{errorComponent:s.a,onError:o.a});var f=h;function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.a;return n=>r.forwardRef((i,o)=>r.createElement(f,p({errorComponent:t,errorOrigin:e},i),r.createElement(n,{ref:o})))};n.d(t,"a",(function(){return m}))},function(e,t,n){"use strict";var r=n(0),i=n(43);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{let{children:t,isDisabled:n,text:s}=e,l=a(e,["children","isDisabled","text"]);return n||!s?t:r.createElement(i.c,o({text:s},l),t)}},function(e,t,n){"use strict";var r=n(53);n.d(t,"a",(function(){return r.a}))},function(e,t,n){var r=n(424);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(138),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,n){var r=n(39),i=n(502),o=n(267),a="Expected a function",s=Math.max,l=Math.min;e.exports=function(e,t,n){var c,u,d,h,f,p,m=0,g=!1,b=!1,v=!0;if("function"!=typeof e)throw new TypeError(a);function y(t){var n=c,r=u;return c=u=void 0,m=t,h=e.apply(r,n)}function w(e){var n=e-p;return void 0===p||n>=t||n<0||b&&e-m>=d}function E(){var e=i();if(w(e))return C(e);f=setTimeout(E,function(e){var n=t-(e-p);return b?l(n,d-(e-m)):n}(e))}function C(e){return f=void 0,v&&c?y(e):(c=u=void 0,h)}function S(){var e=i(),n=w(e);if(c=arguments,u=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(E,t),g?y(e):h}(p);if(b)return clearTimeout(f),f=setTimeout(E,t),y(p)}return void 0===f&&(f=setTimeout(E,t)),h}return t=o(t)||0,r(n)&&(g=!!n.leading,d=(b="maxWait"in n)?s(o(n.maxWait)||0,t):d,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==f&&clearTimeout(f),m=0,c=p=u=f=void 0},S.flush=function(){return void 0===f?h:C(i())},S}},function(e,t,n){"use strict";var r=n(74);const i="localStore",o="0";t.a=class{constructor(){this.memoryStore=new r.a;try{this.localStorage=window.localStorage,this.isLocalStorageAvailable=this.canUseLocalStorage()}catch(e){this.isLocalStorageAvailable=!1}}buildKey(e){return"".concat(i,"/").concat(o,"/").concat(e)}canUseLocalStorage(){if(!this.localStorage)return!1;try{return this.localStorage.setItem(this.buildKey("TestKey"),"testValue"),this.localStorage.removeItem(this.buildKey("TestKey")),!0}catch(e){return!1}}setItem(e,t){if(this.isLocalStorageAvailable)try{this.localStorage.setItem(this.buildKey(e),JSON.stringify(t))}catch(e){}else this.memoryStore.set(e,t)}getItem(e){if(!this.isLocalStorageAvailable)return this.memoryStore.get(e);try{const t=this.localStorage.getItem(this.buildKey(e));return t?JSON.parse(t):null}catch(e){return null}}removeItem(e){if(this.isLocalStorageAvailable)try{this.localStorage.removeItem(this.buildKey(e))}catch(e){}else this.memoryStore.unset(e)}}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(34),i=n(214),o=n(421),a=n(100);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},function(e,t,n){"use strict";var r=n(35),i=r.Map,o=r.OrderedSet,a=r.Record,s=o(),l={style:s,entity:null},c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getStyle=function(){return this.get("style")},t.prototype.getEntity=function(){return this.get("entity")},t.prototype.hasStyle=function(e){return this.getStyle().includes(e)},t.applyStyle=function(e,n){var r=e.set("style",e.getStyle().add(n));return t.create(r)},t.removeStyle=function(e,n){var r=e.set("style",e.getStyle().remove(n));return t.create(r)},t.applyEntity=function(e,n){var r=e.getEntity()===n?e:e.set("entity",n);return t.create(r)},t.create=function(e){if(!e)return u;var n=i({style:s,entity:null}).merge(e),r=d.get(n);if(r)return r;var o=new t(n);return d=d.set(n,o),o},t}(a(l)),u=new c,d=i([[i(l),u]]);c.EMPTY=u,e.exports=c},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return f}));var r=n(0),i=n(265),o=n(11),a=n(142);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){return Object.keys(e).reduce((n,r)=>(n[r]=s({timeZone:t},e[r]),n),{})}function c(e,t){return Object.keys(s(s({},e),t)).reduce((n,r)=>(n[r]=s(s({},e[r]||{}),t[r]||{}),n),{})}function u(e,t){if(!t)return e;const n=a.a.formats;return s(s(s({},n),e),{date:c(l(n.date,t),l(e.date||{},t)),time:c(l(n.time,t),l(e.time||{},t))})}const d=e=>r.createElement(r.Fragment,null,...e);function h(e,t){let{locale:n,formats:r,messages:a,defaultLocale:s,defaultFormats:l,onError:c,timeZone:h}=e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{id:m,defaultMessage:g}=f;Object(i.a)(!!m,"[React Intl] An `id` must be provided to format a message.");const b=a&&a[String(m)];r=u(r,h),l=u(l,h);let v=[];if(b)try{v=t.getMessageFormat(b,n,r,{formatters:t}).formatHTMLMessage(p)}catch(e){c(Object(o.b)('Error formatting message: "'.concat(m,'" for locale: "').concat(n,'"')+(g?", using default message as fallback.":""),e))}else(!g||n&&n.toLowerCase()!==s.toLowerCase())&&c(Object(o.b)('Missing message: "'.concat(m,'" for locale: "').concat(n,'"')+(g?", using default message as fallback.":"")));if(!v.length&&g)try{v=t.getMessageFormat(g,s,l).formatHTMLMessage(p)}catch(e){c(Object(o.b)('Error formatting the default message for: "'.concat(m,'"'),e))}return v.length?1===v.length&&"string"==typeof v[0]?v[0]||g||String(m):d(v):(c(Object(o.b)('Cannot format message: "'.concat(m,'", ')+"using message ".concat(b||g?"source":"id"," as fallback."))),"string"==typeof b?b||g||String(m):g||String(m))}function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return h(e,t,n,Object.keys(r).reduce((e,t)=>{const n=r[t];return e[t]="string"==typeof n?Object(o.e)(n):n,e},{}))}},function(e,t,n){var r=n(224),i=n(307),o=n(88);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){var r=n(476),i=n(481)((function(e,t,n){r(e,t,n)}));e.exports=i},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=24,title:a,width:s=24}=e;return r.createElement(i.a,{className:"icon-info ".concat(t),height:o,title:a,viewBox:"-603 389 16 16",width:s},r.createElement("path",{className:"fill-color",d:"M-595 403c5.5 0 8-7.1 3.9-10.6-4.2-3.6-10.8.3-9.8 5.7.5 2.8 3 4.9 5.9 4.9zm.9-6.7v3.7h-1.4v-3.7h1.4zm.1-2.2c0 1-1.7 1.1-1.7 0 .1-1.1 1.7-1.1 1.7 0z",fill:n,fillRule:"evenodd"}))}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(399),i=n(45),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t,n){"use strict";var r=n(106),i=n(35),o=n(316),a=i.List,s=i.Map,l=i.OrderedSet,c=i.Record,u=i.Repeat,d=l(),h={parent:null,characterList:a(),data:s(),depth:0,key:"",text:"",type:"unstyled",children:a(),prevSibling:null,nextSibling:null},f=function(e,t){return e.getStyle()===t.getStyle()},p=function(e,t){return e.getEntity()===t.getEntity()},m=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(u(r.EMPTY,n.length))),e},g=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,m(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.getChildKeys=function(){return this.get("children")},t.prototype.getParentKey=function(){return this.get("parent")},t.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},t.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},t.prototype.findStyleRanges=function(e,t){o(this.getCharacterList(),f,e,t)},t.prototype.findEntityRanges=function(e,t){o(this.getCharacterList(),p,e,t)},t}(c(h));e.exports=g},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);n(736);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const l=e=>{let{actions:t,children:n,className:i,elementId:l,sidebarView:c,title:u}=e,d=s(e,["actions","children","className","elementId","sidebarView","title"]);const h="".concat(l).concat(""===l?"":"_").concat(c),f="".concat(h,"-content");return r.createElement("div",a({"aria-labelledby":h,className:o()("bcs-content",i),"data-testid":"bcs-content",id:f,role:"tabpanel"},d),r.createElement("div",{className:"bcs-content-header"},u&&r.createElement("h3",{className:"bcs-title"},u),t),r.createElement("div",{className:"bcs-scroll-content-wrapper"},r.createElement("div",{className:"bcs-scroll-content"},n)))};l.defaultProps={elementId:"",sidebarView:""},t.a=l},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(22),s=n(155),l=n(1);n(737);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u extends r.PureComponent{constructor(e){super(e),c(this,"toggleVisibility",()=>{this.setState(e=>({isOpen:!e.isOpen}))}),this.state={isOpen:e.isOpen}}render(){const{isOpen:e}=this.state,{children:t,className:n,title:i,interactionTarget:c}=this.props,u=o()("bcs-section",{"bcs-section-open":e},n);return r.createElement("div",{className:u},i&&r.createElement(a.a,{"aria-expanded":e,className:"bcs-section-title",onClick:this.toggleVisibility,type:"button"},i,r.createElement(s.a,{color:l.M,width:8})),(e||!i)&&r.createElement("div",{className:"bcs-section-content"},t))}}c(u,"defaultProps",{className:"",isOpen:!0}),t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return u}));const r="file",i="web_link",o="add",a="remove",s="replace",l="test",c="enum",u="multiSelect"},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n.n(i);t.a=r.createContext({closeMenu:o.a})},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(21),s=n.n(a),l=n(12),c=n.n(l);n(658);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}class h extends r.Component{constructor(e){var t,n,r;super(e),r=()=>{const{setActiveItemID:e}=this.props;e&&e(this.id)},(n="setActiveItemID")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.id=c()("datalistitem")}componentDidMount(){this.props.isActive&&this.setActiveItemID()}componentDidUpdate(e){this.props.isActive&&!e.isActive&&this.setActiveItemID()}render(){const e=this.props,{children:t,className:n,isActive:i,isSelected:a}=e,l=d(e,["children","className","isActive","isSelected"]),c=o()("datalist-item",{"is-active":i},n),h=s()(l,["closeDropdown","setActiveItemID"]);return r.createElement("li",u({},h,{className:c,id:this.id,role:"option","aria-selected":a}),t)}}var f=h;n.d(t,"a",(function(){return f}))},function(e,t,n){"use strict";var r=n(0),i=n(54),o=n(107),a=n(11),s=n(85);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const u=n.n(s).a||s,d=(e,t)=>Object(o.b)(l(l({},a.a),{locale:"en"}),Object(a.c)(),e,t);class h extends r.Component{shouldComponentUpdate(e){const t=this.props,{values:n}=t,r=c(t,["values"]),{values:i}=e,o=c(e,["values"]);return!u(i,n)||!u(r,o)}render(){return r.createElement(i.a.Consumer,null,e=>{this.props.defaultMessage||Object(a.h)(e);const{formatMessage:t=d,textComponent:n=r.Fragment}=e||{},{id:i,description:o,defaultMessage:s,values:l,children:c,tagName:u=n}=this.props;let h=t({id:i,description:o,defaultMessage:s},l);return Array.isArray(h)||(h=[h]),"function"==typeof c?c(...h):u?r.createElement(u,null,...h):h})}}h.displayName="FormattedMessage",h.defaultProps={values:{}},t.a=h},function(e,t,n){var r=n(485);e.exports=function(e){return r(e)&&e!=+e}},function(e,t,n){"use strict";var r,i=n(0),o=n(3),a=n.n(o),s=new Uint8Array(16);function l(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)}var c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(e){return"string"==typeof e&&c.test(e)},d=[],h=0;h<256;++h)d.push((h+256).toString(16).substr(1));var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n};var p=function(e,t,n){var r=(e=e||{}).random||(e.rng||l)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return f(r)},m=n(68),g=n(84),b=n(1);function v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=p(),S=new Set;class O extends i.Component{constructor(e){super(e),E(this,"handlePreviewMetric",e=>{const{onMetric:t}=this.props;t(w({},e,{type:b.Je}))}),E(this,"handleDataReadyMetric",(e,t)=>{m.a&&this.logUniqueMetric(b.Ie,g.a,e,t)}),E(this,"handleReadyMetric",e=>{if(!m.a)return;const{startMarkName:t}=this.props,n=w({},e,{startMarkName:t});this.logUniqueMetric(b.Ie,g.b,n)}),this.loggerProps={onDataReadyMetric:this.handleDataReadyMetric,onPreviewMetric:this.handlePreviewMetric,onReadyMetric:this.handleReadyMetric}}get uniqueEvents(){return S}get sessionId(){return C}createEventName(e,t){const{source:n}=this.props,r="".concat(n,"::").concat(e);return t?"".concat(r,"::").concat(t):r}hasLoggedEvent(e){return this.uniqueEvents.has(e)}logMetric(e,t,n){const{onMetric:r,source:i}=this.props;r(w({},n,{component:i,name:t,timestamp:this.getTimestamp(),sessionId:this.sessionId,type:e}))}logUniqueMetric(e,t,n,r){const i=this.createEventName(t,r);this.hasLoggedEvent(i)||(this.logMetric(e,t,n),this.uniqueEvents.add(i))}getTimestamp(){return(new Date).toISOString()}render(){const e=this.props,{children:t,onMetric:n,startMarkName:r}=e,o=v(e,["children","onMetric","startMarkName"]);return i.cloneElement(t,w({},o,{logger:this.loggerProps}))}}E(O,"defaultProps",{onMetric:a.a});var k=O;function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var x=e=>t=>i.forwardRef((n,r)=>i.createElement(k,_({},n,{source:e}),i.createElement(t,{ref:r})));n.d(t,"a",(function(){return x}))},function(e,t,n){"use strict";var r=n(0);var i=n(131),o=(n(13),{ASC:"ASC",DESC:"DESC"});function a(e){var t=e.sortDirection,n=Object(i.a)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===o.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===o.DESC});return r.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===o.ASC?r.createElement("path",{d:"M7 14l5-5 5 5z"}):r.createElement("path",{d:"M7 10l5 5 5-5z"}),r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}a.propTypes={};var s=n(191),l=n.n(s);var c=n(83),u=n.n(c),d=n(146),h=n.n(d),f=n(147),p=n.n(f),m=n(148),g=n.n(m),b=n(16),v=n.n(b),y=function(e){function t(){return u()(this,t),h()(this,p()(t).apply(this,arguments))}return g()(t,e),t}(r.Component);v()(y,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,n=e.rowData;return"function"==typeof n.get?n.get(t):n[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:o.ASC,flexGrow:0,flexShrink:1,headerRenderer:function(e){var t=e.dataKey,n=e.label,i=e.sortBy,o=e.sortDirection,s=i===t,l=[r.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof n?n:null},n)];return s&&l.push(r.createElement(a,{key:"SortIndicator",sortDirection:o})),l},headerRole:"columnheader",role:"gridcell",style:{}}),y.propTypes={};var w=n(104),E=n.n(w),C=n(23),S=n.n(C),O=n(40),k=n(337);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(n,!0).forEach((function(t){v()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=function(e){function t(e){var n;return u()(this,t),(n=h()(this,p()(t).call(this,e))).state={scrollbarWidth:0},n._createColumn=n._createColumn.bind(S()(n)),n._createRow=n._createRow.bind(S()(n)),n._onScroll=n._onScroll.bind(S()(n)),n._onSectionRendered=n._onSectionRendered.bind(S()(n)),n._setRef=n._setRef.bind(S()(n)),n}return g()(t,e),E()(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=Object(O.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.className,a=t.disableHeader,s=t.gridClassName,c=t.gridContainerRole,u=t.gridStyle,d=t.headerHeight,h=t.headerRowRenderer,f=t.height,p=t.id,m=t.noRowsRenderer,g=t.role,b=t.rowClassName,v=t.rowStyle,y=t.scrollToIndex,w=t.style,E=t.width,C=this.state.scrollbarWidth,S=a?f:f-d,O="function"==typeof b?b({index:-1}):b,_="function"==typeof v?v({index:-1}):v;return this._cachedColumnStyles=[],r.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=x({overflow:"hidden"},r)})),r.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":r.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Object(i.a)("ReactVirtualized__Table",o),id:p,role:g,style:w},!a&&h({className:Object(i.a)("ReactVirtualized__Table__headerRow",O),columns:this._getHeaderColumns(),style:x({height:d,overflow:"hidden",paddingRight:C,width:E},_)}),r.createElement(k.b,l()({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Object(i.a)("ReactVirtualized__Table__Grid",s),cellRenderer:this._createRow,columnWidth:E,columnCount:1,containerRole:c,height:S,id:void 0,noContentRenderer:m,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:C,scrollToRow:y,style:x({},u,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,o=e.isScrolling,a=e.parent,s=e.rowData,l=e.rowIndex,c=this.props.onColumnClick,u=t.props,d=u.cellDataGetter,h=u.cellRenderer,f=u.className,p=u.columnData,m=u.dataKey,g=u.id,b=u.role,v=h({cellData:d({columnData:p,dataKey:m,rowData:s}),columnData:p,columnIndex:n,dataKey:m,isScrolling:o,parent:a,rowData:s,rowIndex:l}),y=this._cachedColumnStyles[n],w="string"==typeof v?v:null;return r.createElement("div",{"aria-colindex":n+1,"aria-describedby":g,className:Object(i.a)("ReactVirtualized__Table__rowColumn",f),key:"Row"+l+"-Col"+n,onClick:function(e){c&&c({columnData:p,dataKey:m,event:e})},role:b,style:y,title:w},v)}},{key:"_createHeader",value:function(e){var t,n,a,s,l,c=e.column,u=e.index,d=this.props,h=d.headerClassName,f=d.headerStyle,p=d.onHeaderClick,m=d.sort,g=d.sortBy,b=d.sortDirection,v=c.props,y=v.columnData,w=v.dataKey,E=v.defaultSortDirection,C=v.disableSort,S=v.headerRenderer,O=v.headerRole,k=v.id,_=v.label,P=!C&&m,I=Object(i.a)("ReactVirtualized__Table__headerColumn",h,c.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:P}),A=this._getFlexStyleForColumn(c,x({},f,{},c.props.headerStyle)),T=S({columnData:y,dataKey:w,disableSort:C,label:_,sortBy:g,sortDirection:b});if(P||p){var M=g!==w?E:b===o.DESC?o.ASC:o.DESC,D=function(e){P&&m({defaultSortDirection:E,event:e,sortBy:w,sortDirection:M}),p&&p({columnData:y,dataKey:w,event:e})};l=c.props["aria-label"]||_||w,s="none",a=0,t=D,n=function(e){"Enter"!==e.key&&" "!==e.key||D(e)}}return g===w&&(s=b===o.ASC?"ascending":"descending"),r.createElement("div",{"aria-label":l,"aria-sort":s,className:I,id:k,key:"Header-Col"+u,onClick:t,onKeyDown:n,role:O,style:A,tabIndex:a},T)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,o=e.isScrolling,a=e.key,s=e.parent,l=e.style,c=this.props,u=c.children,d=c.onRowClick,h=c.onRowDoubleClick,f=c.onRowRightClick,p=c.onRowMouseOver,m=c.onRowMouseOut,g=c.rowClassName,b=c.rowGetter,v=c.rowRenderer,y=c.rowStyle,w=this.state.scrollbarWidth,E="function"==typeof g?g({index:n}):g,C="function"==typeof y?y({index:n}):y,S=b({index:n}),O=r.Children.toArray(u).map((function(e,r){return t._createColumn({column:e,columnIndex:r,isScrolling:o,parent:s,rowData:S,rowIndex:n,scrollbarWidth:w})})),k=Object(i.a)("ReactVirtualized__Table__row",E),_=x({},l,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:w},C);return v({className:k,columns:O,index:n,isScrolling:o,key:a,onRowClick:d,onRowDoubleClick:h,onRowRightClick:f,onRowMouseOver:p,onRowMouseOut:m,rowData:S,style:_})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=x({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:r.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(r.PureComponent);v()(P,"defaultProps",{disableHeader:!1,estimatedRowSize:30,gridContainerRole:"",headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:k.a,overscanRowCount:10,role:"grid",rowRenderer:function(e){var t=e.className,n=e.columns,i=e.index,o=e.key,a=e.onRowClick,s=e.onRowDoubleClick,c=e.onRowMouseOut,u=e.onRowMouseOver,d=e.onRowRightClick,h=e.rowData,f=e.style,p={"aria-rowindex":i+1};return(a||s||c||u||d)&&(p.tabIndex=0,a&&(p.onClick=function(e){return a({event:e,index:i,rowData:h})}),s&&(p.onDoubleClick=function(e){return s({event:e,index:i,rowData:h})}),c&&(p.onMouseOut=function(e){return c({event:e,index:i,rowData:h})}),u&&(p.onMouseOver=function(e){return u({event:e,index:i,rowData:h})}),d&&(p.onContextMenu=function(e){return d({event:e,index:i,rowData:h})})),r.createElement("div",l()({},p,{className:t,key:o,role:"row",style:f}),n)},headerRowRenderer:function(e){var t=e.className,n=e.columns,i=e.style;return r.createElement("div",{role:"rowgroup",className:"ReactVirtualized__Table__headerRowGroup"},r.createElement("div",{className:t,role:"row",style:i},n))},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),P.propTypes={},n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return P}));t.c=P},function(e,t,n){(function(e){var r=n(42),i=n(400),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l}).call(this,n(163)(e))},function(e,t,n){var r=n(409),i=n(170),o=n(410),a=n(347),s=n(330),l=n(60),c=n(222),u=c(r),d=c(i),h=c(o),f=c(a),p=c(s),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case p:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){"use strict";e.exports=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}},function(e,t,n){"use strict";var r=n(0),i=n(51),o=n.n(i),a=n(4),s=n.n(a),l=n(3),c=n.n(l),u=n(12),d=n.n(u),h=n(1);n(503);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends r.Component{constructor(){super(...arguments),f(this,"menuID",d()("menu")),f(this,"menuButtonID",d()("menubutton")),f(this,"state",{initialFocusIndex:null,isOpen:!1}),f(this,"openMenuAndSetFocusIndex",e=>{this.setState({initialFocusIndex:e,isOpen:!0})}),f(this,"closeMenu",e=>{const{onMenuClose:t=c.a}=this.props;this.setState({isOpen:!1},()=>t(e))}),f(this,"focusButton",()=>{const e=document.getElementById(this.menuButtonID);e&&e.focus()}),f(this,"handleButtonClick",e=>{const{isOpen:t}=this.state;e.stopPropagation(),e.preventDefault(),t?this.closeMenu(e):this.openMenuAndSetFocusIndex(null)}),f(this,"handleButtonKeyDown",e=>{const{isOpen:t}=this.state;switch(e.key){case h.Be.space:case h.Be.enter:case h.Be.arrowDown:e.stopPropagation(),e.preventDefault(),this.openMenuAndSetFocusIndex(0);break;case h.Be.arrowUp:e.stopPropagation(),e.preventDefault(),this.openMenuAndSetFocusIndex(-1);break;case h.Be.escape:t&&e.stopPropagation(),e.preventDefault(),this.closeMenu(e)}}),f(this,"handleMenuClose",(e,t)=>{this.closeMenu(t),this.focusButton()}),f(this,"handleDocumentClick",e=>{const t=document.getElementById(this.menuID),n=document.getElementById(this.menuButtonID);t&&n&&e.target instanceof Node&&!t.contains(e.target)&&!n.contains(e.target)&&this.closeMenu(e)})}componentDidUpdate(e,t){const{useBubble:n}=this.props;if(!t.isOpen&&this.state.isOpen){document.addEventListener("click",this.handleDocumentClick,!n),document.addEventListener("contextmenu",this.handleDocumentClick,!n);const{onMenuOpen:e}=this.props;e&&e()}else t.isOpen&&!this.state.isOpen&&(document.removeEventListener("contextmenu",this.handleDocumentClick,!n),document.removeEventListener("click",this.handleDocumentClick,!n))}componentWillUnmount(){const{useBubble:e}=this.props;this.state.isOpen&&(document.removeEventListener("contextmenu",this.handleDocumentClick,!e),document.removeEventListener("click",this.handleDocumentClick,!e))}render(){const{bodyElement:e,children:t,className:n,constrainToScrollParent:i,constrainToWindow:a,constrainToWindowWithPin:l,isResponsive:c,isRightAligned:u,tetherAttachment:d,tetherTargetAttachment:h}=this.props,{isOpen:f,initialFocusIndex:p}=this.state,m=r.Children.toArray(t);if(2!==m.length)throw new Error("DropdownMenu must have exactly two children: A button component and a <Menu>");const g=m[0],b=m[1],v={id:this.menuButtonID,key:this.menuButtonID,onClick:this.handleButtonClick,onKeyDown:this.handleButtonKeyDown,"aria-expanded":f?"true":"false"};void 0===g.props["aria-haspopup"]&&(v["aria-haspopup"]="true"),f&&(v["aria-controls"]=this.menuID);const y={id:this.menuID,key:this.menuID,initialFocusIndex:p,onClose:this.handleMenuClose,"aria-labelledby":this.menuButtonID};let w="top left",E="bottom left";u&&(w="top right",E="bottom right");const C=[];i&&C.push({to:"scrollParent",attachment:"together"}),a&&C.push({to:"window",attachment:"together"}),l&&C.push({to:"window",attachment:"together",pin:!0});const S=e instanceof HTMLElement?e:document.body;return r.createElement(o.a,{attachment:d||w,bodyElement:S,className:s()({"bdl-DropdownMenu--responsive":c},n),classPrefix:"dropdown-menu",constraints:C,enabled:f,targetAttachment:h||E},r.cloneElement(g,v),f&&r.cloneElement(b,y))}}f(p,"defaultProps",{constrainToScrollParent:!1,constrainToWindow:!1,isResponsive:!1,isRightAligned:!1}),t.a=p},function(e,t,n){"use strict";var r=n(0),i=n(21),o=n.n(i),a=n(4),s=n.n(a),l=n(117);n(504);function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=".menu-item:not([aria-disabled])",h="ul:not(.submenu) > ".concat(d,", ul:not(.submenu) > li > ").concat(d,", ul:not(.submenu) > span > ").concat(d),f="ul.submenu > ".concat(d,", ul.submenu > li > ").concat(d,", ul.submenu > span > ").concat(d);function p(e){e.stopPropagation(),e.preventDefault()}class m extends r.Component{constructor(e){var t;super(e),t=this,u(this,"setInitialFocusIndex",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.props;const{initialFocusIndex:n,isHidden:r}=e;r||void 0===n||("number"==typeof n?setTimeout(()=>{t.setFocus(n)},0):null===n&&setTimeout(()=>{t.menuEl&&t.menuEl.focus()},0))})),u(this,"setMenuItemEls",()=>{const{isSubmenu:e,menuItemSelector:t}=this.props,n=t||(e?f:h);this.menuItemEls=this.menuEl?[].slice.call(this.menuEl.querySelectorAll(n)):[]}),u(this,"getMenuItemElFromEventTarget",e=>{let t=null,n=-1;for(let r=0;r<this.menuItemEls.length;r+=1)if(this.menuItemEls[r].contains(e)){t=this.menuItemEls[r],n=r;break}return{menuItemEl:t,menuIndex:n}}),u(this,"setFocus",e=>{if(!this.menuItemEls.length)return;const t=this.menuItemEls.length;this.focusIndex=e>=t?0:e<0?t-1:e,this.menuItemEls[this.focusIndex].focus()}),u(this,"focusFirstItem",()=>{this.setFocus(0)}),u(this,"focusLastItem",()=>{this.setFocus(-1)}),u(this,"focusNextItem",()=>{this.setFocus(this.focusIndex+1)}),u(this,"focusPreviousItem",()=>{this.setFocus(this.focusIndex-1)}),u(this,"fireOnCloseHandler",(e,t)=>{const{onClose:n}=this.props;n&&n(e,t)}),u(this,"handleClick",e=>{const{menuItemEl:t}=e.target instanceof Node?this.getMenuItemElFromEventTarget(e.target):{};t&&this.fireOnCloseHandler(!1,e)}),u(this,"handleKeyDown",e=>{const{isSubmenu:t,initialFocusIndex:n}=this.props;switch(e.key){case"ArrowDown":p(e),null!==n||this.keyboardPressed?this.focusNextItem():this.focusFirstItem();break;case"ArrowUp":p(e),this.focusPreviousItem();break;case"ArrowLeft":if(!t)return;p(e),this.fireOnCloseHandler(!0,e);break;case"Home":case"PageUp":p(e),this.focusFirstItem();break;case"End":case"PageDown":p(e),this.focusLastItem();break;case"Escape":p(e),this.fireOnCloseHandler(!0,e);break;case"Tab":this.fireOnCloseHandler(!0,e);break;case" ":case"Enter":p(e),e.target instanceof HTMLElement&&e.target.click()}this.keyboardPressed=!0}),this.focusIndex=0,this.menuEl=null,this.menuItemEls=[]}componentDidMount(){this.setMenuItemEls(),this.setInitialFocusIndex()}componentDidUpdate(e){let{isHidden:t,children:n}=e;const{children:i,isHidden:o,isSubmenu:a}=this.props;if(a&&t&&!o&&(this.setMenuItemEls(),this.setInitialFocusIndex(this.props)),r.Children.toArray(n).length!==r.Children.toArray(i).length){const e=this.menuItemEls[this.focusIndex];this.setMenuItemEls();const{menuIndex:t}=this.getMenuItemElFromEventTarget(e),n=-1===t,r=this.focusIndex>=this.menuItemEls.length;this.setFocus(n&&!r?this.focusIndex:t)}}render(){const e=this.props,{children:t,className:n,isHidden:i,setRef:a,shouldOutlineFocus:u}=e,d=c(e,["children","className","isHidden","setRef","shouldOutlineFocus"]),h=o()(d,["onClose","initialFocusIndex","isSubmenu","menuItemSelector"]);return h.className=s()("aria-menu",n,{"is-hidden":i,"should-outline-focus":u}),h.ref=e=>{this.menuEl=e,a&&a(e)},void 0===h.role&&(h.role="menu"),h.tabIndex=-1,h.onClick=this.handleClick,h.onKeyDown=this.handleKeyDown,r.createElement("ul",h,r.createElement(l.a.Provider,{value:{closeMenu:this.fireOnCloseHandler}},t))}}u(m,"defaultProps",{className:"",isSubmenu:!1,isHidden:!1}),t.a=m},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(188);t.a=e=>{let{language:t,messages:n,children:a}=e;return!!t&&!!n?i.a.createElement(o.a,{locale:t,messages:n},a):r.Children.only(a)}},function(e,t,n){"use strict";var r=n(77);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(1);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a={getVersionAction:e=>{let{restored_at:t,trashed_at:n,version_promoted:i}=e,o=r.rg;return n&&(o=r.lg),t&&(o=r.ng),i&&(o=r.mg),o},getVersionUser:e=>{let{modified_by:t,restored_by:n,trashed_by:s,uploader_display_name:l}=e;const c=n||s||t||r.jf,{name:u,id:d}=c;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a(c,["name","id"]),{id:d,name:d===r.jf.id&&l?l:u})}}},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){var r=n(368),i=n(369),o=n(370),a=n(371),s=n(372);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(111);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(73)(Object,"create");e.exports=r},function(e,t,n){var r=n(392);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(224),i=n(404),o=n(88);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(60),i=n(45),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&r(e)==o}},function(e,t,n){"use strict";(function(t){var r=n(32),i=n(452),o=n(238),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?l=n(239):void 0!==t&&"[object process]"===Object.prototype.toString.call(t)&&(l=n(239)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(a)})),e.exports=c}).call(this,n(198))},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";var r=n(0),i=n(4),o=n.n(i),a=n(12),s=n.n(a),l=n(323),c=n(129),u=n(47),d=n(17);n(655);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const p=e=>{let{className:t="",description:n,error:i,errorPosition:a,hideLabel:p,hideOptionalLabel:m,icon:g,inputRef:b,isLoading:v,isRequired:y,isValid:w,label:E,labelTooltip:C,tooltipTetherClassName:S}=e,O=f(e,["className","description","error","errorPosition","hideLabel","hideOptionalLabel","icon","inputRef","isLoading","isRequired","isValid","label","labelTooltip","tooltipTetherClassName"]);const k=!!i,_=o()(t,"text-input-container",{"show-error":k}),x=r.useRef(s()("description")).current,P={"aria-invalid":k,"aria-required":y,"aria-describedby":n?x:void 0};return r.createElement("div",{className:_},r.createElement(c.a,{hideLabel:p,showOptionalText:!m&&!y,text:E,tooltip:C},!!n&&r.createElement("div",{id:x,className:"text-input-description"},n),r.createElement(d.c,{isShown:k,position:a||"middle-right",tetherElementClassName:S,text:i||"",theme:"error"},r.createElement("input",h({ref:b,required:y},P,O))),v&&!w&&r.createElement(u.b,{className:"text-input-loading"}),w&&!v&&r.createElement(l.a,{className:"text-input-verified"}),v||w||!g?null:g))};p.displayName="TextInput",t.a=p},function(e,t,n){"use strict";var r;function i(e){return e.type===r.literal}function o(e){return e.type===r.argument}function a(e){return e.type===r.number}function s(e){return e.type===r.date}function l(e){return e.type===r.time}function c(e){return e.type===r.select}function u(e){return e.type===r.plural}function d(e){return e.type===r.pound}function h(e){return!(!e||"object"!=typeof e||0!==e.type)}function f(e){return!(!e||"object"!=typeof e||1!==e.type)}!function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound"}(r||(r={}));var p,m=(p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},b=function(e){function t(n,r,i,o){var a=e.call(this)||this;return a.message=n,a.expected=r,a.found=i,a.location=o,a.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return m(t,e),t.buildMessage=function(e,t){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){switch(e.type){case"literal":return'"'+r(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,n,r=e.map(o);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+((a=t)?'"'+r(a)+'"':"end of input")+" found.";var a},t}(Error);var v=function(e,t){t=void 0!==t?t:{};var n,i={},o={start:ut},a=ut,s=function(e){return e.join("")},l=function(e){return g({type:r.literal,value:e},Dt())},c="#",u=rt("#",!1),d=function(){return g({type:r.pound},Dt())},h=ot("argumentElement"),f="{",p=rt("{",!1),m="}",v=rt("}",!1),y=function(e){return g({type:r.argument,value:e},Dt())},w=ot("numberSkeletonId"),E=/^['\/{}]/,C=it(["'","/","{","}"],!1,!1),S={type:"any"},O=ot("numberSkeletonTokenOption"),k="/",_=rt("/",!1),x=function(e){return e},P=ot("numberSkeletonToken"),I=function(e,t){return{stem:e,options:t}},A=function(e){return g({type:0,tokens:e},Dt())},T="::",M=rt("::",!1),D=function(e){return e},R=function(){return Tt.push("numberArgStyle"),!0},j=function(e){return Tt.pop(),e.replace(/\s*$/,"")},N=",",L=rt(",",!1),F="number",z=rt("number",!1),U=function(e,t,n){return g({type:"number"===t?r.number:"date"===t?r.date:r.time,style:n&&n[2],value:e},Dt())},B="'",H=rt("'",!1),V=/^[^']/,W=it(["'"],!0,!1),K=/^[^a-zA-Z'{}]/,q=it([["a","z"],["A","Z"],"'","{","}"],!0,!1),G=/^[a-zA-Z]/,Q=it([["a","z"],["A","Z"]],!1,!1),Y=function(e){return g({type:1,pattern:e},Dt())},$=function(){return Tt.push("dateOrTimeArgStyle"),!0},X="date",Z=rt("date",!1),J="time",ee=rt("time",!1),te="plural",ne=rt("plural",!1),re="selectordinal",ie=rt("selectordinal",!1),oe="offset:",ae=rt("offset:",!1),se=function(e,t,n,i){return g({type:r.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:n?n[2]:0,options:i.reduce((function(e,t){var n=t.id,r=t.value,i=t.location;return n in e&&nt('Duplicate option "'+n+'" in plural element: "'+et()+'"',tt()),e[n]={value:r,location:i},e}),{})},Dt())},le="select",ce=rt("select",!1),ue=function(e,t){return g({type:r.select,value:e,options:t.reduce((function(e,t){var n=t.id,r=t.value,i=t.location;return n in e&&nt('Duplicate option "'+n+'" in select element: "'+et()+'"',tt()),e[n]={value:r,location:i},e}),{})},Dt())},de="=",he=rt("=",!1),fe=function(e){return Tt.push("select"),!0},pe=function(e,t){return Tt.pop(),g({id:e,value:t},Dt())},me=function(e){return Tt.push("plural"),!0},ge=function(e,t){return Tt.pop(),g({id:e,value:t},Dt())},be=ot("whitespace"),ve=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ye=it([["\t","\r"]," ","…"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),we=ot("syntax pattern"),Ee=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,Ce=it([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),Se=ot("optional whitespace"),Oe=ot("number"),ke="-",_e=rt("-",!1),xe=function(e,t){return t?e?-t:t:0},Pe=(ot("apostrophe"),ot("double apostrophes")),Ie="''",Ae=rt("''",!1),Te=function(){return"'"},Me=function(e,t){return e+t.replace("''","'")},De=function(e){return!("{"===e||Mt()&&"#"===e||Tt.length>1&&"}"===e)},Re="\n",je=rt("\n",!1),Ne=function(e){return"{"===e||"}"===e||Mt()&&"#"===e},Le=ot("argNameOrNumber"),Fe=ot("argNumber"),ze="0",Ue=rt("0",!1),Be=function(){return 0},He=/^[1-9]/,Ve=it([["1","9"]],!1,!1),We=/^[0-9]/,Ke=it([["0","9"]],!1,!1),qe=function(e){return parseInt(e.join(""),10)},Ge=ot("argName"),Qe=0,Ye=0,$e=[{line:1,column:1}],Xe=0,Ze=[],Je=0;if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=o[t.startRule]}function et(){return e.substring(Ye,Qe)}function tt(){return st(Ye,Qe)}function nt(e,t){throw function(e,t){return new b(e,[],"",t)}(e,t=void 0!==t?t:st(Ye,Qe))}function rt(e,t){return{type:"literal",text:e,ignoreCase:t}}function it(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function ot(e){return{type:"other",description:e}}function at(t){var n,r=$e[t];if(r)return r;for(n=t-1;!$e[n];)n--;for(r={line:(r=$e[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return $e[t]=r,r}function st(e,t){var n=at(e),r=at(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:r.line,column:r.column}}}function lt(e){Qe<Xe||(Qe>Xe&&(Xe=Qe,Ze=[]),Ze.push(e))}function ct(e,t,n){return new b(b.buildMessage(e,t),e,t,n)}function ut(){return dt()}function dt(){var e,t;for(e=[],t=ht();t!==i;)e.push(t),t=ht();return e}function ht(){var t;return(t=function(){var e,t;e=Qe,(t=ft())!==i&&(Ye=e,t=l(t));return e=t}())===i&&(t=function(){var t,n,r,o;Je++,t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));n!==i&&St()!==i&&(r=Pt())!==i&&St()!==i?(125===e.charCodeAt(Qe)?(o=m,Qe++):(o=i,0===Je&&lt(v)),o!==i?(Ye=t,n=y(r),t=n):(Qe=t,t=i)):(Qe=t,t=i);Je--,t===i&&(n=i,0===Je&&lt(h));return t}())===i&&(t=function(){var t;(t=function(){var t,n,r,o,a,s,l,c,u;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));n!==i&&St()!==i&&(r=Pt())!==i&&St()!==i?(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i&&St()!==i?(e.substr(Qe,6)===F?(a=F,Qe+=6):(a=i,0===Je&&lt(z)),a!==i&&St()!==i?(s=Qe,44===e.charCodeAt(Qe)?(l=N,Qe++):(l=i,0===Je&&lt(L)),l!==i&&(c=St())!==i&&(u=function(){var t,n,r;t=Qe,e.substr(Qe,2)===T?(n=T,Qe+=2):(n=i,0===Je&&lt(M));n!==i&&(r=function(){var e,t,n;if(e=Qe,t=[],(n=gt())!==i)for(;n!==i;)t.push(n),n=gt();else t=i;t!==i&&(Ye=e,t=A(t));return e=t}())!==i?(Ye=t,n=D(r),t=n):(Qe=t,t=i);t===i&&(t=Qe,Ye=Qe,(n=(n=R())?void 0:i)!==i&&(r=ft())!==i?(Ye=t,n=j(r),t=n):(Qe=t,t=i));return t}())!==i?s=l=[l,c,u]:(Qe=s,s=i),s===i&&(s=null),s!==i&&(l=St())!==i?(125===e.charCodeAt(Qe)?(c=m,Qe++):(c=i,0===Je&&lt(v)),c!==i?(Ye=t,n=U(r,a,s),t=n):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i);return t}())===i&&(t=function(){var t,n,r,o,a,s,l,c,u;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));n!==i&&St()!==i&&(r=Pt())!==i&&St()!==i?(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i&&St()!==i?(e.substr(Qe,4)===X?(a=X,Qe+=4):(a=i,0===Je&&lt(Z)),a===i&&(e.substr(Qe,4)===J?(a=J,Qe+=4):(a=i,0===Je&&lt(ee))),a!==i&&St()!==i?(s=Qe,44===e.charCodeAt(Qe)?(l=N,Qe++):(l=i,0===Je&&lt(L)),l!==i&&(c=St())!==i&&(u=function(){var t,n,r;t=Qe,e.substr(Qe,2)===T?(n=T,Qe+=2):(n=i,0===Je&&lt(M));n!==i&&(r=function(){var t,n,r,o;t=Qe,n=Qe,r=[],(o=bt())===i&&(o=vt());if(o!==i)for(;o!==i;)r.push(o),(o=bt())===i&&(o=vt());else r=i;n=r!==i?e.substring(n,Qe):r;n!==i&&(Ye=t,n=Y(n));return t=n}())!==i?(Ye=t,n=D(r),t=n):(Qe=t,t=i);t===i&&(t=Qe,Ye=Qe,(n=(n=$())?void 0:i)!==i&&(r=ft())!==i?(Ye=t,n=j(r),t=n):(Qe=t,t=i));return t}())!==i?s=l=[l,c,u]:(Qe=s,s=i),s===i&&(s=null),s!==i&&(l=St())!==i?(125===e.charCodeAt(Qe)?(c=m,Qe++):(c=i,0===Je&&lt(v)),c!==i?(Ye=t,n=U(r,a,s),t=n):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i);return t}());return t}())===i&&(t=function(){var t,n,r,o,a,s,l,c,u,d,h;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));if(n!==i)if(St()!==i)if((r=Pt())!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i)if(St()!==i)if(e.substr(Qe,6)===te?(a=te,Qe+=6):(a=i,0===Je&&lt(ne)),a===i&&(e.substr(Qe,13)===re?(a=re,Qe+=13):(a=i,0===Je&&lt(ie))),a!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(s=N,Qe++):(s=i,0===Je&&lt(L)),s!==i)if(St()!==i)if(l=Qe,e.substr(Qe,7)===oe?(c=oe,Qe+=7):(c=i,0===Je&&lt(ae)),c!==i&&(u=St())!==i&&(d=Ot())!==i?l=c=[c,u,d]:(Qe=l,l=i),l===i&&(l=null),l!==i)if((c=St())!==i){if(u=[],(d=wt())!==i)for(;d!==i;)u.push(d),d=wt();else u=i;u!==i&&(d=St())!==i?(125===e.charCodeAt(Qe)?(h=m,Qe++):(h=i,0===Je&&lt(v)),h!==i?(Ye=t,n=se(r,a,l,u),t=n):(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;return t}())===i&&(t=function(){var t,n,r,o,a,s,l,c,u;t=Qe,123===e.charCodeAt(Qe)?(n=f,Qe++):(n=i,0===Je&&lt(p));if(n!==i)if(St()!==i)if((r=Pt())!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(o=N,Qe++):(o=i,0===Je&&lt(L)),o!==i)if(St()!==i)if(e.substr(Qe,6)===le?(a=le,Qe+=6):(a=i,0===Je&&lt(ce)),a!==i)if(St()!==i)if(44===e.charCodeAt(Qe)?(s=N,Qe++):(s=i,0===Je&&lt(L)),s!==i)if(St()!==i){if(l=[],(c=yt())!==i)for(;c!==i;)l.push(c),c=yt();else l=i;l!==i&&(c=St())!==i?(125===e.charCodeAt(Qe)?(u=m,Qe++):(u=i,0===Je&&lt(v)),u!==i?(Ye=t,n=ue(r,l),t=n):(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;else Qe=t,t=i;return t}())===i&&(t=function(){var t,n;t=Qe,35===e.charCodeAt(Qe)?(n=c,Qe++):(n=i,0===Je&&lt(u));n!==i&&(Ye=t,n=d());return t=n}()),t}function ft(){var e,t,n;if(e=Qe,t=[],(n=kt())===i&&(n=_t())===i&&(n=xt()),n!==i)for(;n!==i;)t.push(n),(n=kt())===i&&(n=_t())===i&&(n=xt());else t=i;return t!==i&&(Ye=e,t=s(t)),e=t}function pt(){var t,n,r,o,a;if(Je++,t=Qe,n=[],r=Qe,o=Qe,Je++,(a=Et())===i&&(E.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(C))),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i),r!==i)for(;r!==i;)n.push(r),r=Qe,o=Qe,Je++,(a=Et())===i&&(E.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(C))),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i);else n=i;return t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(w)),t}function mt(){var t,n,r;return Je++,t=Qe,47===e.charCodeAt(Qe)?(n=k,Qe++):(n=i,0===Je&&lt(_)),n!==i&&(r=pt())!==i?(Ye=t,t=n=x(r)):(Qe=t,t=i),Je--,t===i&&(n=i,0===Je&&lt(O)),t}function gt(){var e,t,n,r;if(Je++,e=Qe,St()!==i)if((t=pt())!==i){for(n=[],r=mt();r!==i;)n.push(r),r=mt();n!==i?(Ye=e,e=I(t,n)):(Qe=e,e=i)}else Qe=e,e=i;else Qe=e,e=i;return Je--,e===i&&(i,0===Je&&lt(P)),e}function bt(){var t,n,r,o;if(t=Qe,39===e.charCodeAt(Qe)?(n=B,Qe++):(n=i,0===Je&&lt(H)),n!==i){if(r=[],(o=kt())===i&&(V.test(e.charAt(Qe))?(o=e.charAt(Qe),Qe++):(o=i,0===Je&&lt(W))),o!==i)for(;o!==i;)r.push(o),(o=kt())===i&&(V.test(e.charAt(Qe))?(o=e.charAt(Qe),Qe++):(o=i,0===Je&&lt(W)));else r=i;r!==i?(39===e.charCodeAt(Qe)?(o=B,Qe++):(o=i,0===Je&&lt(H)),o!==i?t=n=[n,r,o]:(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;if(t===i)if(t=[],(n=kt())===i&&(K.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(q))),n!==i)for(;n!==i;)t.push(n),(n=kt())===i&&(K.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(q)));else t=i;return t}function vt(){var t,n;if(t=[],G.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(Q)),n!==i)for(;n!==i;)t.push(n),G.test(e.charAt(Qe))?(n=e.charAt(Qe),Qe++):(n=i,0===Je&&lt(Q));else t=i;return t}function yt(){var t,n,r,o,a;return t=Qe,St()!==i&&(n=At())!==i&&St()!==i?(123===e.charCodeAt(Qe)?(r=f,Qe++):(r=i,0===Je&&lt(p)),r!==i?(Ye=Qe,(fe(n)?void 0:i)!==i&&(o=dt())!==i?(125===e.charCodeAt(Qe)?(a=m,Qe++):(a=i,0===Je&&lt(v)),a!==i?(Ye=t,t=pe(n,o)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i),t}function wt(){var t,n,r,o,a;return t=Qe,St()!==i&&(n=function(){var t,n,r,o;return t=Qe,n=Qe,61===e.charCodeAt(Qe)?(r=de,Qe++):(r=i,0===Je&&lt(he)),r!==i&&(o=Ot())!==i?n=r=[r,o]:(Qe=n,n=i),(t=n!==i?e.substring(t,Qe):n)===i&&(t=At()),t}())!==i&&St()!==i?(123===e.charCodeAt(Qe)?(r=f,Qe++):(r=i,0===Je&&lt(p)),r!==i?(Ye=Qe,(me(n)?void 0:i)!==i&&(o=dt())!==i?(125===e.charCodeAt(Qe)?(a=m,Qe++):(a=i,0===Je&&lt(v)),a!==i?(Ye=t,t=ge(n,o)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i)):(Qe=t,t=i),t}function Et(){var t;return Je++,ve.test(e.charAt(Qe))?(t=e.charAt(Qe),Qe++):(t=i,0===Je&&lt(ye)),Je--,t===i&&(i,0===Je&&lt(be)),t}function Ct(){var t;return Je++,Ee.test(e.charAt(Qe))?(t=e.charAt(Qe),Qe++):(t=i,0===Je&&lt(Ce)),Je--,t===i&&(i,0===Je&&lt(we)),t}function St(){var t,n,r;for(Je++,t=Qe,n=[],r=Et();r!==i;)n.push(r),r=Et();return t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(Se)),t}function Ot(){var t,n,r;return Je++,t=Qe,45===e.charCodeAt(Qe)?(n=ke,Qe++):(n=i,0===Je&&lt(_e)),n===i&&(n=null),n!==i&&(r=It())!==i?(Ye=t,t=n=xe(n,r)):(Qe=t,t=i),Je--,t===i&&(n=i,0===Je&&lt(Oe)),t}function kt(){var t,n;return Je++,t=Qe,e.substr(Qe,2)===Ie?(n=Ie,Qe+=2):(n=i,0===Je&&lt(Ae)),n!==i&&(Ye=t,n=Te()),Je--,(t=n)===i&&(n=i,0===Je&&lt(Pe)),t}function _t(){var t,n,r,o,a,s;if(t=Qe,39===e.charCodeAt(Qe)?(n=B,Qe++):(n=i,0===Je&&lt(H)),n!==i)if((r=function(){var t,n,r,o;t=Qe,n=Qe,e.length>Qe?(r=e.charAt(Qe),Qe++):(r=i,0===Je&&lt(S));r!==i?(Ye=Qe,(o=(o=Ne(r))?void 0:i)!==i?n=r=[r,o]:(Qe=n,n=i)):(Qe=n,n=i);t=n!==i?e.substring(t,Qe):n;return t}())!==i){for(o=Qe,a=[],e.substr(Qe,2)===Ie?(s=Ie,Qe+=2):(s=i,0===Je&&lt(Ae)),s===i&&(V.test(e.charAt(Qe))?(s=e.charAt(Qe),Qe++):(s=i,0===Je&&lt(W)));s!==i;)a.push(s),e.substr(Qe,2)===Ie?(s=Ie,Qe+=2):(s=i,0===Je&&lt(Ae)),s===i&&(V.test(e.charAt(Qe))?(s=e.charAt(Qe),Qe++):(s=i,0===Je&&lt(W)));(o=a!==i?e.substring(o,Qe):a)!==i?(39===e.charCodeAt(Qe)?(a=B,Qe++):(a=i,0===Je&&lt(H)),a===i&&(a=null),a!==i?(Ye=t,t=n=Me(r,o)):(Qe=t,t=i)):(Qe=t,t=i)}else Qe=t,t=i;else Qe=t,t=i;return t}function xt(){var t,n,r,o;return t=Qe,n=Qe,e.length>Qe?(r=e.charAt(Qe),Qe++):(r=i,0===Je&&lt(S)),r!==i?(Ye=Qe,(o=(o=De(r))?void 0:i)!==i?n=r=[r,o]:(Qe=n,n=i)):(Qe=n,n=i),n===i&&(10===e.charCodeAt(Qe)?(n=Re,Qe++):(n=i,0===Je&&lt(je))),t=n!==i?e.substring(t,Qe):n}function Pt(){var t,n;return Je++,t=Qe,(n=It())===i&&(n=At()),t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(Le)),t}function It(){var t,n,r,o,a;if(Je++,t=Qe,48===e.charCodeAt(Qe)?(n=ze,Qe++):(n=i,0===Je&&lt(Ue)),n!==i&&(Ye=t,n=Be()),(t=n)===i){if(t=Qe,n=Qe,He.test(e.charAt(Qe))?(r=e.charAt(Qe),Qe++):(r=i,0===Je&&lt(Ve)),r!==i){for(o=[],We.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(Ke));a!==i;)o.push(a),We.test(e.charAt(Qe))?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(Ke));o!==i?n=r=[r,o]:(Qe=n,n=i)}else Qe=n,n=i;n!==i&&(Ye=t,n=qe(n)),t=n}return Je--,t===i&&(n=i,0===Je&&lt(Fe)),t}function At(){var t,n,r,o,a;if(Je++,t=Qe,n=[],r=Qe,o=Qe,Je++,(a=Et())===i&&(a=Ct()),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i),r!==i)for(;r!==i;)n.push(r),r=Qe,o=Qe,Je++,(a=Et())===i&&(a=Ct()),Je--,a===i?o=void 0:(Qe=o,o=i),o!==i?(e.length>Qe?(a=e.charAt(Qe),Qe++):(a=i,0===Je&&lt(S)),a!==i?r=o=[o,a]:(Qe=r,r=i)):(Qe=r,r=i);else n=i;return t=n!==i?e.substring(t,Qe):n,Je--,t===i&&(n=i,0===Je&&lt(Ge)),t}var Tt=["root"];function Mt(){return"plural"===Tt[Tt.length-1]}function Dt(){return t&&t.captureLocation?{location:tt()}:{}}if((n=a())!==i&&Qe===e.length)return n;throw n!==i&&Qe<e.length&&lt({type:"end"}),ct(Ze,Xe<e.length?e.charAt(Xe):null,Xe<e.length?st(Xe,Xe+1):st(Xe,Xe))},y=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},w=/(^|[^\\])#/g;function E(e,t){var n=v(e,t);return t&&!1===t.normalizeHashtagInPlural||function e(t){t.forEach((function(t){(u(t)||c(t))&&Object.keys(t.options).forEach((function(n){for(var r,o=t.options[n],a=-1,s=void 0,l=0;l<o.value.length;l++){var c=o.value[l];if(i(c)&&w.test(c.value)){a=l,s=c;break}}if(s){var u=s.value.replace(w,"$1{"+t.value+", number}"),d=v(u);(r=o.value).splice.apply(r,y([a,1],d))}e(o.value)}))}))}(n),n}var C=n(49),S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},O=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function k(e){var t={};return e.replace(O,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead")}return""})),t}var _=/^\.(?:(0+)(\+|#+)?)?$/g,x=/^(@+)?(\+|#+)?$/g;function P(e){var t={};return e.replace(x,(function(e,n,r){return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function I(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function A(e){var t=I(e);return t||{}}function T(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":t.style="percent";continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":t.useGrouping=!1;continue;case"precision-integer":t.maximumFractionDigits=0;continue;case"measure-unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=S(S(S({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return S(S({},e),A(t))}),{}));continue;case"engineering":t=S(S(S({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return S(S({},e),A(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue}if(_.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(_,(function(e,n,r){return"."===e?t.maximumFractionDigits=0:"+"===r?t.minimumFractionDigits=r.length:"#"===n[0]?t.maximumFractionDigits=n.length:(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length+("string"==typeof r?r.length:0)),""})),i.options.length&&(t=S(S({},t),P(i.options[0])))}else if(x.test(i.stem))t=S(S({},t),P(i.stem));else{var o=I(i.stem);o&&(t=S(S({},t),o))}}return t}var M,D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},j=function(e){function t(t,n){var r=e.call(this,t)||this;return r.variableId=n,r}return D(t,e),t}(Error);function N(e,t,n,r,p,m,g){if(1===e.length&&i(e[0]))return[{type:0,value:e[0].value}];for(var b,v=[],y=0,w=e;y<w.length;y++){var E=w[y];if(i(E))v.push({type:0,value:E.value});else if(d(E))"number"==typeof m&&v.push({type:0,value:n.getNumberFormat(t).format(m)});else{var C=E.value;if(!(p&&C in p))throw new j('The intl string context variable "'+C+'" was not provided to the string "'+g+'"');var S=p[C];if(o(E))S&&"string"!=typeof S&&"number"!=typeof S||(S="string"==typeof S||"number"==typeof S?String(S):""),v.push({type:1,value:S});else if(s(E)){var O="string"==typeof E.style?r.date[E.style]:void 0;v.push({type:0,value:n.getDateTimeFormat(t,O).format(S)})}else if(l(E)){O="string"==typeof E.style?r.time[E.style]:f(E.style)?k(E.style.pattern):void 0;v.push({type:0,value:n.getDateTimeFormat(t,O).format(S)})}else if(a(E)){O="string"==typeof E.style?r.number[E.style]:h(E.style)?T(E.style.tokens):void 0;v.push({type:0,value:n.getNumberFormat(t,O).format(S)})}else if(c(E)){if(!(_=E.options[S]||E.options.other))throw new RangeError('Invalid values for "'+E.value+'": "'+S+'". Options are "'+Object.keys(E.options).join('", "')+'"');v.push.apply(v,N(_.value,t,n,r,p))}else if(u(E)){var _;if(!(_=E.options["="+S])){if(!Intl.PluralRules)throw new j('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n');var x=n.getPluralRules(t,{type:E.pluralType}).select(S-(E.offset||0));_=E.options[x]||E.options.other}if(!_)throw new RangeError('Invalid values for "'+E.value+'": "'+S+'". Options are "'+Object.keys(E.options).join('", "')+'"');v.push.apply(v,N(_.value,t,n,r,p,S-(E.offset||0)))}else;}}return(b=v).length<2?b:b.reduce((function(e,t){var n=e[e.length-1];return n&&0===n.type&&0===t.type?n.value+=t.value:e.push(t),e}),[])}var L="@@",F=/@@(\d+_\d+)@@/g,z=0;function U(e,t){return e.split(F).filter(Boolean).map((function(e){return null!=t[e]?t[e]:e})).reduce((function(e,t){return e.length&&"string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e}),[])}var B=/(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,H=Date.now()+"@@",V=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function W(e,t,n,r,i,o){var a=N(e,t,n,r,i,void 0,o),s={},l=a.reduce((function(e,t){if(0===t.type)return e+t.value;var n=Date.now()+"_"+ ++z;return s[n]=t.value,e+""+L+n+L}),"");if(!B.test(l))return U(l,s);if(!i)throw new j("Message has placeholders but no values was given");if("undefined"==typeof DOMParser)throw new j("Cannot format XML message without DOMParser");M||(M=new DOMParser);var c=M.parseFromString('<formatted-message id="'+H+'">'+l+"</formatted-message>","text/html").getElementById(H);if(!c)throw new j("Malformed HTML message "+l);var u=Object.keys(i).filter((function(e){return!!c.getElementsByTagName(e).length}));if(!u.length)return U(l,s);var d=u.filter((function(e){return e!==e.toLowerCase()}));if(d.length)throw new j("HTML tag must be lowercased but the following tags are not: "+d.join(", "));return Array.prototype.slice.call(c.childNodes).reduce((function(e,t){return e.concat(function e(t,n,r){var i=t.tagName,o=t.outerHTML,a=t.textContent,s=t.childNodes;if(!i)return U(a||"",n);i=i.toLowerCase();var l=~V.indexOf(i),c=r[i];if(c&&l)throw new j(i+" is a self-closing tag and can not be used, please use another tag name.");if(!s.length)return[o];var u=Array.prototype.slice.call(s).reduce((function(t,i){return t.concat(e(i,n,r))}),[]);return c?"function"==typeof c?[c.apply(void 0,u)]:[c]:R(["<"+i+">"],u,["</"+i+">"])}(t,s,i))}),[])}var K=function(){return(K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function q(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?K(K(K({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=K(K({},i[t]),o[t]||{}),e}),{})):i),n}),K({},e)):e}var G=function(){function e(t,n,r,i){var o,a=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){return function(e,t,n,r,i,o){var a=N(e,t,n,r,i,void 0,o);return 1===a.length?a[0].value:a.reduce((function(e,t){return e+t.value}),"")}(a.ast,a.locales,a.formatters,a.formats,e,a.message)},this.formatToParts=function(e){return N(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.formatHTMLMessage=function(e){return W(a.ast,a.locales,a.formatters,a.formats,e,a.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{normalizeHashtagInPlural:!1})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=q(e.formats,r),this.locales=n,this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Object(C.a)(Intl.NumberFormat,o.number),getDateTimeFormat:Object(C.a)(Intl.DateTimeFormat,o.dateTime),getPluralRules:Object(C.a)(Intl.PluralRules,o.pluralRules)})}return e.defaultLocale=(new Intl.NumberFormat).resolvedOptions().locale,e.__parse=E,e.formats={number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();t.a=G},function(e,t,n){"use strict";var r=n(0),i=n(155);n(506);t.a=e=>{let{children:t}=e;return r.createElement("span",{className:"menu-toggle"},t,r.createElement(i.a,{className:"toggle-arrow",width:7}))}},function(e,t,n){"use strict";var r=n(817),i=n(819),o=n(820),a=n(821);function s(e,t,n,r){if(e===n)return!0;if(!n.startsWith(e))return!1;var o=n.slice(e.length);return!!t&&(o=r?r(o):o,i.contains(o,t))}function l(e){return"Windows"===r.platformName?e.replace(/^\s*NT/,""):e}var c={isBrowser:function(e){return s(r.browserName,r.browserFullVersion,e)},isBrowserArchitecture:function(e){return s(r.browserArchitecture,null,e)},isDevice:function(e){return s(r.deviceName,null,e)},isEngine:function(e){return s(r.engineName,r.engineVersion,e)},isPlatform:function(e){return s(r.platformName,r.platformFullVersion,e,l)},isPlatformArchitecture:function(e){return s(r.platformArchitecture,null,e)}};e.exports=o(c,a)},function(e,t,n){"use strict";var r=n(0),i=n(12),o=n.n(i),a=n(51),s=n.n(a);n(443);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let d;!function(e){e.BOTTOM_CENTER="bottom-center",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.MIDDLE_CENTER="middle-center",e.MIDDLE_LEFT="middle-left",e.MIDDLE_RIGHT="middle-right",e.TOP_CENTER="top-center",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right"}(d||(d={}));const h={[d.BOTTOM_CENTER]:{attachment:"top center",targetAttachment:"bottom center"},[d.BOTTOM_LEFT]:{attachment:"top left",targetAttachment:"bottom left"},[d.BOTTOM_RIGHT]:{attachment:"top right",targetAttachment:"bottom right"},[d.MIDDLE_CENTER]:{attachment:"middle center",targetAttachment:"middle center"},[d.MIDDLE_LEFT]:{attachment:"middle right",targetAttachment:"middle left"},[d.MIDDLE_RIGHT]:{attachment:"middle left",targetAttachment:"middle right"},[d.TOP_CENTER]:{attachment:"bottom center",targetAttachment:"top center"},[d.TOP_LEFT]:{attachment:"bottom left",targetAttachment:"top left"},[d.TOP_RIGHT]:{attachment:"bottom right",targetAttachment:"top right"}};class f extends r.Component{constructor(){super(...arguments),u(this,"tetherRef",r.createRef()),u(this,"radarAnimationID",o()("radarAnimation")),u(this,"position",()=>{const{isShown:e}=this.props;this.tetherRef.current&&e&&this.tetherRef.current.position()})}render(){const e=this.props,{children:t,className:n="",constrainToScrollParent:i,constrainToWindow:o,position:a,isShown:u,offset:d,tetherElementClassName:f}=e,p=c(e,["children","className","constrainToScrollParent","constrainToWindow","position","isShown","offset","tetherElementClassName"]),m=[];i&&m.push({to:"scrollParent",attachment:"together"}),o&&m.push({to:"window",attachment:"together"});const{attachment:g,targetAttachment:b}=h[a],v=r.Children.only(t),y=r.cloneElement(v,{"aria-describedby":this.radarAnimationID}),w={attachment:g,classPrefix:"radar-animation",constraints:m,targetAttachment:b};return f&&(w.className=f),d&&(w.offset=d),r.createElement(s.a,l({ref:this.tetherRef},w),y,u&&r.createElement("div",l({className:"radar ".concat(n),id:this.radarAnimationID},p),r.createElement("div",{className:"radar-dot"}),r.createElement("div",{className:"radar-circle"})))}}u(f,"defaultProps",{constrainToScrollParent:!1,constrainToWindow:!0,isShown:!0,position:d.MIDDLE_RIGHT});var p=f;n.d(t,"a",(function(){return p}))},function(e,t,n){var r=n(686),i=n(23);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(687);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(8),i=n.n(r);n(314);function o(e,t){return!!i()(e,t,!1)}function a(e,t){return i()(e,t,{})}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="data-resin-target"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}));const r="auto",i="bottom-end",o="bottom-start"},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";var r={},i=Math.pow(2,24);e.exports=function(){for(var e=void 0;void 0===e||r.hasOwnProperty(e)||!isNaN(+e);)e=Math.floor(Math.random()*i).toString(32);return r[e]=!0,e}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000",height:o=6,title:a,width:s=10}=e;return r.createElement(i.a,{className:"icon-caret-down ".concat(t),height:o,title:a,viewBox:"0 0 10 6",width:s},r.createElement("path",{className:"fill-color",d:"M0 .5l5 5 5-5H0z",fill:n,fillRule:"evenodd"}))}},function(e,t,n){"use strict";var r=n(0);const i=r.createContext({});t.a=i},function(e,t,n){"use strict";var r=n(252);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(321),i=n(0);n(4),n(219);var o,a,s;class l extends i.Component{render(){const{title:e,children:t,className:n}=this.props;return i.createElement("div",{className:"link-group ".concat(n)},e?i.createElement("div",{className:"link-group-title"},e):null,i.createElement("ul",null,i.Children.map(t,(e,t)=>e?i.createElement("li",{key:t},e," "):null)))}}s={title:"",className:""},(a="defaultProps")in(o=l)?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s;n.d(t,"a",(function(){return r.a}))},function(e,t,n){var r=n(348),i=n(88),o=n(269),a=n(313),s=n(466),l=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var u=e.length;return n<0&&(n=l(u+n,0)),o(e)?n<=u&&e.indexOf(t,n)>-1:!!u&&r(e,t,n)>-1}},function(e,t,n){"use strict";t.a="__clear__"},function(e,t,n){"use strict";var r=n(79);const i=Object(r.defineMessages)({clearAll:{id:"boxui.selectField.clearAll",defaultMessage:"Clear All"},searchPlaceholder:{id:"boxui.selectField.searchPlaceholder",defaultMessage:"Search"},noResults:{id:"boxui.selectField.noResults",defaultMessage:"No Results"}});t.a=i},function(e,t,n){var r=n(132),i=n(373),o=n(374),a=n(375),s=n(376),l=n(377);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(401),i=n(175),o=n(176),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},function(e,t,n){"use strict";var r=n(0),i=n(31);function o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{const t=t=>{let{isLoading:n=!1,loadingIndicatorProps:a={}}=t,s=o(t,["isLoading","loadingIndicatorProps"]);return n?r.createElement(i.b,a):r.createElement(e,s)};return t.displayName="Loadable".concat(e.displayName||e.name||"Component"),t}},function(e,t,n){"use strict";var r=n(0),i=n(280),o=n(281),a=n(282),s=n(283),l=n(211),c=n(284),u=n(285),d=n(286),h=n(287),f=n(288),p=n(289),m=n(290),g=n(291),b=n(292),v=n(293),y=n(294),w=n(295),E=n(296),C=n(297),S=n(298),O=n(299),k=n(207),_=n(300),x=n(301),P=n(212),I=n(302),A=n(303),T=n(304),M=n(305);const D={IconFileAudio:i.a,IconFileBoxCanvas:o.a,IconFileBoxNote:a.a,IconFileCode:s.a,IconFileDefault:l.a,IconFileDocument:k.a,IconFileDwg:c.a,IconFileExcelSpreadsheet:u.a,IconFileGoogleDocs:d.a,IconFileGoogleSheets:h.a,IconFileGoogleSlides:f.a,IconFileIllustrator:p.a,IconFileImage:m.a,IconFileIndesign:g.a,IconFileKeynote:b.a,IconFileNumbers:v.a,IconFilePages:y.a,IconFilePDF:w.a,IconFilePhotoshop:E.a,IconFilePowerpointPresentation:C.a,IconFilePresentation:S.a,IconFileSpreadsheet:O.a,IconFileText:k.a,IconFileThreeD:_.a,IconFileVector:x.a,IconFileVideo:P.a,IconFileWordDocument:I.a,IconFileXbd:A.a,IconFileXdw:T.a,IconFileZip:M.a},R=e=>e.reduce((e,t)=>(e[t]=t,e),{}),j={IconFileAudio:R(["aac","aif","aifc","aiff","amr","au","flac","m3u","m4a","mid","mp3","ra","wav","wma","wpl"]),IconFileBoxCanvas:R(["boxcanvas"]),IconFileBoxNote:R(["boxnote"]),IconFileCode:R(["as","as3","asm","aspx","c","cpp","bat","c","cc","cmake","cs","css","cxx","db","diff","erb","groovy","h","haml","hh","htm","html","java","js","less","m","make","md","ml","mm","php","pl","plist","properties","py","rb","sass","scala","script","scm","sml","sql","sh","wabba","yaml"]),IconFileDocument:R(["dot","dotx","msg","odt","rtf","wpd","xhtml","xml","xsd","xsl"]),IconFileDwg:R(["dwg","dwgzip"]),IconFileExcelSpreadsheet:R(["xls","xlsx","xlsm","xlsb"]),IconFileGoogleDocs:R(["gdoc"]),IconFileGoogleSheets:R(["gsheet"]),IconFileGoogleSlides:R(["gslide","gslides"]),IconFileVector:R(["eps"]),IconFileIllustrator:R(["ai"]),IconFileIndesign:R(["idml","indd","indt","inx"]),IconFileKeynote:R(["key"]),IconFileNumbers:R(["numbers"]),IconFilePages:R(["pages"]),IconFileImage:R(["bmp","gif","gdraw","jpeg","jpg","png","ps","svs","svg","tif","tiff","heic","heif"]),IconFilePDF:R(["pdf"]),IconFilePresentation:R(["odp","otp","pot","potx"]),IconFilePowerpointPresentation:R(["ppt","pptx","pptm"]),IconFilePhotoshop:R(["psd"]),IconFileSpreadsheet:R(["csv","ods","tsv","xlt","xltx"]),IconFileText:R(["txt","vi","vim","webdoc"]),IconFileThreeD:R(["3ds","dae","fbx","obj","ply","stl"]),IconFileVideo:R(["3g2","3gp","avi","flv","m2v","m2ts","m4v","mkv","mov","mp4","mpeg","mpg","ogg","mts","qt","wmv"]),IconFileWordDocument:R(["docx","doc","docm"]),IconFileXbd:R(["xbd"]),IconFileXdw:R(["xdw"]),IconFileZip:R(["rar","tgz","zip"])};t.a=e=>{let{dimension:t=32,extension:n="",title:i}=e;const o=D[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=Object.keys(j).filter(t=>!!j[t][e.toLowerCase()])[0];return t||"IconFileDefault"}(n)];return r.createElement(o,{height:t,title:i,width:t})}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=20,title:a,width:s=20}=e;return r.createElement(i.a,{className:"icon-ellipsis ".concat(t),height:o,title:a,viewBox:"0 0 10 2",width:s},r.createElement("path",{className:"fill-color",d:"M1 2c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zm8 0c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1zM5 2c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z",fill:n,fillRule:"evenodd"}))}},function(e,t,n){"use strict";var r=n(0);var i=e=>{let{className:t="",url:n,onError:i}=e;return r.createElement("img",{alt:"",className:"avatar-image ".concat(t),onError:e=>{"function"==typeof i&&i(e)},src:n})},o=n(2);var a=e=>{let{className:t="",id:n=0,name:i}=e;const a=(parseInt(n,10)||0)%o.a.length;return r.createElement("span",{className:"avatar-initials ".concat(t),"data-bg-idx":a},(e=>{const t=e.replace(/[[({<]+.*[\])}>]+/g,"").trim();return(t.slice(0,1)+t.slice(t.lastIndexOf(" ")+1,t.lastIndexOf(" ")+2)).toUpperCase()})(i))},s=n(9);var l=e=>{let{className:t="",height:n=28,title:i,width:a=28}=e;return r.createElement(s.a,{className:"unknown-user-avatar ".concat(t),height:n,title:i,viewBox:"0 0 16 16",width:a},r.createElement("path",{fill:o.k,fillRule:"evenodd",d:"M8 0a8 8 0 110 16A8 8 0 018 0zm0 9.5c-1.21 0-2.293.413-3.232 1.096-.56.407-.953.817-1.168 1.104a.5.5 0 00.8.6c.035-.047.114-.141.234-.267.205-.214.447-.428.722-.629.78-.567 1.665-.904 2.644-.904.979 0 1.865.337 2.644.904.275.2.517.415.722.63.12.125.199.219.234.266a.5.5 0 00.8-.6c-.215-.287-.607-.697-1.168-1.104C10.293 9.913 9.21 9.5 8 9.5zm0-6a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm0 1a1.5 1.5 0 11-.001 3.001A1.5 1.5 0 018 4.5z"}))},c=n(54),u=n(4),d=n.n(u),h=n(271);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=e=>r.createElement(s.a,f({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:o.k,fillRule:"evenodd",d:"M8 0a7.988 7.988 0 00-5.662 2.338A7.992 7.992 0 000 8a7.988 7.988 0 002.338 5.662A7.992 7.992 0 008 16a7.988 7.988 0 005.662-2.338A7.992 7.992 0 0016 8a7.988 7.988 0 00-2.338-5.662A7.992 7.992 0 008 0zm-.862 14.4C4.062 13.908 1.6 11.323 1.6 8c0-.492.123-.984.123-1.477L5.54 10.34v.861c0 .862.738 1.6 1.6 1.6v1.6zm5.539-2.092c-.247-.616-.861-1.108-1.477-1.108h-.862V8.738c0-.368-.246-.738-.738-.738H4.8V6.4h1.6c.492 0 .862-.37.862-.862V4.062h1.6c.861 0 1.6-.739 1.6-1.6v-.37C12.8 3.077 14.4 5.292 14.4 8c0 1.723-.616 3.2-1.723 4.308z"})),m=n(79);var g=Object(m.defineMessages)({externalUser:{id:"boxui.avatar.externalUser",defaultMessage:"External user"}});n(645);const b={small:!0,large:!0};var v=Object(c.c)((function(e){let{avatarUrl:t,badgeIcon:n,className:o,name:s,id:c,intl:u,isExternal:f,shouldShowExternal:m=!1,size:v=""}=e;const{formatMessage:y}=u,[w,E]=r.useState(!1),[C,S]=r.useState(null),O=d()(["avatar",o,{["avatar--".concat(v)]:v&&b[v],"avatar--isExternal":m&&f,"avatar--iconBadge":!!n}]);let k;t!==C&&(E(!1),S(t)),k=t&&!w?r.createElement(i,{onError:()=>{E(!0)},url:t}):s?r.createElement(a,{id:c,name:s}):r.createElement(l,{className:"avatar-icon"});let _=null;return m&&f?_=r.createElement(p,{className:"bdl-Avatar-externalBadge",title:y(g.externalUser)}):n&&(_=r.createElement("div",{className:"bdl-Avatar-badge bdl-Avatar-iconBadge"},n)),r.createElement(h.a,{className:O,bottomRight:_},r.createElement("span",null,k))}));n.d(t,"a",(function(){return v}))},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(73)(n(42),"Map");e.exports=r},function(e,t,n){var r=n(60),i=n(39),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==a||t==s||t==o||t==l}},function(e,t,n){var r=n(173),i=n(111),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(223);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(221),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(163)(e))},function(e,t,n){var r=n(407),i=n(227),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(225)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(309);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var r=n(434),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var b=a[g];if(!(o[b]||r&&r[b]||m&&m[b]||s&&s[b])){var v=h(n,b);try{c(t,b,v)}catch(e){}}}}return t}},function(e,t,n){var r=n(445),i=n(311);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){"use strict";var r=n(319);n.d(t,"a",(function(){return r.a}));var i=n(320);n.d(t,"b",(function(){return i.a}));n(270)},function(e,t,n){"use strict";var r=n(795);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(2);t.a=e=>{let{className:t="",color:n=o.l,height:a=14,title:s,width:l=14}=e;return r.createElement(i.a,{className:"icon-edit ".concat(t),height:a,title:s,viewBox:"0 0 14 14",width:l},r.createElement("path",{className:"fill-color",d:"M3.21 7.89l6.47-6.48a2 2 0 0 1 2.88 2.78h-.05L6 10.72 3.21 7.89zM2.24 9l2.83 2.83L1.67 13c-.52.18-.79-.1-.62-.61z",fill:n}))}},function(e,t,n){"use strict";var r=n(0),i=n(119),o=n(204),a=n(96),s=n(115);function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>t=>{let{maskError:n,inlineError:c,errorCode:u}=t,d=l(t,["maskError","inlineError","errorCode"]);return n?r.createElement(s.a,null,r.createElement(o.a,{errorHeader:r.createElement(i.a,n.errorHeader),errorSubHeader:n.errorSubHeader?r.createElement(i.a,n.errorSubHeader):void 0})):c?r.createElement(r.Fragment,null,r.createElement(a.a,{title:r.createElement(i.a,c.title)},r.createElement(i.a,c.content)),r.createElement(e,d)):r.createElement(e,d)}},function(e,t,n){"use strict";var r=n(0),i=n(54),o=n(11);const a=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay"];function s(e,t){let{locale:n,formats:r,onError:i}=e,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:l}=s,c=l&&Object(o.g)(r,"number",l,i)||{};return t(n,Object(o.f)(s,a,c))}function l(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return s(e,t,r).format(n)}catch(t){e.onError(Object(o.b)("Error formatting number.",t))}return String(n)}function c(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return s(e,t,r).formatToParts(n)}catch(t){e.onError(Object(o.b)("Error formatting number.",t))}return[]}const u=["numeric","style"];function d(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r||(r="second"),Intl.RelativeTimeFormat||e.onError(Object(o.b)('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n'));try{return function(e,t){let{locale:n,formats:r,onError:i}=e,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:s}=a,l=!!s&&Object(o.g)(r,"relative",s,i)||{};return t(n,Object(o.f)(a,u,l))}(e,t,i).format(n,r)}catch(t){e.onError(Object(o.b)("Error formatting relative time.",t))}return String(n)}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const f=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function p(e,t,n){let{locale:r,formats:i,onError:a,timeZone:s}=e,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{format:c}=l,u=h(h({},s&&{timeZone:s}),c&&Object(o.g)(i,t,c,a));let d=Object(o.f)(l,f,u);return"time"!==t||d.hour||d.minute||d.second||(d=h(h({},d),{hour:"numeric",minute:"numeric"})),n(r,d)}function m(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"date",t,r).format(i)}catch(t){e.onError(Object(o.b)("Error formatting date.",t))}return String(i)}function g(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"time",t,r).format(i)}catch(t){e.onError(Object(o.b)("Error formatting time.",t))}return String(i)}function b(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"date",t,r).formatToParts(i)}catch(t){e.onError(Object(o.b)("Error formatting date.",t))}return[]}function v(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i="string"==typeof n?new Date(n||0):n;try{return p(e,"time",t,r).formatToParts(i)}catch(t){e.onError(Object(o.b)("Error formatting time.",t))}return[]}const y=["localeMatcher","type"];function w(e,t,n){let{locale:r,onError:i}=e,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Intl.PluralRules||i(Object(o.b)('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n'));const s=Object(o.f)(a,y);try{return t(r,s).select(n)}catch(e){i(Object(o.b)("Error formatting plural.",e))}return"other"}var E=n(107),C=n(85),S=n.n(C);const O=["localeMatcher","type","style"],k=Date.now();function _(e,t,n){let{locale:r,onError:i}=e,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Intl.ListFormat||i(Object(o.b)('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n'));const s=Object(o.f)(a,O);try{const e={},i=n.map((t,n)=>{if("object"==typeof t){const r=function(e){return"".concat(k,"_").concat(e,"_").concat(k)}(n);return e[r]=t,r}return String(t)});return Object.keys(e).length?t(r,s).formatToParts(i).reduce((t,n)=>{const r=n.value;return e[r]?t.push(e[r]):"string"==typeof t[t.length-1]?t[t.length-1]+=r:t.push(r),t},[]):t(r,s).format(i)}catch(e){i(Object(o.b)("Error formatting list.",e))}return n}function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return T}));const P=S.a||C;function I(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError}}function A(e,t){const n=Object(o.c)(t),r=x(x({},o.a),e);if(!r.locale||!function(e,t){if("undefined"==typeof Intl)return!1;if(!e)throw new Error("locales must be supplied.");Array.isArray(e)||(e=[e]);var n=t||[Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules];return!(0===(n=n.filter(Boolean)).length||t&&n.length!==t.length)&&n.every((function(t){return t.supportedLocalesOf(e).length===e.length}))}(r.locale)){const{locale:e,defaultLocale:t,onError:n}=r;"function"==typeof n&&n(Object(o.b)('Missing locale data for locale: "'.concat(e,'". ')+'Using default locale: "'.concat(t,'" as fallback.'))),r.locale=r.defaultLocale||"en"}return x(x({},r),{formatters:n,formatNumber:l.bind(null,r,n.getNumberFormat),formatNumberToParts:c.bind(null,r,n.getNumberFormat),formatRelativeTime:d.bind(null,r,n.getRelativeTimeFormat),formatDate:m.bind(null,r,n.getDateTimeFormat),formatDateToParts:b.bind(null,r,n.getDateTimeFormat),formatTime:g.bind(null,r,n.getDateTimeFormat),formatTimeToParts:v.bind(null,r,n.getDateTimeFormat),formatPlural:w.bind(null,r,n.getPluralRules),formatMessage:E.b.bind(null,r,n),formatHTMLMessage:E.a.bind(null,r,n),formatList:_.bind(null,r,n.getListFormat)})}class T extends r.PureComponent{constructor(){super(...arguments),this.cache=Object(o.d)(),this.state={cache:this.cache,intl:A(I(this.props),this.cache),prevConfig:I(this.props)}}static getDerivedStateFromProps(e,t){let{prevConfig:n,cache:r}=t;const i=I(e);return P(n,i)?null:{intl:A(i,r),prevConfig:i}}render(){return Object(o.h)(this.state.intl),r.createElement(i.b,{value:this.state.intl},this.props.children)}}T.displayName="IntlProvider",T.defaultProps=o.a},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#F7931D",height:o=26,title:a,width:s=26}=e;return r.createElement(i.a,{className:"icon-alert-default ".concat(t),title:a,height:o,width:s,viewBox:"0 0 26 26"},r.createElement("defs",null,r.createElement("circle",{id:"b",cx:"8",cy:"8",r:"8"}),r.createElement("filter",{x:"-46.9%",y:"-46.9%",width:"193.8%",height:"193.8%",filterUnits:"objectBoundingBox",id:"a"},r.createElement("feMorphology",{radius:".5",operator:"dilate",in:"SourceAlpha",result:"shadowSpreadOuter1"}),r.createElement("feOffset",{in:"shadowSpreadOuter1",result:"shadowOffsetOuter1"}),r.createElement("feGaussianBlur",{stdDeviation:"2",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),r.createElement("feColorMatrix",{values:"0 0 0 0 0.733285502 0 0 0 0 0.733285502 0 0 0 0 0.733285502 0 0 0 0.5 0",in:"shadowBlurOuter1"}))),r.createElement("g",{transform:"translate(5 5)",fill:"none",fillRule:"evenodd"},r.createElement("use",{fill:"#000",filter:"url(#a)",xlinkHref:"#b"}),r.createElement("use",{fill:n,xlinkHref:"#b"}),r.createElement("path",{d:"M8.047 4.706v4.111",stroke:"#FFF",strokeWidth:"1.412",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("circle",{fill:"#FFF",cx:"8.047",cy:"11.294",r:"1"})))}},function(e,t,n){"use strict";var r=n(0),i=n(119),o=n(204),a=n(5);n(637);t.a=()=>r.createElement("section",{className:"be-default-error"},r.createElement(o.a,{errorHeader:r.createElement(i.a,a.a.defaultErrorMaskHeaderMessage),errorSubHeader:r.createElement(i.a,a.a.defaultErrorMaskSubHeaderMessage)}))},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(384),i=n(391),o=n(393),a=n(394),s=n(395);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(105),i=n(101);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(678),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){var r=n(552)();e.exports=r},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.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];c.push(new p(e,t)),1!==c.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(106),i=n(35),o=n(316),a=i.List,s=i.Map,l=i.OrderedSet,c=i.Record,u=i.Repeat,d=l(),h=c({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:s()}),f=function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(u(r.EMPTY,n.length))),e},p=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,f(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():d},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.findStyleRanges=function(e,t){o(this.getCharacterList(),m,e,t)},t.prototype.findEntityRanges=function(e,t){o(this.getCharacterList(),g,e,t)},t}(h);function m(e,t){return e.getStyle()===t.getStyle()}function g(e,t){return e.getEntity()===t.getEntity()}e.exports=p},function(e,t,n){"use strict";var r=n(36),i=55296,o=56319,a=56320,s=57343,l=/[\uD800-\uDFFF]/;function c(e){return i<=e&&e<=s}function u(e){return l.test(e)}function d(e,t){return 1+c(e.charCodeAt(t))}function h(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!u(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var i=0;if(t>0){for(;t>0&&i<r;t--)i+=d(e,i);if(i>=r)return""}else if(t<0){for(i=r;t<0&&0<i;t++)i-=d(e,i-1);i<0&&(i=0)}var o=r;if(n<r)for(o=i;n>0&&o<r;n--)o+=d(e,o);return e.substring(i,o)}var f={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=d(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:d,hasSurrogateUnit:u,isCodeUnitInSurrogateRange:c,isSurrogatePair:function(e,t){if(0<=t&&t<e.length||r(!1),t+1===e.length)return!1;var n=e.charCodeAt(t),l=e.charCodeAt(t+1);return i<=n&&n<=o&&a<=l&&l<=s},strlen:function(e){if(!u(e))return e.length;for(var t=0,n=0;n<e.length;n+=d(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return h(e,t=t<n?t:n,r)},substr:h};e.exports=f},function(e,t,n){"use strict";var r=n(74),i=n(3),o=n.n(i),a=n(120),s=n.n(a),l=n(25),c=n(76),u=n(255),d=n.n(u);function h(){return window.crypto||window.msCrypto}function f(e,t){const n=h();return n!==window.msCrypto?n.subtle.digest(e,t):new Promise((r,i)=>{if("SHA-1"===e)try{const e=d.a.arrayBuffer(t);r(e)}catch(e){i(e)}else{const o=n.subtle.digest({name:e},t);o.oncomplete=e=>{r(e.target.result)},o.onerror=i}})}function p(e,t,n){"use asm";var r=new e.Int32Array(n);function i(e,t){e=e|0;t=t|0;var n=0,i=0,o=0,a=0,s=0,l=0,c=0,u=0,d=0,h=0,f=0,p=0,m=0,g=0;o=r[t+320>>2]|0;s=r[t+324>>2]|0;c=r[t+328>>2]|0;d=r[t+332>>2]|0;f=r[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){a=o;l=s;u=c;h=d;p=f;for(i=0;(i|0)<64;i=i+4|0){g=r[n+i>>2]|0;m=((o<<5|o>>>27)+(s&c|~s&d)|0)+((g+f|0)+1518500249|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[e+i>>2]=g}for(i=e+64|0;(i|0)<(e+80|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s&c|~s&d)|0)+((g+f|0)+1518500249|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}for(i=e+80|0;(i|0)<(e+160|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s^c^d)|0)+((g+f|0)+1859775393|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}for(i=e+160|0;(i|0)<(e+240|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s&c|s&d|c&d)|0)+((g+f|0)-1894007588|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}for(i=e+240|0;(i|0)<(e+320|0);i=i+4|0){g=(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])<<1|(r[i-12>>2]^r[i-32>>2]^r[i-56>>2]^r[i-64>>2])>>>31;m=((o<<5|o>>>27)+(s^c^d)|0)+((g+f|0)-899497514|0)|0;f=d;d=c;c=s<<30|s>>>2;s=o;o=m;r[i>>2]=g}o=o+a|0;s=s+l|0;c=c+u|0;d=d+h|0;f=f+p|0}r[t+320>>2]=o;r[t+324>>2]=s;r[t+328>>2]=c;r[t+332>>2]=d;r[t+336>>2]=f}return{hash:i}}var m=()=>{const e=new Blob(["const RushaCore = ".concat(p.toString()),";\n",'function Rusha(e){for(var r=function(e){if("string"==typeof e)return"string";if(e instanceof Array)return"array";if("undefined"!=typeof global&&global.Buffer&&global.Buffer.isBuffer(e))return"buffer";if(e instanceof ArrayBuffer)return"arraybuffer";if(e.buffer instanceof ArrayBuffer)return"view";if(e instanceof Blob)return"blob";throw new Error("Unsupported data type.")},n={fill:0},t=function(e){for(e+=9;e%64>0;e+=1);return e},a=function(e,r,n,t,a){var f,s=this,i=a%4,h=(t+i)%4,u=t-h;switch(i){case 0:e[a]=s[n+3];case 1:e[a+1-(i<<1)|0]=s[n+2];case 2:e[a+2-(i<<1)|0]=s[n+1];case 3:e[a+3-(i<<1)|0]=s[n]}if(!(t<h+i)){for(f=4-i;f<u;f=f+4|0)r[a+f>>2|0]=s[n+f]<<24|s[n+f+1]<<16|s[n+f+2]<<8|s[n+f+3];switch(h){case 3:e[a+u+1|0]=s[n+u+2];case 2:e[a+u+2|0]=s[n+u+1];case 1:e[a+u+3|0]=s[n+u]}}},f=function(e){switch(r(e)){case"string":return function(e,r,n,t,a){var f,s=this,i=a%4,h=(t+i)%4,u=t-h;switch(i){case 0:e[a]=s.charCodeAt(n+3);case 1:e[a+1-(i<<1)|0]=s.charCodeAt(n+2);case 2:e[a+2-(i<<1)|0]=s.charCodeAt(n+1);case 3:e[a+3-(i<<1)|0]=s.charCodeAt(n)}if(!(t<h+i)){for(f=4-i;f<u;f=f+4|0)r[a+f>>2]=s.charCodeAt(n+f)<<24|s.charCodeAt(n+f+1)<<16|s.charCodeAt(n+f+2)<<8|s.charCodeAt(n+f+3);switch(h){case 3:e[a+u+1|0]=s.charCodeAt(n+u+2);case 2:e[a+u+2|0]=s.charCodeAt(n+u+1);case 1:e[a+u+3|0]=s.charCodeAt(n+u)}}}.bind(e);case"array":case"buffer":return a.bind(e);case"arraybuffer":return a.bind(new Uint8Array(e));case"view":return a.bind(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));case"blob":return function(e,r,n,t,a){var f,s=a%4,i=(t+s)%4,h=t-i,u=new Uint8Array(reader.readAsArrayBuffer(this.slice(n,n+t)));switch(s){case 0:e[a]=u[3];case 1:e[a+1-(s<<1)|0]=u[2];case 2:e[a+2-(s<<1)|0]=u[1];case 3:e[a+3-(s<<1)|0]=u[0]}if(!(t<i+s)){for(f=4-s;f<h;f=f+4|0)r[a+f>>2|0]=u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3];switch(i){case 3:e[a+h+1|0]=u[h+2];case 2:e[a+h+2|0]=u[h+1];case 1:e[a+h+3|0]=u[h]}}}.bind(e)}},s=new Array(256),i=0;i<256;i++)s[i]=(i<16?"0":"")+i.toString(16);var h=function(e){for(var r=new Uint8Array(e),n=new Array(e.byteLength),t=0;t<n.length;t++)n[t]=s[r[t]];return n.join("")};!function(e){if(e%64>0)throw new Error("Chunk size must be a multiple of 128 bit");n.offset=0,n.maxChunkLen=e,n.padMaxChunkLen=t(e),n.heap=new ArrayBuffer(function(e){var r;if(e<=65536)return 65536;if(e<16777216)for(r=1;r<e;r<<=1);else for(r=16777216;r<e;r+=16777216);return r}(n.padMaxChunkLen+320+20)),n.h32=new Int32Array(n.heap),n.h8=new Int8Array(n.heap),n.core=new RushaCore({Int32Array:Int32Array,DataView:DataView},{},n.heap),n.buffer=null}(e||65536);var u=function(e,r){n.offset=0;var t=new Int32Array(e,r+320,5);t[0]=1732584193,t[1]=-271733879,t[2]=-1732584194,t[3]=271733878,t[4]=-1009589776},c=function(e,r){var a,f,s,i=t(e),h=new Int32Array(n.heap,0,i>>2);return function(e,r){var n=new Uint8Array(e.buffer),t=r%4,a=r-t;switch(t){case 0:n[a+3]=0;case 1:n[a+2]=0;case 2:n[a+1]=0;case 3:n[a+0]=0}for(var f=1+(r>>2);f<e.length;f++)e[f]=0}(h,e),s=r,(a=h)[(f=e)>>2]|=128<<24-(f%4<<3),a[14+(2+(f>>2)&-16)]=s/(1<<29)|0,a[15+(2+(f>>2)&-16)]=s<<3,i},o=function(e,r,t,a){f(e)(n.h8,n.h32,r,t,a||0)},d=function(e,r,t,a,f){var s=t;o(e,r,t),f&&(s=c(t,a)),n.core.hash(s,n.padMaxChunkLen)},y=function(e,r){var n=new Int32Array(e,r+320,5),t=new Int32Array(5),a=new DataView(t.buffer);return a.setInt32(0,n[0],!1),a.setInt32(4,n[1],!1),a.setInt32(8,n[2],!1),a.setInt32(12,n[3],!1),a.setInt32(16,n[4],!1),t},w=this.rawDigest=function(e){var r=e.byteLength||e.length||e.size||0;u(n.heap,n.padMaxChunkLen);var t=0,a=n.maxChunkLen;for(t=0;r>t+a;t+=a)d(e,t,a,r,!1);return d(e,t,r-t,r,!0),y(n.heap,n.padMaxChunkLen)};this.digest=this.digestFromString=this.digestFromBuffer=this.digestFromArrayBuffer=function(e){return h(w(e).buffer)},this.resetState=function(){return u(n.heap,n.padMaxChunkLen),this},this.append=function(e){var r,t=0,a=e.byteLength||e.length||e.size||0,f=n.offset%n.maxChunkLen;for(n.offset+=a;t<a;)r=Math.min(a-t,n.maxChunkLen-f),o(e,t,r,f),t+=r,(f+=r)===n.maxChunkLen&&(n.core.hash(n.maxChunkLen,n.padMaxChunkLen),f=0);return this},this.getState=function(){var e;if(n.offset%n.maxChunkLen)e=n.heap.slice(0);else{var r=new Int32Array(n.heap,n.padMaxChunkLen+320,5);e=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)}return{offset:n.offset,heap:e}},this.setState=function(e){(n.offset=e.offset,20===e.heap.byteLength)?new Int32Array(n.heap,n.padMaxChunkLen+320,5).set(new Int32Array(e.heap)):n.h32.set(new Int32Array(e.heap));return this};var p=this.rawEnd=function(){var e=n.offset,r=e%n.maxChunkLen,t=c(r,e);n.core.hash(t,n.padMaxChunkLen);var a=y(n.heap,n.padMaxChunkLen);return u(n.heap,n.padMaxChunkLen),a};this.end=function(){return h(p().buffer)}}',";\n","var setupWorker = ",function(){const e=new Rusha;e.resetState();let t=0;self.onmessage=n=>{const{data:r}=n,{part:i,fileSize:o,partContents:a}=r,s=Date.now();try{if(i.offset!==t)throw new Error("Out of order parts given to worker");if(e.append(a),self.postMessage({type:"partDone",part:r.part,duration:Date.now()-s,partContents:a},[a]),t+=i.size,i.offset+i.size===o){const t=e.end();self.postMessage({type:"done",sha1:t})}}catch(e){const t={type:"error",name:e.name,message:e.message,part:i};self.postMessage(t)}}}.toString(),";\n","setupWorker();"],{type:"text/javascript"}),t=(window.URL||window.webkitURL).createObjectURL(e),n=new Worker(t);return n.oldTerminate=n.terminate,n.terminate=()=>{(window.URL||window.webkitURL).revokeObjectURL(t),n.oldTerminate()},n},g=n(59),b=n(1),v=n(8),y=n.n(v),w=n(256),E=n.n(w);var C=n(15);function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=5,k=10;class _ extends C.a{constructor(){super(...arguments),S(this,"retryCount",0),S(this,"reachabilityRetryCount",0),S(this,"isUploadFallbackLogicEnabled",!1),S(this,"makePreflightRequest",()=>{if(this.isDestroyed())return;let e="".concat(this.getBaseApiUrl(),"/files/content");if(this.fileId&&(e=e.replace("content","".concat(this.fileId,"/content"))),this.isUploadFallbackLogicEnabled){const t=this.uploadsReachability.getUnreachableHostsUrls();0!==t.length&&(e+="?unreachable_hosts=".concat(t.join(",")))}const{size:t,name:n}=this.file,r={name:this.fileName||n,parent:{id:this.folderId},description:this.fileDescription,size:t};this.xhr.options({url:e,data:r,successHandler:e=>{this.isUploadFallbackLogicEnabled?this.preflightSuccessReachabilityHandler(e):this.preflightSuccessHandler(e)},errorHandler:this.preflightErrorHandler})}),S(this,"preflightSuccessReachabilityHandler",async e=>{let{data:t}=e;if(this.isDestroyed())return;const{upload_url:n}=t;if(!n)return void this.preflightSuccessHandler({data:t});const r=this.getUploadHostFromUrl(n);r!=="".concat(b.X,"/")&&r!=="".concat(b.Y,"/")&&r!=="".concat(b.Z,"/")?await this.uploadsReachability.isReachable(r)?this.preflightSuccessHandler({data:t}):this.reachabilityRetryCount>=k?this.preflightSuccessHandler({data:{}}):(this.reachabilityRetryCount+=1,this.makePreflightRequest()):this.preflightSuccessHandler({data:t})}),S(this,"preflightErrorHandler",e=>{if(this.isDestroyed())return;this.fileName=this.file?this.file.name:"";let t=e;const{response:n}=e;if(n&&n.data&&(t=n.data),this.retryCount>=O)this.errorCallback(t);else if(t&&409===t.status){if(this.overwrite){const e=t.context_info.conflicts.id;!this.fileId&&e&&(this.fileId=e)}else if(this.conflictCallback)this.fileName=this.conflictCallback(this.fileName);else{const e=this.fileName.substr(this.fileName.lastIndexOf("."))||"";this.fileName="".concat(this.fileName.substr(0,this.fileName.lastIndexOf(".")),"-").concat(Date.now()).concat(e)}this.makePreflightRequest(),this.retryCount+=1}else if(!t||429!==t.status&&"too_many_requests"!==t.code)t&&(t.status||"Failed to fetch"===t.message)&&"function"==typeof this.errorCallback?this.errorCallback(t):(this.retryTimeout=setTimeout(this.makePreflightRequest,2**this.retryCount*b.Ke),this.retryCount+=1);else{let e=b.hb;if(t.headers){const n=parseInt(t.headers["retry-after"]||t.headers.get("Retry-After"),10);Number.isNaN(n)||(e=n*b.Ke)}this.retryTimeout=setTimeout(this.makePreflightRequest,e),this.retryCount+=1}})}readFile(e,t){return new Promise((n,r)=>{e.readAsArrayBuffer(t),e.onload=()=>{n({buffer:e.result,readCompleteTimestamp:Date.now()})},e.onerror=r})}getUploadHostFromUrl(e){const t=e.split("/");return"".concat(t[0],"//").concat(t[2],"/")}}var x=_;function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A={digestReadahead:5,initialRetryDelayMs:5e3,maxRetryDelayMs:6e4,parallelism:4,requestTimeoutMs:12e4,retries:5};var T=class extends x{constructor(e,t,n){super(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{shouldRetry:!1})),I(this,"logEvent",(e,t)=>{const n={event_type:e};return t&&(n.event_info=t),this.xhr.post({url:this.sessionEndpoints.logEvent,data:n})}),this.config=n||A,this.sessionEndpoints=t}};function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=0,R=1,j=2,N=3;var L=class extends T{constructor(e,t,n,r,i,a,s,u,d,h,f,p){super(e,s,u),M(this,"toJSON",()=>JSON.stringify({index:this.index,offset:this.offset,partSize:this.partSize,state:this.state,uploadedBytes:this.uploadedBytes,numUploadRetriesPerformed:this.numUploadRetriesPerformed,numDigestRetriesPerformed:this.numDigestRetriesPerformed,sha256:this.sha256,timing:this.timing})),M(this,"getPart",()=>this.data.part||{}),M(this,"upload",()=>{if(this.isDestroyedOrPaused())return;if(!this.sha256)throw new Error("Part SHA-256 unavailable");if(!this.blob)throw new Error("Part blob unavailable");const e={documentHidden:document.hidden,digest_retries:this.numDigestRetriesPerformed,timing:this.timing,parts_uploading:this.getNumPartsUploading()},t={"Content-Type":"application/octet-stream",Digest:"sha-256=".concat(this.sha256),"Content-Range":"bytes ".concat(this.offset,"-").concat(this.rangeEnd,"/").concat(this.fileSize),"X-Box-Client-Event-Info":JSON.stringify(e)};this.state=j,this.startTimestamp=Date.now(),this.xhr.uploadFile({url:this.sessionEndpoints.uploadPart,data:this.blob,headers:t,method:b.oe,successHandler:this.uploadSuccessHandler,errorHandler:this.uploadErrorHandler,progressHandler:this.uploadProgressHandler,withIdleTimeout:!0,idleTimeoutDuration:this.config.requestTimeoutMs})}),M(this,"uploadSuccessHandler",e=>{let{data:t}=e;this.isDestroyedOrPaused()||(this.state=N,this.consoleLog("Upload completed: ".concat(this.toJSON(),".")),this.data=t,this.blob=null,this.timing.uploadTime=Date.now()-this.startTimestamp,this.onSuccess(this),this.uploadedBytes=this.partSize)}),M(this,"uploadProgressHandler",e=>{if(this.isDestroyedOrPaused())return;const t=parseInt(e.loaded,10),n=this.uploadedBytes;this.uploadedBytes=t,this.onProgress(n,t)}),M(this,"uploadErrorHandler",async e=>{if(this.isDestroyedOrPaused())return;const t=y()(this.xhr,"xhr.readyState",null),n=y()(this.xhr,"xhr.statusText","");this.consoleLog("Upload failure ".concat(e.message," for part ").concat(this.toJSON(),". XHR state: ").concat(t,"."));const r={message:e.message,part:{uploadedBytes:this.uploadedBytes,id:this.id,index:this.index,offset:this.offset},xhr_ready_state:t,xhr_status_text:n},i=JSON.stringify(r);if(this.sessionEndpoints.logEvent?Object(c.a)((e,t)=>{this.logEvent("part_failure",i).then(e).catch(t)},this.config.retries,this.config.initialRetryDelayMs).catch(e=>this.consoleLog("Failure in logEvent: ".concat(e.message))):this.consoleLog("logEvent endpoint not found"),this.numUploadRetriesPerformed>=this.config.retries)return void this.onError(e,i);const o=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,this.numUploadRetriesPerformed);this.numUploadRetriesPerformed+=1,this.consoleLog("Retrying uploading part ".concat(this.toJSON()," in ").concat(o," ms")),this.retryTimeout=setTimeout(this.retryUpload,o)}),M(this,"retryUpload",async()=>{if(!this.isDestroyedOrPaused())try{const e=await this.listParts(this.index,1);if(e&&1===e.length&&e[0].offset===this.offset&&e[0].part_id)return this.consoleLog("Part ".concat(this.toJSON()," is available on server. Not re-uploading.")),this.id=e[0].part_id,void this.uploadSuccessHandler({data:{part:e[0]}});throw this.consoleLog("Part ".concat(this.toJSON()," is not available on server. Re-uploading.")),new Error("Part not found on the server")}catch(e){const{response:t}=e;t&&t.status&&this.consoleLog("Error ".concat(t.status," while listing part ").concat(this.toJSON(),". Re-uploading.")),this.numUploadRetriesPerformed+=1,this.upload()}}),M(this,"listParts",async(e,t)=>{const n={offset:e,limit:t},r=function(e,t){if(!t)return e;const n=new E.a(e);return Object.keys(t).forEach(e=>{const r=t[e];r&&(n.hasQueryParam(e)?n.replaceQueryParam(e,r):n.addQueryParam(e,r))}),n.toString()}(this.sessionEndpoints.listParts,n);return(await this.xhr.get({url:r})).data.entries}),this.index=t,this.numDigestRetriesPerformed=0,this.numUploadRetriesPerformed=0,this.offset=n,this.partSize=r,this.fileSize=i,this.state=D,this.timing={},this.uploadedBytes=0,this.data={},this.config=u,this.rangeEnd=n+r-1,this.rangeEnd>i-1&&(this.rangeEnd=i-1),this.isPaused=!1,this.onSuccess=h||o.a,this.onError=p||o.a,this.onProgress=f||o.a,this.getNumPartsUploading=d}cancel(){clearTimeout(this.retryTimeout),this.blob=null,this.data={},this.destroy()}pause(){clearTimeout(this.retryTimeout),this.isPaused=!0,this.state=R,this.xhr.abort()}unpause(){this.isPaused=!1,this.state=j,this.retryUpload()}reset(){this.numUploadRetriesPerformed=0,this.timing={},this.uploadedBytes=0}isDestroyedOrPaused(){return this.isDestroyed()||this.isPaused}};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B="create_session_misc_error",H="create_session_retries_exceeded",V="file_changed_during_upload",W="part_upload_retries_exceeded",K="commit_retries_exceeded",q="web_worker_error",G="file_reader_received_not_found_error",Q="part_digest_retries_exceeded";var Y=class extends T{constructor(e,t){super(e,{createSession:null,uploadPart:null,listParts:null,commit:null,abort:null,logEvent:null},t),U(this,"getBaseUploadUrlFromPreflightResponse",e=>{let{data:t}=e;if(!t||!t.upload_url)return this.getBaseUploadUrl();const n=t.upload_url.split("/");return this.uploadHost="".concat(n[0],"//").concat(n[2]),this.getBaseUploadUrl()}),U(this,"preflightSuccessHandler",async e=>{if(this.isDestroyed())return;const t=this.getBaseUploadUrlFromPreflightResponse(e);let n="".concat(t,"/files/upload_sessions");n.includes("fupload-ec2")&&(this.config.parallelism=1);const r={file_size:this.file.size,file_name:this.fileName};this.fileId?n=n.replace("upload_sessions","".concat(this.fileId,"/upload_sessions")):r.folder_id=this.folderId;try{const e=await this.xhr.post({url:n,data:r});this.createSessionSuccessHandler(e.data)}catch(e){const t=this.getErrorResponse(e);if(t&&t.status>=500&&t.status<600)return void this.createSessionErrorHandler(e);if(t&&409===t.status&&"session_conflict"===t.code)return void this.createSessionSuccessHandler(t.context_info.session);if(t&&t.status===b.re&&t.code===b.Cc||t.status===b.re&&"access_denied_insufficient_permissions"===t.code)return void this.errorCallback(t);if(t&&409===t.status)return this.resolveConflict(t),void this.createSessionRetry();this.sessionErrorHandler(e,B,JSON.stringify(e))}}),U(this,"createSessionErrorHandler",e=>{this.isDestroyed()||(this.createSessionNumRetriesPerformed<this.config.retries?this.createSessionRetry():(this.consoleLog("Too many create session failures, failing upload"),this.sessionErrorHandler(e,H,JSON.stringify(e))))}),U(this,"getSessionInfo",async()=>{const e=this.getBaseUploadUrl(),t="".concat(e,"/files/upload_sessions/").concat(this.sessionId);try{const e=await this.xhr.get({url:t});this.getSessionSuccessHandler(e.data)}catch(e){this.getSessionErrorHandler(e)}}),U(this,"partUploadSuccessHandler",e=>{this.numPartsUploading-=1,this.numPartsUploaded+=1,this.updateProgress(e.uploadedBytes,this.partSize),this.processNextParts()}),U(this,"partUploadErrorHandler",(e,t)=>{if(this.sessionErrorHandler(e,W,t),this.isResumableUploadsEnabled){let e=this.firstUnuploadedPartIndex;for(;this.numPartsUploading>0;){const t=this.parts[e];t&&t.state===j&&(t.reset(),t.pause(),this.numPartsUploading-=1,this.numPartsDigestReady+=1),e+=1}}}),U(this,"updateProgress",(e,t)=>{this.isDestroyed()||(this.totalUploadedBytes+=t-e,this.progressCallback({loaded:this.totalUploadedBytes,total:this.file.size}))}),U(this,"processNextParts",()=>{if(!this.failSessionIfFileChangeDetected())if(this.numPartsUploaded===this.parts.length&&this.fileSha1)this.commitSession();else{for(this.updateFirstUnuploadedPartIndex();this.canStartMorePartUploads();)this.uploadNextPart();this.shouldComputeDigestForNextPart()&&this.computeDigestForNextPart()}}),U(this,"onWorkerMessage",e=>{if(this.isDestroyed())return;const{data:t}=e;if("partDone"===t.type){this.numPartsDigestComputing-=1;const{part:e}=t;this.parts[e.index].timing.fileDigestTime=t.duration,this.processNextParts()}else"done"===t.type?(this.fileSha1=function(e){return btoa(String.fromCharCode.apply(null,e.replace(/\r|\n/g,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")))}(t.sha1),this.sha1Worker.terminate(),this.processNextParts()):"error"===t.type&&this.sessionErrorHandler(null,q,JSON.stringify(t))}),U(this,"sendPartToWorker",(e,t)=>{if(this.isDestroyed())return;const n={index:e.index,offset:e.offset,size:e.partSize};this.sha1Worker.postMessage({part:n,fileSize:this.file.size,partContents:t},[t]),this.consoleLog("Part sent to worker: ".concat(JSON.stringify(e),".}"))}),U(this,"onPartDigestError",(e,t)=>{if(this.consoleLog("Error computing digest for part ".concat(JSON.stringify(t),": ").concat(JSON.stringify(e))),"NotFoundError"===e.name||"NOT_FOUND_ERR"===e.name)return void this.sessionErrorHandler(null,G,JSON.stringify(e));if(this.failSessionIfFileChangeDetected())return;if(t.numDigestRetriesPerformed>=this.config.retries)return void this.sessionErrorHandler(null,Q,JSON.stringify(e));const n=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,t.numDigestRetriesPerformed);t.numDigestRetriesPerformed+=1,this.consoleLog("Retrying digest work for part ".concat(JSON.stringify(t)," in ").concat(n," ms")),setTimeout(()=>{this.computeDigestForPart(t)},n)}),U(this,"commitSession",()=>{if(this.isDestroyed())return;const e={totalPartReadTime:0,totalPartDigestTime:0,totalFileDigestTime:0,totalPartUploadTime:0},t={parts:this.parts.map(t=>(e.totalPartReadTime+=t.timing.readTime,e.totalPartDigestTime+=t.timing.subtleCryptoTime,e.totalFileDigestTime+=t.timing.fileDigestTime,e.totalPartUploadTime+=t.timing.uploadTime,t.getPart())).sort((e,t)=>e.offset-t.offset),attributes:{}},n=Object(l.k)(this.file);n&&(t.attributes.content_modified_at=n),this.fileDescription&&(t.attributes.description=this.fileDescription);const r={avg_part_read_time:Math.round(e.totalPartReadTime/this.parts.length),avg_part_digest_time:Math.round(e.totalPartDigestTime/this.parts.length),avg_file_digest_time:Math.round(e.totalFileDigestTime/this.parts.length),avg_part_upload_time:Math.round(e.totalPartUploadTime/this.parts.length)},i=this.fileSha1,o={Digest:"sha=".concat(i),"X-Box-Client-Event-Info":JSON.stringify(r)};this.xhr.post({url:this.sessionEndpoints.commit,data:t,headers:o}).then(this.commitSessionSuccessHandler).catch(this.commitSessionErrorHandler)}),U(this,"commitSessionSuccessHandler",e=>{if(this.isDestroyed())return;const{status:t,data:n}=e;if(202===t)return void this.commitSessionRetry(e);let{entries:r}=n;!r&&n.id&&(r=[n]),this.destroy(),this.successCallback&&r&&this.successCallback(r)}),U(this,"commitSessionErrorHandler",e=>{if(this.isDestroyed())return;const{response:t}=e;if(t)return this.commitRetryCount>=this.config.retries?(this.consoleLog("Too many commit failures, failing upload"),void this.sessionErrorHandler(e,K,JSON.stringify(e))):void this.commitSessionRetry(t);this.consoleError(e)}),U(this,"getNumPartsUploading",()=>this.numPartsUploading),this.parts=[],this.options=e,this.fileSha1=null,this.totalUploadedBytes=0,this.numPartsNotStarted=0,this.numPartsDigestComputing=0,this.numPartsDigestReady=0,this.numPartsUploading=0,this.numPartsUploaded=0,this.firstUnuploadedPartIndex=0,this.createSessionNumRetriesPerformed=0,this.partSize=0,this.commitRetryCount=0,this.clientId=null,this.isResumableUploadsEnabled=!1,this.numResumeRetries=0}reset(){this.parts=[],this.fileSha1=null,this.totalUploadedBytes=0,this.numPartsNotStarted=0,this.numPartsDigestComputing=0,this.numPartsDigestReady=0,this.numPartsUploading=0,this.numPartsUploaded=0,this.firstUnuploadedPartIndex=0,this.createSessionNumRetriesPerformed=0,this.partSize=0,this.commitRetryCount=0,this.numResumeRetries=0}setFileInfo(e){let{file:t,folderId:n,errorCallback:r,progressCallback:i,successCallback:a,overwrite:s=!0,conflictCallback:l,fileId:c}=e;this.file=t,this.fileName=this.file.name,this.folderId=n,this.errorCallback=r||o.a,this.progressCallback=i||o.a,this.successCallback=a||o.a,this.overwrite=s,this.conflictCallback=l,this.fileId=c}upload(e){let{file:t,fileDescription:n,folderId:r,errorCallback:i,progressCallback:a,successCallback:s,overwrite:c=!0,conflictCallback:u,fileId:d}=e;this.file=t,this.fileName=this.file.name,this.initialFileSize=this.file.size,this.initialFileLastModified=Object(l.k)(this.file),this.folderId=r,this.errorCallback=i||o.a,this.progressCallback=a||o.a,this.successCallback=s||o.a,this.sha1Worker=m(),this.sha1Worker.addEventListener("message",this.onWorkerMessage),this.conflictCallback=u,this.overwrite=c,this.fileId=d,this.fileDescription=n,this.makePreflightRequest()}createSessionRetry(){const e=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,this.createSessionNumRetriesPerformed);this.createSessionNumRetriesPerformed+=1,this.consoleLog("Retrying create session in ".concat(e," ms")),this.createSessionTimeout=setTimeout(this.makePreflightRequest,e)}createSessionSuccessHandler(e){if(this.isDestroyed())return;const{id:t,part_size:n,session_endpoints:r}=e;this.sessionId=t,this.partSize=n,this.sessionEndpoints=z({},this.sessionEndpoints,{uploadPart:r.upload_part,listParts:r.list_parts,commit:r.commit,abort:r.abort,logEvent:r.log_event}),this.populateParts(),this.processNextParts()}resume(e){let{file:t,folderId:n,errorCallback:r,progressCallback:i,sessionId:o,successCallback:a,overwrite:s=!0,conflictCallback:l,fileId:c}=e;this.setFileInfo({file:t,folderId:n,errorCallback:r,progressCallback:i,successCallback:a,conflictCallback:l,overwrite:s,fileId:c}),this.sessionId=o,this.sha1Worker||(this.sha1Worker=m()),this.sha1Worker.addEventListener("message",this.onWorkerMessage),this.getSessionInfo()}getSessionSuccessHandler(e){const{part_size:t,session_endpoints:n}=e;this.partSize=t,this.sessionEndpoints=z({},this.sessionEndpoints,{uploadPart:n.upload_part,listParts:n.list_parts,commit:n.commit,abort:n.abort,logEvent:n.log_event}),this.processNextParts()}getSessionErrorHandler(e){if(this.isDestroyed())return;const t=this.getErrorResponse(e);if(this.numResumeRetries>this.config.retries)this.errorCallback(t);else if(t&&429===t.status){let e=b.hb;if(t.headers){const n=parseInt(t.headers["retry-after"]||t.headers.get("Retry-After"),10);s()(n)||(e=n*b.Ke)}this.retryTimeout=setTimeout(this.getSessionInfo,e),this.numResumeRetries+=1}else if(t&&t.status>=400&&t.status<500){this.parts.forEach(e=>{e.cancel()}),this.reset(),clearTimeout(this.createSessionTimeout),clearTimeout(this.commitSessionTimeout),this.abortSession();const e={file:this.file,folderId:this.folderId,errorCallback:this.errorCallback,progressCallback:this.progressCallback,successCallback:this.successCallback,overwrite:this.overwrite,fileId:this.fileId};this.upload(e)}else this.retryTimeout=setTimeout(this.getSessionInfo,2**this.numResumeRetries*b.Ke),this.numResumeRetries+=1}async sessionErrorHandler(e,t,n){this.isResumableUploadsEnabled||this.destroy();const r=this.getErrorResponse(e);this.errorCallback(r);try{if(!this.sessionEndpoints.logEvent)throw new Error("logEvent endpoint not found");await Object(c.a)((e,r)=>{this.logEvent(t,n).then(e).catch(r)},this.config.retries,this.config.initialRetryDelayMs),this.isResumableUploadsEnabled||this.abortSession()}catch(e){this.isResumableUploadsEnabled||this.abortSession()}}abortSession(){this.sha1Worker&&this.sha1Worker.terminate(),this.sessionEndpoints.abort&&this.sessionId&&this.xhr.delete({url:this.sessionEndpoints.abort}).then(()=>{this.sessionId=""})}shouldComputeDigestForNextPart(){return!this.isDestroyed()&&0===this.numPartsDigestComputing&&this.numPartsNotStarted>0&&this.numPartsDigestReady<this.config.digestReadahead}computeDigestForNextPart(){for(let e=this.firstUnuploadedPartIndex;e<this.parts.length;e+=1){const t=this.parts[e];if(t.state===D)return this.numPartsNotStarted-=1,this.numPartsDigestComputing+=1,void this.computeDigestForPart(t)}}async computeDigestForPart(e){const t=this.file.slice(e.offset,e.offset+this.partSize),n=new window.FileReader,r=Date.now();try{const{buffer:i,readCompleteTimestamp:o}=await this.readFile(n,t),a=await f("SHA-256",i),s=btoa([].reduce.call(new Uint8Array(a),(e,t)=>e+String.fromCharCode(t),""));this.sendPartToWorker(e,i),e.sha256=s,e.state=R,e.blob=t,this.numPartsDigestReady+=1;const l=Date.now();e.timing={partDigestTime:l-r,readTime:o-r,subtleCryptoTime:l-o},this.processNextParts()}catch(t){this.onPartDigestError(t,e)}}commitSessionRetry(e){const{status:t,headers:n}=e;let r=b.hb;if(n){const e=parseInt(n["retry-after"],10);Number.isNaN(e)||(r=1e3*e)}const i=Object(l.a)(this.config.initialRetryDelayMs,this.config.maxRetryDelayMs,this.commitRetryCount);202!==t&&(this.commitRetryCount+=1);const o=r||i;this.consoleLog("Retrying commit in ".concat(o," ms")),this.commitSessionTimeout=setTimeout(this.commitSession,o)}uploadNextPart(){for(let e=this.firstUnuploadedPartIndex;e<this.parts.length;e+=1){const t=this.parts[e];if(t.state===R){this.numPartsDigestReady-=1,this.numPartsUploading+=1,t.isPaused?t.unpause():t.upload();break}}}canStartMorePartUploads(){return!this.isDestroyed()&&this.numPartsUploading<this.config.parallelism&&this.numPartsDigestReady>0}updateFirstUnuploadedPartIndex(){let e=this.parts[this.firstUnuploadedPartIndex];for(;e&&e.state===N;)this.firstUnuploadedPartIndex+=1,e=this.parts[this.firstUnuploadedPartIndex]}populateParts(){this.numPartsNotStarted=Math.ceil(this.file.size/this.partSize);for(let e=0;e<this.numPartsNotStarted;e+=1){const t=e*this.partSize,n=Math.min(t+this.partSize,this.file.size)-t,r=new L(this.options,e,t,n,this.file.size,this.sessionId,this.sessionEndpoints,this.config,this.getNumPartsUploading,this.partUploadSuccessHandler,this.updateProgress,this.partUploadErrorHandler);this.parts.push(r)}}failSessionIfFileChangeDetected(){const e=this.file.size,t=Object(l.k)(this.file);if(e!==this.initialFileSize||t!==this.initialFileLastModified){const n=JSON.stringify({oldSize:this.initialFileSize,newSize:e,oldLastModified:this.initialFileLastModified,newLastModified:t});return g.a.isIE()?(this.sessionErrorHandler(null,V,n),!0):(this.consoleLog("file properties changed during upload: ".concat(n)),!1)}return!1}cancel(){this.isDestroyed()||(this.parts.forEach(e=>{e.cancel()}),this.parts=[],clearTimeout(this.createSessionTimeout),clearTimeout(this.commitSessionTimeout),this.abortSession(),this.destroy())}async resolveConflict(e){if(this.overwrite&&e.context_info)return void(this.fileId=e.context_info.conflicts.id);if(this.conflictCallback)return void(this.fileName=this.conflictCallback(this.fileName));const t=this.fileName.substr(this.fileName.lastIndexOf("."))||"";this.fileName="".concat(this.fileName.substr(0,this.fileName.lastIndexOf(".")),"-").concat(Date.now()).concat(t)}getErrorResponse(e){if(!e)return{};const{response:t}=e;return t?401===t.status?t:t.data:{}}};function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const X="Content-MD5";var Z=class extends x{constructor(){super(...arguments),$(this,"uploadSuccessHandler",e=>{let{data:t}=e;const{entries:n}=t;this.isDestroyed()||"function"==typeof this.successCallback&&this.successCallback(n)}),$(this,"uploadProgressHandler",e=>{this.isDestroyed()||"function"==typeof this.progressCallback&&this.progressCallback(e)}),$(this,"preflightSuccessHandler",async e=>{let{data:t}=e;if(this.isDestroyed())return;let n=t.upload_url;n||(n="".concat(this.getBaseUploadUrl(),"/files/content"),this.fileId&&(n=n.replace("content","".concat(this.fileId,"/content"))));const r={url:n,data:{attributes:JSON.stringify({name:this.fileName,parent:{id:this.folderId},description:this.fileDescription,content_modified_at:Object(l.k)(this.file)}),file:this.file},headers:{},successHandler:this.uploadSuccessHandler,errorHandler:this.preflightErrorHandler,progressHandler:this.uploadProgressHandler},i=await this.computeSHA1(this.file);i&&(r.headers={[X]:i}),this.xhr.uploadFile(r)})}upload(e){let{folderId:t,fileId:n,file:r,fileDescription:i,successCallback:a=o.a,errorCallback:s=o.a,progressCallback:l=o.a,conflictCallback:c,overwrite:u=!0}=e;this.isDestroyed()||(this.folderId=t,this.fileId=n,this.file=r,this.fileDescription=i,this.fileName=this.file.name,this.successCallback=a,this.errorCallback=s,this.progressCallback=l,this.overwrite=u,this.conflictCallback=c,this.makePreflightRequest())}cancel(){this.isDestroyed()||(clearTimeout(this.retryTimeout),this.destroy())}async computeSHA1(e){let t="";try{const n=new window.FileReader,{buffer:r}=await this.readFile(n,e),i=await f("SHA-1",r);t=Array.from(new Uint8Array(i)).map(e=>"00".concat(e.toString(16)).slice(-2)).join("")}catch(e){}return t}},J=n(75),ee=n(55),te=n(61),ne=n(81),re=n(18),ie=n(7);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class le extends C.a{constructor(){super(...arguments),se(this,"searchSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const{entries:n,total_count:r,limit:i,offset:o}=t;if(!Array.isArray(n)||"number"!=typeof r||"number"!=typeof i||"number"!=typeof o)throw Object(ie.a)();const a=Object(ne.a)(n,new J.a(this.options),new ee.a(this.options),new te.a(this.options));this.itemCache=(this.itemCache||[]).concat(a),this.getCache().set(this.key,{item_collection:ae({},t,{entries:this.itemCache})}),this.finish()}),se(this,"searchErrorHandler",e=>{this.isDestroyed()||this.errorCallback(e,this.errorCode)})}getEncodedQuery(e){return encodeURIComponent(e)}getCacheKey(e,t){return"".concat(b.t).concat(e,"|").concat(t)}getUrl(){return"".concat(this.getBaseApiUrl(),"/search")}isLoaded(){return this.getCache().has(this.key)}finish(){if(this.isDestroyed())return;const e=this.getCache(),t=e.get(this.key),{item_collection:n}=t;if(!n)throw Object(ie.a)();const{entries:r,total_count:i}=n;if(!Array.isArray(r)||"number"!=typeof i)throw Object(ie.a)();const o={id:this.id,items:r.map(t=>e.get(t)),offset:this.offset,percentLoaded:100,sortBy:b.vd,sortDirection:b.Lf,totalCount:i};this.successCallback(o)}searchRequest(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isDestroyed())return Promise.reject();const{fields:t}=e,n=t||re.g;return this.errorCode=b.nc,this.xhr.get({url:this.getUrl(),params:{offset:this.offset,query:this.query,ancestor_folder_ids:this.id,limit:this.limit,fields:n.toString()},headers:n.includes(b.xd)?{"X-Rep-Hints":b.Eg}:{}}).then(this.searchSuccessHandler).catch(this.searchErrorHandler)}search(e,t,n,r,i,o){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.isDestroyed()||(this.limit=n,this.offset=r,this.query=t,this.id=e,this.key=this.getCacheKey(e,this.getEncodedQuery(this.query)),this.successCallback=i,this.errorCallback=o,a.forceFetch&&this.getCache().unset(this.key),this.isLoaded()?this.finish():this.searchRequest(a))}}var ce=le;function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class he extends C.a{constructor(){super(...arguments),de(this,"recentsSuccessHandler",e=>{let{data:t}=e;if(this.isDestroyed())return;const{entries:n,order:{by:r,direction:i}}=t,o=[];n.forEach(e=>{let{item:t,interacted_at:n}=e;const{path_collection:r}=t;(this.id===b.ib||!!r&&-1!==r.entries.findIndex(e=>e.id===this.id))&&o.push(ue(t,{interacted_at:n}))});const a=Object(ne.a)(o,new J.a(this.options),new ee.a(this.options),new te.a(this.options));this.getCache().set(this.key,{item_collection:{entries:a,order:[{by:r,direction:i}]}}),this.finish()}),de(this,"recentsErrorHandler",e=>{this.isDestroyed()||this.errorCallback(e,this.errorCode)})}getCacheKey(e){return"".concat(b.s).concat(e)}getUrl(){return"".concat(this.getBaseApiUrl(),"/recent_items")}finish(){if(this.isDestroyed())return;const e=this.getCache(),t=e.get(this.key),{item_collection:n}=t;if(!n)throw Object(ie.a)();const{entries:r}=n;if(!Array.isArray(r))throw Object(ie.a)();const i={id:this.id,items:r.map(t=>e.get(t)),percentLoaded:100,sortBy:b.Tc,sortDirection:b.Lf};this.successCallback(i)}recentsRequest(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isDestroyed())return Promise.reject();const{fields:t}=e,n=t||re.g;return this.errorCode=b.Wb,this.xhr.get({url:this.getUrl(),params:{fields:n.toString()},headers:n.includes(b.xd)?{"X-Rep-Hints":b.Eg}:{}}).then(this.recentsSuccessHandler).catch(this.recentsErrorHandler)}recents(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.isDestroyed())return;this.id=e,this.successCallback=t,this.errorCallback=n;const i=this.getCache();this.key=this.getCacheKey(this.id),r.forceFetch&&i.unset(this.key),i.has(this.key)?this.finish():this.recentsRequest(r)}}var fe=he,pe=n(20);function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class be extends C.a{getQueryParameters(e,t,n){const r={offset:e,limit:t};return n&&n.length>0&&(r.fields=n.toString()),r}hasMoreItems(e,t){return void 0===t||e<t}async offsetGetRequest(e,t,n,r,i){if(!this.isDestroyed())try{const o=this.getQueryParameters(t,n,i),a=this.getUrl(e),{data:s}=await this.xhr.get({url:a,id:Object(pe.b)(e),params:o}),l=this.data?this.data.entries:[];this.data=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s,{entries:l.concat(s.entries)});const c=s.total_count,u=t+n;if(r&&this.hasMoreItems(u,c))return void this.offsetGetRequest(e,u,n,r,i);this.successHandler(this.data)}catch(e){this.errorHandler(e)}}async offsetGet(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b.T,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.S,o=arguments.length>5?arguments[5]:void 0,a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];return this.successCallback=t,this.errorCallback=n,this.offsetGetRequest(e,r,i,a,o)}}var ve=be;function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Se=class extends ve{constructor(){super(...arguments),Ce(this,"successHandler",e=>{this.isDestroyed()||"function"!=typeof this.successCallback||this.successCallback(e)})}getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/versions")}getVersionUrl(e,t){if(!t)throw new Error("Missing version id!");return"".concat(this.getUrl(e),"/").concat(t)}addPermissions(e,t){if(!e)return e;const{entries:n,total_count:r}=e,i=y()(t,["permissions",b.hf],!1);return{entries:n.map(e=>{let{permissions:t}=e;return we({},Ee(e,["permissions"]),{permissions:we({can_upload:i},t)})}),total_count:r}}deleteVersion(e){let{errorCallback:t,fileId:n,permissions:r,successCallback:i,versionId:o}=e;this.errorCode=b.Eb;try{this.checkApiCallValidity(b.af,r,n)}catch(e){return void t(e,this.errorCode)}this.delete({id:n,url:this.getVersionUrl(n,o),successCallback:i,errorCallback:t})}getVersions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b.T,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.S,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:re.e,a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];this.errorCode=b.cc,this.offsetGet(e,t,n,r,i,o,a)}getVersion(e,t,n,r){this.errorCode=b.bc,this.get({id:e,successCallback:n,errorCallback:r,url:this.getVersionUrl(e,t),requestData:{params:{fields:re.e.toString()}}})}addCurrentVersion(e,t,n){if(!e)return t||{entries:[],total_count:0};if(!t)return{entries:[e],total_count:1};const r=y()(n,"restored_from.id"),i=t.entries.find(e=>e.id===r);return i&&(e.version_promoted=i.version_number),{entries:[...t.entries,e],total_count:t.total_count+1}}promoteVersion(e){let{errorCallback:t,fileId:n,permissions:r,successCallback:i,versionId:o}=e;this.errorCode=b.kc;try{this.checkApiCallValidity(b.hf,r,n)}catch(e){return void t(e,this.errorCode)}this.post({id:n,data:{data:{id:o,type:"file_version"}},url:this.getVersionUrl(n,"current"),successCallback:i,errorCallback:t})}restoreVersion(e){let{errorCallback:t,fileId:n,permissions:r,successCallback:i,versionId:o}=e;this.errorCode=b.mc;try{this.checkApiCallValidity(b.af,r,n)}catch(e){return void t(e,this.errorCode)}this.put({id:n,data:{data:{trashed_at:null}},url:this.getVersionUrl(n,o),successCallback:i,errorCallback:t})}};function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=class extends ve{constructor(){super(...arguments),_e(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;if(!e)return void this.successCallback();if(!e.entries)return void this.successCallback(this.format(e));const t=e.entries.map(this.format);this.successCallback(ke({},e,{entries:t}))})}getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/comments")}commentsUrl(e){const t="".concat(this.getBaseApiUrl(),"/comments");return e?"".concat(t,"/").concat(e):t}format(e){return ke({},e,{tagged_message:""!==e.tagged_message?e.tagged_message:e.message})}createComment(e){let{file:t,message:n,taggedMessage:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.qb;const{id:a="",permissions:s}=t;try{this.checkApiCallValidity(b.Ye,s,a)}catch(e){return void o(e,this.errorCode)}const l={data:{item:{id:a,type:"file"},message:n,tagged_message:r},params:{fields:re.b.toString()}};this.post({id:a,url:this.commentsUrl(),data:l,successCallback:i,errorCallback:o})}updateComment(e){let{file:t,commentId:n,message:r,tagged_message:i,permissions:o,successCallback:a,errorCallback:s}=e;this.errorCode=b.rc;const{id:l=""}=t;try{this.checkApiCallValidity(b.cf,o,l)}catch(e){return void s(e,this.errorCode)}const c={data:{message:r,tagged_message:i}};this.put({id:l,url:this.commentsUrl(n),data:c,successCallback:a,errorCallback:s})}deleteComment(e){let{file:t,commentId:n,permissions:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.zb;const{id:a=""}=t;try{this.checkApiCallValidity(b.af,r,a)}catch(e){return void o(e,this.errorCode)}this.delete({id:a,url:this.commentsUrl(n),successCallback:i,errorCallback:o})}getComments(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:re.b,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0;this.errorCode=b.Mb;try{this.checkApiCallValidity(b.Ye,t,e)}catch(e){return void r(e,this.errorCode)}this.offsetGet(e,n,r,o,a,i,s)}};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const Te=[b.we,b.te,b.ve,b.pe,b.xe,b.se];class Me extends C.a{constructor(e){let{retryableStatusCodes:t=Te}=e;super(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Ae(e,["retryableStatusCodes"]),{retryableStatusCodes:t}))}}var De=Me;function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){Ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Fe=class extends De{getUrlForFileTasks(e){return"".concat(this.getBaseApiUrl(),"/undoc/files/").concat(e,"/linked_tasks?limit=").concat(b.l)}getUrlForTaskCreateWithDeps(){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/with_dependencies")}getUrlForTask(e){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/").concat(e)}getUrlForTaskWithDeps(e){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/").concat(e,"/with_dependencies")}updateTaskWithDeps(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.uc;const o=i.addedAssignees.map(e=>({op:e.item&&"group"===e.item.type?"add_task_collaborators_expand_group":"add_task_collaborator",payload:{target:{type:e.item&&"group"===e.item.type?"group":"user",id:e.id}}})),a=i.removedAssignees.map(e=>({op:"delete_task_collaborator",id:e.id})),{id:s,addedAssignees:l,removedAssignees:c}=i,u=Le(i,["id","addedAssignees","removedAssignees"]);this.put({id:n.id,url:this.getUrlForTaskWithDeps(i.id),data:{data:[{op:"update_task",payload:je({},u)},...o,...a]},successCallback:r,errorCallback:t})}deleteTask(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.Cb,this.delete({id:n.id,url:this.getUrlForTask(i.id),successCallback:r,errorCallback:t})}getTasksForFile(e){let{errorCallback:t,file:n,successCallback:r}=e;this.errorCode=b.Zb,this.get({id:n.id,url:this.getUrlForFileTasks(n.id),successCallback:r,errorCallback:t})}getTask(e){let{errorCallback:t,file:n,id:r,successCallback:i}=e;this.errorCode=b.Zb,this.get({id:n.id,url:this.getUrlForTask(r),successCallback:i,errorCallback:t})}createTaskWithDeps(e){let{errorCallback:t,file:n,successCallback:r,task:i,assignees:o}=e;this.errorCode=b.ub;const a=o.map(e=>({target:{type:e.item&&"group"===e.item.type?"group":"user",id:e.id}})),s=[{target:{id:n.id,type:"file"}}],l={task:je({},i),assigned_to:a,task_links:s};this.post({id:n.id,url:this.getUrlForTaskCreateWithDeps(),data:{data:je({},l)},successCallback:r,errorCallback:t})}},ze=n(21),Ue=n.n(ze);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var We=class extends De{getUrlForTaskCollaborators(e){return"".concat(this.getBaseApiUrl(),"/undoc/tasks/").concat(e,"/task_collaborators?role=ASSIGNEE&limit=").concat(b.l)}getUrlForTaskCollaboratorCreate(){return"".concat(this.getBaseApiUrl(),"/undoc/task_collaborators")}getUrlForTaskCollaborator(e){return"".concat(this.getBaseApiUrl(),"/undoc/task_collaborators/").concat(e)}getUrlForTaskGroupCreate(){return"".concat(this.getBaseApiUrl(),"/undoc/task_collaborators/expand_group")}createTaskCollaborator(e){let{errorCallback:t,file:n,successCallback:r,task:i,user:o}=e;this.errorCode=b.vb;const a={data:{task:{type:"task",id:i.id},target:{type:"user",id:o.id}}};this.post({id:n.id,url:this.getUrlForTaskCollaboratorCreate(),data:He({},a),successCallback:r,errorCallback:t})}createTaskCollaboratorsforGroup(e){let{errorCallback:t,file:n,successCallback:r,task:i,group:o}=e;this.errorCode=b.vb;const a={data:{task:{type:"task",id:i.id},target:{type:"group",id:o.id}}};this.post({id:n.id,url:this.getUrlForTaskGroupCreate(),data:He({},a),successCallback:r,errorCallback:t})}getTaskCollaborators(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.ac;const o=this.getUrlForTaskCollaborators(i.id);this.get({id:n.id,successCallback:r,errorCallback:t,url:o})}updateTaskCollaborator(e){let{errorCallback:t,file:n,successCallback:r,taskCollaborator:i}=e;this.errorCode=b.vc;const o={data:Ue()(i,"id")};this.put({id:n.id,url:this.getUrlForTaskCollaborator(i.id),data:He({},o),successCallback:r,errorCallback:t})}deleteTaskCollaborator(e){let{errorCallback:t,file:n,successCallback:r,taskCollaborator:i}=e;this.errorCode=b.Db,this.delete({id:n.id,url:this.getUrlForTaskCollaborator(i.id),successCallback:r,errorCallback:t})}};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){Ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qe=class extends De{getUrlForTaskLinkCreate(){return"".concat(this.getBaseApiUrl(),"/undoc/task_links")}createTaskLink(e){let{errorCallback:t,file:n,successCallback:r,task:i}=e;this.errorCode=b.wb;const o={data:{target:{id:n.id,type:"file"},task:{id:i.id,type:"task"}}};this.post({id:n.id,url:this.getUrlForTaskLinkCreate(),data:qe({},o),successCallback:r,errorCallback:t})}};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ze extends C.a{hasMoreItems(e){return null!==e&&""!==e}async markerGetRequest(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDestroyed())try{const o=this.getUrl(e),a=$e({},i,{marker:t,limit:n}),{data:s}=await this.xhr.get({url:o,id:Object(pe.b)(e),params:a}),l=this.data?this.data.entries:[];this.data=$e({},s,{entries:l.concat(s.entries)});const c=s.next_marker;if(r&&this.hasMoreItems(c))return void this.markerGetRequest(e,c,n,r,i);this.successHandler(this.data)}catch(e){this.errorHandler(e)}}async markerGet(e){let{id:t,successCallback:n,errorCallback:r,marker:i="",limit:o=1e3,requestData:a,shouldFetchAll:s=!0}=e;return this.successCallback=n,this.errorCallback=r,this.markerGetRequest(t,i,o,s,a)}}var Je=Ze;function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nt=e=>{const t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{tagged_message:e.message});return e.replies&&e.replies.length&&(t.replies=e.replies.map(nt)),t};function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var at=class extends Je{constructor(){super(...arguments),ot(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;if(!e)return void this.successCallback();if(!e.entries)return void this.successCallback(nt(e));const t=e.entries.map(nt);this.successCallback(it({},e,{entries:t}))})}getUrl(e){return"".concat(this.getBaseApiUrl(),"/undoc/comments").concat(e?"?file_id=".concat(e):"")}getUrlForId(e){return"".concat(this.getUrl(),"/").concat(e)}getUrlWithRepliesForId(e,t){return"".concat(this.getUrlForId(e),"/replies").concat(t?"?file_id=".concat(t):"")}createComment(e){let{file:t,message:n,successCallback:r,errorCallback:i}=e;this.errorCode=b.qb;const{id:o,permissions:a}=t;try{this.checkApiCallValidity(b.Ye,a,o)}catch(e){return void i(e,this.errorCode)}this.post({id:o,url:this.getUrl(o),data:{data:{message:n}},successCallback:r,errorCallback:i})}updateComment(e){let{fileId:t,commentId:n,status:r,message:i,permissions:o,successCallback:a,errorCallback:s}=e;if(this.errorCode=b.rc,i)try{this.checkApiCallValidity(b.cf,o,t)}catch(e){return void s(e,this.errorCode)}if(r)try{this.checkApiCallValidity(b.ff,o,t)}catch(e){return void s(e,this.errorCode)}const l={data:{status:r,message:i}};this.put({id:t,url:this.getUrlForId(n),data:l,successCallback:a,errorCallback:s})}deleteComment(e){let{fileId:t,commentId:n,permissions:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.zb;try{this.checkApiCallValidity(b.af,r,t)}catch(e){return void o(e,this.errorCode)}this.delete({id:t,url:this.getUrlForId(n),successCallback:i,errorCallback:o})}getComment(e){let{commentId:t,errorCallback:n,fileId:r,permissions:i,successCallback:o}=e;this.errorCode=b.Lb;try{this.checkApiCallValidity(b.Ye,i,r)}catch(e){return void n(e,this.errorCode)}this.get({id:r,errorCallback:n,successCallback:o,url:this.getUrlForId(t)})}getComments(e){let{fileId:t,permissions:n,successCallback:r,errorCallback:i,marker:o,limit:a,shouldFetchAll:s,repliesCount:l}=e;this.errorCode=b.Mb;try{this.checkApiCallValidity(b.Ye,n,t)}catch(e){return void i(e,this.errorCode)}this.markerGet({id:t,successCallback:r,errorCallback:i,marker:o,limit:a,requestData:it({},l?{replies_count:l}:null),shouldFetchAll:s})}getCommentReplies(e){let{fileId:t,commentId:n,permissions:r,successCallback:i,errorCallback:o}=e;this.errorCode=b.Xb;try{this.checkApiCallValidity(b.Ye,r,t)}catch(e){return void o(e,this.errorCode)}this.get({id:t,errorCallback:o,successCallback:i,url:this.getUrlWithRepliesForId(n)})}createCommentReply(e){let{fileId:t,commentId:n,permissions:r,successCallback:i,errorCallback:o,message:a}=e;this.errorCode=b.tb;try{this.checkApiCallValidity(b.Ye,r,t)}catch(e){return void o(e,this.errorCode)}this.post({id:t,data:{data:{message:a}},errorCallback:o,successCallback:i,url:this.getUrlWithRepliesForId(n,t)})}};class st extends C.a{getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/file_access_stats/").concat(e)}getFileAccessStats(e,t,n){this.errorCode=b.Hb,this.get({id:e,successCallback:t,errorCallback:n})}}var lt=st;function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ht=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="/file_activities?file_id=".concat(e),i=!!t&&!!t.length,o=n?"true":"false",a="&enable_replies=".concat(o,"&reply_limit=").concat(1),s=i?"&activity_types=".concat(t.join()):"";return"".concat(r).concat(s).concat(a)};class ft extends C.a{getFilteredUrl(e,t,n){return"".concat(this.getBaseApiUrl()).concat(ht(e,t,n))}getActivities(e){let{activityTypes:t,errorCallback:n,fileID:r,permissions:i,repliesCount:o,shouldShowReplies:a,successCallback:s}=e;this.errorCode=b.Ib;try{if(!r)throw new Error("Missing file id!");t.includes(b.Ud)&&this.checkApiCallValidity(b.Ye,i,r),t.includes(b.Sd)&&this.checkApiCallValidity(b.if,i,r)}catch(e){return void n(e,this.errorCode)}this.get({id:r,successCallback:s,errorCallback:n,requestData:ut({},o?{replies_count:o}:null),url:this.getFilteredUrl(r,t,a)})}}var pt=ft;function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){bt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vt=class extends Je{getUrl(){return"".concat(this.getBaseApiUrl(),"/groups")}getGroupsInEnterprise(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.cb;this.errorCode=b.Ob,this.markerGet({id:e,limit:i,successCallback:t,errorCallback:n,requestData:gt({usemarker:!0},r),shouldFetchAll:!1})}};function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ct=class extends Je{getUrl(){return"".concat(this.getBaseApiUrl(),"/users")}getUsersInEnterprise(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.cb;this.errorCode=b.Pb,this.markerGet({id:e,limit:i,successCallback:t,errorCallback:n,requestData:wt({usemarker:!0},r),shouldFetchAll:!1})}};class St extends C.a{getUrlForGroupCount(e){return"".concat(this.getBaseApiUrl(),"/groups/").concat(e,"/memberships")}getGroupCount(e){let{errorCallback:t=o.a,successCallback:n=o.a,group:r,file:i}=e;return new Promise((e,o)=>this.get({id:i.id,url:this.getUrlForGroupCount(r.id),successCallback:function(){n(...arguments),e(...arguments)},errorCallback:function(){t(...arguments),o()},requestData:{params:{limit:1}}}))}}var Ot=St,kt=n(64),_t=n.n(kt),xt=n(63);class Pt extends C.a{getUrl(){return"".concat(this.getBaseApiUrl(),"/users/me")}getAvatarUrl(e){if(!e)throw new Error("Missing user id");return"".concat(this.getBaseApiUrl(),"/users/").concat(e,"/avatar")}async getAvatarUrlWithAccessToken(e,t){if(!e)return null;const n=this.getCache();if(n.has(e))return n.get(e);const r=await xt.a.getReadToken(Object(pe.b)(t),this.options.token);if("string"==typeof r){const t={access_token:r,pic_type:"large"},i=_t.a.stringify(t),o="".concat(this.getAvatarUrl(e),"?").concat(i);return n.set(e,o),o}return null}getUser(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.errorCode=b.Nb,this.get({id:e,successCallback:t,errorCallback:n,requestData:r})}}var It=Pt,At=n(12),Tt=n.n(At);class Mt extends ee.a{getMetadataCacheKey(e){return"".concat(b.q).concat(e)}getSkillsCacheKey(e){return"".concat(this.getMetadataCacheKey(e),"_skills")}getClassificationCacheKey(e){return"".concat(this.getMetadataCacheKey(e),"_classification")}getMetadataUrl(e,t,n){const r="".concat(this.getUrl(e),"/metadata");return t&&n?"".concat(r,"/").concat(t,"/").concat(n):r}getMetadataTemplateUrl(){return"".concat(this.getBaseApiUrl(),"/metadata_templates")}getMetadataTemplateUrlForInstance(e){return"".concat(this.getMetadataTemplateUrl(),"?metadata_instance_id=").concat(e)}getMetadataTemplateSchemaUrl(e){return"".concat(this.getMetadataTemplateUrl(),"/enterprise/").concat(e,"/schema")}getMetadataTemplateUrlForScope(e){return"".concat(this.getMetadataTemplateUrl(),"/").concat(e)}getCustomPropertiesTemplate(){return{id:Tt()("metadata_template_"),scope:b.De,templateKey:b.Ge,hidden:!1}}createEditor(e,t,n){const r={};return Object.keys(e).forEach(t=>{t.startsWith("$")||(r[t]=e[t])}),{template:t,instance:{id:e.$id,canEdit:e.$canEdit&&n,data:r}}}async getTemplates(e,t,n){this.errorCode=b.Vb;let r={};const i=n?this.getMetadataTemplateUrlForInstance(n):this.getMetadataTemplateUrlForScope(t);try{r=await this.xhr.get({url:i,id:Object(pe.b)(e),params:{limit:b.Fe}})}catch(e){const{status:t}=e;if(Object(ie.e)(t))throw e}return y()(r,"data.entries",[])}getSchemaByTemplateKey(e){const t=this.getMetadataTemplateSchemaUrl(e);return this.xhr.get({url:t})}async getInstances(e){this.errorCode=b.Ub;let t={};try{t=await this.xhr.get({url:this.getMetadataUrl(e),id:Object(pe.b)(e)})}catch(e){const{status:t}=e;if(Object(ie.e)(t))throw e}return y()(t,"data.entries",[])}getUserAddableTemplates(e,t,n,r){let i=[];return n&&(i=r?[e]:[e].concat(t)),i.filter(e=>!e.hidden&&e.templateKey!==b.Ee)}extractClassification(e,t){const n=t.find(e=>e.$template===b.Ee);if(n){t.splice(t.indexOf(n),1);const r=this.getCache(),i=this.getClassificationCacheKey(e);r.set(i,n)}return t}async getTemplateForInstance(e,t,n){const r=t.$id,i=t.$template,o=t.$scope;let a=n.find(e=>e.templateKey===i&&e.scope===o);if(!a&&o.startsWith(b.Ce)){a=(await this.getTemplates(e,o,r))[0]}return a}async getEditors(e,t,n,r,i,o){const a=[n].concat(r,i),s=this.extractClassification(e,t),l=[];return await Promise.all(s.map(async t=>{const n=await this.getTemplateForInstance(e,t,a);n&&l.push(this.createEditor(t,n,o))})),l}async getMetadata(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{id:o,permissions:a,is_externally_owned:s}=e;if(this.errorCode=b.Ub,this.successCallback=t,this.errorCallback=n,!o||!a)return void this.errorHandler(Object(ie.a)());const l=this.getCache(),c=this.getMetadataCacheKey(o);if(i.forceFetch&&l.unset(c),!l.has(c)||(this.successHandler(l.get(c)),i.refreshCache))try{const e=this.getCustomPropertiesTemplate(),[t,n,i]=await Promise.all([this.getInstances(o),this.getTemplates(o,b.De),r?this.getTemplates(o,b.Ce):Promise.resolve([])]),u={editors:await this.getEditors(o,t,e,i,n,!!a.can_upload),templates:this.getUserAddableTemplates(e,i,r,s)};l.set(c,u),this.isDestroyed()||this.successHandler(u)}catch(e){this.errorHandler(e)}}async getSkills(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.errorCode=b.Yb;const{id:i}=e;if(!i)return void n(Object(ie.a)(),this.errorCode);const o=this.getCache(),a=this.getSkillsCacheKey(i);if(this.successCallback=t,this.errorCallback=n,r&&o.unset(a),o.has(a))return void this.successHandler(o.get(a));let s={data:y()(e,b.kd)};try{if(s.data||(s=await this.xhr.get({url:this.getMetadataUrl(i,b.De,b.He),id:Object(pe.b)(i)})),!this.isDestroyed()){const e=s.data.cards||[];o.set(a,e),this.successHandler(e)}}catch(e){this.errorHandler(e)}}async updateSkills(e,t,n,r){this.errorCode=b.tc;const{id:i,permissions:o}=e;if(i&&o)if(o.can_upload){this.successCallback=n,this.errorCallback=r;try{const e=await this.xhr.put({url:this.getMetadataUrl(i,b.De,b.He),headers:{[b.ie]:"application/json-patch+json"},id:Object(pe.b)(i),data:t});if(!this.isDestroyed()){const t=e.data.cards||[];this.merge(this.getCacheKey(i),b.kd,e.data),this.getCache().set(this.getSkillsCacheKey(i),t),this.successHandler(t)}}catch(e){this.errorHandler(e)}}else r(Object(ie.b)(),this.errorCode);else r(Object(ie.a)(),this.errorCode)}async updateMetadata(e,t,n,r,i){this.errorCode=b.sc,this.successCallback=r,this.errorCallback=i;const{id:o,permissions:a}=e;if(!o||!a)return void this.errorHandler(Object(ie.a)());const s=!!a.can_upload;if(s)try{const e=await this.xhr.put({url:this.getMetadataUrl(o,t.scope,t.templateKey),headers:{[b.ie]:"application/json-patch+json"},id:Object(pe.b)(o),data:n});if(!this.isDestroyed()){const n=this.getCache(),r=this.getMetadataCacheKey(o),i=n.get(r),a=this.createEditor(e.data,t,s);i&&i.editors&&i.editors.splice(i.editors.findIndex(e=>{let{instance:t}=e;return t.id===a.instance.id}),1,a),this.successHandler(a)}}catch(e){this.errorHandler(e)}else this.errorHandler(Object(ie.b)())}async createMetadata(e,t,n,r){if(this.errorCode=b.sb,!e||!t)return void r(Object(ie.a)(),this.errorCode);const{id:i,permissions:o,is_externally_owned:a}=e;if(!i||!o)return void r(Object(ie.a)(),this.errorCode);const s=!!o.can_upload,l=t.templateKey===b.Ge&&t.scope===b.De;if(!s||a&&!l)r(Object(ie.b)(),this.errorCode);else{this.successCallback=n,this.errorCallback=r;try{const e=await this.xhr.post({url:this.getMetadataUrl(i,t.scope,t.templateKey),id:Object(pe.b)(i),data:{}});if(!this.isDestroyed()){const n=this.getCache(),r=this.getMetadataCacheKey(i),o=n.get(r),a=this.createEditor(e.data,t,s);o.editors.push(a),this.successHandler(a)}}catch(e){this.errorHandler(e)}}}async deleteMetadata(e,t,n,r){if(this.errorCode=b.Bb,!e||!t)return void r(Object(ie.a)(),this.errorCode);const{scope:i,templateKey:o}=t,{id:a,permissions:s}=e;if(a&&s)if(s.can_upload){this.successCallback=n,this.errorCallback=r;try{if(await this.xhr.delete({url:this.getMetadataUrl(a,i,o),id:Object(pe.b)(a)}),!this.isDestroyed()){const e=this.getCache(),t=this.getMetadataCacheKey(a),n=e.get(t);n.editors.splice(n.editors.findIndex(e=>e.template.scope===i&&e.template.templateKey===o),1),this.successHandler()}}catch(e){this.errorHandler(e)}}else r(Object(ie.b)(),this.errorCode);else r(Object(ie.a)(),this.errorCode)}}var Dt=Mt;function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nt=class extends Je{constructor(){var e;super(...arguments),e=this,jt(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;const t=e.entries.map(e=>{let t;return"group"===e.type?t=e:(t=e).email=t.login,{id:e.id,name:e.name,item:t}});this.successCallback(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){jt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{entries:t}))}),jt(this,"getCollaboratorsWithQuery",(function(t,n,r,i){let{includeGroups:o=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};i&&""!==i.trim()&&e.getFileCollaborators(t,n,r,{filter_term:i,include_groups:o,include_uploader_collabs:!1})}))}getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/collaborators")}getFileCollaborators(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.bb;this.markerGet({id:e,limit:i,successCallback:t,errorCallback:n,requestData:r})}};function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=class extends Je{constructor(){var e;super(...arguments),e=this,Lt(this,"getCollaborations",(function(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.bb;e.markerGet({id:t,limit:o,successCallback:n,errorCallback:r,requestData:i})})),Lt(this,"successHandler",e=>{this.isDestroyed()||"function"!=typeof this.successCallback||this.successCallback(e)})}getUrl(e){return"getUrl(".concat(e,") should be overridden")}};var zt=class extends Ft{getUrl(e){if(!e)throw new Error("Missing file ID!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/collaborations")}};var Ut=class extends Ft{getUrl(e){if(!e)throw new Error("Missing folder ID!");return"".concat(this.getBaseApiUrl(),"/folders/").concat(e,"/collaborations")}};function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Wt extends C.a{constructor(){super(...arguments),Vt(this,"addCollaboration",(e,t,n,r)=>{const{id:i}=e;this.post({id:i,data:{data:Ht({item:e},t)},errorCallback:r,successCallback:n,url:this.getUrl()})})}getUrl(){return"".concat(this.getBaseApiUrl(),"/collaborations")}}var Kt=Wt,qt=n(5),Gt=n(28);var Qt=n(109),Yt=n.n(Qt);function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach((function(t){Zt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Jt extends Je{constructor(){super(...arguments),Zt(this,"successHandler",e=>{if(this.isDestroyed()||"function"!=typeof this.successCallback)return;if(!e)return void this.successCallback();if(!e.entries)return e.type&&"comment"===e.type?void this.successCallback(nt(e)):void this.successCallback(this.formatReplies(e));if(e.entries.length&&"comment"===e.entries[0].type){const t=e.entries.map(nt);return void this.successCallback(Xt({},e,{entries:t}))}const t=e.entries.map(this.formatReplies);this.successCallback(Xt({},e,{entries:t}))})}formatReplies(e){return e.replies&&e.replies.length?Xt({},e,{replies:e.replies.map(nt)}):e}getUrl(){return"".concat(this.getBaseApiUrl(),"/undoc/annotations")}getUrlForId(e){return"".concat(this.getUrl(),"/").concat(e)}getUrlWithRepliesForId(e){return"".concat(this.getUrlForId(e),"/replies")}createAnnotation(e,t,n,r,i,o){this.errorCode=b.pb;try{this.checkApiCallValidity(b.Ze,r,e)}catch(e){return void o(e,this.errorCode)}const a={description:{type:"reply"},file_version:{id:t,type:"file_version"}};this.post({id:e,data:{data:Yt()(a,n)},errorCallback:o,successCallback:i,url:this.getUrl()})}updateAnnotation(e,t,n,r,i,o){this.errorCode=b.Fb;const{message:a,status:s}=r;if(a)try{this.checkApiCallValidity(b.cf,n,e)}catch(e){return void o(e,this.errorCode)}if(s)try{this.checkApiCallValidity(b.ff,n,e)}catch(e){return void o(e,this.errorCode)}this.put({id:e,data:{data:{description:a?{message:a}:void 0,status:s}},errorCallback:o,successCallback:i,url:this.getUrlForId(t)})}deleteAnnotation(e,t,n,r,i){this.errorCode=b.xb;try{this.checkApiCallValidity(b.af,n,e)}catch(e){return void i(e,this.errorCode)}this.delete({id:e,errorCallback:i,successCallback:r,url:this.getUrlForId(t)})}getAnnotation(e,t,n,r,i,o){this.errorCode=b.Jb;try{this.checkApiCallValidity(b.if,n,e)}catch(e){return void i(e,this.errorCode)}const a=o?{params:{fields:"replies"}}:void 0;this.get({id:e,errorCallback:i,successCallback:r,url:this.getUrlForId(t),requestData:a})}getAnnotations(e,t,n,r,i,o,a,s){this.errorCode=b.Kb;try{this.checkApiCallValidity(b.if,n,e)}catch(e){return void i(e,this.errorCode)}const l=Xt({file_id:e,file_version_id:t},s?{fields:"replies"}:null);this.markerGet({id:e,errorCallback:i,limit:o,requestData:l,shouldFetchAll:a,successCallback:r})}getAnnotationReplies(e,t,n,r,i){this.errorCode=b.Xb;try{this.checkApiCallValidity(b.if,n,e)}catch(e){return void i(e,this.errorCode)}this.get({id:e,errorCallback:i,successCallback:r,url:this.getUrlWithRepliesForId(t)})}createAnnotationReply(e,t,n,r,i,o){this.errorCode=b.tb;try{this.checkApiCallValidity(b.Ze,n,e)}catch(e){return void o(e,this.errorCode)}this.post({id:e,data:{data:{message:r}},errorCallback:o,successCallback:i,url:"".concat(this.getUrlWithRepliesForId(t),"?file_id=").concat(e)})}}function en(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tn=class extends Je{constructor(){super(...arguments),en(this,"permissions",{}),en(this,"mapAppActivityItem",e=>{const{activity_template:t,app:n,created_by:r,id:i,occurred_at:o,rendered_text:a,type:s}=e,{can_delete:l}=this.permissions;return{activity_template:t,app:n,created_at:o,created_by:r,id:i,permissions:{can_delete:l},rendered_text:a,type:s}}),en(this,"successHandler",e=>{let{entries:t=[]}=e;if(this.isDestroyed()||"function"!=typeof this.successCallback)return;const n=t.map(this.mapAppActivityItem);this.successCallback({entries:n,total_count:n.length})}),en(this,"errorHandler",e=>{if(this.isDestroyed()&&"function"!=typeof this.errorCallback)return;const{response:t}=e;t.status===b.ue?this.successHandler({entries:[],total_count:0}):this.errorCallback(e,t.status)})}getUrl(){return"".concat(this.getBaseApiUrl(),"/app_activities")}getDeleteUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getUrl(),"/").concat(e)}getAppActivity(e,t,n,r){const i={item_id:e,item_type:"file",fields:re.a.toString()};this.permissions=t,this.markerGet({id:e,successCallback:n,errorCallback:r,requestData:i})}deleteAppActivity(e){let{id:t,appActivityId:n,successCallback:r,errorCallback:i}=e;this.errorCode=b.yb,this.delete({id:t,url:this.getDeleteUrl(n),successCallback:r,errorCallback:i})}};function nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach((function(t){on(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const sn=b.bg,ln=(e,t)=>{const{replies:n=[]}=e,r=an(e,["replies"]);return rn({replies:n.filter(e=>{let{id:n}=e;return n!==t})},r)},cn=(e,t)=>{const{replies:n=[]}=e;return rn({replies:[...n,t]},an(e,["replies"]))},un=e=>{return[...e].map(e=>rn({},e,{tagged_message:e.tagged_message||e.message||""}))},dn=e=>{if(!e||!e.entries||!e.entries.length)return[];return e.entries.map(e=>{if(!e.source)return null;const t=rn({},e.source);switch(e.activity_type){case b.Vd:{var n;const e=rn({},t[b.Vd]);if(null===(n=e.assigned_to)||void 0===n?void 0:n.entries){const t=e.assigned_to.entries.map(e=>{const t=rn({},e);return t.role=e.role.toUpperCase(),t.status=e.status.toUpperCase(),t});e.assigned_to.entries=t}return e.completion_rule&&(e.completion_rule=e.completion_rule.toUpperCase()),e.status&&(e.status=e.status.toUpperCase()),e.task_type&&(e.task_type=e.task_type.toUpperCase()),e.created_by={target:e.created_by},e}case b.Ud:{const e=rn({},t[b.Ud]);if(e.replies&&e.replies.length){const t=un(e.replies);e.replies=t}return e.tagged_message=e.tagged_message||e.message||"",e}case b.Sd:{const e=rn({},t[b.Sd]);if(e.replies&&e.replies.length){const t=un(e.replies);e.replies=t}return e}case b.Td:{const e=rn({},t[b.Td]);return e.created_at=e.occurred_at,e}case b.Wd:{var r,i;const e=rn({},t[b.Wd]);if(e.type=b.Hc,e.action_by){const t={};1===e.action_by.length&&(e.uploader_display_name=e.action_by[0].name),e.action_by.map(e=>(t[e.id]=rn({},e),e)),e.collaborators=t}var o,a,s,l,c,u;if((null===(r=e.end)||void 0===r?void 0:r.number)&&(e.version_end=e.end.number,e.id=e.end.id),(null===(i=e.start)||void 0===i?void 0:i.number)&&(e.version_start=e.start.number),e.version_start===e.version_end)e.version_number=e.version_start,e.action_type===b.e&&(null===(o=e.start)||void 0===o?void 0:o.created_at)&&(null===(a=e.start)||void 0===a?void 0:a.created_by)&&(e.modified_at=e.start.created_at,e.modified_by=rn({},e.start.created_by)),e.action_type===b.g&&(null===(s=e.start)||void 0===s?void 0:s.trashed_at)&&(null===(l=e.start)||void 0===l?void 0:l.trashed_by)&&(e.trashed_at=e.start.trashed_at,e.trashed_by=rn({},e.start.trashed_by)),e.action_type===b.f&&(null===(c=e.start)||void 0===c?void 0:c.restored_at)&&(null===(u=e.start)||void 0===u?void 0:u.restored_by)&&(e.restored_at=e.start.restored_at,e.restored_by=rn({},e.start.restored_by));return e}default:return null}}).filter(e=>!!e).reverse()};class hn extends C.a{constructor(e){var t;super(e),t=this,on(this,"updateAnnotation",(e,t,n,r,i,o,a)=>{if(!e.id)throw Object(ie.a)();if(!n&&!r)throw Object(ie.d)();this.annotationsAPI=new Jt(this.options),this.file=e,this.errorCallback=a;const s={};n&&(s.message=n),r&&(s.status=r),this.updateFeedItem(rn({},s,{isPending:!0}),t),this.annotationsAPI.updateAnnotation(this.file.id,t,i,s,e=>{const{replies:n,total_reply_count:r}=e,i=an(e,["replies","total_reply_count"]);this.updateFeedItem(rn({},i,{isPending:!1}),t),this.isDestroyed()||o(e)},(e,n)=>{this.updateCommentErrorCallback(e,n,t)})}),on(this,"updateCommentErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.commentUpdateErrorMessage),n),this.feedErrorCallback(!0,e,t)}),on(this,"updateReplyErrorCallback",(e,t,n,r)=>{this.updateReplyItem(this.createFeedError(Gt.a.commentUpdateErrorMessage),r,n),this.feedErrorCallback(!0,e,t)}),on(this,"fetchRepliesErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.repliesFetchErrorMessage),n),this.feedErrorCallback(!0,e,t)}),on(this,"deleteAnnotation",(e,t,n,r,i)=>{if(this.annotationsAPI=new Jt(this.options),!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isPending:!0},t),this.annotationsAPI.deleteAnnotation(this.file.id,t,n,this.deleteFeedItem.bind(this,t,r),(e,n)=>{this.deleteCommentErrorCallback(e,n,t)})}),on(this,"fetchThreadedCommentSuccessCallback",(e,t,n)=>{t(n),e()}),on(this,"updateTaskCollaborator",(e,t,n,r,i,o)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=o,this.updateFeedItem({isPending:!0},t);const a=new We(this.options);this.taskCollaboratorsAPI.push(a);const s={id:n,status:r},l=(e,n)=>{let i;switch(r){case b.Yf:i=Gt.a.taskApproveErrorMessage;break;case b.Zf:i=Gt.a.taskCompleteErrorMessage;break;case b.cg:i=Gt.a.taskRejectErrorMessage;break;default:i=Gt.a.taskCompleteErrorMessage}this.updateFeedItem(this.createFeedError(i,Gt.a.taskActionErrorTitle),t),this.feedErrorCallback(!0,e,n)};a.updateTaskCollaborator({file:e,taskCollaborator:s,successCallback:n=>{this.updateTaskCollaboratorSuccessCallback(t,e,n,i,l)},errorCallback:l})}),on(this,"updateTaskCollaboratorSuccessCallback",(e,t,n,r,i)=>{this.tasksNewAPI=new Fe(this.options),this.tasksNewAPI.getTask({id:e,file:t,successCallback:t=>{this.updateFeedItem(rn({},t,{isPending:!1}),e),r(n)},errorCallback:i})}),on(this,"updateTaskNew",(async function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.a;if(!e.id)throw Object(ie.a)();t.file=e,t.errorCallback=i,t.tasksNewAPI=new Fe(t.options),t.updateFeedItem({isPending:!0},n.id);try{const i=n.addedAssignees.filter(e=>e.item&&"group"===e.item.type).map(e=>e.id).map(n=>new Ot(t.options).getGroupCount({file:e,group:{id:n}})),o=(await Promise.all(i)).some(e=>e.total_count>b.Xf),a={code:b.fc,type:"warning"};if(o)return void t.feedErrorCallback(!1,a,b.fc);await new Promise((r,i)=>{t.tasksNewAPI.updateTaskWithDeps({file:e,task:n,successCallback:r,errorCallback:i})}),await new Promise((r,i)=>{t.tasksNewAPI.getTask({file:e,id:n.id,successCallback:e=>{t.updateFeedItem(rn({},e,{isPending:!1}),n.id),r()},errorCallback:e=>{t.updateFeedItem({isPending:!1},n.id),t.feedErrorCallback(!1,e,b.uc),i()}})}),t.isDestroyed()||r()}catch(e){t.updateFeedItem({isPending:!1},n.id),t.feedErrorCallback(!1,e,b.uc)}})),on(this,"deleteComment",(e,t,n,r,i)=>{if(this.commentsAPI=new xe(this.options),!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isPending:!0},t),this.commentsAPI.deleteComment({file:e,commentId:t,permissions:n,successCallback:this.deleteFeedItem.bind(this,t,r),errorCallback:(e,n)=>{this.deleteCommentErrorCallback(e,n,t)}})}),on(this,"deleteThreadedComment",(e,t,n,r,i)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isPending:!0},t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.deleteComment({fileId:e.id,commentId:t,permissions:n,successCallback:this.deleteFeedItem.bind(this,t,r),errorCallback:(e,n)=>{this.deleteCommentErrorCallback(e,n,t)}})}),on(this,"deleteReply",(e,t,n,r,i,o)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=o,this.updateReplyItem({isPending:!0},n,t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.deleteComment({fileId:e.id,commentId:t,permissions:r,successCallback:this.deleteReplySuccessCallback.bind(this,t,n,i),errorCallback:(e,r)=>{this.deleteReplyErrorCallback(e,r,t,n)}})}),on(this,"deleteReplySuccessCallback",(e,t,n)=>{this.modifyFeedItemRepliesCountBy(t,-1),this.deleteReplyItem(e,t,n)}),on(this,"deleteCommentErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.commentDeleteErrorMessage),n),this.feedErrorCallback(!0,e,t)}),on(this,"deleteReplyErrorCallback",(e,t,n,r)=>{this.updateReplyItem(this.createFeedError(Gt.a.commentDeleteErrorMessage),r,n),this.feedErrorCallback(!0,e,t)}),on(this,"createTaskNew",(e,t,n,r,i,o,a,s,l)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=l;const c=Tt()("task_");let u;if(o){u=new Date(o).toISOString()}const d={created_by:{type:"task_collaborator",target:t,id:Tt()(),role:"CREATOR",status:sn},completion_rule:a,created_at:(new Date).toISOString(),due_at:u,id:c,description:n,type:b.Gc,assigned_to:{entries:r.map(e=>({id:Tt()(),target:rn({},e,{avatar_url:"",type:"user"}),status:sn,permissions:{can_delete:!1,can_update:!1},role:"ASSIGNEE",type:"task_collaborator"})),limit:10,next_marker:null},permissions:{can_update:!1,can_delete:!1,can_create_task_collaborator:!1,can_create_task_link:!1},task_links:{entries:[{id:Tt()(),type:"task_link",target:rn({type:"file"},e),permissions:{can_delete:!1,can_update:!1}}],limit:1,next_marker:null},task_type:i,status:b.bg},h={description:n,due_at:u,task_type:i,completion_rule:a},f=r.filter(e=>"group"===(e.item&&e.item.type)).map(e=>e.id).map(t=>new Ot(this.options).getGroupCount({file:e,group:{id:t}}));Promise.all(f).then(n=>{const i=n.some(e=>e.total_count>b.Xf),o={code:b.fc,type:"warning"};i?this.feedErrorCallback(!1,o,b.fc):(this.tasksNewAPI=new Fe(this.options),this.tasksNewAPI.createTaskWithDeps({file:e,task:h,assignees:r,successCallback:e=>{this.addPendingItem(this.file.id,t,d),this.updateFeedItem(rn({},e,{task_links:{entries:e.task_links,next_marker:null,limit:1},assigned_to:{entries:e.assigned_to,next_marker:null,limit:e.assigned_to.length},isPending:!1}),c),s(e)},errorCallback:(e,t)=>{this.feedErrorCallback(!1,e,t)}}))}).catch(e=>{this.feedErrorCallback(!1,e,b.ub)})}),on(this,"deleteTaskNew",(function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.a;if(!e.id)throw Object(ie.a)();t.file=e,t.errorCallback=i,t.tasksNewAPI=new Fe(t.options),t.updateFeedItem({isPending:!0},n.id),t.tasksNewAPI.deleteTask({file:e,task:n,successCallback:t.deleteFeedItem.bind(t,n.id,r),errorCallback:(e,r)=>{t.updateFeedItem(t.createFeedError(Gt.a.taskDeleteErrorMessage),n.id),t.feedErrorCallback(!0,e,r)}})})),on(this,"deleteFeedItem",(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.a;const r=t.getCachedItems(t.file.id);if(r){const i=r.items.filter(t=>t.id!==e);t.setCachedItems(t.file.id,i),t.isDestroyed()||n(e)}})),on(this,"deleteReplyItem",(function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a;const i=t.getCachedItems(t.file.id)||{items:[],errors:[]},a=i.items.map(t=>t.id!==n?t:t.type===b.Dc?ln(t,e):t.type===b.Fc?ln(t,e):t);t.setCachedItems(t.file.id,a),t.isDestroyed()||r(e,n)})),on(this,"feedErrorCallback",(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;e&&t.errors.push(rn({},n,{code:r})),!t.isDestroyed()&&t.errorCallback&&t.errorCallback(n,r,{error:n,[b.Ae]:e}),console.error(n)})),on(this,"addPendingItem",(e,t,n)=>{if(!t)throw Object(ie.c)();const r=(new Date).toISOString(),i=rn({created_at:r,created_by:t,modified_at:r,isPending:!0},n),o=this.getCachedItems(this.file.id),a=[...o?o.items:[],i];return this.setCachedItems(e,a),i}),on(this,"addPendingReply",(e,t,n)=>{if(!this.file.id)throw Object(ie.a)();if(!t)throw Object(ie.c)();const r=(new Date).toISOString(),i=rn({created_at:r,created_by:t,modified_at:r,isPending:!0},n),o=this.getCachedItems(this.file.id);if(o){const t=o.items.map(t=>t.id===e&&t.type===b.Fc?cn(t,i):t.id===e&&t.type===b.Dc?cn(t,i):t);this.setCachedItems(this.file.id,t)}return i}),on(this,"createCommentSuccessCallback",(e,t,n)=>{const{message:r="",tagged_message:i=""}=e;e.tagged_message=i||r,this.updateFeedItem(rn({},e,{isPending:!1}),t),this.isDestroyed()||n(e)}),on(this,"createCommentErrorCallback",(e,t,n)=>{const r=e.status===b.qe?Gt.a.commentCreateConflictMessage:Gt.a.commentCreateErrorMessage;this.updateFeedItem(this.createFeedError(r),n),this.feedErrorCallback(!1,e,t)}),on(this,"createReplySuccessCallback",(e,t,n,r)=>{this.updateReplyItem(rn({},e,{isPending:!1}),t,n),this.isDestroyed()||r(e)}),on(this,"createReplyErrorCallback",(e,t,n,r)=>{const i=e.status===b.qe?Gt.a.commentCreateConflictMessage:Gt.a.commentCreateErrorMessage;this.updateReplyItem(this.createFeedError(i),n,r),this.feedErrorCallback(!1,e,t)}),on(this,"updateFeedItem",(e,t)=>{if(!this.file.id)throw Object(ie.a)();const n=this.getCachedItems(this.file.id);if(n){const r=n.items.map(n=>n.id===t?rn({},n,{},e):n);return this.setCachedItems(this.file.id,r),r}return null}),on(this,"updateReplyItem",(e,t,n)=>{if(!this.file.id)throw Object(ie.a)();const r=(e,t,n)=>{const r=rn({},e);return r.replies&&(r.replies=r.replies.map(e=>e.id===t?rn({},e,{},n):e)),r},i=this.getCachedItems(this.file.id);if(i){const o=i.items.map(i=>i.id===t&&i.type===b.Fc?r(i,n,e):i.id===t&&i.type===b.Dc?r(i,n,e):i);this.setCachedItems(this.file.id,o)}}),on(this,"createComment",(e,t,n,r,i,o)=>{const a=Tt()("comment_"),s={id:a,tagged_message:n,type:b.Fc};if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=o,this.addPendingItem(this.file.id,t,s);const l={};r?l.taggedMessage=n:l.message=n,this.commentsAPI=new xe(this.options),this.commentsAPI.createComment(rn({file:e},l,{successCallback:e=>{this.createCommentSuccessCallback(e,a,i)},errorCallback:(e,t)=>{this.createCommentErrorCallback(e,t,a)}}))}),on(this,"createThreadedComment",(e,t,n,r,i)=>{if(!e.id)throw Object(ie.a)();const o=Tt()("comment_"),a={id:o,tagged_message:n,type:b.Fc};this.file=e,this.errorCallback=i,this.addPendingItem(this.file.id,t,a),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.createComment({file:e,message:n,successCallback:e=>{this.createCommentSuccessCallback(e,o,r)},errorCallback:(e,t)=>{this.createCommentErrorCallback(e,t,o)}})}),on(this,"updateComment",(e,t,n,r,i,o,a)=>{const s={tagged_message:n};if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=a,this.updateFeedItem(rn({},s,{isPending:!0}),t);const l={};r?l.tagged_message=n:l.message=n,this.commentsAPI=new xe(this.options),this.commentsAPI.updateComment(rn({file:e,commentId:t,permissions:i},l,{successCallback:e=>{this.updateFeedItem(rn({},l,{isPending:!1}),t),this.isDestroyed()||o(e)},errorCallback:(e,n)=>{this.updateCommentErrorCallback(e,n,t)}}))}),on(this,"updateThreadedComment",(e,t,n,r,i,o,a)=>{if(!e.id)throw Object(ie.a)();if(!n&&!r)throw Object(ie.d)();const s={};n&&(s.tagged_message=n),r&&(s.status=r),this.file=e,this.errorCallback=a,this.updateFeedItem(rn({},s,{isPending:!0}),t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.updateComment({fileId:e.id,commentId:t,permissions:i,message:n,status:r,successCallback:e=>{const{replies:n,total_reply_count:r}=e,i=an(e,["replies","total_reply_count"]);this.updateFeedItem(rn({},i,{isPending:!1}),t),this.isDestroyed()||o(e)},errorCallback:(e,n)=>{this.updateCommentErrorCallback(e,n,t)}})}),on(this,"updateReply",(e,t,n,r,i,o,a)=>{if(!e.id)throw Object(ie.a)();this.file=e,this.errorCallback=a,this.updateReplyItem({tagged_message:r,isPending:!0},n,t),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.updateComment({fileId:e.id,commentId:t,permissions:i,message:r,undefined:void 0,successCallback:e=>{this.updateReplyItem(rn({},e,{isPending:!1}),n,t),this.isDestroyed()||o(e)},errorCallback:(e,r)=>{this.updateReplyErrorCallback(e,r,t,n)}})}),on(this,"modifyFeedItemRepliesCountBy",(e,t)=>{if(!this.file.id)throw Object(ie.a)();const{items:n=[]}=this.getCachedItems(this.file.id)||{},r=n.find(t=>{let{id:n}=t;return n===e});if(!r||"annotation"!==r.type&&"comment"!==r.type)return;const i=(r.total_reply_count||0)+t;i>=0&&this.updateFeedItem({total_reply_count:i},e)}),on(this,"deleteAppActivity",(e,t,n,r)=>{const{id:i}=e;if(!i)throw Object(ie.a)();this.appActivityAPI=new tn(this.options),this.file=e,this.errorCallback=r,this.updateFeedItem({isPending:!0},t),this.appActivityAPI.deleteAppActivity({id:i,appActivityId:t,successCallback:this.deleteFeedItem.bind(this,t,n),errorCallback:(e,n)=>{this.deleteAppActivityErrorCallback(e,n,t)}})}),on(this,"deleteAppActivityErrorCallback",(e,t,n)=>{this.updateFeedItem(this.createFeedError(Gt.a.appActivityDeleteErrorMessage),n),this.feedErrorCallback(!0,e,t)}),this.taskCollaboratorsAPI=[],this.taskLinksAPI=[],this.errors=[]}addAnnotation(e,t,n,r,i){if(!e.id)throw Object(ie.a)();if(this.file=e,i){const e=rn({},n,{created_by:t,id:r,type:b.Dc});this.addPendingItem(this.file.id,t,e)}else this.updateFeedItem(rn({},n,{isPending:!1}),r)}getCacheKey(e){return"".concat(b.fg).concat(e)}getCachedItems(e){const t=this.getCache(),n=this.getCacheKey(e);return t.get(n)}setCachedItems(e,t){const n=this.getCache(),r=this.getCacheKey(e);n.set(r,{errors:this.errors,items:t})}feedItems(e,t,n,r,i){let{shouldShowAnnotations:o=!1,shouldShowAppActivity:a=!1,shouldShowReplies:s=!1,shouldShowTasks:l=!0,shouldShowVersions:c=!0,shouldUseUAA:u=!1}=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const{id:d,permissions:h={}}=e,f=this.getCachedItems(d);if(f){const{errors:e,items:i}=f;if(e.length?r(i,e):n(i),!t)return}this.file=e,this.errors=[],this.errorCallback=i;const p=!u&&o?this.fetchAnnotations(h,s):Promise.resolve(),m=()=>u?Promise.resolve():s?this.fetchThreadedComments(h):this.fetchComments(h),g=!u&&l?this.fetchTasksNew():Promise.resolve(),v=!u&&a?this.fetchAppActivity(h):Promise.resolve(),y=!u&&c?this.fetchVersions():Promise.resolve(),w=!u&&c?this.fetchCurrentVersion():Promise.resolve(),E=o&&h[b.if]?[b.Sd]:[],C=a?[b.Td]:[],S=l?[b.Vd]:[],O=c?[b.Wd]:[],k=[...E,...C,...h[b.Ye]?[b.Ud]:[],...S,...O],_=u&&k.length?this.fetchFileActivities(h,k,s):Promise.resolve(),x=e=>{this.isDestroyed()||(this.setCachedItems(d,e),this.errors.length?r(e,this.errors):n(e))};u?_.then(e=>{if(!e)return;const t=dn(e);x(t)}):Promise.all([y,w,m(),g,v,p]).then(e=>{let[t,n,...r]=e;const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>t?e.concat(t.entries):e,[]).sort((e,t)=>Date.parse(e.created_at)-Date.parse(t.created_at))}(n?this.versionsAPI.addCurrentVersion(n,t,this.file):void 0,...r);x(i)})}fetchAnnotations(e,t){return this.annotationsAPI=new Jt(this.options),new Promise(n=>{this.annotationsAPI.getAnnotations(this.file.id,void 0,e,n,this.fetchFeedItemErrorCallback.bind(this,n),void 0,void 0,t)})}fetchComments(e){return this.commentsAPI=new xe(this.options),new Promise(t=>{this.commentsAPI.getComments(this.file.id,e,t,this.fetchFeedItemErrorCallback.bind(this,t))})}fetchThreadedComment(e,t,n,r){const{id:i,permissions:o}=e;if(!i||!o)throw Object(ie.a)();return this.threadedCommentsAPI=new at(this.options),new Promise(e=>{this.threadedCommentsAPI.getComment({commentId:t,errorCallback:r,fileId:i,permissions:o,successCallback:this.fetchThreadedCommentSuccessCallback.bind(this,e,n)})})}fetchThreadedComments(e){return this.threadedCommentsAPI=new at(this.options),new Promise(t=>{this.threadedCommentsAPI.getComments({errorCallback:this.fetchFeedItemErrorCallback.bind(this,t),fileId:this.file.id,permissions:e,successCallback:t})})}fetchFileActivities(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.fileActivitiesAPI=new pt(this.options),new Promise(r=>{this.fileActivitiesAPI.getActivities({errorCallback:this.fetchFeedItemErrorCallback.bind(this,r),fileID:this.file.id,permissions:e,successCallback:r,activityTypes:t,shouldShowReplies:n})})}fetchReplies(e,t,n,r,i){const{id:o,permissions:a}=e;if(!o||!a)throw Object(ie.a)();this.file=e,this.errorCallback=i,this.updateFeedItem({isRepliesLoading:!0},t);const s=e=>{let{entries:n}=e;this.updateFeedItem({isRepliesLoading:!1,replies:n,total_reply_count:n.length},t),r(n)},l=(e,n)=>{this.fetchRepliesErrorCallback(e,n,t)};n===b.Dc?(this.annotationsAPI=new Jt(this.options),this.annotationsAPI.getAnnotationReplies(e.id,t,a,s,l)):n===b.Fc&&(this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.getCommentReplies({fileId:e.id,commentId:t,permissions:a,successCallback:s,errorCallback:l}))}fetchVersions(){return this.versionsAPI=new Se(this.options),new Promise(e=>{this.versionsAPI.getVersions(this.file.id,e,this.fetchFeedItemErrorCallback.bind(this,e),void 0,void 0,re.c)})}fetchCurrentVersion(){return this.versionsAPI=new Se(this.options),new Promise(e=>{const{file_version:t={}}=this.file;this.versionsAPI.getVersion(this.file.id,t.id,e,this.fetchFeedItemErrorCallback.bind(this,e))})}fetchTasksNew(){return this.tasksNewAPI=new Fe(this.options),new Promise(e=>{this.tasksNewAPI.getTasksForFile({file:{id:this.file.id},successCallback:e,errorCallback:(t,n)=>this.fetchFeedItemErrorCallback(e,t,n)})})}fetchFeedItemErrorCallback(e,t,n){const{status:r}=t,i=Object(ie.e)(r);this.feedErrorCallback(i,t,n),e()}createTaskCollaboratorsforGroup(e,t,n){if(!e.id)throw Object(ie.a)();return this.file=e,new Promise((r,i)=>{const o=new We(this.options);this.taskCollaboratorsAPI.push(o),o.createTaskCollaboratorsforGroup({file:e,task:t,group:n,successCallback:r,errorCallback:e=>{i(e)}})})}createTaskCollaborator(e,t,n){if(!e.id)throw Object(ie.a)();return this.file=e,new Promise((r,i)=>{const o=new We(this.options);this.taskCollaboratorsAPI.push(o),o.createTaskCollaborator({file:e,task:t,user:n,successCallback:r,errorCallback:e=>{i(e)}})})}deleteTaskCollaborator(e,t,n){if(!e.id)throw Object(ie.a)();return this.file.id=e.id,new Promise((r,i)=>{const o=new We(this.options);this.taskCollaboratorsAPI.push(o),o.deleteTaskCollaborator({file:e,task:t,taskCollaborator:{id:n.id},successCallback:r,errorCallback:e=>{i(e)}})})}createTaskLink(e,t){if(!e.id)throw Object(ie.a)();return this.file=e,new Promise((n,r)=>{const i=new Qe(this.options);this.taskLinksAPI.push(i),i.createTaskLink({file:e,task:t,successCallback:n,errorCallback:r})})}createFeedError(e){return{error:{message:e,title:arguments.length>1&&void 0!==arguments[1]?arguments[1]:qt.a.errorOccured}}}createReply(e,t,n,r,i,o,a){const{id:s,permissions:l}=e;if(!s||!l)throw Object(ie.a)();const c=Tt()("comment_"),u={id:c,tagged_message:i,type:b.Fc};this.file=e,this.errorCallback=a,this.addPendingReply(n,t,u),this.modifyFeedItemRepliesCountBy(n,1);const d=e=>{this.createReplySuccessCallback(e,n,c,o)},h=(e,t)=>{this.createReplyErrorCallback(e,t,n,c)};r===b.Dc?(this.annotationsAPI=new Jt(this.options),this.annotationsAPI.createAnnotationReply(e.id,n,l,i,d,h)):r===b.Fc&&(this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI.createCommentReply({fileId:e.id,commentId:n,permissions:l,message:i,successCallback:d,errorCallback:h}))}destroyTaskCollaborators(){Array.isArray(this.taskCollaboratorsAPI)&&(this.taskCollaboratorsAPI.forEach(e=>e.destroy()),this.taskCollaboratorsAPI=[])}destroyTaskLinks(){Array.isArray(this.taskLinksAPI)&&(this.taskLinksAPI.forEach(e=>e.destroy()),this.taskLinksAPI=[])}fetchAppActivity(e){return this.appActivityAPI=new tn(this.options),new Promise(t=>{this.appActivityAPI.getAppActivity(this.file.id,e,t,this.fetchFeedItemErrorCallback.bind(this,t))})}destroy(){super.destroy(),this.annotationsAPI&&(this.annotationsAPI.destroy(),delete this.annotationsAPI),this.commentsAPI&&(this.commentsAPI.destroy(),delete this.commentsAPI),this.threadedCommentsAPI&&(this.threadedCommentsAPI.destroy(),delete this.threadedCommentsAPI),this.versionsAPI&&(this.versionsAPI.destroy(),delete this.versionsAPI),this.appActivityAPI&&(this.appActivityAPI.destroy(),delete this.appActivityAPI),this.tasksNewAPI&&(this.tasksNewAPI.destroy(),delete this.tasksNewAPI),this.destroyTaskCollaborators(),this.destroyTaskLinks()}}var fn=hn;class pn extends C.a{getUrl(e){if(!e)throw new Error("Missing app integration id!");return"".concat(this.getBaseApiUrl(),"/app_integrations/").concat(e)}execute(e,t,n,r){if(!e)throw new Error("Missing integration id!");if(!t)throw new Error("Missing file id!");this.errorCode=b.Gb;const i="".concat(this.getUrl(e),"/execute"),o={data:{item:{id:t,type:b.ig}}};this.post({id:t,url:i,data:o,successCallback:n,errorCallback:r})}}var mn=pn;class gn extends C.a{getUrl(e){if(!e)throw new Error("Missing file id!");return"".concat(this.getBaseApiUrl(),"/files/").concat(e,"/open_with_integrations")}getOpenWithIntegrations(e,t,n){this.errorCode=b.Tb,this.get({id:e,successCallback:e=>{const n=this.formatOpenWithData(e),r=this.consolidateBoxEditIntegrations(n);t(r)},errorCallback:n})}consolidateBoxEditIntegrations(e){let t=[...e];return e.some(e=>e.appIntegrationId===b.m)&&(t=e.filter(e=>e.appIntegrationId!==b.n)),t}formatOpenWithData(e){const{items:t,default_app_integration:n}=e;return t.map(e=>{let{app_integration:t,disabled_reasons:r,display_name:i,display_description:o,display_order:a,is_disabled:s,should_show_consent_popup:l}=e;const{id:c,type:u}=t;return{appIntegrationId:c,displayDescription:o,disabledReasons:r||[],displayOrder:a,isDefault:!!n&&c===n.id,isDisabled:s,displayName:i,requiresConsent:l,type:u}}).sort((e,t)=>e.displayOrder-t.displayOrder)}}var bn=gn;class vn extends C.a{constructor(){var e,t,n;super(...arguments),n=e=>{let{data:t}=e;this.getCache().set(this.key,t),this.finish()},(t="queryMetadataSuccessHandler")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}getCacheKey(e){return"".concat(b.r).concat(e)}getUrl(){return"".concat(this.getBaseApiUrl(),"/metadata_queries/execute_read")}isLoaded(){return this.getCache().has(this.key)}finish(){if(this.isDestroyed())return;const e=this.getCache().get(this.key);this.successCallback(e)}queryMetadataRequest(e){this.isDestroyed()||(this.errorCode=b.jc,this.xhr.post({url:this.getUrl(),data:e}).then(this.queryMetadataSuccessHandler).catch(this.errorHandler))}queryMetadata(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.isDestroyed())return;const{context:i={}}=r;this.key=this.getCacheKey(i.id),this.successCallback=t,this.errorCallback=n,r.forceFetch&&this.getCache().unset(this.key),this.isLoaded()?this.finish():this.queryMetadataRequest(e)}}var yn=vn;const wn={CHROME:"Chrome",EDGE:"Edge",FIREFOX:"Firefox",MAC:"Mac",SAFARI:"Safari",IE:"Explorer"},En=[{key:"userAgent",subString:wn.EDGE,identity:wn.EDGE},{key:"userAgent",subString:wn.CHROME,identity:wn.CHROME},{key:"userAgent",subString:"criOS",identity:wn.CHROME,versionSearch:"criOS"},{key:"vendor",subString:"Apple",identity:wn.SAFARI,versionSearch:"Version"},{key:"userAgent",subString:wn.FIREFOX,identity:wn.FIREFOX},{key:"userAgent",subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{key:"userAgent",subString:"Trident",identity:"Explorer",versionSearch:"rv"},{key:"userAgent",subString:"Gecko",identity:"Mozilla",versionSearch:"rv"}],Cn=[{key:"platform",subString:"Win",identity:"Windows"},{key:"userAgent",subString:"iPod",identity:"iOS",device:"iPod"},{key:"userAgent",subString:"iPhone",identity:"iOS",device:"iPhone"},{key:"userAgent",subString:"iPad",identity:"iOS",device:"iPad"},{key:"platform",subString:wn.MAC,identity:wn.MAC},{key:"userAgent",subString:"Android",identity:"Android"},{key:"platform",subString:"Linux",identity:"Linux"}];function Sn(e,t){let n,r=null,i=null,o="";for(let a=0,s=t.length;a<s;a+=1)if(n=e[t[a].key],o=t[a].versionSearch||t[a].identity,n&&-1!==n.indexOf(t[a].subString)){r=t[a].identity,i=t[a].device;break}return{identity:r,device:i,versionSearchString:o}}function On(e,t){const n=e.indexOf(t);if(-1===n)return"";const r=e.substring(n+t.length+1).match(/[0-9]+(?:\.[0-9]*)?/);return r&&r.length?r[0]:""}var kn=new class{constructor(){const{navigator:e}=window,t=Sn(e,En),n=Sn(e,Cn);this.browser=t.identity||"unknown",this.version=On(e.userAgent,t.versionSearchString)||On(e.appVersion,t.versionSearchString)||"unknown",this.OS=n.identity||"unknown",this.device=n.device||"unknown"}getName(){return this.browser}getVersion(){return this.version}isMinBrowser(e,t){return this.browser.toLowerCase()===e.toLowerCase()&&parseFloat(this.version)>=parseFloat(t)}isSafari(){return this.browser===wn.SAFARI}isFirefox(){return this.browser===wn.FIREFOX}isChrome(){return this.browser===wn.CHROME}isIE(){return this.browser===wn.IE}isEdge(){return this.browser===wn.EDGE}isIEAndSpecificBrowserPluginSupported(e){return this.isIE()&&function(e){const t=e||"htmlfile";let n=!1;try{if("ActiveXObject"in window){const{ActiveXObject:e}=window;n=!!new e(t)}}catch(e){n=!1}return n}(e)}};var _n=function(e){const t=[];let n,r=0;return new Promise((i,o)=>{e.forEach((a,s)=>{a.then(i).catch((i=>a=>{t[i]=a,(r+=1)===e.length&&(n=new Error("no promises resolved"),o(n))})(s))})})};var xn={SAFARI_CHANNEL_NAME:"safari_channel",SECRET_STORE_COOKIE_NAME:"box-edit-secret-cookie-name",BOX_EDIT_APP_NAME:"BoxEdit",BOX_EDIT_NOT_SUPPORTED_ERROR:"box_edit_not_supported_error",BOX_EDIT_UNINSTALLED_ERROR:"box_edit_uninstalled_error",BOX_EDIT_UPGRADE_BROWSER_ERROR:"box_edit_upgrade_browser_error",BOX_EDIT_SAFARI_ERROR:"box_edit_safari_error",BOX_EDIT_INSECURE_REQUESTS_UPGRADED_ERROR:"box_edit_insecure_requests_upgraded_error",BOX_TOOLS_PLUGIN_NAME:"Box.BoxTools",BOX_SECURE_LOCAL_BASE_URL:"https://edit.boxlocalhost.com:",BOX_UNSECURE_LOCAL_BASE_URL:"http://127.0.0.1:",ACTIVEX_CHANNEL_NAME:"activex_channel",HTTP_CHANNEL_NAME:"http_channel",HTTPS_CHANNEL_NAME:"https_channel",OPERATION_STATUS:"status",OPERATION_REQUEST:"application_request",OPERATION_COMMAND:"application_command",UNCREATED_STATUS:"uncreated",CREATED_STATUS:"created",ACTIVE_STATUS:"active",HIVE_TABLE_WEBAPP_BOXTOOLS_ANALYTICS:"webapp_boxtools_analytics",KEY_LENGTH:16,KEY_ID_LENGTH:8,IV:"75392C57F66CE7E7EF47110410280DD7",OUTPUT_EVENT:"box_extension_output",REQUEST_ID_PRE:"BOX-EXT-REQ-ID-",REQUEST_TIMEOUT_RESPONSE_CODE:408,EXTENSION_BLACKLIST:{A6P:1,AC:1,AS:1,ACR:1,ACTION:1,AIR:1,APP:1,AWK:1,BAT:1,BOXNOTE:1,CGI:1,CHM:1,CMD:1,COM:1,CSH:1,DEK:1,DLD:1,DS:1,EBM:1,ESH:1,EXE:1,EZS:1,FKY:1,FRS:1,FXP:1,GADGET:1,HMS:1,HTA:1,ICD:1,INX:1,IPF:1,ISU:1,JAR:1,JS:1,JSE:1,JSX:1,KIX:1,LNK:1,LUA:1,MCR:1,MEM:1,MPX:1,MS:1,MSI:1,MST:1,OBS:1,PAF:1,PEX:1,PIF:1,PL:1,PRC:1,PRG:1,PVD:1,PWC:1,PY:1,PYC:1,PYO:1,QPX:1,RBX:1,REG:1,RGS:1,ROX:1,RPJ:1,SCAR:1,SCR:1,SCRIPT:1,SCPT:1,SCT:1,SH:1,SHB:1,SHS:1,SPR:1,TLB:1,TMS:1,U3P:1,UDF:1,URL:1,VB:1,VBE:1,VBS:1,VBSCRIPT:1,WCM:1,WPK:1,WS:1,WSF:1,XQT:1}};function Pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In=class{constructor(e){Pn(this,"buildNextRequestID",()=>"".concat(xn.REQUEST_ID_PRE).concat(this.window.performance.now())),Pn(this,"buildDetailsObj",(e,t,n)=>{const r=n.toString(),i={data:void 0,operation:e,properties:{application:this.appName,timeout:r},req_id:this.buildNextRequestID()};if(e!==xn.OPERATION_STATUS){if(!t)throw new TypeError("Data cannot be undefined for ".concat(e));i.data=t}return i}),this.appName=e,this.window=window}sendCommand(e,t,n){return Promise.resolve("TODO")}sendRequest(e,t,n){return Promise.resolve("TODO")}getComServerStatus(e,t){return Promise.resolve("TODO")}destroy(){}};function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tn=2;var Mn=class extends In{constructor(e,t){var n;super(e),n=this,An(this,"executeOperation",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new Promise((o,a)=>{const s=n.buildDetailsObj(e,t,i),l=setTimeout(()=>{a(new Error({status_code:xn.REQUEST_TIMEOUT_RESPONSE_CODE}))},r);n.reqIdToPromiseMap.set(s.req_id,{resolve:o,rejectTimeout:l}),n.executeActiveXEvent({detail:s})})})),An(this,"repairActiveXConnection",e=>{kn.isIEAndSpecificBrowserPluginSupported(xn.BOX_TOOLS_PLUGIN_NAME)&&(this.retryAttempt>=Tn||(this.retryAttempt+=1,setTimeout(()=>{this.executeActiveXEvent(e)},100)))}),An(this,"executeActiveXEvent",e=>{const t=this.createActiveXObjectJSRef(),n="ExecuteSync"in t;try{this.isSynchronous&&n?t.ExecuteSync(JSON.stringify(e)):t.Execute(JSON.stringify(e))}catch(t){this.repairActiveXConnection(e)}}),An(this,"createActiveXObjectJSRef",()=>{const{ActiveXObject:e}=this.window;return new e(xn.BOX_TOOLS_PLUGIN_NAME)}),An(this,"setupActiveXCommunication",()=>{this.isActiveXExtensionListenerAttached||(this.document.addEventListener(xn.OUTPUT_EVENT,this.appExtensionEventResponseHandler),this.isActiveXExtensionListenerAttached=!0)}),An(this,"tearDownActiveXCommunication",()=>{this.isActiveXExtensionListenerAttached&&(this.document.removeEventListener(xn.OUTPUT_EVENT,this.appExtensionEventResponseHandler),this.isActiveXExtensionListenerAttached=!1)}),An(this,"appExtensionEventResponseHandler",e=>{this.retryAttempt>0&&(this.retryAttempt=0);const t="string"==typeof e.detail?JSON.parse(e.detail):e.detail;if(this.reqIdToPromiseMap.has(t.req_id)){const e=this.reqIdToPromiseMap.get(t.req_id);if(e){clearTimeout(e.rejectTimeout),this.reqIdToPromiseMap.delete(t.req_id);const n="string"==typeof t.com_server_response.data?JSON.parse(t.com_server_response.data):t.com_server_response.data;e.resolve(n)}}}),An(this,"getComServerStatus",(e,t)=>this.executeOperation(xn.OPERATION_STATUS,null,e,t)),An(this,"sendRequest",(e,t,n)=>this.executeOperation(xn.OPERATION_REQUEST,e,t,n)),An(this,"sendCommand",(e,t,n)=>this.executeOperation(xn.OPERATION_COMMAND,e,t,n)),An(this,"destroy",()=>{this.tearDownActiveXCommunication()}),this.isSynchronous=t,this.channelName=xn.ACTIVEX_CHANNEL_NAME,this.reqIdToPromiseMap=new Map,this.isActiveXExtensionListenerAttached=!1,this.retryAttempt=0,this.document=document,this.window=window,this.setupActiveXCommunication()}},Dn=n(103);function Rn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";const{document:o}=window,a=new Date,s=[];void 0===n&&(n=a.getTime()+5184e6),a.setTime(n),s.push("".concat(e,"=").concat(encodeURIComponent(t))),0!==n&&s.push("; expires=".concat(a.toUTCString())),s.push("; path=".concat(r)),i&&s.push("; domain=".concat(i)),s.push("; secure"),o.cookie=s.join("")}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Nn="GET",Ln="POST",Fn=31536e6,zn=17223,Un=17224,Bn="Content-Type",Hn="text/plain; charset=UTF-8",Vn="notrunning",Wn=new Dn.a;function Kn(){return Wn.getItem("comUseFallback")?{primary:Un,fallback:zn}:{primary:zn,fallback:Un}}var qn=class extends In{constructor(e,t,n){super(e),jn(this,"createCORSRequest",(e,t)=>{let n;try{const{XMLHttpRequest:r}=this.window;return(n=new r).open(e,t,!0),n}catch(n){if(this.retryCounter<3)return this.retryCounter+=1,this.createCORSRequest(e,t);throw new Error("could not create xhr")}}),jn(this,"getComServerStatusInstallationPromise",e=>{let t,n;const r=new Promise((e,r)=>{t=e,n=r}),i=(e,n)=>{this.currentPort=e,e===zn?Wn.removeItem("comUseFallback"):Wn.setItem("comUseFallback",1),this.comServerInstallationPromiseRejected=!1,t(n)},o=Kn(),a=o.primary,s=o.fallback;return this.checkInstallStatus(a,e).then(i.bind(this,a)).catch(t=>{if(t===Vn)return this.comServerInstallationPromiseRejected=!0,void n();this.checkInstallStatus(s,e).then(i.bind(this,s)).catch(()=>{this.comServerInstallationPromiseRejected=!0,n()})}),r}),jn(this,"sendComServerRequest",(e,t,n,r)=>new Promise((i,o)=>{try{const a=this.createCORSRequest(e,t);a.setRequestHeader(Bn,Hn),a.onload=()=>{i(a)},a.onerror=()=>{o(a)},r>0&&(a.timeout=r,a.ontimeout=()=>{o(a)}),setTimeout(()=>{a.send(n)},0)}catch(e){o()}})),jn(this,"checkInstallStatus",(e,t)=>this.sendComServerRequest(Nn,"".concat(this.url).concat(e,"/status"),null,t).then(e=>{const t=JSON.parse(e.responseText);if(t.running)return t;throw this.comServerInstallationPromiseRejected=!0,new Error(Vn)})),jn(this,"getComChannel",e=>(function(e){const{document:t}=window,n=t.cookie.split("; "),r=n.length;let i,o;for(o=0;o<r;o+=1)if((i=n[o].split("="))[0]===e)return i[1]?decodeURIComponent(i[1]):"";return""})("".concat(e,"-bgp-id"))),jn(this,"setComChannel",e=>{const t=this.getComChannel(e)||this.generateId(),n="bgp-".concat(t),r=(new Date).getTime()+Fn;return Rn("".concat(e,"-bgp-id"),t,r),Rn("bgp-".concat(t),"generic",r),n}),jn(this,"getComServerStatus",e=>!this.comServerInstallationPromise||this.comServerInstallationPromiseRejected?(this.comServerInstallationPromise=null,this.comServerInstallationPromise=this.getComServerStatusInstallationPromise(e),this.comServerInstallationPromise):this.comServerInstallationPromise),jn(this,"sendRequest",(e,t,n)=>{const r="".concat(this.url).concat(this.currentPort,"/application_request?application=").concat(this.appName,"&com=").concat(this.comChannelName,"&timeout=").concat(n);return this.sendComServerRequest(Ln,r,e,t).then(e=>{const t=JSON.parse(e.responseText);if(t.response_type&&"error"===t.response_type)throw new Error("Communication error: ".concat(t.message));return t})}),jn(this,"sendCommand",(e,t,n)=>{const r="".concat(this.url).concat(this.currentPort,"/application_command?application=").concat(this.appName,"&com=").concat(this.comChannelName,"&timeout=").concat(n);return this.sendComServerRequest(Ln,r,e,t).then(e=>JSON.parse(e.responseText))}),jn(this,"generateId",()=>{const e=(new Date).getTime();return"xxxxxxxx".replace(/x/g,()=>{return Math.floor((e+16*Math.random())%16).toString(16)})}),this.url=t,this.comChannelName=this.setComChannel(e),this.channelName=n,this.comServerInstallationPromise=null,this.comServerInstallationPromiseRejected=!1,this.retryCounter=0,this.sendCount=0,this.currentPort=Kn().primary,this.window=window}};function Gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qn="box_extension_input",Yn="box_extension_output";var $n=class extends In{constructor(e){var t;super(e),t=this,Gn(this,"executeOperation",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new Promise((o,a)=>{const s=t.buildDetailsObj(e,n,i),l=setTimeout(()=>{a(new Error({status_code:xn.REQUEST_TIMEOUT_RESPONSE_CODE}))},r);t.reqIdToPromiseMap.set(s.req_id,{resolve:o,rejectTimeout:l}),t.createAndDispatchAppExtensionEvent({detail:s})})})),Gn(this,"setupSafariExtensionCommunication",()=>{this.isAppExtensionListenerAttached||(this.isAppExtensionListenerAttached=!0,this.document.addEventListener(Yn,this.appExtensionEventResponseHandler))}),Gn(this,"tearDownSafariExtensionCommunication",()=>{this.isAppExtensionListenerAttached&&(this.isAppExtensionListenerAttached=!1,this.document.removeEventListener(Yn,this.appExtensionEventResponseHandler))}),Gn(this,"appExtensionEventResponseHandler",e=>{const t="string"==typeof e.detail?JSON.parse(e.detail):e.detail;if(this.reqIdToPromiseMap.has(t.req_id)){const e=this.reqIdToPromiseMap.get(t.req_id);if(e){clearTimeout(e.rejectTimeout),this.reqIdToPromiseMap.delete(t.req_id);const n="string"==typeof t.com_server_response.data?JSON.parse(t.com_server_response.data):t.com_server_response.data;e.resolve(n)}}}),Gn(this,"createAndDispatchAppExtensionEvent",e=>{const{CustomEvent:t}=this.window,n=new t(Qn,e);this.document.dispatchEvent(n)}),Gn(this,"getComServerStatus",(e,t)=>this.executeOperation(xn.OPERATION_STATUS,null,e,t)),Gn(this,"sendRequest",(e,t,n)=>this.executeOperation(xn.OPERATION_REQUEST,e,t,n)),Gn(this,"sendCommand",(e,t,n)=>this.executeOperation(xn.OPERATION_COMMAND,e,t,n)),Gn(this,"destroy",()=>{this.tearDownSafariExtensionCommunication()}),this.reqIdToPromiseMap=new Map,this.channelName=xn.SAFARI_CHANNEL_NAME,this.window=window,this.document=document,this.setupSafariExtensionCommunication()}};const Xn=55,Zn="16.16299",Jn="17.17134",er=5e3;let tr;function nr(e){const{BOX_UNSECURE_LOCAL_BASE_URL:t,CREATED_STATUS:n,HTTP_CHANNEL_NAME:r}=xn;return tr.http_channel_status=n,new qn(e,t,r)}function rr(e){const{CREATED_STATUS:t}=xn;return tr.safari_channel_status=t,new $n(e)}function ir(e){const{CREATED_STATUS:t}=xn;return tr.activex_channel_status=t,new Mn(e,!0)}function or(){const{EDGE:e}=wn;return kn.isMinBrowser(e,Jn)||kn.isMinBrowser(e,Zn)&&kn.getVersion().startsWith("16.")}function ar(){return kn.isEdge()&&!or()}function sr(){const{CHROME:e,FIREFOX:t}=wn;return kn.isMinBrowser(e,53)||kn.isMinBrowser(t,Xn)||or()}function lr(){return kn.isMinBrowser(wn.SAFARI,10)}function cr(){return kn.isMinBrowser(wn.IE,11)}function ur(e){const{BOX_EDIT_NOT_SUPPORTED_ERROR:t,BOX_EDIT_SAFARI_ERROR:n,BOX_EDIT_UNINSTALLED_ERROR:r,BOX_EDIT_UPGRADE_BROWSER_ERROR:i}=xn;let o=t;return sr()?o=r:cr()?o=r:kn.isFirefox()||kn.isChrome()||kn.isSafari()&&!lr()||ar()?o=i:lr()&&(o=n),tr.error_message=o,e(new Error(o))}function dr(e){let t=er;return"number"==typeof e&&e>=0&&(t=Math.floor(e)),t}function hr(e){let t=+(e/1e3).toFixed(2);return e<2?t/=2:t-=1,t}var fr=class{constructor(e){var t,n,r;r=!1,(n="isInitialized")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.channels=[],this.isInitialized=!0,function(){const e=kn.getName(),t=kn.getVersion(),{UNCREATED_STATUS:n}=xn;tr={box_tools_version:null,browser_name:e,browser_version:t,error_message:null,installation_type:null,http_channel_status:n,https_channel_status:n,activex_channel_status:n,safari_channel_status:n}}(),sr()?this.channels.push(nr(e)):lr()?this.channels.push(rr(e)):cr()&&kn.isIEAndSpecificBrowserPluginSupported(xn.BOX_TOOLS_PLUGIN_NAME)?this.channels.push(function(e){const{CREATED_STATUS:t}=xn;return tr.activex_channel_status=t,new Mn(e,!1)}(e)):kn.isFirefox()&&!kn.isMinBrowser(wn.FIREFOX,Xn)||ar()||(this.channels=this.channels.concat([nr(e),rr(e),ir(e)]))}getComServerStatus(e){const{ACTIVE_STATUS:t}=xn,n=dr(e),r=hr(n),i=ar();return new Promise((e,o)=>i?ur.call(null,o):this.channels.length?_n(this.channels.map(i=>i.getComServerStatus(n,r).then(n=>(this.activeChannel=i,n&&(tr.installation_type=n.installation_type,tr.box_tools_version=n.version),tr["".concat(i.channelName,"_status")]=t,e(n))))).catch(ur.bind(null,o)):ur.call(null,o))}sendRequest(e,t,n){const r=dr(n),i=hr(r);return this.activeChannel?this.activeChannel.sendRequest(e,r,i):this.getComServerStatus().then(()=>this.activeChannel.sendRequest(e,r,i))}sendCommand(e,t){const n=dr(t),r=hr(n);return this.activeChannel?this.activeChannel.sendCommand(e,n,r):this.getComServerStatus().then(()=>this.activeChannel.sendCommand(e,n,r))}};const pr=5e3,mr=100;let gr;let br=null;class vr{constructor(){return br instanceof vr||(br=this),this.extensionRequestQueue=new Map,br}queueGetNativeAppNameFromLocal(e){if(this.extensionRequestQueue.has(e)){const t=this.extensionRequestQueue.get(e);if(!t)throw new Error("Race condition re: queueGetNativeAppNameFromLocal");return t.promise}const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});return t.promise=n,this.extensionRequestQueue.set(e,t),n}checkBoxEditAvailability(){return this.getBoxEditAvailability()}getBoxEditAvailability(){return this.client=new fr(xn.BOX_EDIT_APP_NAME),this.client.getComServerStatus()}async canOpenWithBoxEdit(e){const t=await Promise.all(e.map(async e=>{try{return[e,await this.getAppForExtension(e)]}catch(t){return[e,""]}})),n=new Map;return t.forEach(e=>n.set(...e)),Promise.resolve(n)}openFile(e,t){const n=function(e,t,n,r){return JSON.stringify({auth_code:n,auth_token:t,browser_type:kn.getName(),command_type:"launch_application",file_id:e.toString(),token_scope:r})}(e,t.data.token,t.data.auth_code,t.data.token_scope);return this.client.sendCommand(n,pr)}getAppForExtension(e){try{if(function(e){const{EXTENSION_BLACKLIST:t}=xn;let n=e.toUpperCase();return"."===n.charAt(0)&&(n=n.substr(1)),n in t}(e))throw new Error("blacklisted");const t=this.queueGetNativeAppNameFromLocal(e);return gr||(gr=setTimeout(()=>{this.processExtensionRequestQueue()},mr)),t}catch(e){return Promise.reject()}}processExtensionRequestQueue(){const e=new Map,t=[];this.extensionRequestQueue.forEach((n,r)=>{e.set(r,n),t.push(r)}),this.extensionRequestQueue.clear(),gr=null;const n=function(e){return JSON.stringify({request_type:"get_default_application",extension:e})}(t);return this.client.sendRequest(n).then(n=>{if(n&&n.default_application_name){let t=n.default_application_name;"[object Object]"===Object.prototype.toString.call(t)&&(t=[t]),t.forEach(t=>{const n=Object.keys(t)[0],r=decodeURIComponent(t[n]);if(r){const t=e.get(n);t&&(t.resolve(r),e.delete(n))}})}t.forEach(t=>{const n=e.get(t);n&&n.reject()})})}}var yr=vr;function wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.a=class{constructor(e){this.options=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(n),!0).forEach((function(t){Er(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{apiHost:e.apiHost||b.U,uploadHost:e.uploadHost||b.X,cache:e.cache||new r.a,language:e.language})}destroy(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.fileAPI&&(this.fileAPI.destroy(),delete this.fileAPI),this.weblinkAPI&&(this.weblinkAPI.destroy(),delete this.weblinkAPI),this.plainUploadAPI&&(this.plainUploadAPI.destroy(),delete this.plainUploadAPI),this.chunkedUploadAPI&&(this.chunkedUploadAPI.destroy(),delete this.chunkedUploadAPI),this.folderAPI&&(this.folderAPI.destroy(),delete this.folderAPI),this.searchAPI&&(this.searchAPI.destroy(),delete this.searchAPI),this.recentsAPI&&(this.recentsAPI.destroy(),delete this.recentsAPI),this.versionsAPI&&(this.versionsAPI.destroy(),delete this.versionsAPI),this.fileAccessStatsAPI&&(this.fileAccessStatsAPI.destroy(),delete this.fileAccessStatsAPI),this.fileActivitiesAPI&&(this.fileActivitiesAPI.destroy(),delete this.fileActivitiesAPI),this.tasksNewAPI&&(this.tasksNewAPI.destroy(),delete this.tasksNewAPI),this.taskCollaboratorsAPI&&(this.taskCollaboratorsAPI.destroy(),delete this.taskCollaboratorsAPI),this.taskLinksAPI&&(this.taskLinksAPI.destroy(),delete this.taskLinksAPI),this.commentsAPI&&(this.commentsAPI.destroy(),delete this.commentsAPI),this.threadedCommentsAPI&&(this.threadedCommentsAPI.destroy(),delete this.threadedCommentsAPI),this.markerBasedGroupsAPI&&(this.markerBasedGroupsAPI.destroy(),delete this.markerBasedGroupsAPI),this.markerBasedUsersAPI&&(this.markerBasedUsersAPI.destroy(),delete this.markerBasedUsersAPI),this.groupsAPI&&(this.groupsAPI.destroy(),delete this.groupsAPI),this.usersAPI&&(this.usersAPI.destroy(),delete this.usersAPI),this.metadataAPI&&(this.metadataAPI.destroy(),delete this.metadataAPI),this.fileCollaboratorsAPI&&(this.fileCollaboratorsAPI.destroy(),delete this.fileCollaboratorsAPI),this.fileCollaborationsAPI&&(this.fileCollaborationsAPI.destroy(),delete this.fileCollaborationsAPI),this.folderCollaborationsAPI&&(this.folderCollaborationsAPI.destroy(),delete this.folderCollaborationsAPI),this.collaborationsAPI&&(this.collaborationsAPI.destroy(),delete this.collaborationsAPI),this.appIntegrationsAPI&&(this.appIntegrationsAPI.destroy(),delete this.appIntegrationsAPI),this.metadataQueryAPI&&(this.metadataQueryAPI.destroy(),delete this.metadataQueryAPI),this.openWithAPI&&(this.openWithAPI.destroy(),delete this.openWithAPI),this.annotationsAPI&&(this.annotationsAPI.destroy(),delete this.annotationsAPI),e&&(this.options.cache=new r.a)}getCache(){return this.options.cache}getAPI(e){let t;switch(e){case b.jg:t=this.getFolderAPI();break;case b.ig:t=this.getFileAPI();break;case b.kg:t=this.getWebLinkAPI();break;default:throw new Error("Unknown Type!")}return t}getFileAPI(){return(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.destroy(),this.fileAPI=new ee.a(this.options),this.fileAPI}getWebLinkAPI(){return this.destroy(),this.weblinkAPI=new te.a(this.options),this.weblinkAPI}getPlainUploadAPI(){return this.destroy(),this.plainUploadAPI=new Z(this.options),this.plainUploadAPI}getChunkedUploadAPI(){return this.destroy(),this.chunkedUploadAPI=new Y(this.options),this.chunkedUploadAPI}getFolderAPI(){return this.destroy(),this.folderAPI=new J.a(this.options),this.folderAPI}getSearchAPI(){return this.destroy(),this.searchAPI=new ce(this.options),this.searchAPI}getRecentsAPI(){return this.destroy(),this.recentsAPI=new fe(this.options),this.recentsAPI}getMetadataAPI(e){return e&&this.destroy(),this.metadataAPI=new Dt(this.options),this.metadataAPI}getVersionsAPI(e){return e&&this.destroy(),this.versionsAPI=new Se(this.options),this.versionsAPI}getCommentsAPI(e){return e&&this.destroy(),this.commentsAPI=new xe(this.options),this.commentsAPI}getThreadedCommentsAPI(e){return e&&this.destroy(),this.threadedCommentsAPI=new at(this.options),this.threadedCommentsAPI}getTasksNewAPI(e){return e&&this.destroy(),this.tasksNewAPI=new Fe(this.options),this.tasksNewAPI}getTaskCollaboratorsAPI(e){return e&&this.destroy(),this.taskCollaboratorsAPI=new We(this.options),this.taskCollaboratorsAPI}getTaskLinksAPI(e){return e&&this.destroy(),this.taskLinksAPI=new Qe(this.options),this.taskLinksAPI}getFileAccessStatsAPI(e){return e&&this.destroy(),this.fileAccessStatsAPI=new lt(this.options),this.fileAccessStatsAPI}getFileActivitiesAPI(e){return e&&this.destroy(),this.fileActivitiesAPI=new pt(this.options),this.fileActivitiesAPI}getFileCollaboratorsAPI(e){return e&&this.destroy(),this.fileCollaboratorsAPI=new Nt(this.options),this.fileCollaboratorsAPI}getFileCollaborationsAPI(e){return e&&this.destroy(),this.fileCollaborationsAPI=new zt(this.options),this.fileCollaborationsAPI}getFolderCollaborationsAPI(e){return e&&this.destroy(),this.folderCollaborationsAPI=new Ut(this.options),this.folderCollaborationsAPI}getCollaborationsAPI(e){return e&&this.destroy(),this.collaborationsAPI=new Kt(this.options),this.collaborationsAPI}getMarkerBasedGroupsAPI(e){return e&&this.destroy(),this.markerBasedGroupsAPI=new vt(this.options),this.markerBasedGroupsAPI}getMarkerBasedUsersAPI(e){return e&&this.destroy(),this.markerBasedUsersAPI=new Ct(this.options),this.markerBasedUsersAPI}getGroupsAPI(e){return e&&this.destroy(),this.groupsAPI=new Ot(this.options),this.groupsAPI}getUsersAPI(e){return e&&this.destroy(),this.usersAPI=new It(this.options),this.usersAPI}getFeedAPI(e){return e&&this.destroy(),this.feedItemsAPI=new fn(this.options),this.feedItemsAPI}getOpenWithAPI(e){return e&&this.destroy(),this.openWithAPI=new bn(this.options),this.openWithAPI}getAppIntegrationsAPI(e){return e&&this.destroy(),this.appIntegrationsAPI=new mn(this.options),this.appIntegrationsAPI}getMetadataQueryAPI(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.destroy(),this.metadataQueryAPI=new yn(this.options),this.metadataQueryAPI}getBoxEditAPI(){return this.boxEditAPI=new yr,this.boxEditAPI}getAnnotationsAPI(e){return e&&this.destroy(),this.annotationsAPI=new Jt(this.options),this.annotationsAPI}}},function(e,t,n){"use strict";var r=n(0),i=n(10);t.a=e=>{let{className:t="",color:n="#000000",height:o=24,title:a,width:s=24}=e;return r.createElement(i.a,{className:"icon-check ".concat(t),height:o,title:a,viewBox:"0 0 24 24",width:s},r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),r.createElement("path",{className:"fill-color",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",fill:n}))}},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(12),s=n.n(a),l=n(52),c=n(273),u=n(152),d=n(3),h=n.n(d),f=n(217),p=n.n(f);n(664);function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class v extends r.Component{constructor(e){super(e),b(this,"state",{shouldShowTopScrollShadow:!1,shouldShowBottomScrollShadow:!1}),b(this,"componentDidMount",()=>{const e=this.getScrollShadowState();this.setState(e),this.scrollRef&&(this.scrollRef.addEventListener("transitionend",this.throttledOnContentScroll),this.scrollRef&&this.observer.observe(this.scrollRef,{attributes:!0,childlist:!0,subtree:!0}))}),b(this,"onContentScroll",()=>{const e=this.getScrollShadowState();this.setState(e)}),b(this,"getScrollShadowState",()=>{const{scrollTop:e,scrollHeight:t,clientHeight:n}=this.scrollRef||{},r={};return e>0&&e<t-n&&(r.shouldShowTopScrollShadow=!0,r.shouldShowBottomScrollShadow=!0),0===e&&(r.shouldShowTopScrollShadow=!1),e<t-n&&(r.shouldShowBottomScrollShadow=!0),e===t-n&&(r.shouldShowBottomScrollShadow=!1),r}),b(this,"scrollRef",null),b(this,"throttledOnContentScroll",p()(this.onContentScroll,100)),this.observer=new MutationObserver(this.throttledOnContentScroll)}componentWillUnmount(){this.observer.disconnect(),this.scrollRef&&this.scrollRef.removeEventListener("transitionend",this.throttledOnContentScroll)}render(){const e=this.props,{children:t,className:n="",scrollRefFn:i,shadowSize:a}=e,s=g(e,["children","className","scrollRefFn","shadowSize"]),{shouldShowTopScrollShadow:l,shouldShowBottomScrollShadow:c}=this.state,u=o()("scroll-container",n,{"is-showing-top-shadow":l,"is-showing-bottom-shadow":c});return r.createElement("div",m({className:u},s),r.createElement("div",{className:o()("scroll-wrap-container","style--".concat(a)),onScroll:this.throttledOnContentScroll,ref:e=>{this.scrollRef=e,i(e)}},t))}}b(v,"defaultProps",{scrollRefFn:h.a,shadowSize:"cover"});var y=v,w=n(1);n(665);function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){e.preventDefault(),e.stopPropagation()}class S extends r.Component{constructor(e){super(e),E(this,"setActiveItem",e=>{this.setState({activeItemIndex:e}),-1===e&&this.setActiveItemID(null)}),E(this,"setActiveItemID",e=>{const{scrollBoundarySelector:t}=this.props,n=e?document.getElementById(e):null,r={block:"nearest"};void 0!==t&&(r.boundary=document.querySelector(t)),this.setState({activeItemID:e},()=>{Object(l.e)(n,r)})}),E(this,"haveChildrenChanged",e=>{const{children:t}=this.props,n=r.Children.count(t);if(n!==r.Children.count(e))return!0;if(0===n)return!1;const i=r.Children.map(t,e=>e.key),o=r.Children.map(e,e=>e.key);return i.some((e,t)=>e!==o[t])}),E(this,"resetActiveItem",()=>{this.setState({activeItemID:null,activeItemIndex:-1})}),E(this,"handleFocus",()=>{this.openDropdown()}),E(this,"handleDocumentClick",e=>{const t=this.selectorDropdownRef.current;t&&e.target instanceof Node&&t.contains(e.target)||t===e.target||this.closeDropdown()}),E(this,"handleInput",()=>{this.openDropdown()}),E(this,"handleKeyDown",e=>{const{children:t,isAlwaysOpen:n,onEnter:i}=this.props,{activeItemIndex:o}=this.state,a=r.Children.count(t);switch(e.key){case"ArrowDown":if(this.isDropdownOpen()){a&&C(e);const t=o===a-1?-1:o+1;this.setActiveItem(t)}else this.openDropdown();break;case"ArrowUp":if(this.isDropdownOpen()){a&&C(e);const t=-1===o?a-1:o-1;this.setActiveItem(t)}else this.openDropdown();break;case"Enter":-1!==o&&this.isDropdownOpen()?(C(e),this.selectItem(o,e)):i&&i(e);break;case"Tab":this.isDropdownOpen()&&(this.closeDropdown(),this.resetActiveItem());break;case"Escape":!n&&this.isDropdownOpen()&&(C(e),this.closeDropdown(),this.resetActiveItem());break;default:this.handleInput()}}),E(this,"isDropdownOpen",()=>{const{children:e,isAlwaysOpen:t}=this.props,{shouldOpen:n}=this.state;return r.Children.count(e)>0&&(!!t||n)}),E(this,"openDropdown",()=>{if(!this.state.shouldOpen){const{shouldSetActiveItemOnOpen:e}=this.props;e&&this.setActiveItem(0),this.setState({shouldOpen:!0}),document.addEventListener("click",this.handleDocumentClick,!0)}}),E(this,"closeDropdown",()=>{this.setState({shouldOpen:!1}),document.removeEventListener("click",this.handleDocumentClick,!0)}),E(this,"selectItem",(e,t)=>{const{onSelect:n}=this.props;n&&n(e,t),this.closeDropdown()}),this.listboxID=s()("listbox"),this.state={activeItemID:null,activeItemIndex:-1,shouldOpen:!1},this.selectorDropdownRef=r.createRef()}componentDidUpdate(e){let{shouldSetActiveItemOnOpen:t,children:n}=e;this.haveChildrenChanged(n)&&(t?this.setActiveItem(0):this.resetActiveItem())}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick,!0)}render(){const{listboxID:e,selectItem:t,setActiveItem:n,setActiveItemID:i,closeDropdown:a}=this,{dividerIndex:s,overlayTitle:l,children:d,className:h,isPositionDynamic:f,title:p,selector:m,shouldScroll:g}=this.props,{activeItemID:b,activeItemIndex:v}=this.state,E=this.isDropdownOpen(),C={"aria-activedescendant":b,"aria-autocomplete":"list","aria-expanded":E,role:"combobox"};E&&(C["aria-owns"]=e);const S=r.createElement("ul",{className:o()("overlay",l?l.toLowerCase():""),id:e,role:"listbox"},l&&r.createElement("h5",{className:"SelectorDropdown-title"},l),r.Children.map(d,(e,o)=>{const l={onClick:e=>{t(o,e)},onMouseDown:e=>{e.preventDefault()},onMouseEnter:()=>{n(o)},closeDropdown:()=>{a()},setActiveItemID:i};o===v&&(l.isActive=!0);const c=o===s;return r.createElement(r.Fragment,null,c&&r.createElement("hr",{className:"SelectorDropdown-divider"}),r.cloneElement(e,l))}));return(r.createElement("div",{className:o()("SelectorDropdown",h),onFocus:this.handleFocus,onKeyDown:this.handleKeyDown,onPaste:this.handleInput,ref:this.selectorDropdownRef},r.createElement(c.a,{isPositionDynamic:f,isOpen:E,placement:u.c},r.cloneElement(m,{inputProps:C}),r.createElement("div",{className:"SelectorDropdown-overlay ".concat(w.Xe," is-visible")},p,g?r.createElement(y,null,S):S))))}}E(S,"defaultProps",{isPositionDynamic:!1});var O=S;n.d(t,"a",(function(){return O}))},function(e,t,n){"use strict";var r=n(0),i=n(79),o=n(119),a=n(10);var s=e=>{let{className:t="",color:n="#979797",height:i=64,title:o,width:s=64}=e;return r.createElement(a.a,{className:"icon-sad-cloud ".concat(t),height:i,title:o,viewBox:"0 0 1224 792",width:s},r.createElement("g",{transform:"translate(1 1)"},r.createElement("path",{className:"fill-color",d:"M273.7 788.9c-142 0-257.6-116.5-257.6-259.7 0-140.3 110.9-255 249-259.6 4.6-70.2 33.9-135.4 83.6-185.3C402.8 29.7 475-.3 551.9-.3c56.8 0 110.7 11.3 156 32.7 43.7 20.7 78.4 50.5 101.3 86.9 7.8-1.9 16.2-2.9 25.1-2.9 43.4 0 97.3 23.8 128.2 56.6l.2.2c23.9 26 41.2 59.1 48.9 93.1 4.1 18.3 5 35.1 2.8 49.2 15.8 3.5 32.3 9.8 48.9 18.7 25.1 13.5 49.9 32.7 71.7 55.4 48.9 51.2 77 113.7 77 171.7 0 61.1-23.4 118.4-66 161.3-42.5 42.8-99.1 66.4-159.5 66.4l-712.8-.1zm0-479.5c-120 0-217.6 98.6-217.6 219.7 0 121.2 97.6 219.7 217.6 219.7h712.8c49.6 0 96.2-19.4 131.1-54.6 35.1-35.3 54.4-82.6 54.4-133.1 0-47.7-24-100.2-65.9-144-37.8-39.5-84.7-65-119.6-65-7.9 0-15.1-4.6-18.3-11.9-3.2-7.2-1.9-15.6 3.4-21.5 2.8-3.1 6.8-18 1-43.8-6.1-26.9-20.4-54.1-39.3-74.8-23.2-24.6-66.7-43.9-99-43.9-9.9 0-18.3 1.7-24.8 5.2-4.7 2.5-10.3 3-15.3 1.4-5.1-1.6-9.3-5.2-11.8-9.9-18.2-35.5-49.9-64.7-91.6-84.4-40-18.9-88-28.9-138.9-28.9-66.2 0-128.3 25.8-175 72.8-46.8 47.1-72.6 109.9-72.6 176.9 0 11-9 20-20 20h-10.6z",fill:n}),r.createElement("path",{className:"fill-color",d:"M442.7 585.5c-2.9 0-5.9-.6-8.7-2-10-4.8-14.1-16.7-9.3-26.7 15.4-32 39.7-59.1 70.3-78.1 31-19.3 66.9-29.5 104-29.5 75.5 0 141.4 40 176.2 107.1 5.1 9.8 1.3 21.9-8.5 27-9.8 5.1-21.9 1.3-27-8.5-27.8-53.6-80.3-85.5-140.6-85.5-29.6 0-58.2 8.1-82.8 23.5-24.1 15.1-43.3 36.3-55.4 61.5-3.6 7-10.7 11.2-18.2 11.2z",fill:n}),r.createElement("circle",{className:"fill-color",cx:"496.3",cy:"351.5",fill:n,r:"32.1"}),r.createElement("circle",{className:"fill-color",cx:"688.9",cy:"351.5",fill:n,r:"32.1"})))};n(636);const l=Object(i.defineMessages)({errorMaskIconSadCloudText:{id:"boxui.errorMask.iconSadCloudText",defaultMessage:"Sad Box Cloud"}});t.a=e=>{let{errorHeader:t,errorSubHeader:n}=e;return r.createElement("div",{className:"error-mask"},r.createElement(s,{className:"error-mask-sad-cloud",height:50,title:r.createElement(o.a,l.errorMaskIconSadCloudText)}),r.createElement("h4",null,t),r.createElement("h5",null,n))}},function(e,t,n){"use strict";var r=n(0),i=n(208),o=n.n(i),a=n(4),s=n.n(a);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends r.Component{constructor(){super(...arguments),u(this,"focusFirstElement",()=>{if(!this.el)return;const e=o()(this.el);e.length>3?e[1].focus():this.trapEl&&this.trapEl.focus()}),u(this,"focusLastElement",()=>{if(!this.el)return;const e=o()(this.el);e.length>3?e[e.length-3].focus():this.trapEl&&this.trapEl.focus()}),u(this,"handleElKeyDown",e=>{const{handleOverlayKeyDown:t}=this.props;this.el===document.activeElement&&"Tab"===e.key&&(this.focusFirstElement(),e.stopPropagation(),e.preventDefault()),t&&t(e)}),u(this,"handleTrapElKeyDown",e=>{"Tab"===e.key&&(e.stopPropagation(),e.preventDefault())})}componentDidMount(){this.props.shouldDefaultFocus?setTimeout(()=>{this.previousFocusEl=document.activeElement,this.focusFirstElement()},0):setTimeout(()=>{this.el&&this.el.focus()},0)}componentWillUnmount(){setTimeout(()=>{this.previousFocusEl&&this.previousFocusEl.focus()},0)}render(){const e=this.props,{children:t,className:n,getRef:i,handleOverlayKeyDown:o,shouldDefaultFocus:a,shouldOutlineFocus:u}=e,d=c(e,["children","className","getRef","handleOverlayKeyDown","shouldDefaultFocus","shouldOutlineFocus"]);return(r.createElement("div",l({ref:e=>{this.el=e,i&&i(e)},className:s()(n,{"should-outline-focus":u}),onKeyDown:this.handleElKeyDown},d),r.createElement("i",{"aria-hidden":!0,onFocus:this.focusLastElement,tabIndex:"0"}),t,r.createElement("i",{"aria-hidden":!0,onFocus:this.focusFirstElement,tabIndex:"0"}),r.createElement("i",{ref:e=>{this.trapEl=e},"aria-hidden":!0,onKeyDown:this.handleTrapElKeyDown,tabIndex:"0"})))}}var h=d;n.d(t,"a",(function(){return h}))},function(e,t,n){"use strict";var r=n(0),i=n(12),o=n.n(i),a=n(4),s=n.n(a),l=n(79),c=n(119),u=n(110),d=n(17);const h=Object(l.defineMessages)({checkboxTooltipIconInfoText:{id:"boxui.checkboxTooltip.iconInfoText",defaultMessage:"Info"}});var f=e=>{let{tooltip:t}=e;return r.createElement("div",{className:"checkbox-tooltip-wrapper"},r.createElement(d.c,{text:t},r.createElement("div",{className:"info-tooltip"},r.createElement(u.a,{height:16,title:r.createElement(c.a,h.checkboxTooltipIconInfoText),width:16}))))};n(558);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var g=e=>{let{className:t="",description:n,fieldLabel:i,hideLabel:a,id:l,inputClassName:c,isChecked:u,isDisabled:d,label:h,name:g,onFocus:b,onChange:v,subsection:y,tooltip:w}=e,E=m(e,["className","description","fieldLabel","hideLabel","id","inputClassName","isChecked","isDisabled","label","name","onFocus","onChange","subsection","tooltip"]);const C=r.useRef(o()("checkbox")).current,S=l||C,O=r.createElement("span",{className:"checkbox-label"},r.createElement("input",p({"aria-describedby":n?"description_".concat(S):"",checked:u,className:c,disabled:d,id:S,name:g,onFocus:b,onChange:v,type:"checkbox"},E)),r.createElement("span",{className:"checkbox-pointer-target"}),r.createElement("span",{className:s()("bdl-Checkbox-labelTooltipWrapper",{"accessibility-hidden":a})},h&&r.createElement("label",{htmlFor:S},h),w&&r.createElement(f,{tooltip:w})));return r.createElement("div",{className:s()("checkbox-container",t,{"is-disabled bdl-is-disabled":d})},i&&r.createElement("div",{className:"label"},i),O,n?r.createElement("div",{id:"description_".concat(S),className:"checkbox-description"},n):null,y?r.createElement("div",{className:"checkbox-subsection"},y):null)};n.d(t,"a",(function(){return g}))},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:32,height:32,viewBox:"0 0 32 32"},e),r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{fill:i.b,fillRule:"nonzero",d:"M9 3h9.586a1 1 0 01.707.293l6.415 6.414a1 1 0 01.293.707V26A3 3 0 0123 29H9a3 3 0 01-3-3V6a3 3 0 013-3z"}),r.createElement("path",{fill:i.D,fillOpacity:.5,fillRule:"nonzero",d:"M19.286 3.286l5.01 5.009 1.412 1.412a1 1 0 01.203.293H21a2 2 0 01-2-2V3.09a1 1 0 01.286.196z"}),r.createElement("path",{fill:i.D,d:"M17.5 21c.245 0 .45.183.492.412L18 21.5c0 .276-.23.5-.5.5h-7a.505.505 0 01-.5-.5c0-.276.23-.5.5-.5h7zm4-3c.245 0 .45.183.492.412L22 18.5c0 .276-.229.5-.5.5h-11a.505.505 0 01-.5-.5c0-.276.229-.5.5-.5h11zm-1.001-3c.246 0 .45.183.493.412L21 15.5c0 .276-.23.5-.501.5H10.5a.506.506 0 01-.501-.5c0-.276.23-.5.501-.5h10z"})))},function(e,t){e.exports=function(e,t){t=t||{};var n,r,i,o=e.ownerDocument||e,a=[],s=[],l=function(e){var t=[];return function(n){if(n===e.documentElement)return!1;var r=e.defaultView.getComputedStyle(n);return!!function n(r,i){if(r===e.documentElement)return!1;for(var o=0,a=t.length;o<a;o++)if(t[o][0]===r)return t[o][1];var s=!1;return"none"===(i=i||e.defaultView.getComputedStyle(r)).display?s=!0:r.parentNode&&(s=n(r.parentNode)),t.push([r,s]),s}(n,r)||"hidden"===r.visibility}}(o),c=["input","select","a[href]","textarea","button","[tabindex]"],u=e.querySelectorAll(c.join(","));if(t.includeContainer){var d=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;c.some((function(t){return d.call(e,t)}))&&(u=Array.prototype.slice.apply(u)).unshift(e)}for(var h=0,f=u.length;h<f;h++)n=u[h],r=parseInt(n.getAttribute("tabindex"),10),(i=isNaN(r)?n.tabIndex:r)<0||"INPUT"===n.tagName&&"hidden"===n.type||n.disabled||l(n,o)||(0===i?a.push(n):s.push({index:h,tabIndex:i,node:n}));var p=s.sort((function(e,t){return e.tabIndex===t.tabIndex?e.index-t.index:e.tabIndex-t.tabIndex})).map((function(e){return e.node}));return Array.prototype.push.apply(p,a),p}},function(e,t,n){var r=n(42).isFinite;e.exports=function(e){return"number"==typeof e&&r(e)}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:32,height:32,viewBox:"0 0 32 32"},e),r.createElement("g",{fill:"none"},r.createElement("path",{fill:i.i,d:"M9 3h9.586a1 1 0 01.707.293l6.415 6.414a1 1 0 01.293.707V26A3 3 0 0123 29H9a3 3 0 01-3-3V6a3 3 0 013-3z"}),r.createElement("path",{fill:i.D,fillOpacity:.5,d:"M19.286 3.286l5.01 5.009 1.412 1.412a1 1 0 01.203.293H21a2 2 0 01-2-2V3.09a1 1 0 01.286.196z"})))},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:32,height:32,viewBox:"0 0 32 32"},e),r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{fill:"#009AED",fillRule:"nonzero",d:"M9 3h9.586a1 1 0 01.707.293l6.415 6.414a1 1 0 01.293.707V26A3 3 0 0123 29H9a3 3 0 01-3-3V6a3 3 0 013-3z"}),r.createElement("path",{fill:i.D,fillOpacity:.5,fillRule:"nonzero",d:"M19.286 3.286l5.01 5.009 1.412 1.412a1 1 0 01.203.293H21a2 2 0 01-2-2V3.09a1 1 0 01.286.196z"}),r.createElement("path",{fill:i.D,d:"M19.723 18.973l-5.914 3.957a.543.543 0 01-.809-.473v-7.914a.543.543 0 01.809-.473l5.914 3.957a.543.543 0 010 .946z"})))},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(9);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.a=e=>r.createElement(o.a,a({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:i.k,fillRule:"evenodd",d:"M7.646 7.646L4.354 4.354a.5.5 0 010-.708l1.292-1.292a.5.5 0 01.708 0l5.292 5.292a.5.5 0 010 .708l-5.292 5.292a.5.5 0 01-.708 0l-1.292-1.292a.5.5 0 010-.708l3.292-3.292a.5.5 0 000-.708z"}))},function(e,t,n){var r=n(34),i=n(138),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){"use strict";var r=n(0),i=n(79),o=n(119),a=n(54),s=n(4),l=n.n(s),c=n(3),u=n.n(c),d=n(196),h=n.n(d),f=n(12),p=n.n(f),m=n(151),g=n(2),b=n(9);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var y=e=>r.createElement(b.a,v({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("path",{fill:g.k,fillRule:"evenodd",d:"M8 1a7 7 0 110 14A7 7 0 018 1zm0 10a1 1 0 100 2 1 1 0 000-2zm0-8a1 1 0 00-1 1v5a1 1 0 002 0V4a1 1 0 00-1-1z"}));function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var E=e=>r.createElement(b.a,w({width:16,height:16,viewBox:"0 0 16 16"},e),r.createElement("g",{fill:g.k,fillRule:"evenodd"},r.createElement("path",{d:"M13.436 0c.892 0 1.215.093 1.54.267.327.174.583.43.757.756.174.326.267.65.267 1.54v10.873c0 .892-.093 1.215-.267 1.54-.174.327-.43.583-.756.757-.326.174-.65.267-1.54.267H2.563c-.892 0-1.215-.093-1.54-.267a1.817 1.817 0 01-.757-.756C.093 14.65 0 14.327 0 13.437V2.563c0-.892.093-1.215.267-1.54.174-.327.43-.583.756-.757C1.35.093 1.673 0 2.563 0h10.873zM13 4H3a1 1 0 00-1 1v8a1 1 0 001 1h10a1 1 0 001-1V5a1 1 0 00-1-1z"}),r.createElement("g",{transform:"translate(3 5.5)"},r.createElement("rect",{width:1.5,height:1.5,x:2.833,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:5.667,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:8.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:2.83,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:5.67,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:8.5,y:2.5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,y:5,rx:.5}),r.createElement("rect",{width:1.5,height:1.5,x:2.83,y:5,rx:.5})))),C=n(272),S=n(535),O=n.n(S);function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class _ extends O.a{constructor(e){super(e),k(this,"handleBlur",()=>{this.hide()}),k(this,"handleClickOutside",e=>{if(!(this.isVisible()&&this.datePickerButtonEl&&this.datePickerButtonEl.contains(e.target))&&this.isVisible()&&!this.el.contains(e.target)){this.hide();const e=document.activeElement;this.accessibleFieldEl&&e&&e.tabIndex<0&&this.accessibleFieldEl.focus()}}),this.accessibleFieldEl=e.accessibleFieldEl,this.datePickerButtonEl=e.datePickerButtonEl,this.accessibleFieldEl&&(this.el.classList.add("is-bound"),document.body.appendChild(this.el),this.accessibleFieldEl.addEventListener("blur",this.handleBlur),this.hide())}show(){super.show(),this.accessibleFieldEl&&(document.addEventListener("click",this.handleClickOutside,!0),this.adjustPosition())}hide(){super.hide(),this.accessibleFieldEl&&document.removeEventListener("click",this.handleClickOutside)}destroy(){super.destroy(),this.accessibleFieldEl&&(this.accessibleFieldEl.removeEventListener("blur",this.handleBlur),document.removeEventListener("click",this.handleClickOutside))}}var x=_,P=n(24),I=n(129),A=n(14),T=n(17),M=n(33);n(663);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(){return(R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N=Object(i.defineMessages)({previousMonth:{id:"boxui.base.previousMonth",defaultMessage:"Previous Month"},nextMonth:{id:"boxui.base.nextMonth",defaultMessage:"Next Month"},iconAlertText:{id:"boxui.datePicker.iconAlertText",defaultMessage:"Invalid Date"},dateClearButton:{id:"boxui.datePicker.dateClearButton",defaultMessage:"Clear Date"},chooseDate:{id:"boxui.datePicker.chooseDate",defaultMessage:"Choose Date"},dateInputRangeError:{id:"boxui.datePicker.dateInputRangeError",defaultMessage:"Please enter a date between {minLocaleDate} and {maxLocaleDate}"},dateInputMaxError:{id:"boxui.datePicker.dateInputMaxError",defaultMessage:"Please enter a date before {maxLocaleDate}"},dateInputMinError:{id:"boxui.datePicker.dateInputMinError",defaultMessage:"Please enter a date after {minLocaleDate}"}}),L=300,F="Enter",z="Escape",U="Tab",B=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/;let H;function V(e,t){if(!e)return"";let n;switch(t){case H.ISO_STRING_DATE_FORMAT:return e.toISOString();case H.LOCALE_DATE_STRING_DATE_FORMAT:return e.toLocaleDateString();case H.UTC_TIME_DATE_FORMAT:return Object(M.b)(e);case H.UTC_ISO_STRING_DATE_FORMAT:return(n=new Date(Object(M.b)(e))).toISOString();default:return e.getTime()}}!function(e){e.ISO_STRING_DATE_FORMAT="isoString",e.LOCALE_DATE_STRING_DATE_FORMAT="localeDateString",e.UTC_TIME_DATE_FORMAT="utcTime",e.UNIX_TIME_DATE_FORMAT="unixTime",e.UTC_ISO_STRING_DATE_FORMAT="utcISOString"}(H||(H={}));const W=["en-US","en-CA","jp-JP"];class K extends r.Component{constructor(){var e;super(...arguments),e=this,j(this,"state",{isDateInputInvalid:!1,showDateInputError:!1}),j(this,"errorMessageID",p()("errorMessage")),j(this,"descriptionID",p()("description")),j(this,"onSelectHandler",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{onChange:n,isAccessible:r}=e.props,{isDateInputInvalid:i}=e.state;if(n){n(t,e.formatValue(t))}r&&(e.dateInputEl&&e.datePicker&&(e.dateInputEl.value=e.datePicker.toString()),e.datePicker&&e.datePicker.isVisible()&&(e.datePicker.hide(),e.focusDatePicker())),i&&e.setState({isDateInputInvalid:!1,showDateInputError:!1})})),j(this,"datePicker",null),j(this,"canUseDateInputType",!0),j(this,"shouldStayClosed",!1),j(this,"focusDatePicker",()=>{this.dateInputEl&&this.dateInputEl.focus()}),j(this,"getDateInputError",()=>{const{intl:e,maxDate:t=null,minDate:n=null}=this.props,{showDateInputError:r}=this.state,{formatMessage:i}=e;if(!r)return"";let o="";const a=V(t,H.LOCALE_DATE_STRING_DATE_FORMAT),s=V(n,H.LOCALE_DATE_STRING_DATE_FORMAT);return a&&s?o=i(N.dateInputRangeError,{maxLocaleDate:a,minLocaleDate:s}):a?o=i(N.dateInputMaxError,{maxLocaleDate:a}):s&&(o=i(N.dateInputMinError,{minLocaleDate:s})),o}),j(this,"handleInputKeyDown",e=>{const{isKeyboardInputAllowed:t,isTextInputAllowed:n,isAccessible:r}=this.props;!t&&this.datePicker&&this.datePicker.isVisible()&&e.stopPropagation(),n||r||e.key===U||e.preventDefault(),(n||r&&!this.canUseDateInputType)&&e.key===F&&e.preventDefault(),!r||e.key!==F&&" "!==e.key||e.preventDefault(),e.key!==F&&e.key!==z&&" "!==e.key||this.datePicker&&this.datePicker.isVisible()&&this.datePicker.hide()}),j(this,"handleOnChange",e=>{const{isAccessible:t,maxDate:n,minDate:r,onChange:i}=this.props,{isDateInputInvalid:o}=this.state;if(!t||!this.canUseDateInputType)return;this.datePicker&&this.datePicker.isVisible()&&e.stopPropagation();const{value:a}=e.target;if(this.datePicker&&a){const e=this.parseDisplayDateType(a);if(e){if(r&&e<r||n&&e>n)return this.datePicker.setDate(null),void this.setState({isDateInputInvalid:!0});o&&this.setState({isDateInputInvalid:!1,showDateInputError:!1})}else this.setState({isDateInputInvalid:!0});if(this.datePicker.setDate(e,!0),i){i(e,this.formatValue(e))}}else o&&this.setState({isDateInputInvalid:!1,showDateInputError:!1})}),j(this,"handleInputBlur",e=>{const{isAccessible:t,isTextInputAllowed:n,onBlur:r}=this.props,{isDateInputInvalid:i}=this.state,o=e.relatedTarget||document.activeElement;this.datePicker&&this.datePicker.isVisible()&&o&&o===this.datePickerButtonEl&&(this.shouldStayClosed=!0,setTimeout(()=>{this.shouldStayClosed=!1},L)),r&&r(e);let a=null;if(this.dateInputEl){let e=null;t&&!this.canUseDateInputType&&(e=this.parseDisplayDateType(this.dateInputEl.value)),a=new Date(e||this.dateInputEl.value)}(n||t&&!this.canUseDateInputType)&&a&&a.getDate()&&this.onSelectHandler(a),t&&i&&this.setState({showDateInputError:!0})}),j(this,"handleButtonClick",e=>{e.preventDefault(),e.stopPropagation();const{isAccessible:t,isDisabled:n}=this.props;if(t){if(n||!this.datePicker)return;this.datePicker.isVisible()?(this.datePicker.hide(),this.focusDatePicker()):this.datePicker.show()}else this.shouldStayClosed||this.focusDatePicker()}),j(this,"handleOnClick",e=>{const{isAccessible:t}=this.props;t&&(e.preventDefault(),e.stopPropagation())}),j(this,"formatDisplay",e=>{const{displayFormat:t,intl:n}=this.props;return e?n.formatDate(e,t):""}),j(this,"formatDisplayDateType",e=>e?V(e,H.UTC_ISO_STRING_DATE_FORMAT).slice(0,10):""),j(this,"parseDisplayDateType",e=>e&&B.test(e)?new Date("".concat(e,"T00:00:00")):null),j(this,"formatValue",e=>{const{dateFormat:t}=this.props;return t?V(e,t):""}),j(this,"clearDate",e=>{e.preventDefault();const{isAccessible:t}=this.props;this.datePicker&&this.datePicker.setDate(null),this.onSelectHandler(null),t&&this.focusDatePicker()}),j(this,"shouldUseAccessibleFallback",()=>{const e=document.createElement("input");try{e.type="date"}catch(e){}return"text"===e.type}),j(this,"renderCalendarButton",()=>{const{intl:e,isAccessible:t,isAlwaysVisible:n,isDisabled:i}=this.props,{formatMessage:o}=e;if(n)return null;const a=t?{"aria-hidden":!0,tabIndex:-1}:{};return r.createElement(A.a,R({"aria-label":o(N.chooseDate),className:"date-picker-open-btn",getDOMRef:e=>{this.datePickerButtonEl=e},isDisabled:i,onClick:this.handleButtonClick,type:P.a.BUTTON},a),r.createElement(E,null))})}componentDidMount(){const{customInput:e,dateFormat:t,displayFormat:n,intl:r,isAccessible:i,isAlwaysVisible:o,isTextInputAllowed:a,maxDate:s,minDate:l,onChange:c,value:d,yearRange:f}=this.props,{formatDate:p,formatMessage:m}=r,{nextMonth:g,previousMonth:b}=N;let v=d;if(i&&this.shouldUseAccessibleFallback()&&(this.canUseDateInputType=!1),t===H.UTC_TIME_DATE_FORMAT&&d&&(v=function(e){const t=e.toUTCString().slice(0,-4);return new Date(t)}(d),c)){c(v,this.formatValue(v))}const y=(new Date).getFullYear(),{timeZone:w}=n||{},E={previousMonth:m(b),nextMonth:m(g),months:h()(12).map(e=>p(new Date(y,e,15),{month:"long",timeZone:w})),weekdays:h()(1,8).map(e=>p(new Date(2016,4,e),{weekday:"long",timeZone:w})),weekdaysShort:h()(1,8).map(e=>p(new Date(2016,4,e),{weekday:"narrow",timeZone:w}))},C={bound:!e,blurFieldOnSelect:!1,setDefaultDate:!0,defaultDate:null===v?void 0:v,field:this.dateInputEl,firstDay:W.includes(r.locale)?0:1,maxDate:s,minDate:l,position:"bottom left",i18n:E,showDaysInNextAndPreviousMonths:!0,onSelect:this.onSelectHandler,yearRange:f,toString:this.formatDisplay};i&&(this.canUseDateInputType&&(delete C.field,C.trigger=this.dateInputEl,C.accessibleFieldEl=this.dateInputEl,C.datePickerButtonEl=this.datePickerButtonEl),C.parse=this.parseDisplayDateType,C.toString=this.formatDisplayDateType,C.keyboardInput=!1),this.datePicker=new x(C),a&&this.updateDateInputValue(this.formatDisplay(v)),o&&(this.datePicker.show(),this.datePicker.hide=u.a)}UNSAFE_componentWillReceiveProps(e){if(!this.datePicker)return;const{value:t=null,minDate:n=null,maxDate:r=null}=e,{value:i,minDate:o,maxDate:a,isTextInputAllowed:s}=this.props,l=this.datePicker&&this.datePicker.getDate();(t&&!i||!t&&i||t&&i&&t.getTime()!==i.getTime())&&this.datePicker.setDate(t),s&&this.updateDateInputValue(this.formatDisplay(t)),(n&&!o||n&&o||n&&o&&n.getTime()!==o.getTime())&&(this.datePicker.setMinDate(n),l&&l<n&&this.datePicker.gotoDate(n)),(r&&!a||!r&&a||r&&a&&r.getTime()!==a.getTime())&&(this.datePicker.setMaxDate(r),l&&r&&l>r&&this.datePicker.gotoDate(r))}componentWillUnmount(){this.datePicker&&this.datePicker.destroy()}updateDateInputValue(e){this.dateInputEl&&(this.dateInputEl.value=e)}render(){const{className:e,customInput:t,description:n,error:i,errorTooltipPosition:a,hideLabel:s,hideOptionalLabel:c,inputProps:d,intl:h,isAccessible:f,isClearable:p,isDisabled:g,isRequired:b,isTextInputAllowed:v,label:w,maxDate:E,minDate:S,name:O,onFocus:k,placeholder:_,resinTarget:x,value:M}=this.props,{isDateInputInvalid:L}=this.state,{formatMessage:F}=h,z=i||this.getDateInputError(),U=!!z||L,H=!!M||L,V=l()(e,"date-picker-wrapper",{"show-clear-btn":p&&H&&!g,"show-error":U}),W={"aria-invalid":U,"aria-required":b,"aria-errormessage":this.errorMessageID,"aria-describedby":n?this.descriptionID:void 0},K=x?{[m.a]:x}:{};let q,G,Q;return q=f?{defaultValue:this.formatDisplayDateType(M)}:v?{defaultValue:this.formatDisplay(M)}:{value:this.formatDisplay(M)},G=f&&this.canUseDateInputType?{onChange:this.handleOnChange}:v||f&&!this.canUseDateInputType?{}:{onChange:u.a},Q=f&&this.canUseDateInputType?{max:this.formatDisplayDateType(E)||"9999-12-31",min:this.formatDisplayDateType(S)||"0001-01-01"}:f&&!this.canUseDateInputType?{name:O,pattern:B.source,title:"YYYY-MM-DD"}:{},r.createElement("div",{className:V},r.createElement("span",{className:"date-picker-icon-holder"},r.createElement(I.a,{hideLabel:s,showOptionalText:!c&&!b,text:w},r.createElement(r.Fragment,null,!!n&&r.createElement("div",{id:this.descriptionID,className:"date-picker-description"},n),r.createElement(T.c,{className:"date-picker-error-tooltip",isShown:!!z,position:a,text:z||"",theme:T.b.ERROR},t?r.cloneElement(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({disabled:g,ref:e=>{this.dateInputEl=e},required:b},K,{},W)):r.createElement("input",R({ref:e=>{this.dateInputEl=e},className:"date-picker-input",disabled:g,onBlur:this.handleInputBlur,onClick:this.handleOnClick,placeholder:_||F(N.chooseDate),required:b,type:f&&this.canUseDateInputType?"date":"text"},G,{onFocus:k,onKeyDown:this.handleInputKeyDown},K,W,d,q,Q))),r.createElement("span",{id:this.errorMessageID,className:"accessibility-hidden",role:"alert"},z))),p&&H&&!g?r.createElement(A.a,{"aria-label":F(N.dateClearButton),className:"date-picker-clear-btn",onClick:this.clearDate,type:P.a.BUTTON},r.createElement(C.a,null)):null,U?r.createElement(y,{className:"date-picker-icon-alert",title:r.createElement(o.a,N.iconAlertText)}):null,this.renderCalendarButton(),r.createElement("input",{className:"date-picker-unix-time-input",name:O,readOnly:!0,type:"hidden",value:M?this.formatValue(M):""})))}}j(K,"defaultProps",{className:"",dateFormat:H.UNIX_TIME_DATE_FORMAT,displayFormat:{},error:"",errorTooltipPosition:T.a.BOTTOM_LEFT,inputProps:{},isClearable:!0,isKeyboardInputAllowed:!1,isTextInputAllowed:!1,yearRange:10});t.a=Object(a.c)(K)},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);n(656);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const l=r.forwardRef((e,t)=>{let{className:n="",description:i,isDisabled:l,isOn:c,isToggleRightAligned:u=!1,label:d,name:h,onBlur:f,onChange:p,onFocus:m,onMouseEnter:g,onMouseLeave:b}=e,v=s(e,["className","description","isDisabled","isOn","isToggleRightAligned","label","name","onBlur","onChange","onFocus","onMouseEnter","onMouseLeave"]);const y=o()("toggle-container",n,{"is-toggle-right-aligned":u}),w=[r.createElement("div",{key:"toggle-simple-switch",className:"toggle-simple-switch"}),r.createElement("div",{key:"toggle-simple-label",className:"toggle-simple-label"},d)];return u&&w.reverse(),r.createElement("div",{className:y,onMouseEnter:g,onMouseLeave:b},r.createElement("label",{className:"toggle-simple"},r.createElement("input",a({checked:c,className:"toggle-simple-input",disabled:l,name:h,onBlur:f,onChange:p,onFocus:m,ref:t,role:"switch",type:"checkbox"},v)),w),i?r.createElement("div",{className:"toggle-simple-description"},i):null)});l.displayName="Toggle",t.a=l},function(e,t,n){var r=n(102),i=n(39),o="Expected a function";e.exports=function(e,t,n){var a=!0,s=!0;if("function"!=typeof e)throw new TypeError(o);return i(n)&&(a="leading"in n?!!n.leading:a,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:a,maxWait:t,trailing:s})}},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(2);t.a=e=>{let{className:t="",color:n=o.m,height:a=16,title:s,width:l=16}=e;return r.createElement(i.a,{className:"icon-open-with ".concat(t),height:a,title:s,viewBox:"0 0 16 16",width:l},r.createElement("path",{className:"fill-color",fill:n,fillRule:"evenodd",d:"M12 2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm0 1H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm-1 2v6h-1V6.71l-4.65 4.64-.7-.7L9.29 6H5V5h6z"}))}},function(e,t,n){"use strict";var r=n(0);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{let{children:t,href:n="#",linkRef:a,target:s,rel:l,component:c,refProp:u}=e,d=o(e,["children","href","linkRef","target","rel","component","refProp"]);const h="_blank"!==s||l?l:"noopener",f=c||"a",p={[u||"ref"]:a};return r.createElement(f,i({href:n,rel:h,target:s},p,d),t)}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(6),a=n(119),s=n(33),l=n(77),c=n(31),u=n(14),d=n(17),h=n(4),f=n.n(h),p=n(10),m=n(2);var g=e=>{let{className:t="",height:n=12,color:i=m.g,title:o,width:a=12}=e;const s=f()("bdl-IconSecurityClassification",t);return r.createElement(p.a,{className:s,height:n,title:o,viewBox:"0 0 12 12",width:a},r.createElement("path",{d:"M6 0l4.875 2.438v2.856c0 2.645-2.309 5.792-4.79 6.366L6 11.68l-.084-.02c-2.482-.574-4.791-3.721-4.791-6.366V2.438L6 0zm0 .839L1.875 2.9v2.393c0 2.276 2.026 5.068 4.125 5.614 2.1-.546 4.125-3.338 4.125-5.614V2.901L6 .839zm2.25 2.58c.207 0 .375.168.375.375v3c0 .207-.168.375-.375.375s-.375-.168-.375-.375v-3c0-.207.168-.375.375-.375z",fill:i,fillRule:"evenodd"}))},b=n(189);n(648);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const w=e=>{let{className:t,color:n,icon:i,message:o}=e,a=y(e,["className","color","icon","message"]);return r.createElement("h1",v({className:f()("bdl-SecurityBadge",t),style:{backgroundColor:n}},a),i,r.createElement("span",{className:"bdl-SecurityBadge-name"},o))};w.defaultProps={icon:r.createElement(b.a,{color:m.y,height:22,width:22,strokeWidth:3})};var E=w;n(649);const C=e=>{let{color:t,name:n,onClick:i,tooltipPosition:o="bottom-center",tooltipText:a}=e;const s="function"==typeof i,l=!a,c=r.createElement(E,{className:"bdl-ClassifiedBadge",color:t,icon:r.createElement(g,{height:12,width:12}),message:n});return r.createElement(d.c,{isDisabled:l,isTabbable:!1,position:o,text:a},s?r.createElement(u.a,{className:"bdl-ClassifiedBadge-editButton",onClick:i,type:"button"},c):c)};C.defaultProps={color:m.y};var S=C,O=n(27),k=n(8),_=n.n(k),x=n(328),P=n.n(x),I=n(79);var A=Object(I.defineMessages)({securityControlsLabel:{id:"boxui.securityControls.securityControlsLabel",defaultMessage:"Restrictions"},shortSharing:{id:"boxui.securityControls.shortSharing",defaultMessage:"Sharing restriction applies"},shortDownload:{id:"boxui.securityControls.shortDownload",defaultMessage:"Download restrictions apply"},shortApp:{id:"boxui.securityControls.shortApp",defaultMessage:"Application restrictions apply"},shortWatermarking:{id:"boxui.securityControls.shortWatermarking",defaultMessage:"Watermarking applies"},shortSign:{id:"boxui.securityControls.shortSign",defaultMessage:"Sign restrictions apply"},shortSharingDownload:{id:"boxui.securityControls.shortSharingDownload",defaultMessage:"Sharing and download restrictions apply"},shortSharingApp:{id:"boxui.securityControls.shortSharingApp",defaultMessage:"Sharing and app restrictions apply"},shortDownloadApp:{id:"boxui.securityControls.shortDownloadApp",defaultMessage:"Download and app restrictions apply"},shortSharingSign:{id:"boxui.securityControls.shortSharingSign",defaultMessage:"Sharing and Sign restrictions apply"},shortDownloadSign:{id:"boxui.securityControls.shortDownloadSign",defaultMessage:"Download and Sign restrictions apply"},shortAppSign:{id:"boxui.securityControls.shortAppSign",defaultMessage:"App and Sign restrictions apply"},shortDownloadAppSign:{id:"boxui.securityControls.shortDownloadAppSign",defaultMessage:"Download, app and Sign restrictions apply"},shortSharingAppSign:{id:"boxui.securityControls.shortSharingAppSign",defaultMessage:"Sharing, app and Sign restrictions apply"},shortSharingDownloadSign:{id:"boxui.securityControls.shortSharingDownloadSign",defaultMessage:"Sharing, download and Sign restrictions apply"},shortSharingDownloadApp:{id:"boxui.securityControls.shortSharingDownloadApp",defaultMessage:"Sharing, download and app restrictions apply"},shortSharingDownloadAppSign:{id:"boxui.securityControls.shortSharingDownloadAppSign",defaultMessage:"Sharing, download, app and Sign restrictions apply"},sharingCollabOnly:{id:"boxui.securityControls.sharingCollabOnly",defaultMessage:"Shared links allowed for collaborators only."},sharingCollabAndCompanyOnly:{id:"boxui.securityControls.sharingCollabAndCompanyOnly",defaultMessage:"Shared links cannot be made publicly accessible."},watermarkingApplied:{id:"boxui.securityControls.watermarkingApplied",defaultMessage:"Watermarking will be applied."},externalCollabBlock:{id:"boxui.securityControls.externalCollabBlock",defaultMessage:"External collaboration restricted."},externalCollabDomainList:{id:"boxui.securityControls.externalCollabDomainList",defaultMessage:"External collaboration limited to approved domains."},appDownloadRestricted:{id:"boxui.securityControls.appDownloadRestricted",defaultMessage:"Download restricted for some applications."},appDownloadBlacklist:{id:"boxui.securityControls.appDownloadBlacklist",defaultMessage:"Download restricted for some applications: {appNames}"},appDownloadBlacklistOverflow:{id:"boxui.securityControls.appDownloadBlacklistOverflow",defaultMessage:"Download restricted for some applications: {appNames} +{remainingAppCount} more"},appDownloadWhitelist:{id:"boxui.securityControls.appDownloadWhitelist",defaultMessage:"Only select applications are allowed: {appNames}"},appDownloadWhitelistOverflow:{id:"boxui.securityControls.appDownloadWhitelistOverflow",defaultMessage:"Only select applications are allowed: {appNames} +{remainingAppCount} more"},allAppNames:{id:"boxui.securityControls.allAppNames",defaultMessage:"All applications: {appsList}"},webDownloadOwners:{id:"boxui.securityControls.webDownloadOwners",defaultMessage:"Download restricted on web, except Owners/Co-Owners."},webDownloadOwnersEditors:{id:"boxui.securityControls.webDownloadOwnersEditors",defaultMessage:"Download restricted on web, except Owners/Co-Owners/Editors."},webDownloadExternalOwners:{id:"boxui.securityControls.webDownloadExternalOwners",defaultMessage:"Download restricted on web, except Owners/Co-Owners. Also restricted for external users."},webDownloadExternalOwnersEditors:{id:"boxui.securityControls.webDownloadExternalOwnersEditors",defaultMessage:"Download restricted on web, except Owners/Co-Owners/Editors. Also restricted for external users."},webDownloadExternal:{id:"boxui.securityControls.webDownloadExternal",defaultMessage:"Download restricted on web for external users."},boxSignRequestRestricted:{id:"boxui.securityControls.boxSignRequestRestricted",defaultMessage:"Sign restrictions apply."},mobileDownloadOwners:{id:"boxui.securityControls.mobileDownloadOwners",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners."},mobileDownloadOwnersEditors:{id:"boxui.securityControls.mobileDownloadOwnersEditors",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners/Editors."},mobileDownloadExternalOwners:{id:"boxui.securityControls.mobileDownloadExternalOwners",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners. Also restricted for external users."},mobileDownloadExternalOwnersEditors:{id:"boxui.securityControls.mobileDownloadExternalOwnersEditors",defaultMessage:"Download restricted on mobile, except Owners/Co-Owners/Editors. Also restricted for external users."},mobileDownloadExternal:{id:"boxui.securityControls.mobileDownloadExternal",defaultMessage:"Download restricted on mobile for external users."},desktopDownloadOwners:{id:"boxui.securityControls.desktopDownloadOwners",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners."},desktopDownloadOwnersEditors:{id:"boxui.securityControls.desktopDownloadOwnersEditors",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners/Editors."},desktopDownloadExternalOwners:{id:"boxui.securityControls.desktopDownloadExternalOwners",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners. Also restricted for external users."},desktopDownloadExternalOwnersEditors:{id:"boxui.securityControls.desktopDownloadExternalOwnersEditors",defaultMessage:"Download restricted on Box Drive, except Owners/Co-Owners/Editors. Also restricted for external users."},desktopDownloadExternal:{id:"boxui.securityControls.downloadExternal",defaultMessage:"Download restricted on Box Drive for external users."},viewAll:{id:"boxui.securityControls.viewAll",defaultMessage:"View All"},modalTitle:{id:"boxui.securityControls.modalTitle",defaultMessage:"View Classification for '{itemName}'"},modalDescription:{id:"boxui.securityControls.modalDescription",defaultMessage:"Classification labels defined by your administrator can be used to label content and apply security policies."}});const{BLACKLIST:T,WHITELIST:M}=O.n,{DEFAULT:D,WITH_APP_LIST:R,WITH_OVERFLOWN_APP_LIST:j}=O.b;var N={[T]:{[D]:A.appDownloadRestricted,[R]:A.appDownloadBlacklist,[j]:A.appDownloadBlacklistOverflow},[M]:{[D]:A.appDownloadRestricted,[R]:A.appDownloadWhitelist,[j]:A.appDownloadWhitelistOverflow}};const{DESKTOP:L,MOBILE:F,WEB:z}=O.m,{OWNERS_AND_COOWNERS:U,OWNERS_COOWNERS_AND_EDITORS:B}=O.o;var H={[L]:{externalAllowed:{[U]:A.desktopDownloadOwners,[B]:A.desktopDownloadOwnersEditors},externalRestricted:{[U]:A.desktopDownloadExternalOwners,[B]:A.desktopDownloadExternalOwnersEditors,default:A.desktopDownloadExternal}},[F]:{externalAllowed:{[U]:A.mobileDownloadOwners,[B]:A.mobileDownloadOwnersEditors},externalRestricted:{[U]:A.mobileDownloadExternalOwners,[B]:A.mobileDownloadExternalOwnersEditors,default:A.mobileDownloadExternal}},[z]:{externalAllowed:{[U]:A.webDownloadOwners,[B]:A.webDownloadOwnersEditors},externalRestricted:{[U]:A.webDownloadExternalOwners,[B]:A.webDownloadExternalOwnersEditors,default:A.webDownloadExternal}}};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{APP:q,BOX_SIGN_REQUEST:G,DOWNLOAD:Q,EXTERNAL_COLLAB:Y,SHARED_LINK:$,WATERMARK:X}=O.a,{DEFAULT:Z,WITH_APP_LIST:J,WITH_OVERFLOWN_APP_LIST:ee}=O.b,{DESKTOP:te,MOBILE:ne,WEB:re}=O.m,{BLOCK:ie,WHITELIST:oe,BLACKLIST:ae}=O.n,{COLLAB_ONLY:se,COLLAB_AND_COMPANY_ONLY:le,PUBLIC:ce}=O.q,ue=e=>{const t=[],{app:n,boxSignRequest:r,download:i,externalCollab:o,sharedLink:a,watermark:s}=e,l=a&&a.accessLevel!==ce||o;return l&&i&&n&&r?t.push({message:A.shortSharingDownloadAppSign}):l&&i&&n?t.push({message:A.shortSharingDownloadApp}):i&&n&&r?t.push({message:A.shortDownloadAppSign}):l&&n&&r?t.push({message:A.shortSharingAppSign}):l&&i&&r?t.push({message:A.shortSharingDownloadSign}):l&&r?t.push({message:A.shortSharingSign}):i&&r?t.push({message:A.shortDownloadSign}):n&&r?t.push({message:A.shortAppSign}):l&&i?t.push({message:A.shortSharingDownload}):l&&n?t.push({message:A.shortSharingApp}):i&&n?t.push({message:A.shortDownloadApp}):r?t.push({message:A.shortSign}):l?t.push({message:A.shortSharing}):i?t.push({message:A.shortDownload}):n&&t.push({message:A.shortApp}),s&&t.push({message:A.shortWatermarking}),t},de=e=>{const t=[];switch(_()(e,"".concat($,".accessLevel"))){case se:t.push({message:A.sharingCollabOnly});break;case le:t.push({message:A.sharingCollabAndCompanyOnly})}return t},he=e=>{const t=[];return _()(e,"".concat(X,".enabled"),!1)&&t.push({message:A.watermarkingApplied}),t},fe=e=>{const t=[];switch(_()(e,"".concat(Y,".accessLevel"))){case ie:t.push({message:A.externalCollabBlock});break;case oe:case ae:t.push({message:A.externalCollabDomainList})}return t},pe=(e,t)=>{const n=[],r=_()(e,"".concat(q,".accessLevel"));switch(r){case ie:n.push({message:A.appDownloadRestricted});break;case oe:case ae:{const i=_()(e,"".concat(q,".apps"),[]);t=P()(t)?i.length:t;const o=i.slice(0,t),a=i.slice(t).length,s=o.map(e=>{let{displayText:t}=e;return t}).join(", ");if(a){const e=i.map(e=>{let{displayText:t}=e;return t}).join(", ");n.push({message:W({},N[r][ee],{values:{appNames:s,remainingAppCount:a}}),tooltipMessage:W({},A.allAppNames,{values:{appsList:e}})})}else{const e=i.length?J:Z;n.push({message:W({},N[r][e],{values:{appNames:s}})})}break}}return n},me=e=>{const t=[],{web:n,mobile:r,desktop:i}=_()(e,Q,{}),o={[re]:{platform:re,restrictions:n},[ne]:{platform:ne,restrictions:r},[te]:{platform:te,restrictions:i}};return Object.keys(o).forEach(e=>{const{platform:n,restrictions:r}=o[e];if(!r)return;const{restrictExternalUsers:i,restrictManagedUsers:a}=r;a&&i?t.push({message:H[n].externalRestricted[a]}):a?t.push({message:H[n].externalAllowed[a]}):i&&t.push({message:H[n].externalRestricted.default})}),t},ge=e=>{return _()(e,"".concat(G,".enabled"),!1)?[{message:A.boxSignRequestRestricted}]:[]},be=(e,t)=>{return[...de(e),...fe(e),...me(e),...pe(e,t),...he(e),...ge(e)]};var ve=n(110);n(650);var ye=e=>{let{message:t,tooltipMessage:n}=e;return r.createElement("li",{className:"bdl-SecurityControlsItem"},r.isValidElement(t)?t:r.createElement(a.a,t),n&&r.createElement(d.c,{className:"bdl-SecurityControlsItem-tooltip",text:r.createElement(a.a,n),position:"middle-right",isTabbable:!1},r.createElement("span",{className:"bdl-SecurityControlsItem-tooltipIcon"},r.createElement(ve.a,{color:m.b,width:13,height:13}))))},we=n(184),Ee=n(30),Ce=n(24);var Se=Object(I.defineMessages)({add:{id:"boxui.classification.add",defaultMessage:"Add"},classification:{id:"boxui.classification.classification",defaultMessage:"Classification"},definition:{id:"boxui.classification.definition",defaultMessage:"Definition"},edit:{id:"boxui.classification.edit",defaultMessage:"Edit"},missing:{id:"boxui.classification.missing",defaultMessage:"Not classified"},modifiedByLabel:{id:"boxui.classification.modifiedByLabel",defaultMessage:"Classification Label"},importedBy:{id:"boxui.classification.importedBy",defaultMessage:"Imported from {modifiedBy} on {modifiedAt}"},modifiedBy:{id:"boxui.classification.modifiedBy",defaultMessage:"Applied by {modifiedBy} on {modifiedAt}"},classificationYellow:{id:"boxui.classification.classificationYellow",defaultMessage:"Yellow"},classificationOrange:{id:"boxui.classification.classificationOrange",defaultMessage:"Orange"},classificationRed:{id:"boxui.classification.classificationRed",defaultMessage:"Red"},classificationPurple:{id:"boxui.classification.classificationPurple",defaultMessage:"Purple"},classificationLightBlue:{id:"boxui.classification.classificationLightBlue",defaultMessage:"Light Blue"},classificationDarkBlue:{id:"boxui.classification.classificationDarkBlue",defaultMessage:"Dark Blue"},classificationGreen:{id:"boxui.classification.classificationGreen",defaultMessage:"Green"},classificationGrey:{id:"boxui.classification.classificationGrey",defaultMessage:"Grey"}});n(652);function Oe(){return(Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const ke=e=>{let{closeModal:t,definition:n,classificationColor:i,classificationName:o,isSecurityControlsModalOpen:s,itemName:c,modalItems:u}=e;if(!c||!o||!n)return null;const d=r.createElement(a.a,Oe({},A.modalTitle,{values:{itemName:c}}));return r.createElement(we.a,{className:"bdl-SecurityControlsModal",title:d,onRequestClose:t,isOpen:s},r.createElement("p",null,r.createElement(a.a,A.modalDescription)),r.createElement(S,{color:i,name:o}),r.createElement(l.a,{text:r.createElement(a.a,Se.definition)},r.createElement("p",{className:"bdl-SecurityControlsModal-definition"},n)),r.createElement("ul",{className:"bdl-SecurityControlsModal-controlsItemList"},u.map((e,t)=>{let{message:n,tooltipMessage:i}=e;return r.createElement(ye,{key:t,message:n,tooltipMessage:i})})),r.createElement(we.b,null,r.createElement(Ce.b,{onClick:t,type:"button"},r.createElement(a.a,Ee.a.close))))};ke.defaultProps={isSecurityControlsModalOpen:!1,modalItems:[]};var _e=ke;n(653);function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{FULL:Pe,SHORT:Ie,SHORT_WITH_BTN:Ae}=O.p;class Te extends r.Component{constructor(){super(...arguments),xe(this,"state",{isSecurityControlsModalOpen:!1}),xe(this,"openModal",()=>this.setState({isSecurityControlsModalOpen:!0})),xe(this,"closeModal",()=>this.setState({isSecurityControlsModalOpen:!1}))}render(){const{classificationColor:e,classificationName:t,controls:n,controlsFormat:i,definition:o,itemName:s,maxAppCount:c,shouldRenderLabel:d}=this.props;let h,f=[];if(i===Pe?f=be(n,c):(f=ue(n)).length&&i===Ae&&(h=be(n,c)),!f.length)return null;const{isSecurityControlsModalOpen:p}=this.state,m=i===Ae&&!!s&&!!t&&!!o;let g=r.createElement("ul",{className:"bdl-SecurityControls"},f.map((e,t)=>{let{message:n,tooltipMessage:i}=e;return r.createElement(ye,{key:t,message:n,tooltipMessage:i})}));return d&&(g=r.createElement(l.a,{text:r.createElement(a.a,A.securityControlsLabel)},g)),r.createElement(r.Fragment,null,g,m&&r.createElement(r.Fragment,null,r.createElement(u.a,{className:"lnk",onClick:this.openModal,type:"button"},r.createElement(a.a,A.viewAll)),r.createElement(_e,{classificationColor:e,classificationName:t,closeModal:this.closeModal,definition:o,itemName:s,isSecurityControlsModalOpen:p,modalItems:h})))}}xe(Te,"defaultProps",{classificationName:"",definition:"",itemName:"",controls:{},controlsFormat:Ie,maxAppCount:O.l,shouldRenderLabel:!1});var Me=Te;n(654);function De(){return(De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Re=e=>{let{className:t="",color:n,controls:i,controlsFormat:u,definition:d,isImportedClassification:h=!1,isLoadingControls:f,itemName:p="",maxAppCount:m,messageStyle:g,modifiedAt:b,modifiedBy:v,name:y,onClick:w}=e;const E=!!y,C=!!d,O=!!b,k=!!v,_=E&&C&&"tooltip"===g,x=E&&C&&"inline"===g,P=!E&&"inline"===g,I=E&&f&&"inline"===g,A=E&&!f&&!!i&&"inline"===g,T=new Date(b||0),M=E&&O&&Object(s.j)(T)&&k&&"inline"===g,D=M&&r.createElement(o.a,{value:T,month:"long",year:"numeric",day:"numeric"}),R=h?Se.importedBy:Se.modifiedBy;return r.createElement("article",{className:"bdl-Classification ".concat(t)},E&&r.createElement(S,{color:n,name:y,onClick:w,tooltipText:_?d:void 0}),x&&r.createElement(l.a,{text:r.createElement(a.a,Se.definition)},r.createElement("p",{className:"bdl-Classification-definition"},d)),P&&r.createElement("span",{className:"bdl-Classification-missingMessage"},r.createElement(a.a,Se.missing)),M&&r.createElement(l.a,{text:r.createElement(a.a,Se.modifiedByLabel)},r.createElement("p",{className:"bdl-Classification-modifiedBy","data-testid":"classification-modifiedby"},r.createElement(a.a,De({},R,{values:{modifiedAt:D,modifiedBy:v}})))),A&&r.createElement(Me,{classificationColor:n,classificationName:y,controls:i,controlsFormat:u,definition:d,itemName:p,maxAppCount:m,shouldRenderLabel:!0}),I&&r.createElement(c.b,null))},je=n(22);function Ne(){return(Ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Le(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Fe=e=>{let{className:t="",isEditing:n,onEdit:r}=e,o=Le(e,["className","isEditing","onEdit"]);const s=n?Se.edit:Se.add;return i.a.createElement(je.a,Ne({className:"bdl-EditClassificationButton ".concat(t),onClick:r,type:"button"},o),i.a.createElement(a.a,s))};var ze={[O.c]:{name:Se.classificationYellow,color:m.y,tinycon:m.x},[O.d]:{name:Se.classificationOrange,color:m.s,tinycon:m.r},[O.e]:{name:Se.classificationRed,color:m.w,tinycon:m.v},[O.f]:{name:Se.classificationPurple,color:m.u,tinycon:m.t},[O.g]:{name:Se.classificationLightBlue,color:m.q,tinycon:m.p},[O.h]:{name:Se.classificationDarkBlue,color:m.f,tinycon:m.e},[O.i]:{name:Se.classificationGreen,color:m.o,tinycon:m.n},[O.j]:{name:Se.classificationGrey,color:m.i,tinycon:m.l}};function Ue(e){const t=_()(e,"colorID",O.k),{color:n}=ze[t]||ze[O.k];return n}n.d(t,"c",(function(){return Re})),n.d(t,"b",(function(){return Se})),n.d(t,"a",(function(){return Fe})),n.d(t,"d",(function(){return Ue}))},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(44))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(73),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(398),i=n(112),o=n(34),a=n(123),s=n(136),l=n(164),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&a(e),h=!n&&!u&&!d&&l(e),f=n||u||d||h,p=f?r(e.length,String):[],m=p.length;for(var g in e)!t&&!c.call(e,g)||f&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||p.push(g);return p}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){(function(e){var r=n(42),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(163)(e))},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(178),i=n(179),o=n(177),a=n(227),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},function(e,t,n){var r=n(178),i=n(34);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(229),i=n(228),o=n(137);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(180);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(266),i=n(179),o=n(150);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(60),i=n(179),o=n(45),a="[object Object]",s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,d=c.call(Object);e.exports=function(e){if(!o(e)||r(e)!=a)return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}},function(e,t,n){var r=n(430),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(l),r(e,this,c)}}},function(e,t,n){var r=n(431),i=n(433)(r);e.exports=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){"use strict";var r=n(32);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},function(e,t,n){"use strict";var r=n(32),i=n(453),o=n(454),a=n(237),s=n(455),l=n(458),c=n(459),u=n(240),d=n(139),h=n(140);e.exports=function(e){return new Promise((function(t,n){var f,p=e.data,m=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(p)&&delete m["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(y+":"+w)}var E=s(e.baseURL,e.url);function C(){if(v){var r="getAllResponseHeaders"in v?l(v.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};i((function(e){t(e),b()}),(function(e){n(e),b()}),o),v=null}}if(v.open(e.method.toUpperCase(),a(E,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(C)},v.onabort=function(){v&&(n(u("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(u("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var S=(e.withCredentials||c(E))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(m[e.xsrfHeaderName]=S)}"setRequestHeader"in v&&r.forEach(m,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete m[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){v&&(n(!e||e&&e.type?new h("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),p||(p=null),v.send(p)}))}},function(e,t,n){"use strict";var r=n(238);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},function(e,t){e.exports={version:"0.25.0"}},function(e,t,n){var r=n(468),i=n(469),o=n(472),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},function(e,t,n){var r=n(173),i=n(111);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){},function(e,t,n){"use strict";var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},t.prototype.getAnchorKey=function(){return this.get("anchorKey")},t.prototype.getAnchorOffset=function(){return this.get("anchorOffset")},t.prototype.getFocusKey=function(){return this.get("focusKey")},t.prototype.getFocusOffset=function(){return this.get("focusOffset")},t.prototype.getIsBackward=function(){return this.get("isBackward")},t.prototype.getHasFocus=function(){return this.get("hasFocus")},t.prototype.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset();return t<=this.getEndOffset()&&o<=n}if(e!==r&&e!==i)return!1;var a=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=a&&n>=a},t.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},t.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},t.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},t.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},t.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,n(35).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i),a=n(54),s=n(24),l=n(89),c=n(2),u=n(30);n(554);t.a=Object(a.c)(e=>{let{className:t,intl:n,onClick:i}=e;return r.createElement(s.b,{"aria-label":n.formatMessage(u.a.close),className:o()("bdl-CloseButton",t),"data-testid":"bdl-CloseButton",onClick:i,type:s.a.BUTTON},r.createElement(l.a,{color:c.l,height:18,width:18}))})},function(e,t,n){"use strict";const r=n(156).a.Consumer;t.a=r},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.a=e=>{let{children:t,className:n="",title:i,type:l="warning"}=e,c=s(e,["children","className","title","type"]);return r.createElement("div",a({className:o()(n,"inline-alert","inline-alert-visible","inline-alert-".concat(l))},c),i?r.createElement("strong",null,i):null,r.createElement("div",null,t))}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function d(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return u(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return u(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(244)((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}));e.exports=r},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
33
33
  /*
34
34
  * [js-sha1]{@link https://github.com/emn178/js-sha1}
35
35
  *