Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apideck/file-picker

Package Overview
Dependencies
Maintainers
6
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apideck/file-picker - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0

2

dist/file-picker.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("@headlessui/react"),a=require("react-dom"),o=require("react-table"),l=require("react-waypoint"),i=require("react-dropzone"),c=e(require("swr"));function s(e,t,n,r,a,o,l){try{var i=e[o](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function l(e){s(o,r,a,l,i,"next",e)}function i(e){s(o,r,a,l,i,"throw",e)}l(void 0)}))}}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 m(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}var f,p=function(e){var t=e.className;return n.createElement("svg",{width:95,height:23,viewBox:"0 0 95 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:void 0===t?"":t},n.createElement("path",{d:"M1.2 15.05C1.25 14.2167 1.45833 13.525 1.825 12.975C2.19167 12.425 2.65833 11.9833 3.225 11.65C3.79167 11.3167 4.425 11.0833 5.125 10.95C5.84167 10.8 6.55833 10.725 7.275 10.725C7.925 10.725 8.58333 10.775 9.25 10.875C9.91667 10.9583 10.525 11.1333 11.075 11.4C11.625 11.6667 12.075 12.0417 12.425 12.525C12.775 12.9917 12.95 13.6167 12.95 14.4V21.125C12.95 21.7083 12.9833 22.2667 13.05 22.8C13.1167 23.3333 13.2333 23.7333 13.4 24H9.8C9.73333 23.8 9.675 23.6 9.625 23.4C9.59167 23.1833 9.56667 22.9667 9.55 22.75C8.98333 23.3333 8.31667 23.7417 7.55 23.975C6.78333 24.2083 6 24.325 5.2 24.325C4.58333 24.325 4.00833 24.25 3.475 24.1C2.94167 23.95 2.475 23.7167 2.075 23.4C1.675 23.0833 1.35833 22.6833 1.125 22.2C0.908333 21.7167 0.8 21.1417 0.8 20.475C0.8 19.7417 0.925 19.1417 1.175 18.675C1.44167 18.1917 1.775 17.8083 2.175 17.525C2.59167 17.2417 3.05833 17.0333 3.575 16.9C4.10833 16.75 4.64167 16.6333 5.175 16.55C5.70833 16.4667 6.23333 16.4 6.75 16.35C7.26667 16.3 7.725 16.225 8.125 16.125C8.525 16.025 8.84167 15.8833 9.075 15.7C9.30833 15.5 9.41667 15.2167 9.4 14.85C9.4 14.4667 9.33333 14.1667 9.2 13.95C9.08333 13.7167 8.91667 13.5417 8.7 13.425C8.5 13.2917 8.25833 13.2083 7.975 13.175C7.70833 13.125 7.41667 13.1 7.1 13.1C6.4 13.1 5.85 13.25 5.45 13.55C5.05 13.85 4.81667 14.35 4.75 15.05H1.2ZM9.4 17.675C9.25 17.8083 9.05833 17.9167 8.825 18C8.60833 18.0667 8.36667 18.125 8.1 18.175C7.85 18.225 7.58333 18.2667 7.3 18.3C7.01667 18.3333 6.73333 18.375 6.45 18.425C6.18333 18.475 5.91667 18.5417 5.65 18.625C5.4 18.7083 5.175 18.825 4.975 18.975C4.79167 19.1083 4.64167 19.2833 4.525 19.5C4.40833 19.7167 4.35 19.9917 4.35 20.325C4.35 20.6417 4.40833 20.9083 4.525 21.125C4.64167 21.3417 4.8 21.5167 5 21.65C5.2 21.7667 5.43333 21.85 5.7 21.9C5.96667 21.95 6.24167 21.975 6.525 21.975C7.225 21.975 7.76667 21.8583 8.15 21.625C8.53333 21.3917 8.81667 21.1167 9 20.8C9.18333 20.4667 9.29167 20.1333 9.325 19.8C9.375 19.4667 9.4 19.2 9.4 19V17.675ZM22.2305 21.675C21.6638 21.675 21.1805 21.5583 20.7805 21.325C20.3805 21.0917 20.0555 20.7917 19.8055 20.425C19.5721 20.0417 19.3971 19.6 19.2805 19.1C19.1805 18.6 19.1305 18.0917 19.1305 17.575C19.1305 17.0417 19.1805 16.525 19.2805 16.025C19.3805 15.525 19.5471 15.0833 19.7805 14.7C20.0305 14.3167 20.3471 14.0083 20.7305 13.775C21.1305 13.525 21.6221 13.4 22.2055 13.4C22.7721 13.4 23.2471 13.525 23.6305 13.775C24.0305 14.0083 24.3555 14.325 24.6055 14.725C24.8555 15.1083 25.0305 15.55 25.1305 16.05C25.2471 16.55 25.3055 17.0583 25.3055 17.575C25.3055 18.0917 25.2555 18.6 25.1555 19.1C25.0555 19.6 24.8805 20.0417 24.6305 20.425C24.3971 20.7917 24.0805 21.0917 23.6805 21.325C23.2971 21.5583 22.8138 21.675 22.2305 21.675ZM15.7055 11.075V28.525H19.2555V22.4H19.3055C19.7388 23.0333 20.2888 23.5167 20.9555 23.85C21.6388 24.1667 22.3805 24.325 23.1805 24.325C24.1305 24.325 24.9555 24.1417 25.6555 23.775C26.3721 23.4083 26.9638 22.9167 27.4305 22.3C27.9138 21.6833 28.2721 20.975 28.5055 20.175C28.7388 19.375 28.8555 18.5417 28.8555 17.675C28.8555 16.7583 28.7388 15.8833 28.5055 15.05C28.2721 14.2 27.9138 13.4583 27.4305 12.825C26.9471 12.1917 26.3388 11.6833 25.6055 11.3C24.8721 10.9167 23.9971 10.725 22.9805 10.725C22.1805 10.725 21.4471 10.8833 20.7805 11.2C20.1138 11.5167 19.5638 12.025 19.1305 12.725H19.0805V11.075H15.7055ZM34.6387 9.075V6.15H31.0887V9.075H34.6387ZM31.0887 11.075V24H34.6387V11.075H31.0887ZM46.609 17.5C46.609 18.0333 46.559 18.55 46.459 19.05C46.359 19.55 46.1923 20 45.959 20.4C45.7257 20.7833 45.409 21.0917 45.009 21.325C44.6257 21.5583 44.1423 21.675 43.559 21.675C43.009 21.675 42.534 21.5583 42.134 21.325C41.7507 21.075 41.4257 20.7583 41.159 20.375C40.909 19.975 40.7257 19.525 40.609 19.025C40.4923 18.525 40.434 18.025 40.434 17.525C40.434 16.9917 40.484 16.4833 40.584 16C40.7007 15.5 40.8757 15.0583 41.109 14.675C41.359 14.2917 41.684 13.9833 42.084 13.75C42.484 13.5167 42.9757 13.4 43.559 13.4C44.1423 13.4 44.6257 13.5167 45.009 13.75C45.3923 13.9833 45.7007 14.2917 45.934 14.675C46.184 15.0417 46.359 15.475 46.459 15.975C46.559 16.4583 46.609 16.9667 46.609 17.5ZM46.659 22.35V24H50.034V6.15H46.484V12.65H46.434C46.034 12.0167 45.484 11.5417 44.784 11.225C44.1007 10.8917 43.3757 10.725 42.609 10.725C41.659 10.725 40.8257 10.9167 40.109 11.3C39.3923 11.6667 38.7923 12.1583 38.309 12.775C37.8423 13.3917 37.484 14.1083 37.234 14.925C37.0007 15.725 36.884 16.5583 36.884 17.425C36.884 18.325 37.0007 19.1917 37.234 20.025C37.484 20.8583 37.8423 21.6 38.309 22.25C38.7923 22.8833 39.4007 23.3917 40.134 23.775C40.8673 24.1417 41.7173 24.325 42.684 24.325C43.534 24.325 44.2923 24.175 44.959 23.875C45.6423 23.5583 46.1923 23.05 46.609 22.35H46.659ZM61.4172 16.15H55.6422C55.6589 15.9 55.7089 15.6167 55.7922 15.3C55.8922 14.9833 56.0505 14.6833 56.2672 14.4C56.5005 14.1167 56.8005 13.8833 57.1672 13.7C57.5505 13.5 58.0255 13.4 58.5922 13.4C59.4589 13.4 60.1005 13.6333 60.5172 14.1C60.9505 14.5667 61.2505 15.25 61.4172 16.15ZM55.6422 18.4H64.9672C65.0339 17.4 64.9505 16.4417 64.7172 15.525C64.4839 14.6083 64.1005 13.7917 63.5672 13.075C63.0505 12.3583 62.3839 11.7917 61.5672 11.375C60.7505 10.9417 59.7922 10.725 58.6922 10.725C57.7089 10.725 56.8089 10.9 55.9922 11.25C55.1922 11.6 54.5005 12.0833 53.9172 12.7C53.3339 13.3 52.8839 14.0167 52.5672 14.85C52.2505 15.6833 52.0922 16.5833 52.0922 17.55C52.0922 18.55 52.2422 19.4667 52.5422 20.3C52.8589 21.1333 53.3005 21.85 53.8672 22.45C54.4339 23.05 55.1255 23.5167 55.9422 23.85C56.7589 24.1667 57.6755 24.325 58.6922 24.325C60.1589 24.325 61.4089 23.9917 62.4422 23.325C63.4755 22.6583 64.2422 21.55 64.7422 20H61.6172C61.5005 20.4 61.1839 20.7833 60.6672 21.15C60.1505 21.5 59.5339 21.675 58.8172 21.675C57.8172 21.675 57.0505 21.4167 56.5172 20.9C55.9839 20.3833 55.6922 19.55 55.6422 18.4ZM75.8727 15.625H79.3477C79.2977 14.7917 79.0977 14.075 78.7477 13.475C78.3977 12.8583 77.9393 12.35 77.3727 11.95C76.8227 11.5333 76.1893 11.225 75.4727 11.025C74.7727 10.825 74.0393 10.725 73.2727 10.725C72.2227 10.725 71.2893 10.9 70.4727 11.25C69.656 11.6 68.9643 12.0917 68.3977 12.725C67.831 13.3417 67.3977 14.0833 67.0977 14.95C66.8143 15.8 66.6727 16.725 66.6727 17.725C66.6727 18.6917 66.831 19.5833 67.1477 20.4C67.4643 21.2 67.906 21.8917 68.4727 22.475C69.0393 23.0583 69.7227 23.5167 70.5227 23.85C71.3393 24.1667 72.231 24.325 73.1977 24.325C74.9143 24.325 76.3227 23.875 77.4227 22.975C78.5227 22.075 79.1893 20.7667 79.4227 19.05H75.9977C75.881 19.85 75.5893 20.4917 75.1227 20.975C74.6727 21.4417 74.0227 21.675 73.1727 21.675C72.6227 21.675 72.156 21.55 71.7727 21.3C71.3893 21.05 71.081 20.7333 70.8477 20.35C70.631 19.95 70.4727 19.5083 70.3727 19.025C70.2727 18.5417 70.2227 18.0667 70.2227 17.6C70.2227 17.1167 70.2727 16.6333 70.3727 16.15C70.4727 15.65 70.6393 15.2 70.8727 14.8C71.1227 14.3833 71.4393 14.05 71.8227 13.8C72.206 13.5333 72.681 13.4 73.2477 13.4C74.7643 13.4 75.6393 14.1417 75.8727 15.625ZM81.7531 6.15V24H85.3031V19.55L86.6781 18.225L90.2281 24H94.5281L89.1031 15.825L93.9781 11.075H89.7781L85.3031 15.725V6.15H81.7531Z",transform:"translate(0 -6)",fill:"white"}))},v=["children","onClose","isOpen","showAttribution","className","style"],h=n.forwardRef((function(e,o){var l=e.children,i=e.onClose,c=e.isOpen,s=e.showAttribution,u=e.className,f=void 0===u?"":u,h=e.style,g=void 0===h?{}:h,y=m(e,v),x=t.useState(!1),w=x[0],E=x[1];t.useEffect((function(){E(!0)}),[]);var C=n.createElement(r.Transition,{show:c},n.createElement(r.Transition.Child,{enter:"transition ease-out duration-150",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0"},n.createElement("div",{className:"fixed inset-0 z-40 flex items-end bg-gray-400 bg-opacity-75 dark:bg-gray-600 sm:items-center sm:justify-center","data-testid":"backdrop",onClick:i},s?n.createElement("a",{className:"absolute flex text-sm text-center text-gray-100 bottom-5 lg:left-5 xl:left-6 xl:bottom-6",href:"https://apideck.com/products/unify",target:"_blank",rel:"noopener noreferrer"},"Powered by ",n.createElement(p,{className:"h-5"}),n.createElement("span",null,"Unify")):null,n.createElement(r.Transition.Child,Object.assign({enter:"transition ease-out duration-150",enterFrom:"opacity-0 transform translate-y-1/4 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 transform translate-y-1/4 scale-95",className:"w-full p-5 overflow-hidden bg-white dark:bg-gray-800 dark-text-gray-400 shadow-lg rounded-t-lg sm:p-6 no-scrollbar sm:rounded-lg sm:m-4 sm:max-w-xl relative "+f,style:d({maxHeight:"90%"},g),ref:o,role:"dialog",id:"modal-component",onClick:function(e){return e.stopPropagation()}},y),l))));return w?a.createPortal(C,document.body):null})),g=(function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=Object.create((t&&t.prototype instanceof d?t:d).prototype),o=new b(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return{value:void 0,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var i=w(l,n);if(i){if(i===u)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,o),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function d(){}function m(){}function f(){}var p={};i(p,a,(function(){return this}));var v=Object.getPrototypeOf,h=v&&v(v(N([])));h&&h!==t&&n.call(h,a)&&(p=h);var g=f.prototype=d.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var r;this._invoke=function(a,o){function l(){return new t((function(r,l){!function r(a,o,l,i){var c=s(e[a],e,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,l,i)}),(function(e){r("throw",e,l,i)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return r("throw",e,l,i)}))}i(c.arg)}(a,o,r,l)}))}return r=r?r.then(l,l):l()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function N(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return m.prototype=f,i(g,"constructor",f),i(f,"constructor",m),m.displayName=i(f,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,i(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(x.prototype),i(x.prototype,o,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var l=new x(c(t,n,r,a),o);return e.isGeneratorFunction(n)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},y(g),i(g,l,"Generator"),i(g,a,(function(){return this})),i(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=N,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return l.type="throw",l.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var i=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(i&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;C(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(f={exports:{}}),f.exports),y=function(e){var a=e.folders,o=e.handleClick;return n.createElement(t.Fragment,null,n.createElement("div",{className:"flex items-center text-sm"},n.createElement("button",{className:"text-gray-600 hover:text-gray-900",onClick:function(){return o()}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"inline-block w-5 h-5 text-yellow-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"}))),a.map((function(e,t){return n.createElement(r.Transition,{show:!0,enter:"transition ease-out duration-200",enterFrom:"transform opacity-60",enterTo:"transform opacity-100",leave:"transition ease-in duration-200",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",key:t},n.createElement(r.Transition.Child,{enter:"transition ease-out duration-200",enterFrom:"transform opacity-60 translate-x-1",enterTo:"transform opacity-100",leave:"transition ease-in duration-100",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",className:"flex items-center",as:"div",key:e.id},n.createElement("svg",{className:"flex-shrink-0 w-5 h-5 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},n.createElement("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})),t===a.length-1?n.createElement("span",{className:"font-medium text-gray-900"},e.name):n.createElement("button",{className:"text-gray-600 hover:text-gray-900",onClick:function(){return o(e)}},e.name)))}))))},x=function(e,t){if(void 0===t&&(t=2),0===e)return"0 Bytes";var n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},w=function(e){var t,r,a=e.file,o=e.setFile,l=e.onSelect;return a?n.createElement("div",{className:"flex flex-col justify-between h-full"},n.createElement("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-6"},n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Name"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a?void 0:a.name)),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Size"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null!=a&&a.size?x(null==a?void 0:a.size):"-")),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Mime type"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a?void 0:a.mime_type)),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Downloadable"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null!=a&&a.downloadable?"Yes":"No")),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Created"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},n.createElement("div",null,n.createElement("span",{className:"mr-2 text-gray-900"},(null==a?void 0:a.created_at)&&new Date(a.created_at).toLocaleDateString()),n.createElement("span",{className:"text-gray-500 "},(null==a?void 0:a.created_at)&&new Date(a.created_at).toLocaleTimeString())))),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Updated"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},n.createElement("div",null,n.createElement("span",{className:"mr-2 text-gray-900"},(null==a?void 0:a.updated_at)&&new Date(a.updated_at).toLocaleDateString()),n.createElement("span",{className:"text-gray-500 "},(null==a?void 0:a.updated_at)&&new Date(a.updated_at).toLocaleTimeString())))),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Owner"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a||null==(t=a.owner)?void 0:t.name)),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Email"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a||null==(r=a.owner)?void 0:r.email))),n.createElement("div",{className:"flex justify-between pt-6"},n.createElement("button",{type:"button",className:"items-center w-full px-3 py-2 mr-2 text-sm font-medium leading-4 text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm sm:mr-3 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){return o(null)}},"Close"),n.createElement("button",{type:"button",className:"items-center w-full px-3 py-2 ml-2 text-sm font-medium leading-4 text-white bg-blue-600 border border-transparent rounded-md shadow-sm sm:ml-3 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){return l(a)}},"Select file"))):n.createElement("p",{className:"p-4 text-center"},"No file found")},E=function(e){var t=e.isSearching,r=[{Header:"Name"},{Header:"Size"},{Header:"Updated"}],a=Array.from(Array(6).keys());return t&&(r=[].concat(r,[{Header:"Service"}])),n.createElement("div",{className:"overflow-auto"},n.createElement("table",{className:"min-w-full divide-y divide-gray-200"},n.createElement("thead",null,n.createElement("tr",null,r.map((function(e,t){return n.createElement("th",{key:"column-"+t,className:"py-3 space-x-6 text-xs font-medium tracking-wide text-left text-gray-500 uppercase "+(t===r.length-1?"text-right":"")},e.Header)})))),n.createElement("tbody",{className:"bg-white divide-y divide-gray-200"},a.map((function(e,t){return n.createElement(C,{key:t,columns:r})})))))},C=function(e){var t=e.columns;return n.createElement("tr",null,t.map((function(e,r){return n.createElement("td",{className:"py-4 space-x-6 text-sm font-medium truncate whitespace-nowrap "+(r===t.length-1?"text-right":""),key:"cell-"+r,style:{maxWidth:80}},n.createElement("span",{className:"px-16 py-0 bg-gray-200 rounded-sm animate-pulse"}))})))},b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],N=function(e){var t=e.data,a=void 0===t?[]:t,l=e.isLoadingMore,i=e.handleSelect,c=e.searchMode,s=e.uploadingMode,u=n.useMemo((function(){return[{Header:"Name",accessor:"name",Cell:function(e){return"folder"===e.row.original.type?n.createElement("div",{className:"flex items-center"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"inline-block w-5 h-5 mr-1 text-yellow-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})),n.createElement("span",{className:"truncate"},e.value)):n.createElement("div",{className:"flex items-center truncate"},n.createElement("svg",{viewBox:"0 0 24 24",className:"inline-block w-5 h-5 mr-1 text-gray-500"},n.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"})),n.createElement("span",{className:"truncate"},e.value))}},{Header:"Size",accessor:"size",Cell:function(e){var t=e.value;return n.createElement("div",null,t?x(t):null)}},{Header:"Updated",accessor:"updated_at",Cell:function(e){var t=e.value;if(!t)return n.createElement("span",null);var r=new Date(t);return n.createElement("span",null,b[r.getMonth()]+" "+r.getDay()+", "+new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}))}},{Header:"Service",accessor:"connection",Cell:function(e){var t=e.value;return t?n.createElement("div",{className:"flex justify-end pr-2"},n.createElement("img",{className:"inline-block w-5 h-5 text-right rounded-full",src:null!=t&&t.icon?t.icon:"/img/logo.png",alt:t.service_id})):n.createElement("span",{className:"hidden text-gray-900"},"-")}}]}),[]),d=o.useTable({columns:u,data:a},o.useSortBy),m=d.getTableBodyProps,f=d.rows,p=d.prepareRow;return n.createElement("div",{className:"overflow-auto"},n.createElement("table",{className:"min-w-full divide-y divide-gray-200"},n.createElement("thead",{className:""},d.headerGroups.map((function(e,t){return n.createElement("tr",Object.assign({},e.getHeaderGroupProps(),{key:"headerGroup"+t}),e.headers.map((function(t,r){return r!==e.headers.length-1||c?n.createElement("th",Object.assign({key:"column-"+r,className:"py-3 pr-2 space-x-6 text-xs font-medium tracking-wide text-left text-gray-500 uppercase "+(r===e.headers.length-2&&!c||r===e.headers.length-1&&c?"text-right":"")},t.getHeaderProps(t.getSortByToggleProps())),t.render("Header"),n.createElement("span",null,t.isSorted?n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"inline-block w-4 h-4 ml-2 text-gray-500"},n.createElement("path",t.isSortedDesc?{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"}:{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})):"")):null})))}))),n.createElement("tbody",Object.assign({},m(),{className:"bg-white divide-y divide-gray-200"}),f.map((function(e,t){return p(e),n.createElement(r.Transition,Object.assign({show:!0,enter:"transition ease-out duration-300",enterFrom:"transform opacity-40",enterTo:"transform opacity-100",leave:"transition ease-in duration-300",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",as:"tr"},e.getRowProps(),{key:"row-"+t,className:s&&"file"===e.original.type?"text-gray-300":"cursor-pointer hover:bg-gray-50 text-gray-900",onClick:function(){s&&"folder"!==e.original.type||i(e.original)}}),e.cells.map((function(t,r){return n.createElement("td",Object.assign({className:"py-3 space-x-6 text-xs truncate max-w-2xs whitespace-nowrap "+(r===e.cells.length-2&&!c||r===e.cells.length-1&&c?"text-right":""),style:{maxWidth:"16rem"}},t.getCellProps(),{key:"cell-"+r}),t.render("Cell"))})))})))),l?n.createElement("table",{className:"min-w-full divide-y divide-gray-200"},n.createElement("tbody",{className:"bg-white divide-y divide-gray-200"},Array.from(Array(12).keys()).map((function(e){return n.createElement(C,{key:e,columns:u})})))):"")},k=function(e){var a=e.title,o=e.description,l=e.type,i=void 0===l?"info":l,c=e.id,s=e.autoClose,u=e.closeAfter,d=e.closeText,m=e.image,f=t.useState(!1),p=f[0],v=f[1],h=T().removeToast;t.useEffect((function(){p||v(!0)}),[]),t.useEffect((function(){if(s||u){var e=setTimeout((function(){v(!1),setTimeout((function(){h(c)}),300)}),u||3500);return function(){clearTimeout(e)}}}),[c,h,s]);var g={info:n.createElement("svg",{className:"w-6 h-6 text-indigo-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{d:"M13 16H12V12H11M12 8H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),success:n.createElement("svg",{className:"w-6 h-6 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})),warning:n.createElement("svg",{className:"w-6 h-6 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{d:"M12 8V12M12 16H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),error:n.createElement("svg",{className:"w-6 h-6 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{d:"M12 8V12M12 16H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};return n.createElement("div",{className:"flex items-end justify-center w-full px-4 pt-6 pointer-events-none top-2 right-2",key:c},n.createElement(r.Transition,{show:p,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:"w-full bg-white dark:bg-gray-800 border-l-2 rounded-md shadow-lg pointer-events-auto "+{success:"border-green-400",warning:"border-yellow-500",error:"border-red-400",info:"border-indigo-400"}[i],style:{width:"calc(100% - 120px)",left:60},"data-testid":"toast"},n.createElement("div",{className:"flex overflow-hidden rounded-lg shadow-xs"},n.createElement("div",{className:"flex flex-col justify-center w-full p-3"},n.createElement("div",{className:"flex items-start"},n.createElement("div",{className:"flex-shrink-0"},g[i]),n.createElement("div",{className:"ml-2 w-0 flex-1 pt-0.5 overflow-hidden"},n.createElement("p",{className:"text-sm font-medium leading-5 text-gray-900 dark:text-white"},a),o?n.createElement("p",{className:"mt-1 text-sm leading-5 text-gray-500 dark:text-gray-300"},o):null,m?n.createElement("img",{src:m,className:"mt-2 rounded-md"}):null))),n.createElement("div",{className:"flex border-l border-gray-200 group"},n.createElement("button",{className:"flex items-center justify-center w-full p-3 text-sm font-medium text-gray-600 border border-transparent rounded-none rounded-r-lg hover:text-gray-500 focus:outline-none focus:ring-1 focus:ring-gray-300",onClick:function(){return h(c)},"data-testid":"remove"},d?n.createElement("span",null,d):n.createElement("svg",{className:"text-gray-400 fill-current w-7 h-7 group-hover:text-gray-500 dark:text-gray-300 dark:group-hover:text-gray-100",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22"},n.createElement("path",{d:"M16.24 14.83a1 1 0 0 1-1.41 1.41L12 13.41l-2.83 2.83a1 1 0 0 1-1.41-1.41L10.59 12 7.76 9.17a1 1 0 0 1 1.41-1.41L12 10.59l2.83-2.83a1 1 0 0 1 1.41 1.41L13.41 12l2.83 2.83z"})))))))},S=t.createContext({}),L=1,j=function(e){var r=e.children,a=t.useState([]),o=a[0],l=a[1],i=t.useCallback((function(e){l((function(t){return[].concat(t,[d({},e,{id:L++})])}))}),[l]),c=t.useCallback((function(e){l((function(t){return t.filter((function(t){return t.id!==e}))}))}),[l]);return n.createElement(S.Provider,{value:{addToast:i,removeToast:c}},n.createElement("div",{className:"absolute left-0 right-0 w-full",style:{zIndex:100,top:10}},null==o?void 0:o.map((function(e,t){return n.createElement(k,Object.assign({key:t},e))}))),r)},T=function(){return t.useContext(S)},M=function(e){var n=e.onSuccess,r=t.useState(!1),a=r[0],o=r[1],l=T().addToast,i=function(){var e=u(g.mark((function e(t){var r,a,i,s,u,d;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.file,a=t.jwt,i={"x-apideck-auth-type":"JWT","x-apideck-app-id":t.appId,"x-apideck-consumer-id":t.consumerId,"x-apideck-service-id":t.serviceId,"x-apideck-metadata":JSON.stringify({name:r.name,parent_folder_id:t.folderId}),Authorization:"Bearer "+a},o(!0),e.prev=3,e.next=6,fetch("https://unify.apideck.com/file-storage/files",{headers:i,method:"POST",body:r});case 6:return s=e.sent,e.next=9,s.json();case 9:if(!(u=e.sent).error){e.next=14;break}l({title:"Something went wrong",description:u.message,type:"error",autoClose:!0}),e.next=19;break;case 14:return l({title:"File uploaded",description:"File successfully uploaded",type:"success",autoClose:!0}),e.next=17,c(i,u.data.id);case 17:n((null==(d=e.sent)?void 0:d.data)||r);case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(3),l({title:"Something went wrong",description:e.t0,type:"error"});case 24:return e.prev=24,o(!1),e.finish(24);case 27:case"end":return e.stop()}}),e,null,[[3,21,24,27]])})));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=u(g.mark((function e(t,n){var r;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://unify.apideck.com/file-storage/files/"+n,{headers:t});case 2:return r=e.sent,e.next=5,r.json();case 5:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return{uploadFile:i,isLoading:a}},I=function(e){var r=e.file,a=e.folderId,o=e.appId,l=e.consumerId,i=e.serviceId,c=e.jwt,s=e.onSuccess,u=t.useState(r.name),m=u[0],f=u[1],p=M({onSuccess:s}),v=p.uploadFile,h=p.isLoading;return n.createElement("div",{className:"absolute bottom-0 left-0 right-0 bg-white border-t"},n.createElement("div",{className:"flex items-center justify-center p-4"},n.createElement("input",{className:"w-full px-3 py-2 text-sm leading-tight text-gray-700 border border-gray-200 rounded shadow-sm appearance-none focus:outline-none focus:shadow-outline",name:"fileName",placeholder:"File name",autoComplete:"off",onChange:function(e){return f(e.target.value)},value:m}),n.createElement("button",{type:"button",className:"items-center px-3 py-2 ml-2 text-sm font-medium leading-4 text-white bg-blue-600 border border-transparent rounded-md shadow-sm whitespace-nowrap sm:ml-3 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){return v({file:d({},r,{name:m}),folderId:a,appId:o,consumerId:l,serviceId:i,jwt:c})}},h?"Uploading...":"Save file")))},H=function(e){var r=e.setSearchTerm,a=e.searchTerm,o=e.isSearchVisible,l=e.setIsSearchVisible,i=t.useRef(null),c=function(){o?(r(""),l(!1)):(l(!0),setTimeout((function(){var e;null==(e=i.current)||e.focus()}),0))};return o?n.createElement("div",{className:"h-5"},n.createElement("div",{className:"absolute w-full -inset-x-0 -top-2"},n.createElement("div",{className:"relative"},n.createElement("button",{className:"absolute right-2 top-2",onClick:function(){return c()}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5 text-gray-400 transition duration-150 hover:text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}))),n.createElement("input",{className:"w-full px-3 py-2 mb-3 text-sm leading-tight text-gray-700 border border-gray-200 rounded shadow-sm appearance-none focus:outline-none focus:shadow-outline",name:"search",placeholder:"Search",autoComplete:"off",ref:i,onChange:function(e){return r(e.target.value)},value:a})))):n.createElement("button",{className:"",onClick:function(){return c()}},n.createElement("svg",{className:"w-5 h-5 text-gray-400 transition duration-150 hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"})))},F=function(e){var a;return n.createElement(r.Transition,{show:e.open,as:t.Fragment},n.createElement("div",{className:"absolute bottom-0 left-0 right-0 rounded-t-2xl",style:(null==(a=window)?void 0:a.innerWidth)>768?{width:"calc(100% - 3rem)",left:"1.5rem"}:{width:"calc(100% - 2rem)",left:"1rem"}},n.createElement(r.Transition.Child,{as:t.Fragment,enter:"transform transition ease-in-out duration-300",enterFrom:"translate-y-full",enterTo:"translate-y-0",leave:"transform transition ease-in-out duration-300",leaveFrom:"translate-y-0",leaveTo:"translate-y-full"},n.createElement("div",{className:"relative w-full rounded-t-2xl"},n.createElement("div",{className:"flex flex-col h-full py-6 overflow-y-auto border border-gray-200 rounded-t-lg shadow-sm bg-gray-50"},n.createElement("div",{className:"relative flex-1 px-4 sm:px-6"},e.children))))))},_=function(e){var t=e.className;return n.createElement("svg",{className:"animate-spin "+(void 0===t?"w-8 h-8 text-blue-600":t),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},n.createElement("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.createElement("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))},O=function(e){var t=e.folderId,r=e.appId,a=e.consumerId,o=e.serviceId,l=e.jwt,i=M({onSuccess:e.onSuccess}),c=i.uploadFile;return n.createElement("div",{className:""},n.createElement("label",{htmlFor:"file-upload",className:"cursor-pointer"},i.isLoading?n.createElement(_,{className:"w-5 h-5 text-gray-400"}):n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5 text-gray-400 transition duration-150 hover:text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})),n.createElement("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only",onChange:function(e){var n;return c({file:null==(n=e.target)?void 0:n.files[0],folderId:t,appId:r,consumerId:a,serviceId:o,jwt:l})}})))},B=function(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current},z="undefined"==typeof window||"Deno"in window?t.useEffect:t.useLayoutEffect,P={}[0],V=function(e){return e===P},A=function(e){return"function"==typeof e},R=new WeakMap,W=0;function D(e){if(A(e))try{e=e()}catch(t){e=""}var t;return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",n=0;n<e.length;++n){var r=e[n],a=P;null===r||"object"!=typeof r&&!A(r)?a=JSON.stringify(r):R.has(r)?a=R.get(r):(a=W,R.set(r,W++)),t+="$"+a}return t}(e)):t=[e=String(e||"")],[e,t,e?"$err$"+e:"",e?"$req$"+e:""]}function Z(e){return A(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]}var G=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=Z(n),o=a[0],l=a[1],i=a[2];return i.use=(i.use||[]).concat(t),e(o,l,i)}}(c,(function(e){return function(n,r,a){var o=a.cache,l=a.initialSize,i=void 0===l?1:l,c=a.revalidateAll,s=void 0!==c&&c,u=a.persistSize,d=void 0!==u&&u,m=null;try{m=function(e){return D(e?e(0,null):null)[0]}(n)}catch(e){}var f=t.useState({})[1],p=null;m&&(p="$ctx$"+m);var v=null;m&&(v="$len$"+m);var h=t.useRef(!1),g=t.useCallback((function(){var e=o.get(v);return V(e)?i:e}),[v,i]),y=t.useRef(g());z((function(){h.current?m&&o.set(v,d?y.current:i):h.current=!0}),[m]);var x=t.useRef(),w=e(m?"$inf$"+m:null,(function(){return function(e,t,n,r){return new(n||(n=Promise))((function(e,t){function a(e){try{l(r.next(e))}catch(e){t(e)}}function o(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,o)}l((r=r.apply(void 0,[])).next())}))}(0,0,void 0,(function(){var e,t,l,i,c,u,d,m,f,v,h,y;return function(e,t){var n,r,a,o,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return l.label++,{value:o[1],done:!1};case 5:l.label++,r=o[1],o=[0];continue;case 7:o=l.ops.pop(),l.trys.pop();continue;default:if(!((a=(a=l.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){l=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){l.label=o[1];break}if(6===o[0]&&l.label<a[1]){l.label=a[1],a=o;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(o);break}a[2]&&l.ops.pop(),l.trys.pop();continue}o=t.call(e,l)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,i])}}}(this,(function(w){switch(w.label){case 0:e=o.get(p)||[],t=e[0],l=e[1],i=[],c=g(),u=null,d=0,w.label=1;case 1:return d<c?(m=D(n?n(d,u):null),v=m[1],(f=m[0])?(h=o.get(f),y=s||t||V(h)||!d&&!V(x.current)||l&&!V(l[d])&&!a.compare(l[d],h),r&&y?[4,r.apply(void 0,v)]:[3,3]):[3,5]):[3,5];case 2:h=w.sent(),o.set(f,h),w.label=3;case 3:i.push(h),u=h,w.label=4;case 4:return++d,[3,1];case 5:return o.delete(p),[2,i]}}))}))}),a);z((function(){x.current=w.data}),[w.data]);var E=t.useCallback((function(e,t){if(void 0===t&&(t=!0),p)return t&&!V(e)?o.set(p,[!1,x.current]):t&&o.set(p,[!0]),w.mutate(e,t)}),[p]),C=t.useCallback((function(e){var t;if(v&&(A(e)?t=e(g()):"number"==typeof e&&(t=e),"number"==typeof t))return o.set(v,t),y.current=t,f({}),E(function(e){for(var t=[],r=null,a=0;a<e;++a){var l=D(n?n(a,r):null)[0],i=l?o.get(l):P;if(V(i))return x.current;t.push(i),r=i}return t}(t))}),[v,g,E]);return{size:g(),setSize:C,mutate:E,get error(){return w.error},get data(){return w.data},get isValidating(){return w.isValidating}}}})),q=function(e){var r,a,o,c,s=e.appId,m=e.consumerId,f=e.jwt,p=e.onSelect,v=e.connections,h=e.connection,x=e.setConnection,C=e.fileToSave,b=t.useState(null),k=b[0],S=b[1],L=t.useState([]),j=L[0],T=L[1],z=t.useState(null),P=z[0],V=z[1],A=t.useState(""),R=A[0],W=A[1],D=t.useState(),Z=D[0],q=D[1],$=t.useState(!1),J=$[0],U=$[1],Y=t.useState(!1),K=Y[0],Q=Y[1],X=function(e,n){void 0===n&&(n=500);var r=t.useState(e),a=r[0],o=r[1],l=t.useRef(null),i=function(){null!==l.current&&clearInterval(l.current)};return t.useEffect((function(){return l.current=setTimeout((function(){o(e)}),n),i}),[e,n]),t.useEffect((function(){return i}),[]),a}(R),ee=h.service_id,te=B(ee),ne=B(k),re=!(null==X||!X.length),ae={"Content-Type":"application/json","x-apideck-auth-type":"JWT","x-apideck-app-id":s,"x-apideck-consumer-id":m,"x-apideck-service-id":ee,Authorization:"Bearer "+f},oe=G((function(e,t){var n,r,a,o=te&&te!==ee||!k?"root":k,l="https://unify.apideck.com/file-storage/files?limit=30&"+("shared"===o?"filter[shared]=true":"filter[folder_id]="+o);return!t||null!=t&&null!=(n=t.data)&&n.length?0===e?l+"#serviceId="+ee:l+"&cursor="+(null==t||null==(r=t.meta)||null==(a=r.cursors)?void 0:a.next)+"#serviceId="+ee:null}),function(){var e=u(g.mark((function e(t){var n;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:ae});case 2:return n=e.sent,e.next=5,n.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{shouldRetryOnError:!1}),le=oe.data,ie=oe.setSize,ce=oe.size,se=oe.error,ue=oe.mutate,de=M({onSuccess:ue}),me=de.uploadFile,fe=de.isLoading,pe=i.useDropzone({onDrop:function(){var e=u(g.mark((function e(t){var n,r,a;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,me({file:t[0],folderId:k,appId:s,consumerId:m,serviceId:ee,jwt:f});case 2:null!=(a=document.querySelector(".dropzone"))&&null!=(n=a.style)&&n.visibility&&(a.style.visibility="hidden"),null!=a&&null!=(r=a.style)&&r.opacity&&(a.style.opacity="0");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),ve=pe.getRootProps,he=pe.getInputProps,ge=pe.isDragActive;t.useEffect((function(){var e=null,t=function(t){e=t.target;var n=document.querySelector(".dropzone");null!=n&&n.style&&(n.style.visibility="visible"),null!=n&&n.style&&(n.style.opacity="1")},n=function(t){if(t.target===e||t.target===document){var n=document.querySelector(".dropzone");null!=n&&n.style&&(n.style.visibility="hidden"),null!=n&&n.style&&(n.style.opacity="0")}};return window.addEventListener("dragenter",t),window.addEventListener("dragleave",n),function(){return window.removeEventListener("dragenter",t),void window.removeEventListener("dragleave",n)}}),[]),t.useEffect((function(){(te&&te!==ee&&ne===k||!k)&&(S("root"),T([]))}),[ee,te]);var ye=se||(null==le?void 0:le.length)&&(null==(r=le[le.length-1])?void 0:r.error),xe=!le&&!se,we=ce>0&&le&&void 0===le[ce-1],Ee=null!=le&&le.length?le.map((function(e){return null==e?void 0:e.data})).flat():le?[le]:[];if((!k||"root"===k)&&null!=le&&le.length&&"google-drive"===ee){var Ce,be={id:"shared",name:"Shared with me",type:"folder"};null!=(Ce=Ee)&&Ce.length?Ee=[be].concat(Ee):Ee.push(be)}t.useEffect((function(){if(null!=X&&X.length){U(!0);var e=function(){var e=u(g.mark((function e(t){var n;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:d({},ae,{"x-apideck-service-id":t}),method:"POST",body:JSON.stringify({query:X})},e.next=4,fetch("https://unify.apideck.com/file-storage/files/search",n);case 4:return e.abrupt("return",e.sent.json());case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t=v.map((function(t){return e(t.service_id)}));Promise.all(t).then((function(e){var t=null==e?void 0:e.map((function(e){var t;return null==(t=e.data)?void 0:t.map((function(t){return d({},t,{connection:v.find((function(t){return t.service_id===e.service}))})}))})).flat(),n=t.filter((function(e){var t;return(null==(t=e.connection)?void 0:t.service_id)===h.service_id})),r=t.filter((function(e){var t;return(null==(t=e.connection)?void 0:t.service_id)!==h.service_id}));q([].concat(n,r))})).finally((function(){return U(!1)}))}}),[X,ee]);var Ne=re?null==Z?void 0:Z.length:null==(a=Ee)?void 0:a.length;return n.createElement(t.Fragment,null,n.createElement("div",{className:"relative flex items-center justify-between mb-2"},n.createElement(y,{folders:j,handleClick:function(e){if(e){S(e.id);var t=j.indexOf(e),n=[].concat(j.slice(0,t+1));T(n)}else S("root"),T([])}}),n.createElement("div",{className:"flex items-center space-x-2"},n.createElement(H,{searchTerm:R,setSearchTerm:W,isSearchVisible:K,setIsSearchVisible:Q}),C?null:n.createElement(O,{file:C,consumerId:m,jwt:f,folderId:k,serviceId:ee,appId:s,onSuccess:ue}))),xe||J?n.createElement(E,{isSearching:J}):null,n.createElement("div",Object.assign({},ve(),{className:"relative"}),n.createElement("input",Object.assign({},he())),ge||fe?n.createElement("div",{className:"flex justify-center px-6 py-24 mt-4 border-2 border-gray-300 border-dashed rounded-md"},fe?n.createElement(_,{className:"w-6 h-6 text-gray-500"}):n.createElement("div",{className:"space-y-1 text-center"},n.createElement("svg",{className:"w-12 h-12 mx-auto text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48","aria-hidden":"true"},n.createElement("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("div",{className:"flex text-sm text-gray-600"},n.createElement("label",{htmlFor:"file-upload",className:"relative bg-white rounded-md"},n.createElement("span",null,"Drop here to upload to"),n.createElement("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only"})),n.createElement("p",{className:"pl-1 font-medium text-indigo-600"},h.name)),n.createElement("p",{className:"text-xs text-gray-500"},j.length?"Folder: "+(null==(o=j[j.length-1])?void 0:o.name):"Root folder"))):n.createElement("div",{className:"absolute inset-0 invisible w-full h-96 dropzone"})),xe||J||!Ne||ye||ge||fe?null:n.createElement(N,{data:re&&Z?Z:Ee,handleSelect:function(e){var t;"folder"===e.type&&(S(e.id),re?(W(""),Q(!1),T([e]),(null==(t=e.connection)?void 0:t.service_id)!==ee&&x(e.connection)):T([].concat(j,[e]))),"file"===e.type&&V(e)},isLoadingMore:we,searchMode:re,uploadingMode:!!C}),xe||J||Ne?null:n.createElement("p",{className:"py-4 text-sm text-center text-gray-700"},"No files found"),xe?null:n.createElement(F,{open:!!P},n.createElement(w,{file:P,setFile:V,onSelect:p})),!xe&&ye?n.createElement("p",{className:"mt-2 text-sm text-red-600"},(null==ye?void 0:ye.message)||ye):null,null==(c=Ee)||!c.length||we||re?null:n.createElement("div",{className:"flex flex-row-reverse py-4 border-gray-200"},n.createElement(l.Waypoint,{onEnter:function(){var e,t,n;(null==le?void 0:le.length)&&(null==(e=le[le.length-1])||null==(t=e.meta)||null==(n=t.cursors)?void 0:n.next)&&ie(ce+1)}})),C&&n.createElement(I,{file:C,appId:s,consumerId:m,jwt:f,folderId:k,serviceId:ee,onSuccess:p}))},$=function(e){var t=e.jwt,a=e.connections,o=e.connection,l=e.setConnection,i=e.isLoading,c=function(e){return e.enabled?"callable"!==e.state?"bg-yellow-400":"bg-green-400":"bg-gray-300"};return n.createElement("div",{className:"relative inline-block"},n.createElement(r.Menu,null,(function(e){var s=e.open;return n.createElement(n.Fragment,null,n.createElement(r.Menu.Button,{className:"flex items-center justify-between w-full px-4 py-2 text-sm font-medium text-blue-800 bg-blue-100 border border-blue-200 rounded-md group hover:bg-cool-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-cool-gray-100 focus:ring-blue-600",style:{minWidth:180}},n.createElement("div",null,!i&&(null==o?void 0:o.icon)&&n.createElement("img",{className:"inline-block w-6 h-6 mr-2 rounded-full "+(i?"animate-spin opacity-20":""),src:!i&&null!=o&&o.icon?null==o?void 0:o.icon:"/img/logo.png",alt:""}),i&&n.createElement(_,{className:"w-6 h-6"}),!i&&n.createElement("span",null,(null==o?void 0:o.name)||"No integrations")),n.createElement("svg",{className:"w-5 h-5 ml-2 -mr-1",viewBox:"0 0 20 20",fill:"currentColor"},n.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))),n.createElement(r.Transition,{show:s,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",className:"min-w-sm"},n.createElement(r.Menu.Items,{static:!0,className:"absolute right-0 z-10 w-full mt-2 origin-top-right bg-white border divide-y rounded-md outline-none border-cool-gray-200 divide-cool-gray-100"},n.createElement("div",{className:"py-1"},null==a?void 0:a.map((function(e,a){return n.createElement(r.Menu.Item,{key:a},(function(r){return n.createElement("div",{onClick:function(){return function(e){"callable"!==e.state?window.location.href="available"!==e.state?"https://vault.apideck.com/integrations/file-storage/"+(null==e?void 0:e.service_id)+"?jwt="+t:"https://vault.apideck.com/integrations/file-storage/"+(null==e?void 0:e.service_id)+"/enable?jwt="+t:l(e)}(e)},className:(r.active?"bg-gray-100 text-gray-900":"text-gray-600")+" flex items-center justify-between min-w-0 mx-2 cursor-pointer rounded-md py-0.5 overflow-hidden "+(e.enabled?"":"opacity-60")},n.createElement("img",{className:"flex-shrink-0 w-6 h-6 m-2 rounded-full",src:e.icon,alt:""}),n.createElement("span",{className:"flex-1 min-w-0"},n.createElement("span",{className:"text-sm font-medium text-gray-900 truncate"},e.name)),n.createElement("span",{className:"inline-block w-2.5 h-2.5 mr-2 rounded-full ring-2 ring-white "+c(e)}))}))})),n.createElement(r.Menu.Item,null,(function(e){return n.createElement("div",{onClick:function(){window.location.href="https://vault.apideck.com/session/"+t},className:(e.active?"bg-gray-100 text-gray-900":"text-gray-600")+" flex items-center justify-between min-w-0 mx-2 cursor-pointer rounded-md py-0.5 overflow-hidden"},n.createElement("svg",{className:"flex-shrink-0 w-6 h-6 m-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})),n.createElement("span",{className:"flex-1 min-w-0"},n.createElement("span",{className:"text-sm font-medium text-gray-900 truncate"},"Add integration")))}))))))})))},J=function(e){var r,a=e.appId,o=e.consumerId,l=e.jwt,i=e.onSelect,s=e.title,d=e.subTitle,m=e.fileToSave,f=t.useState(),p=f[0],v=f[1],h=c("https://unify.apideck.com/vault/connections?api=file-storage",function(){var e=u(g.mark((function e(t){var n;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:{"Content-Type":"application/json","x-apideck-consumer-id":o,"x-apideck-app-id":a,"x-apideck-auth-type":"JWT",Authorization:"Bearer "+l}});case 2:return n=e.sent,e.next=5,n.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{shouldRetryOnError:!1}),y=h.data,x=h.error,w=!y&&!x,E=(null==y?void 0:y.error)||x,C=null==y?void 0:y.data,b=null==C?void 0:C.filter((function(e){return"callable"===e.state}));t.useEffect((function(){!p&&null!=b&&b.length&&v(b[0])}),[v,b]);var N=null==(r=document.getElementById("modal-component"))?void 0:r.clientHeight;return n.createElement("div",{className:"relative -m-6 bg-white sm:rounded-lg h-modal",style:{height:"34rem"}},n.createElement("div",{className:"flex items-center justify-between px-4 py-5 sm:px-6"},n.createElement("div",null,n.createElement("h3",{className:"text-lg font-medium leading-6 text-gray-900"},s),n.createElement("p",{className:"max-w-2xl mt-1 text-sm text-gray-500"},E?n.createElement("span",{className:"mb-2 text-red-600"},E):n.createElement("span",{className:"text-gray-700 dark:text-gray-400"},p?d:"No connector selected"))),n.createElement($,{jwt:l,connections:C,connection:p,setConnection:v,isLoading:w})),n.createElement("div",{className:"px-4 py-5 overflow-y-auto border-t border-gray-200 sm:px-6",style:{height:"undefined"!=typeof window&&N?N-70:"calc(100% - 70px)"}},p?n.createElement(j,null,n.createElement(q,{appId:a,consumerId:o,jwt:l,onSelect:i,connections:b,connection:p,setConnection:v,fileToSave:m})):null!=b&&b.length||w?null:n.createElement("div",{className:"flex items-center justify-center border-2 border-gray-200 border-dashed rounded-lg h-96"},n.createElement("div",{className:"text-center"},n.createElement("a",{href:"https://vault.apideck.com/session/"+l,target:"_blank",rel:"noreferrer",className:"text-indigo-600 hover:text-indigo-900"},"Go to vault")," ","to add file storage connectors"))))},U=["connection"];exports.FilePicker=t.forwardRef((function(e,r){var a=e.appId,o=e.consumerId,l=e.jwt,i=e.trigger,c=e.onSelect,s=e.title,u=e.subTitle,d=e.showAttribution,f=void 0===d||d,p=e.open,v=void 0!==p&&p,g=e.onClose,y=e.fileToSave,x=t.useState(!1),w=x[0],E=x[1],C=function(){E(!1),g&&g()};return t.useEffect((function(){v&&E(!0)}),[v]),n.createElement(t.Fragment,null,i?n.cloneElement(i,{onClick:function(){return E(!0)},ref:r}):null,n.createElement(h,{isOpen:w,onClose:function(){return C()},showAttribution:f},n.createElement(J,{appId:a,consumerId:o,jwt:l,onSelect:function(e){var t=e;e.connection&&(t=m(e,U)),c&&c(t),C()},title:s||(y?"Apideck File Uploader":"Apideck File Picker"),subTitle:u||(y?"Select a folder":"Select a file"),fileToSave:y})))}));
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("@headlessui/react"),a=require("react-dom"),o=require("react-table"),l=require("react-waypoint"),i=require("react-dropzone"),s=e(require("swr"));function c(e,t,n,r,a,o,l){try{var i=e[o](l),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function l(e){c(o,r,a,l,i,"next",e)}function i(e){c(o,r,a,l,i,"throw",e)}l(void 0)}))}}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 m(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}var f,p=function(e){var t=e.className;return n.createElement("svg",{width:95,height:23,viewBox:"0 0 95 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:void 0===t?"":t},n.createElement("path",{d:"M1.2 15.05C1.25 14.2167 1.45833 13.525 1.825 12.975C2.19167 12.425 2.65833 11.9833 3.225 11.65C3.79167 11.3167 4.425 11.0833 5.125 10.95C5.84167 10.8 6.55833 10.725 7.275 10.725C7.925 10.725 8.58333 10.775 9.25 10.875C9.91667 10.9583 10.525 11.1333 11.075 11.4C11.625 11.6667 12.075 12.0417 12.425 12.525C12.775 12.9917 12.95 13.6167 12.95 14.4V21.125C12.95 21.7083 12.9833 22.2667 13.05 22.8C13.1167 23.3333 13.2333 23.7333 13.4 24H9.8C9.73333 23.8 9.675 23.6 9.625 23.4C9.59167 23.1833 9.56667 22.9667 9.55 22.75C8.98333 23.3333 8.31667 23.7417 7.55 23.975C6.78333 24.2083 6 24.325 5.2 24.325C4.58333 24.325 4.00833 24.25 3.475 24.1C2.94167 23.95 2.475 23.7167 2.075 23.4C1.675 23.0833 1.35833 22.6833 1.125 22.2C0.908333 21.7167 0.8 21.1417 0.8 20.475C0.8 19.7417 0.925 19.1417 1.175 18.675C1.44167 18.1917 1.775 17.8083 2.175 17.525C2.59167 17.2417 3.05833 17.0333 3.575 16.9C4.10833 16.75 4.64167 16.6333 5.175 16.55C5.70833 16.4667 6.23333 16.4 6.75 16.35C7.26667 16.3 7.725 16.225 8.125 16.125C8.525 16.025 8.84167 15.8833 9.075 15.7C9.30833 15.5 9.41667 15.2167 9.4 14.85C9.4 14.4667 9.33333 14.1667 9.2 13.95C9.08333 13.7167 8.91667 13.5417 8.7 13.425C8.5 13.2917 8.25833 13.2083 7.975 13.175C7.70833 13.125 7.41667 13.1 7.1 13.1C6.4 13.1 5.85 13.25 5.45 13.55C5.05 13.85 4.81667 14.35 4.75 15.05H1.2ZM9.4 17.675C9.25 17.8083 9.05833 17.9167 8.825 18C8.60833 18.0667 8.36667 18.125 8.1 18.175C7.85 18.225 7.58333 18.2667 7.3 18.3C7.01667 18.3333 6.73333 18.375 6.45 18.425C6.18333 18.475 5.91667 18.5417 5.65 18.625C5.4 18.7083 5.175 18.825 4.975 18.975C4.79167 19.1083 4.64167 19.2833 4.525 19.5C4.40833 19.7167 4.35 19.9917 4.35 20.325C4.35 20.6417 4.40833 20.9083 4.525 21.125C4.64167 21.3417 4.8 21.5167 5 21.65C5.2 21.7667 5.43333 21.85 5.7 21.9C5.96667 21.95 6.24167 21.975 6.525 21.975C7.225 21.975 7.76667 21.8583 8.15 21.625C8.53333 21.3917 8.81667 21.1167 9 20.8C9.18333 20.4667 9.29167 20.1333 9.325 19.8C9.375 19.4667 9.4 19.2 9.4 19V17.675ZM22.2305 21.675C21.6638 21.675 21.1805 21.5583 20.7805 21.325C20.3805 21.0917 20.0555 20.7917 19.8055 20.425C19.5721 20.0417 19.3971 19.6 19.2805 19.1C19.1805 18.6 19.1305 18.0917 19.1305 17.575C19.1305 17.0417 19.1805 16.525 19.2805 16.025C19.3805 15.525 19.5471 15.0833 19.7805 14.7C20.0305 14.3167 20.3471 14.0083 20.7305 13.775C21.1305 13.525 21.6221 13.4 22.2055 13.4C22.7721 13.4 23.2471 13.525 23.6305 13.775C24.0305 14.0083 24.3555 14.325 24.6055 14.725C24.8555 15.1083 25.0305 15.55 25.1305 16.05C25.2471 16.55 25.3055 17.0583 25.3055 17.575C25.3055 18.0917 25.2555 18.6 25.1555 19.1C25.0555 19.6 24.8805 20.0417 24.6305 20.425C24.3971 20.7917 24.0805 21.0917 23.6805 21.325C23.2971 21.5583 22.8138 21.675 22.2305 21.675ZM15.7055 11.075V28.525H19.2555V22.4H19.3055C19.7388 23.0333 20.2888 23.5167 20.9555 23.85C21.6388 24.1667 22.3805 24.325 23.1805 24.325C24.1305 24.325 24.9555 24.1417 25.6555 23.775C26.3721 23.4083 26.9638 22.9167 27.4305 22.3C27.9138 21.6833 28.2721 20.975 28.5055 20.175C28.7388 19.375 28.8555 18.5417 28.8555 17.675C28.8555 16.7583 28.7388 15.8833 28.5055 15.05C28.2721 14.2 27.9138 13.4583 27.4305 12.825C26.9471 12.1917 26.3388 11.6833 25.6055 11.3C24.8721 10.9167 23.9971 10.725 22.9805 10.725C22.1805 10.725 21.4471 10.8833 20.7805 11.2C20.1138 11.5167 19.5638 12.025 19.1305 12.725H19.0805V11.075H15.7055ZM34.6387 9.075V6.15H31.0887V9.075H34.6387ZM31.0887 11.075V24H34.6387V11.075H31.0887ZM46.609 17.5C46.609 18.0333 46.559 18.55 46.459 19.05C46.359 19.55 46.1923 20 45.959 20.4C45.7257 20.7833 45.409 21.0917 45.009 21.325C44.6257 21.5583 44.1423 21.675 43.559 21.675C43.009 21.675 42.534 21.5583 42.134 21.325C41.7507 21.075 41.4257 20.7583 41.159 20.375C40.909 19.975 40.7257 19.525 40.609 19.025C40.4923 18.525 40.434 18.025 40.434 17.525C40.434 16.9917 40.484 16.4833 40.584 16C40.7007 15.5 40.8757 15.0583 41.109 14.675C41.359 14.2917 41.684 13.9833 42.084 13.75C42.484 13.5167 42.9757 13.4 43.559 13.4C44.1423 13.4 44.6257 13.5167 45.009 13.75C45.3923 13.9833 45.7007 14.2917 45.934 14.675C46.184 15.0417 46.359 15.475 46.459 15.975C46.559 16.4583 46.609 16.9667 46.609 17.5ZM46.659 22.35V24H50.034V6.15H46.484V12.65H46.434C46.034 12.0167 45.484 11.5417 44.784 11.225C44.1007 10.8917 43.3757 10.725 42.609 10.725C41.659 10.725 40.8257 10.9167 40.109 11.3C39.3923 11.6667 38.7923 12.1583 38.309 12.775C37.8423 13.3917 37.484 14.1083 37.234 14.925C37.0007 15.725 36.884 16.5583 36.884 17.425C36.884 18.325 37.0007 19.1917 37.234 20.025C37.484 20.8583 37.8423 21.6 38.309 22.25C38.7923 22.8833 39.4007 23.3917 40.134 23.775C40.8673 24.1417 41.7173 24.325 42.684 24.325C43.534 24.325 44.2923 24.175 44.959 23.875C45.6423 23.5583 46.1923 23.05 46.609 22.35H46.659ZM61.4172 16.15H55.6422C55.6589 15.9 55.7089 15.6167 55.7922 15.3C55.8922 14.9833 56.0505 14.6833 56.2672 14.4C56.5005 14.1167 56.8005 13.8833 57.1672 13.7C57.5505 13.5 58.0255 13.4 58.5922 13.4C59.4589 13.4 60.1005 13.6333 60.5172 14.1C60.9505 14.5667 61.2505 15.25 61.4172 16.15ZM55.6422 18.4H64.9672C65.0339 17.4 64.9505 16.4417 64.7172 15.525C64.4839 14.6083 64.1005 13.7917 63.5672 13.075C63.0505 12.3583 62.3839 11.7917 61.5672 11.375C60.7505 10.9417 59.7922 10.725 58.6922 10.725C57.7089 10.725 56.8089 10.9 55.9922 11.25C55.1922 11.6 54.5005 12.0833 53.9172 12.7C53.3339 13.3 52.8839 14.0167 52.5672 14.85C52.2505 15.6833 52.0922 16.5833 52.0922 17.55C52.0922 18.55 52.2422 19.4667 52.5422 20.3C52.8589 21.1333 53.3005 21.85 53.8672 22.45C54.4339 23.05 55.1255 23.5167 55.9422 23.85C56.7589 24.1667 57.6755 24.325 58.6922 24.325C60.1589 24.325 61.4089 23.9917 62.4422 23.325C63.4755 22.6583 64.2422 21.55 64.7422 20H61.6172C61.5005 20.4 61.1839 20.7833 60.6672 21.15C60.1505 21.5 59.5339 21.675 58.8172 21.675C57.8172 21.675 57.0505 21.4167 56.5172 20.9C55.9839 20.3833 55.6922 19.55 55.6422 18.4ZM75.8727 15.625H79.3477C79.2977 14.7917 79.0977 14.075 78.7477 13.475C78.3977 12.8583 77.9393 12.35 77.3727 11.95C76.8227 11.5333 76.1893 11.225 75.4727 11.025C74.7727 10.825 74.0393 10.725 73.2727 10.725C72.2227 10.725 71.2893 10.9 70.4727 11.25C69.656 11.6 68.9643 12.0917 68.3977 12.725C67.831 13.3417 67.3977 14.0833 67.0977 14.95C66.8143 15.8 66.6727 16.725 66.6727 17.725C66.6727 18.6917 66.831 19.5833 67.1477 20.4C67.4643 21.2 67.906 21.8917 68.4727 22.475C69.0393 23.0583 69.7227 23.5167 70.5227 23.85C71.3393 24.1667 72.231 24.325 73.1977 24.325C74.9143 24.325 76.3227 23.875 77.4227 22.975C78.5227 22.075 79.1893 20.7667 79.4227 19.05H75.9977C75.881 19.85 75.5893 20.4917 75.1227 20.975C74.6727 21.4417 74.0227 21.675 73.1727 21.675C72.6227 21.675 72.156 21.55 71.7727 21.3C71.3893 21.05 71.081 20.7333 70.8477 20.35C70.631 19.95 70.4727 19.5083 70.3727 19.025C70.2727 18.5417 70.2227 18.0667 70.2227 17.6C70.2227 17.1167 70.2727 16.6333 70.3727 16.15C70.4727 15.65 70.6393 15.2 70.8727 14.8C71.1227 14.3833 71.4393 14.05 71.8227 13.8C72.206 13.5333 72.681 13.4 73.2477 13.4C74.7643 13.4 75.6393 14.1417 75.8727 15.625ZM81.7531 6.15V24H85.3031V19.55L86.6781 18.225L90.2281 24H94.5281L89.1031 15.825L93.9781 11.075H89.7781L85.3031 15.725V6.15H81.7531Z",transform:"translate(0 -6)",fill:"white"}))},v=["children","onClose","isOpen","showAttribution","className","style"],h=n.forwardRef((function(e,o){var l=e.children,i=e.onClose,s=e.isOpen,c=e.showAttribution,u=e.className,f=void 0===u?"":u,h=e.style,g=void 0===h?{}:h,y=m(e,v),x=t.useState(!1),w=x[0],E=x[1];t.useEffect((function(){E(!0)}),[]);var b=n.createElement(r.Transition,{show:s},n.createElement(r.Transition.Child,{enter:"transition ease-out duration-150",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0"},n.createElement("div",{className:"fixed inset-0 z-40 flex items-end bg-gray-400 bg-opacity-75 dark:bg-gray-600 sm:items-center sm:justify-center","data-testid":"backdrop",onClick:i},c?n.createElement("a",{className:"absolute flex text-sm text-center text-gray-100 bottom-5 lg:left-5 xl:left-6 xl:bottom-6",href:"https://apideck.com/products/unify",target:"_blank",rel:"noopener noreferrer"},"Powered by ",n.createElement(p,{className:"h-5"})):null,n.createElement(r.Transition.Child,Object.assign({enter:"transition ease-out duration-150",enterFrom:"opacity-0 transform translate-y-1/4 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 transform translate-y-1/4 scale-95",className:"w-full p-5 overflow-hidden bg-white dark:bg-gray-800 dark-text-gray-400 shadow-lg rounded-t-lg sm:p-6 no-scrollbar sm:rounded-lg sm:m-4 sm:max-w-xl relative "+f,style:d({maxHeight:"90%"},g),ref:o,role:"dialog",id:"modal-component",onClick:function(e){return e.stopPropagation()}},y),l))));return w?a.createPortal(b,document.body):null})),g=(function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=Object.create((t&&t.prototype instanceof d?t:d).prototype),o=new C(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return{value:void 0,done:!0}}for(n.method=a,n.arg=o;;){var l=n.delegate;if(l){var i=w(l,n);if(i){if(i===u)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,o),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function d(){}function m(){}function f(){}var p={};i(p,a,(function(){return this}));var v=Object.getPrototypeOf,h=v&&v(v(N([])));h&&h!==t&&n.call(h,a)&&(p=h);var g=f.prototype=d.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var r;this._invoke=function(a,o){function l(){return new t((function(r,l){!function r(a,o,l,i){var s=c(e[a],e,o);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,l,i)}),(function(e){r("throw",e,l,i)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return r("throw",e,l,i)}))}i(s.arg)}(a,o,r,l)}))}return r=r?r.then(l,l):l()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function N(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return m.prototype=f,i(g,"constructor",f),i(f,"constructor",m),m.displayName=i(f,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,i(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(x.prototype),i(x.prototype,o,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var l=new x(s(t,n,r,a),o);return e.isGeneratorFunction(n)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},y(g),i(g,l,"Generator"),i(g,a,(function(){return this})),i(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=N,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return l.type="throw",l.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var i=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;b(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(f={exports:{}}),f.exports),y=function(e){var a=e.folders,o=e.handleClick;return n.createElement(t.Fragment,null,n.createElement("div",{className:"flex items-center text-sm"},n.createElement("button",{className:"text-gray-600 hover:text-gray-900",onClick:function(){return o()}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"inline-block w-5 h-5 text-yellow-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"}))),a.map((function(e,t){return n.createElement(r.Transition,{show:!0,enter:"transition ease-out duration-200",enterFrom:"transform opacity-60",enterTo:"transform opacity-100",leave:"transition ease-in duration-200",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",key:t},n.createElement(r.Transition.Child,{enter:"transition ease-out duration-200",enterFrom:"transform opacity-60 translate-x-1",enterTo:"transform opacity-100",leave:"transition ease-in duration-100",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",className:"flex items-center",as:"div",key:e.id},n.createElement("svg",{className:"flex-shrink-0 w-5 h-5 text-gray-300",fill:"currentColor",viewBox:"0 0 20 20"},n.createElement("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})),t===a.length-1?n.createElement("span",{className:"font-medium text-gray-900"},e.name):n.createElement("button",{className:"text-gray-600 hover:text-gray-900",onClick:function(){return o(e)}},e.name)))}))))},x=function(e,t){if(void 0===t&&(t=2),0===e)return"0 Bytes";var n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},w=function(e){var t,r,a=e.file,o=e.setFile,l=e.onSelect;return a?n.createElement("div",{className:"flex flex-col justify-between h-full"},n.createElement("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-6"},n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Name"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a?void 0:a.name)),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Size"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null!=a&&a.size?x(null==a?void 0:a.size):"-")),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Mime type"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a?void 0:a.mime_type)),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Downloadable"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null!=a&&a.downloadable?"Yes":"No")),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Created"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},n.createElement("div",null,n.createElement("span",{className:"mr-2 text-gray-900"},(null==a?void 0:a.created_at)&&new Date(a.created_at).toLocaleDateString()),n.createElement("span",{className:"text-gray-500 "},(null==a?void 0:a.created_at)&&new Date(a.created_at).toLocaleTimeString())))),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Updated"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},n.createElement("div",null,n.createElement("span",{className:"mr-2 text-gray-900"},(null==a?void 0:a.updated_at)&&new Date(a.updated_at).toLocaleDateString()),n.createElement("span",{className:"text-gray-500 "},(null==a?void 0:a.updated_at)&&new Date(a.updated_at).toLocaleTimeString())))),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Owner"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a||null==(t=a.owner)?void 0:t.name)),n.createElement("div",{className:"col-span-1"},n.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Email"),n.createElement("dd",{className:"mt-1 text-sm text-gray-900"},null==a||null==(r=a.owner)?void 0:r.email))),n.createElement("div",{className:"flex justify-between pt-6"},n.createElement("button",{type:"button",className:"items-center w-full px-3 py-2 mr-2 text-sm font-medium leading-4 text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm sm:mr-3 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){return o(null)}},"Close"),n.createElement("button",{type:"button",className:"items-center w-full px-3 py-2 ml-2 text-sm font-medium leading-4 text-white bg-blue-600 border border-transparent rounded-md shadow-sm sm:ml-3 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){return l(a)}},"Select file"))):n.createElement("p",{className:"p-4 text-center"},"No file found")},E=function(e){var t=e.isSearching,r=[{Header:"Name"},{Header:"Size"},{Header:"Updated"}],a=Array.from(Array(6).keys());return t&&(r=[].concat(r,[{Header:"Service"}])),n.createElement("div",{className:"overflow-auto"},n.createElement("table",{className:"min-w-full divide-y divide-gray-200"},n.createElement("thead",null,n.createElement("tr",null,r.map((function(e,t){return n.createElement("th",{key:"column-"+t,className:"py-3 space-x-6 text-xs font-medium tracking-wide text-left text-gray-500 uppercase "+(t===r.length-1?"text-right":"")},e.Header)})))),n.createElement("tbody",{className:"bg-white divide-y divide-gray-200"},a.map((function(e,t){return n.createElement(b,{key:t,columns:r})})))))},b=function(e){var t=e.columns;return n.createElement("tr",null,t.map((function(e,r){return n.createElement("td",{className:"py-4 space-x-6 text-sm font-medium truncate whitespace-nowrap "+(r===t.length-1?"text-right":""),key:"cell-"+r,style:{maxWidth:80}},n.createElement("span",{className:"px-16 py-0 bg-gray-200 rounded-sm animate-pulse"}))})))},C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],N=function(e){var t=e.data,a=void 0===t?[]:t,l=e.isLoadingMore,i=e.handleSelect,s=e.searchMode,c=e.uploadingMode,u=n.useMemo((function(){return[{Header:"Name",accessor:"name",Cell:function(e){return"folder"===e.row.original.type?n.createElement("div",{className:"flex items-center"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"inline-block w-5 h-5 mr-1 text-yellow-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})),n.createElement("span",{className:"truncate"},e.value)):n.createElement("div",{className:"flex items-center truncate"},n.createElement("svg",{viewBox:"0 0 24 24",className:"inline-block w-5 h-5 mr-1 text-gray-500"},n.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"})),n.createElement("span",{className:"truncate"},e.value))}},{Header:"Size",accessor:"size",Cell:function(e){var t=e.value;return n.createElement("div",null,t?x(t):null)}},{Header:"Updated",accessor:"updated_at",Cell:function(e){var t=e.value;if(!t)return n.createElement("span",null);var r=new Date(t);return n.createElement("span",null,C[r.getMonth()]+" "+r.getDay()+", "+new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}))}},{Header:"Service",accessor:"connection",Cell:function(e){var t=e.value;return t?n.createElement("div",{className:"flex justify-end pr-2"},n.createElement("img",{className:"inline-block w-5 h-5 text-right rounded-full",src:null!=t&&t.icon?t.icon:"/img/logo.png",alt:t.service_id})):n.createElement("span",{className:"hidden text-gray-900"},"-")}}]}),[]),d=o.useTable({columns:u,data:a},o.useSortBy),m=d.getTableBodyProps,f=d.rows,p=d.prepareRow;return n.createElement("div",{className:"overflow-auto"},n.createElement("table",{className:"min-w-full divide-y divide-gray-200"},n.createElement("thead",{className:""},d.headerGroups.map((function(e,t){return n.createElement("tr",Object.assign({},e.getHeaderGroupProps(),{key:"headerGroup"+t}),e.headers.map((function(t,r){return r!==e.headers.length-1||s?n.createElement("th",Object.assign({key:"column-"+r,className:"py-3 pr-2 space-x-6 text-xs font-medium tracking-wide text-left text-gray-500 uppercase "+(r===e.headers.length-2&&!s||r===e.headers.length-1&&s?"text-right":"")},t.getHeaderProps(t.getSortByToggleProps())),t.render("Header"),n.createElement("span",null,t.isSorted?n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"inline-block w-4 h-4 ml-2 text-gray-500"},n.createElement("path",t.isSortedDesc?{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"}:{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})):"")):null})))}))),n.createElement("tbody",Object.assign({},m(),{className:"bg-white divide-y divide-gray-200"}),f.map((function(e,t){return p(e),n.createElement(r.Transition,Object.assign({show:!0,enter:"transition ease-out duration-300",enterFrom:"transform opacity-40",enterTo:"transform opacity-100",leave:"transition ease-in duration-300",leaveFrom:"transform opacity-100",leaveTo:"transform opacity-0",as:"tr"},e.getRowProps(),{key:"row-"+t,className:c&&"file"===e.original.type?"text-gray-300":"cursor-pointer hover:bg-gray-50 text-gray-900",onClick:function(){c&&"folder"!==e.original.type||i(e.original)}}),e.cells.map((function(t,r){return n.createElement("td",Object.assign({className:"py-3 space-x-6 text-xs truncate max-w-2xs whitespace-nowrap "+(r===e.cells.length-2&&!s||r===e.cells.length-1&&s?"text-right":""),style:{maxWidth:"16rem"}},t.getCellProps(),{key:"cell-"+r}),t.render("Cell"))})))})))),l?n.createElement("table",{className:"min-w-full divide-y divide-gray-200"},n.createElement("tbody",{className:"bg-white divide-y divide-gray-200"},Array.from(Array(12).keys()).map((function(e){return n.createElement(b,{key:e,columns:u})})))):"")},k=function(e){var a=e.title,o=e.description,l=e.type,i=void 0===l?"info":l,s=e.id,c=e.autoClose,u=e.closeAfter,d=e.closeText,m=e.image,f=t.useState(!1),p=f[0],v=f[1],h=T().removeToast;t.useEffect((function(){p||v(!0)}),[]),t.useEffect((function(){if(c||u){var e=setTimeout((function(){v(!1),setTimeout((function(){h(s)}),300)}),u||3500);return function(){clearTimeout(e)}}}),[s,h,c]);var g={info:n.createElement("svg",{className:"w-6 h-6 text-indigo-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{d:"M13 16H12V12H11M12 8H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),success:n.createElement("svg",{className:"w-6 h-6 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})),warning:n.createElement("svg",{className:"w-6 h-6 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{d:"M12 8V12M12 16H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),error:n.createElement("svg",{className:"w-6 h-6 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"icon"},n.createElement("path",{d:"M12 8V12M12 16H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};return n.createElement("div",{className:"flex items-end justify-end w-full px-4 pointer-events-none top-3 right-3",key:s},n.createElement(r.Transition,{show:p,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:"w-full bg-white dark:bg-gray-800 border-l-2 rounded-md shadow-lg pointer-events-auto "+{success:"border-green-400",warning:"border-yellow-500",error:"border-red-400",info:"border-indigo-400"}[i],style:{width:"calc(100% - 120px)",left:60},"data-testid":"toast"},n.createElement("div",{className:"flex overflow-hidden rounded-lg shadow-xs"},n.createElement("div",{className:"flex flex-col justify-center w-full p-3"},n.createElement("div",{className:"flex items-start"},n.createElement("div",{className:"flex-shrink-0"},g[i]),n.createElement("div",{className:"ml-2 w-0 flex-1 pt-0.5 overflow-hidden"},n.createElement("p",{className:"text-sm font-medium leading-5 text-gray-900 dark:text-white"},a),o?n.createElement("p",{className:"mt-1 text-sm leading-5 text-gray-500 dark:text-gray-300"},o):null,m?n.createElement("img",{src:m,className:"mt-2 rounded-md"}):null))),n.createElement("div",{className:"flex border-l border-gray-200 group"},n.createElement("button",{className:"flex items-center justify-center w-full p-3 text-sm font-medium text-gray-600 border border-transparent rounded-none rounded-r-lg hover:text-gray-500 focus:outline-none focus:ring-1 focus:ring-gray-300",onClick:function(){return h(s)},"data-testid":"remove"},d?n.createElement("span",null,d):n.createElement("svg",{className:"text-gray-400 fill-current w-7 h-7 group-hover:text-gray-500 dark:text-gray-300 dark:group-hover:text-gray-100",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22"},n.createElement("path",{d:"M16.24 14.83a1 1 0 0 1-1.41 1.41L12 13.41l-2.83 2.83a1 1 0 0 1-1.41-1.41L10.59 12 7.76 9.17a1 1 0 0 1 1.41-1.41L12 10.59l2.83-2.83a1 1 0 0 1 1.41 1.41L13.41 12l2.83 2.83z"})))))))},S=t.createContext({}),j=1,L=function(e){var r=e.children,a=t.useState([]),o=a[0],l=a[1],i=t.useCallback((function(e){l((function(t){return[].concat(t,[d({},e,{id:j++})])}))}),[l]),s=t.useCallback((function(e){l((function(t){return t.filter((function(t){return t.id!==e}))}))}),[l]);return n.createElement(S.Provider,{value:{addToast:i,removeToast:s}},n.createElement("div",{className:"absolute left-0 right-0 w-full",style:{zIndex:100,top:10}},null==o?void 0:o.map((function(e,t){return n.createElement(k,Object.assign({key:t},e))}))),r)},T=function(){return t.useContext(S)},M=function(e){var n=e.onSuccess,r=t.useState(!1),a=r[0],o=r[1],l=t.useState(null),i=l[0],s=l[1],c=T().addToast,m=function(){var e=u(g.mark((function e(t){var n,r,a,l;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.file,r=t.folderId,a=t.jwt,l={"x-apideck-auth-type":"JWT","x-apideck-app-id":t.appId,"x-apideck-consumer-id":t.consumerId,"x-apideck-service-id":t.serviceId,"x-apideck-metadata":JSON.stringify({name:n.name,parent_folder_id:r}),Authorization:"Bearer "+a},o(!0),s(null),!(n.size>4e6)){e.next=10;break}return s(5),e.next=8,h(n,l,r);case 8:e.next=12;break;case 10:return e.next=12,f(n,l);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=function(){var e=u(g.mark((function e(t,r){var a,l,i;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("https://unify.apideck.com/file-storage/files",{headers:r,method:"POST",body:t});case 3:return a=e.sent,e.next=6,a.json();case 6:if(!(l=e.sent).error){e.next=11;break}c({title:"Something went wrong",description:l.message,type:"error",autoClose:!0}),e.next=16;break;case 11:return c({title:"File uploaded",description:"File successfully uploaded",type:"success",autoClose:!0}),e.next=14,p(l.data.id,r);case 14:n((null==(i=e.sent)?void 0:i.data)||t);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),c({title:"Something went wrong",description:e.t0,type:"error"});case 21:return e.prev=21,o(!1),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[0,18,21,24]])})));return function(t,n){return e.apply(this,arguments)}}(),p=function(){var e=u(g.mark((function e(t,n){var r;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://unify.apideck.com/file-storage/files/"+t,{headers:n});case 2:return r=e.sent,e.next=5,r.json();case 5:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),v=function(){var e=u(g.mark((function e(t,n,r){var a,o,l,i,s;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("https://unify.apideck.com/file-storage/upload-sessions",{headers:d({},n,{"Content-Type":"application/json"}),method:"POST",body:JSON.stringify({size:t.size,name:t.name,parent_folder_id:r})});case 3:return l=e.sent,e.next=6,l.json();case 6:if(i=null==(a=e.sent.data)?void 0:a.id){e.next=10;break}return e.abrupt("return",{partSize:null,sessionId:null});case 10:return e.next=12,fetch("https://unify.apideck.com/file-storage/upload-sessions/"+i,{headers:d({},n,{"Content-Type":"application/json"})});case 12:return s=e.sent,e.next=15,s.json();case 15:return e.abrupt("return",{partSize:null==(o=e.sent.data)?void 0:o.part_size,sessionId:i});case 19:return e.prev=19,e.t0=e.catch(0),console.log("Session error",e.t0),e.abrupt("return",{partSize:null,sessionId:null});case 23:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t,n,r){return e.apply(this,arguments)}}(),h=function(){var e=u(g.mark((function e(t,r,a){var l,i,m,f,p,h,y;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v(t,r,a);case 3:m=(l=e.sent).sessionId,f=0,p=(i=l.partSize)>t.size?t.size:i,h=0,y=function(){var e=u(g.mark((function e(){var a,l,u,v,x,w;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.slice(f,p),e.prev=1,e.next=4,fetch("https://unify.apideck.com/file-storage/upload-sessions/"+m+"?part_number="+h,{headers:d({},r,{"Content-Type":t.type}),method:"PUT",body:a});case 4:return l=e.sent,e.next=7,l.json();case 7:if(!(u=e.sent).error){e.next=11;break}return c({title:"Something went wrong",description:u.message,type:"error"}),e.abrupt("return");case 11:if(v=t.size-p,p!==t.size){e.next=26;break}return s(100),e.next=16,fetch("https://unify.apideck.com/file-storage/upload-sessions/"+m+"/finish",{headers:r,method:"POST"});case 16:return x=e.sent,e.next=19,x.json();case 19:return w=e.sent,o(!1),c({title:"File uploaded",description:"File successfully uploaded",type:"success",autoClose:!0}),n(w.data||t),e.abrupt("return");case 26:p=v<i?(f=p)+v:(f=p)+i;case 27:h++,s(h/Math.ceil(t.size/i)*100),y(),e.next=36;break;case 32:e.prev=32,e.t0=e.catch(1),o(!1),c({title:"Something went wrong",description:e.t0,type:"error"});case 36:case"end":return e.stop()}}),e,null,[[1,32]])})));return function(){return e.apply(this,arguments)}}(),console.log("uploading "+Math.ceil(t.size/i)+" chunks of "+i+" bytes"),m&&i&&y(),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log("Error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n,r){return e.apply(this,arguments)}}();return{uploadFile:m,isLoading:a,progress:i}},I=function(e){var r=e.file,a=e.folderId,o=e.appId,l=e.consumerId,i=e.serviceId,s=e.jwt,c=e.onSuccess,u=t.useState(r.name),m=u[0],f=u[1],p=M({onSuccess:c}),v=p.uploadFile,h=p.isLoading;return n.createElement("div",{className:"absolute bottom-0 left-0 right-0 bg-white border-t"},n.createElement("div",{className:"flex items-center justify-center p-4"},n.createElement("input",{className:"w-full px-3 py-2 text-sm leading-tight text-gray-700 border border-gray-200 rounded shadow-sm appearance-none focus:outline-none focus:shadow-outline",name:"fileName",placeholder:"File name",autoComplete:"off",onChange:function(e){return f(e.target.value)},value:m}),n.createElement("button",{type:"button",className:"items-center px-3 py-2 ml-2 text-sm font-medium leading-4 text-white bg-blue-600 border border-transparent rounded-md shadow-sm whitespace-nowrap sm:ml-3 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){return v({file:d({},r,{name:m}),folderId:a,appId:o,consumerId:l,serviceId:i,jwt:s})}},h?"Uploading...":"Save file")))},F=function(e){var r=e.setSearchTerm,a=e.searchTerm,o=e.isSearchVisible,l=e.setIsSearchVisible,i=t.useRef(null),s=function(){o?(r(""),l(!1)):(l(!0),setTimeout((function(){var e;null==(e=i.current)||e.focus()}),0))};return o?n.createElement("div",{className:"h-5"},n.createElement("div",{className:"absolute w-full -inset-x-0 -top-2"},n.createElement("div",{className:"relative"},n.createElement("button",{className:"absolute right-2 top-2",onClick:function(){return s()}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5 text-gray-400 transition duration-150 hover:text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}))),n.createElement("input",{className:"w-full px-3 py-2 mb-3 text-sm leading-tight text-gray-700 border border-gray-200 rounded shadow-sm appearance-none focus:outline-none focus:shadow-outline",name:"search",placeholder:"Search",autoComplete:"off",ref:i,onChange:function(e){return r(e.target.value)},value:a})))):n.createElement("button",{className:"",onClick:function(){return s()}},n.createElement("svg",{className:"w-5 h-5 text-gray-400 transition duration-150 hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"})))},H=function(e){var a;return n.createElement(r.Transition,{show:e.open,as:t.Fragment},n.createElement("div",{className:"absolute bottom-0 left-0 right-0 rounded-t-2xl",style:(null==(a=window)?void 0:a.innerWidth)>768?{width:"calc(100% - 3rem)",left:"1.5rem"}:{width:"calc(100% - 2rem)",left:"1rem"}},n.createElement(r.Transition.Child,{as:t.Fragment,enter:"transform transition ease-in-out duration-300",enterFrom:"translate-y-full",enterTo:"translate-y-0",leave:"transform transition ease-in-out duration-300",leaveFrom:"translate-y-0",leaveTo:"translate-y-full"},n.createElement("div",{className:"relative w-full rounded-t-2xl"},n.createElement("div",{className:"flex flex-col h-full py-6 overflow-y-auto border border-gray-200 rounded-t-lg shadow-sm bg-gray-50"},n.createElement("div",{className:"relative flex-1 px-4 sm:px-6"},e.children))))))},z=function(e){var t=e.className;return n.createElement("svg",{className:"animate-spin "+(void 0===t?"w-8 h-8 text-blue-600":t),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},n.createElement("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.createElement("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))},O=function(e){var t=e.folderId,r=e.appId,a=e.consumerId,o=e.serviceId,l=e.jwt,i=M({onSuccess:e.onSuccess}),s=i.uploadFile;return n.createElement("div",{className:""},n.createElement("label",{htmlFor:"file-upload",className:"cursor-pointer"},i.isLoading?n.createElement(z,{className:"w-5 h-5 text-gray-400"}):n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5 text-gray-400 transition duration-150 hover:text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})),n.createElement("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only",onChange:function(e){var n;return s({file:null==(n=e.target)?void 0:n.files[0],folderId:t,appId:r,consumerId:a,serviceId:o,jwt:l})}})))},_=function(e){var n=t.useRef();return t.useEffect((function(){n.current=e}),[e]),n.current},B=function(){},P=B(),V=Object,A=function(e){return e===P},R=function(e){return"function"==typeof e},W="undefined"==typeof window||"Deno"in window?t.useEffect:t.useLayoutEffect,D=new WeakMap,Z=0,G=function(e){var t,n,r=typeof e,a=e&&e.constructor,o=a==Date;if(V(e)!==e||o||a==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=D.get(e))return t;if(t=++Z+"~",D.set(e,t),a==Array){for(t="@",n=0;n<e.length;n++)t+=G(e[n])+",";D.set(e,t)}if(a==V){t="#";for(var l=V.keys(e).sort();!A(n=l.pop());)A(e[n])||(t+=n+":"+G(e[n])+",");D.set(e,t)}}return t},q=function(e){if(R(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?G(e):"",t,e?"$err$"+e:"",e?"$req$"+e:""]},J=function(){return(J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},$=function(e){return R(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},U=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=$(n),o=a[0],l=a[1],i=a[2],s=(i.use||[]).concat(t);return e(o,l,J(J({},i),{use:s}))}}(s,(function(e){return function(n,r,a){var o=t.useState({})[1],l=t.useRef(!1),i=t.useRef(),s=a.cache,c=a.initialSize,u=void 0===c?1:c,d=a.revalidateAll,m=void 0!==d&&d,f=a.persistSize,p=void 0!==f&&f,v=a.revalidateFirstPage,h=void 0===v||v,g=null;try{g=function(e){return q(e?e(0,null):null)[0]}(n)}catch(e){}var y=null,x=null;g&&(y="$ctx$"+g,x="$len$"+g);var w=t.useCallback((function(){var e=s.get(x);return A(e)?u:e}),[x,u]),E=t.useRef(w());W((function(){l.current?g&&s.set(x,p?E.current:u):l.current=!0}),[g]);var b=e(g?"$inf$"+g:null,(function(){return t=function(){var e,t,o,l,c,u,d,f,p,v,g,x;return function(e,t){var n,r,a,o,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return l.label++,{value:o[1],done:!1};case 5:l.label++,r=o[1],o=[0];continue;case 7:o=l.ops.pop(),l.trys.pop();continue;default:if(!((a=(a=l.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){l=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){l.label=o[1];break}if(6===o[0]&&l.label<a[1]){l.label=a[1],a=o;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(o);break}a[2]&&l.ops.pop(),l.trys.pop();continue}o=t.call(e,l)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,i])}}}(this,(function(E){switch(E.label){case 0:e=s.get(y)||[],t=e[0],o=e[1],l=[],c=w(),u=null,d=0,E.label=1;case 1:return d<c?(f=q(n?n(d,u):null),v=f[1],(p=f[0])?(g=s.get(p),x=m||t||A(g)||h&&!d&&!A(i.current)||o&&!A(o[d])&&!a.compare(o[d],g),r&&x?[4,r.apply(void 0,v)]:[3,3]):[3,5]):[3,5];case 2:g=E.sent(),s.set(p,g),E.label=3;case 3:l.push(g),u=g,E.label=4;case 4:return++d,[3,1];case 5:return s.delete(y),[2,l]}}))},new((e=void 0)||(e=Promise))((function(n,r){function a(e){try{l(t.next(e))}catch(e){r(e)}}function o(e){try{l(t.throw(e))}catch(e){r(e)}}function l(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e((function(e){e(r)}))).then(a,o)}l((t=t.apply(void 0,[])).next())}));var e,t}),a);W((function(){i.current=b.data}),[b.data]);var C=t.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=!1!==e[1];if(y){if(r)if(A(n))s.set(y,[!0]);else{var a=i.current;s.set(y,[!1,a])}return e.length?b.mutate(n,r):b.mutate()}}),[y]),N=t.useCallback((function(e){var t;if(x&&(R(e)?t=e(w()):"number"==typeof e&&(t=e),"number"==typeof t))return s.set(x,t),E.current=t,o({}),C(function(e){for(var t=[],r=null,a=0;a<e;++a){var o=q(n?n(a,r):null)[0],l=o?s.get(o):P;if(A(l))return i.current;t.push(l),r=l}return t}(t))}),[x,w,C]);return{size:w(),setSize:N,mutate:C,get error(){return b.error},get data(){return b.data},get isValidating(){return b.isValidating}}}})),Y=function(e){var r,a,o,s,c=e.appId,m=e.consumerId,f=e.jwt,p=e.onSelect,v=e.connections,h=e.connection,x=e.setConnection,b=e.fileToSave,C=t.useState(null),k=C[0],S=C[1],j=t.useState([]),L=j[0],T=j[1],B=t.useState(null),P=B[0],V=B[1],A=t.useState(""),R=A[0],W=A[1],D=t.useState(),Z=D[0],G=D[1],q=t.useState(!1),J=q[0],$=q[1],Y=t.useState(!1),K=Y[0],Q=Y[1],X=function(e,n){void 0===n&&(n=500);var r=t.useState(e),a=r[0],o=r[1],l=t.useRef(null),i=function(){null!==l.current&&clearInterval(l.current)};return t.useEffect((function(){return l.current=setTimeout((function(){o(e)}),n),i}),[e,n]),t.useEffect((function(){return i}),[]),a}(R),ee=h.service_id,te=_(ee),ne=_(k),re=!(null==X||!X.length),ae={"Content-Type":"application/json","x-apideck-auth-type":"JWT","x-apideck-app-id":c,"x-apideck-consumer-id":m,"x-apideck-service-id":ee,Authorization:"Bearer "+f},oe=U((function(e,t){var n,r,a,o=te&&te!==ee||!k?"root":k,l="https://unify.apideck.com/file-storage/files?limit=30&"+("shared"===o?"filter[shared]=true":"filter[folder_id]="+o);return!t||null!=t&&null!=(n=t.data)&&n.length?0===e?l+"#serviceId="+ee:l+"&cursor="+(null==t||null==(r=t.meta)||null==(a=r.cursors)?void 0:a.next)+"#serviceId="+ee:null}),function(){var e=u(g.mark((function e(t){var n;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:ae});case 2:return n=e.sent,e.next=5,n.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{shouldRetryOnError:!1}),le=oe.data,ie=oe.setSize,se=oe.size,ce=oe.error,ue=oe.mutate,de=M({onSuccess:function(){ue(),xe()}}),me=de.uploadFile,fe=de.isLoading,pe=de.progress,ve=i.useDropzone({onDrop:function(){var e=u(g.mark((function e(t){return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,me({file:t[0],folderId:k,appId:c,consumerId:m,serviceId:ee,jwt:f});case 2:xe();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),he=ve.getRootProps,ge=ve.getInputProps,ye=ve.isDragActive,xe=function(){var e,t,n=document.querySelector(".dropzone");null!=n&&null!=(e=n.style)&&e.visibility&&(n.style.visibility="hidden"),null!=n&&null!=(t=n.style)&&t.opacity&&(n.style.opacity="0")};t.useEffect((function(){var e=null,t=function(t){var n;e=t.target,null!=(n=document.querySelector(".dropzone"))&&n.style&&(n.style.visibility="visible"),null!=n&&n.style&&(n.style.opacity="1")},n=function(t){t.target!==e&&t.target!==document||xe()};return window.addEventListener("dragenter",t),window.addEventListener("dragleave",n),function(){return window.removeEventListener("dragenter",t),void window.removeEventListener("dragleave",n)}}),[]),t.useEffect((function(){(te&&te!==ee&&ne===k||!k)&&(S("root"),T([]))}),[ee,te]);var we=ce||(null==le?void 0:le.length)&&(null==(r=le[le.length-1])?void 0:r.error),Ee=!le&&!ce,be=se>0&&le&&void 0===le[se-1],Ce=null!=le&&le.length?le.map((function(e){return null==e?void 0:e.data})).flat():le?[le]:[];if((!k||"root"===k)&&null!=le&&le.length&&"google-drive"===ee){var Ne,ke={id:"shared",name:"Shared with me",type:"folder"};null!=(Ne=Ce)&&Ne.length?Ce=[ke].concat(Ce):Ce.push(ke)}t.useEffect((function(){if(null!=X&&X.length){$(!0);var e=function(){var e=u(g.mark((function e(t){var n;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:d({},ae,{"x-apideck-service-id":t}),method:"POST",body:JSON.stringify({query:X})},e.next=4,fetch("https://unify.apideck.com/file-storage/files/search",n);case 4:return e.abrupt("return",e.sent.json());case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t=v.map((function(t){return e(t.service_id)}));Promise.all(t).then((function(e){var t=null==e?void 0:e.map((function(e){var t;return null==(t=e.data)?void 0:t.map((function(t){return d({},t,{connection:v.find((function(t){return t.service_id===e.service}))})}))})).flat(),n=t.filter((function(e){var t;return(null==(t=e.connection)?void 0:t.service_id)===h.service_id})),r=t.filter((function(e){var t;return(null==(t=e.connection)?void 0:t.service_id)!==h.service_id}));G([].concat(n,r))})).finally((function(){return $(!1)}))}}),[X,ee]);var Se=re?null==Z?void 0:Z.length:null==(a=Ce)?void 0:a.length;return n.createElement(t.Fragment,null,n.createElement("div",{className:"relative flex items-center justify-between mb-2"},n.createElement(y,{folders:L,handleClick:function(e){if(e){S(e.id);var t=L.indexOf(e),n=[].concat(L.slice(0,t+1));T(n)}else S("root"),T([])}}),n.createElement("div",{className:"flex items-center space-x-2"},n.createElement(F,{searchTerm:R,setSearchTerm:W,isSearchVisible:K,setIsSearchVisible:Q}),b?null:n.createElement(O,{file:b,consumerId:m,jwt:f,folderId:k,serviceId:ee,appId:c,onSuccess:ue}))),Ee||J?n.createElement(E,{isSearching:J}):null,n.createElement("div",Object.assign({},he(),{className:"relative"}),n.createElement("input",Object.assign({},ge())),ye||fe?n.createElement("div",{className:"flex justify-center px-6 py-24 mt-4 border-2 border-gray-300 border-dashed rounded-md"},fe?n.createElement("div",{className:"flex flex-col items-center"},n.createElement(z,{className:"w-6 h-6 text-gray-500"}),null!==pe?n.createElement("div",{className:"w-full h-2 mt-4 bg-gray-200 rounded",style:{width:200}},n.createElement("div",{className:"h-2 bg-blue-400 rounded "+(100===pe&&"animate-ping")+" ",style:{width:pe+"%"}})):null):n.createElement("div",{className:"space-y-1 text-center"},n.createElement("svg",{className:"w-12 h-12 mx-auto text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48","aria-hidden":"true"},n.createElement("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("div",{className:"flex text-sm text-gray-600"},n.createElement("label",{htmlFor:"file-upload",className:"relative bg-white rounded-md"},n.createElement("span",null,"Drop here to upload to"),n.createElement("input",{id:"file-upload",name:"file-upload",type:"file",className:"sr-only"})),n.createElement("p",{className:"pl-1 font-medium text-indigo-600"},h.name)),n.createElement("p",{className:"text-xs text-gray-500"},L.length?"Folder: "+(null==(o=L[L.length-1])?void 0:o.name):"Root folder"))):n.createElement("div",{className:"absolute inset-0 invisible w-full h-96 dropzone"})),Ee||J||!Se||we||ye||fe?null:n.createElement(N,{data:re&&Z?Z:Ce,handleSelect:function(e){var t;"folder"===e.type&&(S(e.id),re?(W(""),Q(!1),T([e]),(null==(t=e.connection)?void 0:t.service_id)!==ee&&x(e.connection)):T([].concat(L,[e]))),"file"===e.type&&V(e)},isLoadingMore:be,searchMode:re,uploadingMode:!!b}),Ee||J||Se?null:n.createElement("p",{className:"py-4 text-sm text-center text-gray-700"},"No files found"),Ee?null:n.createElement(H,{open:!!P},n.createElement(w,{file:P,setFile:V,onSelect:p})),!Ee&&we?n.createElement("p",{className:"mt-2 text-sm text-red-600"},(null==we?void 0:we.message)||we):null,null==(s=Ce)||!s.length||be||re?null:n.createElement("div",{className:"flex flex-row-reverse py-4 border-gray-200"},n.createElement(l.Waypoint,{onEnter:function(){var e,t,n;(null==le?void 0:le.length)&&(null==(e=le[le.length-1])||null==(t=e.meta)||null==(n=t.cursors)?void 0:n.next)&&ie(se+1)}})),b&&n.createElement(I,{file:b,appId:c,consumerId:m,jwt:f,folderId:k,serviceId:ee,onSuccess:p}))},K=function(e){var t=e.jwt,a=e.connections,o=e.connection,l=e.setConnection,i=e.isLoading,s=function(e){return e.enabled?"callable"!==e.state?"bg-yellow-400":"bg-green-400":"bg-gray-300"};return n.createElement("div",{className:"relative inline-block"},n.createElement(r.Menu,null,(function(e){var c=e.open;return n.createElement(n.Fragment,null,n.createElement(r.Menu.Button,{className:"flex items-center justify-between w-full px-4 py-2 text-sm font-medium text-blue-800 bg-blue-100 border border-blue-200 rounded-md group hover:bg-cool-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-cool-gray-100 focus:ring-blue-600",style:{minWidth:180}},n.createElement("div",null,!i&&(null==o?void 0:o.icon)&&n.createElement("img",{className:"inline-block w-6 h-6 mr-2 rounded-full "+(i?"animate-spin opacity-20":""),src:!i&&null!=o&&o.icon?null==o?void 0:o.icon:"/img/logo.png",alt:""}),i&&n.createElement(z,{className:"w-6 h-6"}),!i&&n.createElement("span",null,(null==o?void 0:o.name)||"No integrations")),n.createElement("svg",{className:"w-5 h-5 ml-2 -mr-1",viewBox:"0 0 20 20",fill:"currentColor"},n.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))),n.createElement(r.Transition,{show:c,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",className:"min-w-sm"},n.createElement(r.Menu.Items,{static:!0,className:"absolute right-0 z-10 w-full mt-2 origin-top-right bg-white border divide-y rounded-md outline-none border-cool-gray-200 divide-cool-gray-100"},n.createElement("div",{className:"py-1"},null==a?void 0:a.map((function(e,a){return n.createElement(r.Menu.Item,{key:a},(function(r){return n.createElement("div",{onClick:function(){return function(e){"callable"!==e.state?window.location.href="available"!==e.state?"https://vault.apideck.com/integrations/file-storage/"+(null==e?void 0:e.service_id)+"?jwt="+t:"https://vault.apideck.com/integrations/file-storage/"+(null==e?void 0:e.service_id)+"/enable?jwt="+t:l(e)}(e)},className:(r.active?"bg-gray-100 text-gray-900":"text-gray-600")+" flex items-center justify-between min-w-0 mx-2 cursor-pointer rounded-md py-0.5 overflow-hidden "+(e.enabled?"":"opacity-60")},n.createElement("img",{className:"flex-shrink-0 w-6 h-6 m-2 rounded-full",src:e.icon,alt:""}),n.createElement("span",{className:"flex-1 min-w-0"},n.createElement("span",{className:"text-sm font-medium text-gray-900 truncate"},e.name)),n.createElement("span",{className:"inline-block w-2.5 h-2.5 mr-2 rounded-full ring-2 ring-white "+s(e)}))}))})),n.createElement(r.Menu.Item,null,(function(e){return n.createElement("div",{onClick:function(){window.location.href="https://vault.apideck.com/session/"+t},className:(e.active?"bg-gray-100 text-gray-900":"text-gray-600")+" flex items-center justify-between min-w-0 mx-2 cursor-pointer rounded-md py-0.5 overflow-hidden"},n.createElement("svg",{className:"flex-shrink-0 w-6 h-6 m-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})),n.createElement("span",{className:"flex-1 min-w-0"},n.createElement("span",{className:"text-sm font-medium text-gray-900 truncate"},"Add integration")))}))))))})))},Q=function(e){var r,a=e.appId,o=e.consumerId,l=e.jwt,i=e.onSelect,c=e.title,d=e.subTitle,m=e.fileToSave,f=t.useState(),p=f[0],v=f[1],h=s("https://unify.apideck.com/vault/connections?api=file-storage",function(){var e=u(g.mark((function e(t){var n;return g.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:{"Content-Type":"application/json","x-apideck-consumer-id":o,"x-apideck-app-id":a,"x-apideck-auth-type":"JWT",Authorization:"Bearer "+l}});case 2:return n=e.sent,e.next=5,n.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),{shouldRetryOnError:!1}),y=h.data,x=h.error,w=!y&&!x,E=(null==y?void 0:y.error)||x,b=null==y?void 0:y.data,C=null==b?void 0:b.filter((function(e){return"callable"===e.state}));t.useEffect((function(){!p&&null!=C&&C.length&&v(C[0])}),[v,C]);var N=null==(r=document.getElementById("modal-component"))?void 0:r.clientHeight;return n.createElement("div",{className:"relative -m-6 bg-white sm:rounded-lg h-modal",style:{height:"34rem"}},n.createElement("div",{className:"flex items-center justify-between px-4 py-5 sm:px-6"},n.createElement("div",null,n.createElement("h3",{className:"text-lg font-medium leading-6 text-gray-900"},c),n.createElement("p",{className:"max-w-2xl mt-1 text-sm text-gray-500"},E?n.createElement("span",{className:"mb-2 text-red-600"},E):n.createElement("span",{className:"text-gray-700 dark:text-gray-400"},p?d:"No connector selected"))),n.createElement(K,{jwt:l,connections:b,connection:p,setConnection:v,isLoading:w})),n.createElement("div",{className:"px-4 py-5 overflow-y-auto border-t border-gray-200 sm:px-6",style:{height:"undefined"!=typeof window&&N?N-70:"calc(100% - 70px)"}},p?n.createElement(L,null,n.createElement(Y,{appId:a,consumerId:o,jwt:l,onSelect:i,connections:C,connection:p,setConnection:v,fileToSave:m})):null!=C&&C.length||w?null:n.createElement("div",{className:"flex items-center justify-center border-2 border-gray-200 border-dashed rounded-lg h-96"},n.createElement("div",{className:"text-center"},n.createElement("a",{href:"https://vault.apideck.com/session/"+l,target:"_blank",rel:"noreferrer",className:"text-indigo-600 hover:text-indigo-900"},"Go to vault")," ","to add file storage connectors"))))},X=["connection"];exports.FilePicker=t.forwardRef((function(e,r){var a=e.appId,o=e.consumerId,l=e.jwt,i=e.trigger,s=e.onSelect,c=e.title,u=e.subTitle,d=e.showAttribution,f=void 0===d||d,p=e.open,v=void 0!==p&&p,g=e.onClose,y=e.fileToSave,x=t.useState(!1),w=x[0],E=x[1],b=function(){E(!1),g&&g()};return t.useEffect((function(){v&&E(!0)}),[v]),n.createElement(t.Fragment,null,i?n.cloneElement(i,{onClick:function(){return E(!0)},ref:r}):null,n.createElement(h,{isOpen:w,onClose:function(){return b()},showAttribution:f},n.createElement(Q,{appId:a,consumerId:o,jwt:l,onSelect:function(e){var t=e;e.connection&&(t=m(e,X)),s&&s(t),b()},title:c||(y?"Apideck File Uploader":"Apideck File Picker"),subTitle:u||(y?"Select a folder":"Select a file"),fileToSave:y})))}));
//# sourceMappingURL=file-picker.cjs.production.min.js.map

@@ -15,3 +15,4 @@ interface Props {

isLoading: boolean;
progress: number | null;
};
export {};
{
"version": "0.5.1",
"version": "0.6.0",
"license": "MIT",

@@ -29,7 +29,7 @@ "main": "dist/index.js",

"dependencies": {
"@headlessui/react": "^1.4.1",
"@headlessui/react": "^1.4.2",
"react-dropzone": "^11.4.2",
"react-table": "^7.7.0",
"react-waypoint": "^10.1.0",
"swr": "^1.0.0"
"swr": "^1.0.1"
},

@@ -65,8 +65,8 @@ "husky": {

"@size-limit/preset-small-lib": "^5.0.3",
"@storybook/addon-essentials": "^6.3.8",
"@storybook/addon-essentials": "^6.4.9",
"@storybook/addon-info": "^5.3.21",
"@storybook/addon-links": "^6.3.8",
"@storybook/addon-links": "^6.4.9",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/addons": "^6.3.8",
"@storybook/react": "^6.3.8",
"@storybook/addons": "^6.4.9",
"@storybook/react": "^6.4.9",
"@types/dropzone": "^5.7.4",

@@ -73,0 +73,0 @@ "@types/react": "^17.0.20",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc