-
Notifications
You must be signed in to change notification settings - Fork 0
/
efcd0184a5c65a3c25403d2c3eabcdd966234c41-952d5b80d68dffa45c32.js
2 lines (2 loc) · 16.9 KB
/
efcd0184a5c65a3c25403d2c3eabcdd966234c41-952d5b80d68dffa45c32.js
1
2
"use strict";(self.webpackChunkgatsby_starter_hello_world=self.webpackChunkgatsby_starter_hello_world||[]).push([[89],{9661:function(e,r){r.Z=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return t.some((function(e){var r=e.trim().toLowerCase();return"."===r.charAt(0)?n.toLowerCase().endsWith(r):r.endsWith("/*")?i===r.replace(/\/.*$/,""):o===r}))}return!0}},733:function(e,r,t){t.d(r,{E:function(){return p}});var n=t(7294),o=t(3336),i=t(4192),a=t(9409),u={cover:"cover",contain:"contain"},c=(0,o.css)(["flex:1 1;overflow:hidden;object-fit:",";"],(function(e){return u[e.fit]})),l=o.default.img.withConfig({displayName:"StyledImage",componentId:"ey4zx9-0"})([""," "," "," "," ",""],i.$G,(function(e){return e.fit&&c}),(function(e){return e.fillProp&&(0,i.EW)(e.fillProp)}),(function(e){return e.theme.image&&e.theme.image.extend}),(function(e){return e.opacityProp&&"opacity: "+(!0===e.opacityProp?e.theme.global.opacity.medium:e.theme.global.opacity[e.opacityProp]||e.opacityProp)+";\n "}));function f(){return(f=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}l.defaultProps={},Object.setPrototypeOf(l.defaultProps,a.l);var s=(0,n.forwardRef)((function(e,r){var t=e.a11yTitle,o=e.fallback,i=e.onError,a=e.opacity,u=e.fill,c=e.src,s=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,["a11yTitle","fallback","onError","opacity","fill","src"]),p=(0,n.useState)(!1),d=p[0],v=p[1],y={onError:(i||o)&&function(e){i&&i(e),v(!0)}};return n.createElement(l,f({"aria-label":t},s,y,{ref:r,opacityProp:a,fillProp:u,src:d?o:c}))}));s.displayName="Image";var p=s},8842:function(e,r,t){t.d(r,{u:function(){return J}});var n=t(7294);function o(e,r,t,n){return new(t||(t=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(r){i(r)}}function u(e){try{c(n.throw(e))}catch(r){i(r)}}function c(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(a,u)}c((n=n.apply(e,r||[])).next())}))}function i(e,r){var t,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=r.call(e,a)}catch(u){i=[6,u],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}Object.create;function a(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(u){o={error:u}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}Object.create;var u=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function c(e,r){var t=function(e){var r=e.name;if(r&&-1!==r.lastIndexOf(".")&&!e.type){var t=r.split(".").pop().toLowerCase(),n=u.get(t);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof t.path){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:"string"==typeof r?r:"string"==typeof n&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}var l=[".DS_Store","Thumbs.db"];function f(e){return(null!==e.target&&e.target.files?d(e.target.files):[]).map((function(e){return c(e)}))}function s(e,r){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e.items?(t=d(e.items).filter((function(e){return"file"===e.kind})),"drop"!==r?[2,t]:[4,Promise.all(t.map(v))]):[3,2];case 1:return[2,p(y(n.sent()))];case 2:return[2,p(d(e.files).map((function(e){return c(e)})))]}}))}))}function p(e){return e.filter((function(e){return-1===l.indexOf(e.name)}))}function d(e){for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function v(e){if("function"!=typeof e.webkitGetAsEntry)return g(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?b(r):g(e)}function y(e){return e.reduce((function(e,r){return function(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(a(arguments[r]));return e}(e,Array.isArray(r)?y(r):[r])}),[])}function g(e){var r=e.getAsFile();if(!r)return Promise.reject(e+" is not a File");var t=c(r);return Promise.resolve(t)}function m(e){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,e.isDirectory?b(e):h(e)]}))}))}function b(e){var r=e.createReader();return new Promise((function(e,t){var n=[];!function a(){var u=this;r.readEntries((function(r){return o(u,void 0,void 0,(function(){var o,u,c;return i(this,(function(i){switch(i.label){case 0:if(r.length)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Promise.all(n)];case 2:return o=i.sent(),e(o),[3,4];case 3:return u=i.sent(),t(u),[3,4];case 4:return[3,6];case 5:c=Promise.all(r.map(m)),n.push(c),a(),i.label=6;case 6:return[2]}}))}))}),(function(e){t(e)}))}()}))}function h(e){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,new Promise((function(r,t){e.file((function(t){var n=c(t,e.fullPath);r(n)}),(function(e){t(e)}))}))]}))}))}var w=t(9661);function D(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(c){o=!0,i=c}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return t}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return O(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return O(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var j=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var r=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(r)}},F=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," bytes")}},A=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," bytes")}},P={code:"too-many-files",message:"Too many files"};function k(e,r){var t="application/x-moz-file"===e.type||(0,w.Z)(e,r);return[t,t?null:j(r)]}function E(e,r,t){if(S(e.size))if(S(r)&&S(t)){if(e.size>t)return[!1,F(t)];if(e.size<r)return[!1,A(r)]}else{if(S(r)&&e.size<r)return[!1,A(r)];if(S(t)&&e.size>t)return[!1,F(t)]}return[!0,null]}function S(e){return null!=e}function x(e){var r=e.files,t=e.accept,n=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!(!i&&r.length>1||i&&a>=1&&r.length>a)&&r.every((function(e){var r=D(k(e,t),1)[0],i=D(E(e,n,o),1)[0];return r&&i}))}function C(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function z(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function R(e){e.preventDefault()}function I(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function T(e){return-1!==e.indexOf("Edge/")}function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return I(e)||T(e)}function K(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return r.some((function(r){return!C(e)&&r&&r.apply(void 0,[e].concat(n)),C(e)}))}}function B(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(c){o=!0,i=c}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return t}(e,r)||M(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,r){if(e){if("string"==typeof e)return $(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$(e,r):void 0}}function $(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function G(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function N(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?G(Object(t),!0).forEach((function(r){W(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function W(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function q(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var U=(0,n.forwardRef)((function(e,r){var t=e.children,o=J(q(e,["children"])),i=o.open,a=q(o,["open"]);return(0,n.useImperativeHandle)(r,(function(){return{open:i}}),[i]),n.createElement(n.Fragment,null,t(N(N({},a),{},{open:i})))}));U.displayName="Dropzone";var Z={disabled:!1,getFilesFromEvent:function(e){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,(t=e,t.dataTransfer&&e.dataTransfer?s(e.dataTransfer,e.type):f(e))];var t}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};U.defaultProps=Z;var H={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=N(N({},Z),e),t=r.accept,o=r.disabled,i=r.getFilesFromEvent,a=r.maxSize,u=r.minSize,c=r.multiple,l=r.maxFiles,f=r.onDragEnter,s=r.onDragLeave,p=r.onDragOver,d=r.onDrop,v=r.onDropAccepted,y=r.onDropRejected,g=r.onFileDialogCancel,m=r.preventDropOnDocument,b=r.noClick,h=r.noKeyboard,w=r.noDrag,D=r.noDragEventsBubbling,O=(0,n.useRef)(null),j=(0,n.useRef)(null),F=(0,n.useReducer)(Q,H),A=_(F,2),S=A[0],I=A[1],T=S.isFocused,M=S.isFileDialogActive,$=S.draggedFiles,G=(0,n.useCallback)((function(){j.current&&(I({type:"openDialog"}),j.current.value=null,j.current.click())}),[I]),U=function(){M&&setTimeout((function(){j.current&&(j.current.files.length||(I({type:"closeDialog"}),"function"==typeof g&&g()))}),300)};(0,n.useEffect)((function(){return window.addEventListener("focus",U,!1),function(){window.removeEventListener("focus",U,!1)}}),[j,M,g]);var J=(0,n.useCallback)((function(e){O.current&&O.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),G()))}),[O,j]),V=(0,n.useCallback)((function(){I({type:"focus"})}),[]),X=(0,n.useCallback)((function(){I({type:"blur"})}),[]),Y=(0,n.useCallback)((function(){b||(L()?setTimeout(G,0):G())}),[j,b]),ee=(0,n.useRef)([]),re=function(e){O.current&&O.current.contains(e.target)||(e.preventDefault(),ee.current=[])};(0,n.useEffect)((function(){return m&&(document.addEventListener("dragover",R,!1),document.addEventListener("drop",re,!1)),function(){m&&(document.removeEventListener("dragover",R),document.removeEventListener("drop",re))}}),[O,m]);var te=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),le(e),ee.current=[].concat(B(ee.current),[e.target]),z(e)&&Promise.resolve(i(e)).then((function(r){C(e)&&!D||(I({draggedFiles:r,isDragActive:!0,type:"setDraggedFiles"}),f&&f(e))}))}),[i,f,D]),ne=(0,n.useCallback)((function(e){if(e.preventDefault(),e.persist(),le(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(r){}return z(e)&&p&&p(e),!1}),[p,D]),oe=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),le(e);var r=ee.current.filter((function(e){return O.current&&O.current.contains(e)})),t=r.indexOf(e.target);-1!==t&&r.splice(t,1),ee.current=r,r.length>0||(I({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),z(e)&&s&&s(e))}),[O,s,D]),ie=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),le(e),ee.current=[],z(e)&&Promise.resolve(i(e)).then((function(r){if(!C(e)||D){var n=[],o=[];r.forEach((function(e){var r=_(k(e,t),2),i=r[0],c=r[1],l=_(E(e,u,a),2),f=l[0],s=l[1];if(i&&f)n.push(e);else{var p=[c,s].filter((function(e){return e}));o.push({file:e,errors:p})}})),(!c&&n.length>1||c&&l>=1&&n.length>l)&&(n.forEach((function(e){o.push({file:e,errors:[P]})})),n.splice(0)),I({acceptedFiles:n,fileRejections:o,type:"setFiles"}),d&&d(n,o,e),o.length>0&&y&&y(o,e),n.length>0&&v&&v(n,e)}})),I({type:"reset"})}),[c,t,u,a,l,i,d,v,y,D]),ae=function(e){return o?null:e},ue=function(e){return h?null:ae(e)},ce=function(e){return w?null:ae(e)},le=function(e){D&&e.stopPropagation()},fe=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.refKey,t=void 0===r?"ref":r,n=e.onKeyDown,i=e.onFocus,a=e.onBlur,u=e.onClick,c=e.onDragEnter,l=e.onDragOver,f=e.onDragLeave,s=e.onDrop,p=q(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return N(N(W({onKeyDown:ue(K(n,J)),onFocus:ue(K(i,V)),onBlur:ue(K(a,X)),onClick:ae(K(u,Y)),onDragEnter:ce(K(c,te)),onDragOver:ce(K(l,ne)),onDragLeave:ce(K(f,oe)),onDrop:ce(K(s,ie))},t,O),o||h?{}:{tabIndex:0}),p)}}),[O,J,V,X,Y,te,ne,oe,ie,h,w,o]),se=(0,n.useCallback)((function(e){e.stopPropagation()}),[]),pe=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.refKey,n=void 0===r?"ref":r,o=e.onChange,i=e.onClick,a=q(e,["refKey","onChange","onClick"]),u=W({accept:t,multiple:c,type:"file",style:{display:"none"},onChange:ae(K(o,ie)),onClick:ae(K(i,se)),autoComplete:"off",tabIndex:-1},n,j);return N(N({},u),a)}}),[j,t,c,ie,o]),de=$.length,ve=de>0&&x({files:$,accept:t,minSize:u,maxSize:a,multiple:c,maxFiles:l}),ye=de>0&&!ve;return N(N({},S),{},{isDragAccept:ve,isDragReject:ye,isFocused:T&&!o,getRootProps:fe,getInputProps:pe,rootRef:O,inputRef:j,open:ae(G)})}function Q(e,r){switch(r.type){case"focus":return N(N({},e),{},{isFocused:!0});case"blur":return N(N({},e),{},{isFocused:!1});case"openDialog":return N(N({},e),{},{isFileDialogActive:!0});case"closeDialog":return N(N({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=r.isDragActive,n=r.draggedFiles;return N(N({},e),{},{draggedFiles:n,isDragActive:t});case"setFiles":return N(N({},e),{},{acceptedFiles:r.acceptedFiles,fileRejections:r.fileRejections});case"reset":return N(N({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}}}]);
//# sourceMappingURL=efcd0184a5c65a3c25403d2c3eabcdd966234c41-952d5b80d68dffa45c32.js.map