From f7d6fd1e50f7a11d55546340408375cdee59f756 Mon Sep 17 00:00:00 2001 From: AmbitionsXXXV Date: Tue, 5 Dec 2023 06:07:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20etc-pages=20from=20@=20Ambitio?= =?UTF-8?q?nsXXXV/etc-hooks@ef58942bd2fa4a566952ca242738532de64d5020=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- asset-manifest.json | 10 +- demos.2e53a328.async.js | 1 - demos.aa8ec337.async.js | 1 + ...i__theme__ContextWrapper.ba813b55.async.js | 2 +- guide/index.html | 2 +- hooks/basic/index.html | 2 +- hooks/debounce/index.html | 2 +- hooks/index/index.html | 2 +- hooks/polling/index.html | 2 +- hooks/use-ant-pagination/index.html | 2 +- hooks/use-boolean/index.html | 2 +- hooks/use-callback-ref/index.html | 2 +- hooks/use-clipboard/index.html | 2 +- hooks/use-color-schema/index.html | 2 +- hooks/use-counter/index.html | 2 +- hooks/use-creation/index/index.html | 2 +- hooks/use-debounce-fn/index.html | 2 +- hooks/use-debounce/index.html | 2 +- hooks/use-latest/index.html | 2 +- hooks/use-memoized-fn/index.html | 2 +- hooks/use-mount/index.html | 2 +- hooks/use-network/index.html | 12 ++ hooks/use-os/index.html | 2 +- hooks/use-reset-state/index.html | 2 +- hooks/use-set/index.html | 2 +- hooks/use-throttle-fn/index.html | 2 +- hooks/use-throttle/index.html | 2 +- hooks/use-title/index.html | 2 +- hooks/use-toggle/index.html | 2 +- hooks/use-unmount-ref/index.html | 2 +- hooks/use-unmount/index.html | 2 +- hooks/use-update-effect/index.html | 2 +- hooks/use-update/index.html | 2 +- hooks/use-window-event/index.html | 12 ++ index.html | 2 +- ...c__useNetwork__index.md.778c6473.chunk.css | 1 + ...rc__useNetwork__index.md.ce2305fc.async.js | 1 + ...seWindowEvent__index.md.778c6473.chunk.css | 1 + ...useWindowEvent__index.md.f9e1b11f.async.js | 1 + umi.56e2e626.js => umi.b88eda91.js | 181 ++++++++++-------- ~demos/:id/index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 12 ++ .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../index.html | 12 ++ 80 files changed, 234 insertions(+), 147 deletions(-) delete mode 100644 demos.2e53a328.async.js create mode 100644 demos.aa8ec337.async.js rename dumi__tmp-production__dumi__theme__ContextWrapper.818538dc.async.js => dumi__tmp-production__dumi__theme__ContextWrapper.ba813b55.async.js (60%) create mode 100644 hooks/use-network/index.html create mode 100644 hooks/use-window-event/index.html create mode 100644 packages__hooks__src__useNetwork__index.md.778c6473.chunk.css create mode 100644 packages__hooks__src__useNetwork__index.md.ce2305fc.async.js create mode 100644 packages__hooks__src__useWindowEvent__index.md.778c6473.chunk.css create mode 100644 packages__hooks__src__useWindowEvent__index.md.f9e1b11f.async.js rename umi.56e2e626.js => umi.b88eda91.js (75%) create mode 100644 ~demos/packages-hooks-src-use-network-demo-example/index.html create mode 100644 ~demos/packages-hooks-src-use-window-event-demo-example/index.html diff --git a/404.html b/404.html index 531d00c..cada7b3 100644 --- a/404.html +++ b/404.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json index 0097e8a..ea2c534 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,10 +1,10 @@ { "umi.css": "/etc-hooks/umi.7ab43a5e.css", - "umi.js": "/etc-hooks/umi.56e2e626.js", - "demos.js": "/etc-hooks/demos.2e53a328.async.js", + "umi.js": "/etc-hooks/umi.b88eda91.js", + "demos.js": "/etc-hooks/demos.aa8ec337.async.js", "nm__dumi__dist__client__pages__404.css": "/etc-hooks/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css", "nm__dumi__dist__client__pages__404.js": "/etc-hooks/nm__dumi__dist__client__pages__404.b3cff8f6.async.js", - "dumi__tmp-production__dumi__theme__ContextWrapper.js": "/etc-hooks/dumi__tmp-production__dumi__theme__ContextWrapper.818538dc.async.js", + "dumi__tmp-production__dumi__theme__ContextWrapper.js": "/etc-hooks/dumi__tmp-production__dumi__theme__ContextWrapper.ba813b55.async.js", "nm__dumi__theme-default__layouts__DocLayout__index.js": "/etc-hooks/nm__dumi__theme-default__layouts__DocLayout__index.a8021425.async.js", "docs__guide__index.md.css": "/etc-hooks/docs__guide__index.md.778c6473.chunk.css", "docs__guide__index.md.js": "/etc-hooks/docs__guide__index.md.51d6bf1c.async.js", @@ -34,6 +34,8 @@ "packages__hooks__src__useMemoizedFn__index.md.js": "/etc-hooks/packages__hooks__src__useMemoizedFn__index.md.2705b4d1.async.js", "packages__hooks__src__useMount__index.md.css": "/etc-hooks/packages__hooks__src__useMount__index.md.778c6473.chunk.css", "packages__hooks__src__useMount__index.md.js": "/etc-hooks/packages__hooks__src__useMount__index.md.7e24d7ef.async.js", + "packages__hooks__src__useNetwork__index.md.css": "/etc-hooks/packages__hooks__src__useNetwork__index.md.778c6473.chunk.css", + "packages__hooks__src__useNetwork__index.md.js": "/etc-hooks/packages__hooks__src__useNetwork__index.md.ce2305fc.async.js", "packages__hooks__src__useOs__index.md.css": "/etc-hooks/packages__hooks__src__useOs__index.md.778c6473.chunk.css", "packages__hooks__src__useOs__index.md.js": "/etc-hooks/packages__hooks__src__useOs__index.md.4ad06e94.async.js", "packages__hooks__src__useResetState__index.md.css": "/etc-hooks/packages__hooks__src__useResetState__index.md.778c6473.chunk.css", @@ -56,6 +58,8 @@ "packages__hooks__src__useUpdate__index.md.js": "/etc-hooks/packages__hooks__src__useUpdate__index.md.927a4318.async.js", "packages__hooks__src__useUpdateEffect__index.md.css": "/etc-hooks/packages__hooks__src__useUpdateEffect__index.md.778c6473.chunk.css", "packages__hooks__src__useUpdateEffect__index.md.js": "/etc-hooks/packages__hooks__src__useUpdateEffect__index.md.c204184d.async.js", + "packages__hooks__src__useWindowEvent__index.md.css": "/etc-hooks/packages__hooks__src__useWindowEvent__index.md.778c6473.chunk.css", + "packages__hooks__src__useWindowEvent__index.md.js": "/etc-hooks/packages__hooks__src__useWindowEvent__index.md.f9e1b11f.async.js", "packages__hooks__src__useRequest__doc__basic__index.md.css": "/etc-hooks/packages__hooks__src__useRequest__doc__basic__index.md.778c6473.chunk.css", "packages__hooks__src__useRequest__doc__basic__index.md.js": "/etc-hooks/packages__hooks__src__useRequest__doc__basic__index.md.da68d840.async.js", "packages__hooks__src__useRequest__doc__debounce__index.md.css": "/etc-hooks/packages__hooks__src__useRequest__doc__debounce__index.md.778c6473.chunk.css", diff --git a/demos.2e53a328.async.js b/demos.2e53a328.async.js deleted file mode 100644 index 04621fa..0000000 --- a/demos.2e53a328.async.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[433],{12113:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(66721),d=e(21737),a=e(11527);s.default=function(){var o=(0,m.Z)(!0),r=c()(o,2),l=r[0],n=r[1],t=n.toggle,u=n.setTrue,i=n.setFalse;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["Effects\uFF1A",JSON.stringify(l)]}),(0,a.jsxs)("p",{children:[(0,a.jsx)(d.ZP,{type:"primary",onClick:t,children:"Toggle"}),(0,a.jsx)(d.ZP,{type:"primary",onClick:i,style:{margin:"0 16px"},children:"setFalse"}),(0,a.jsx)(d.ZP,{type:"primary",onClick:u,children:"setTrue"})]})]})}},12846:function(A,s,e){e.r(s),e.d(s,{default:function(){return o}});var f=e(50959),c=function(l){var n=(0,f.useRef)(l);return(0,f.useEffect)(function(){n.current=l}),(0,f.useMemo)(function(){return function(){for(var t,u=arguments.length,i=new Array(u),v=0;v0&&arguments[0]!==void 0?arguments[0]:{},v=i.timeout,P=v===void 0?2e3:v,D=(0,_.useState)(null),O=c()(D,2),C=O[0],U=O[1],W=(0,_.useState)(!1),$=c()(W,2),V=$[0],N=$[1],z=(0,_.useState)(null),F=c()(z,2),Y=F[0],Q=F[1],G=function(J){window.clearTimeout(Y),Q(window.setTimeout(function(){return N(!1)},P)),N(J)},te=function(J){"clipboard"in navigator?navigator.clipboard.writeText(J).then(function(){G(!0),m.ZP.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}).catch(function(re){return U(re)}):U(new Error("useClipboard: navigator.clipboard is not supported"))},X=function(){N(!1),U(null),window.clearTimeout(Y)};return{copy:te,reset:X,error:C,copied:V}},a=d,o=e(43497),r=e(21737),l=e(11527),n=function(){var i=(0,_.useState)("Hello, world!"),v=c()(i,2),P=v[0],D=v[1],O=a({timeout:500});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.Z,{value:P,onChange:function(U){return D(U.target.value)}}),(0,l.jsx)(r.ZP,{color:O.copied?"teal":"blue",onClick:function(){return O.copy(P)},children:O.copied?"Copied":"Copy"})]})},t=n},25188:function(A,s,e){e.r(s),e.d(s,{default:function(){return n}});var f=e(50959),c=e(28152),_=e.n(c);function m(t,u){try{return t.addEventListener("change",u),function(){return t.removeEventListener("change",u)}}catch(i){return t.addListener(u),function(){return t.removeListener(u)}}}function d(t,u){return typeof u=="boolean"?u:typeof window!="undefined"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function a(t,u){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{getInitialValueInEffect:!0},v=i.getInitialValueInEffect,P=(0,f.useState)(v?u:d(t,u)),D=_()(P,2),O=D[0],C=D[1],U=(0,f.useRef)();return(0,f.useEffect)(function(){if("matchMedia"in window)return U.current=window.matchMedia(t),C(U.current.matches),m(U.current,function(W){return C(W.matches)})},[t]),O}function o(t,u){return a("(prefers-color-scheme: dark)",t==="dark",u)?"dark":"light"}var r=o,l=e(11527),n=function(){var t=r();return(0,l.jsxs)("div",{className:"dark:text-white",children:["Your system color scheme is ",t]})}},28111:function(A,s,e){e.r(s),e.d(s,{default:function(){return u}});var f=e(28152),c=e.n(f),_=e(50959),m=e(77117),d=e.n(m);function a(i,v,P){return v===void 0&&P===void 0?i:v!==void 0&&P===void 0?Math.max(i,v):Math.min(v===void 0&&P!==void 0?i:Math.max(i,v),P)}var o={min:-1/0,max:1/0},r=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,D=d()(d()({},o),P),O=D.min,C=D.max,U=(0,_.useState)(a(v,O,C)),W=c()(U,2),$=W[0],V=W[1],N=function(G){return V(a(G,O,C))},z=function(){return V(a(v,O,C))},F=function(){return V(function(G){return a(G+1,O,C)})},Y=function(){return V(function(G){return a(G-1,O,C)})};return[$,{set:N,reset:z,increment:F,decrement:Y}]},l=r,n=e(21737),t=e(11527),u=function(){var i=l(0,{min:0,max:10}),v=c()(i,2),P=v[0],D=v[1];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{style:{marginTop:16},children:[" ",P," "]}),(0,t.jsxs)("div",{style:{display:"flex",gap:2},children:[(0,t.jsx)(n.ZP,{onClick:D.increment,children:"Increment"}),(0,t.jsx)(n.ZP,{onClick:D.decrement,children:"Decrement"}),(0,t.jsx)(n.ZP,{onClick:D.reset,children:"Reset"}),(0,t.jsx)(n.ZP,{onClick:function(){return D.set(5)},children:"Set 5"})]})]})}},34453:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(96345),m=e.n(_),d=e(15033),a=e.n(d),o=e(21320),r=e.n(o),l=e(50959),n=e(56973),t=e(21737),u=e(11527),i=m()(function v(){a()(this,v),r()(this,"data",void 0),this.data=Math.random()});s.default=function(){var v=(0,n.Z)(function(){return new i},[]),P=(0,l.useState)({}),D=c()(P,2),O=D[1];return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{children:v.data}),(0,u.jsx)(t.ZP,{type:"primary",onClick:function(){O({})},children:"Rerender"})]})}},15647:function(A,s,e){e.r(s),e.d(s,{default:function(){return l}});var f=e(28152),c=e.n(f),_=e(50959),m=e(73066),d=function(t,u){var i=(0,_.useState)(t),v=c()(i,2),P=v[0],D=v[1],O=(0,m.Z)(function(){D(t)},u),C=O.run;return(0,_.useEffect)(function(){C()},[t]),P},a=d,o=e(43497),r=e(11527),l=function(){var n=(0,_.useState)(),t=c()(n,2),u=t[0],i=t[1],v=a(u,{wait:500});return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.Z,{value:u,onChange:function(D){return i(D.target.value)},placeholder:"Typed value",style:{width:280}}),(0,r.jsxs)("p",{style:{marginTop:16},children:["DebouncedValue: ",v]})]})}},17876:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(73066),m=e(50959),d=e(21737),a=e(11527);s.default=function(){var o=(0,m.useState)(0),r=c()(o,2),l=r[0],n=r[1],t=(0,_.Z)(function(){n(l+1)},{wait:500}),u=t.run;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{style:{marginTop:16},children:[" Clicked count: ",l," "]}),(0,a.jsx)(d.ZP,{type:"primary",onClick:u,children:"Click fast!"})]})}},3726:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(66476),d=e(11527);s.default=function(){var a=(0,_.useState)(0),o=c()(a,2),r=o[0],l=o[1],n=(0,m.Z)(r);return(0,_.useEffect)(function(){var t=setInterval(function(){l(n.current+1)},1e3);return function(){return clearInterval(t)}},[]),(0,d.jsxs)("p",{children:["count: ",r]})}},22370:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(68475),d=e(21737),a=e(7790),o=e(11527);s.default=function(){var r=(0,_.useState)(0),l=c()(r,2),n=l[0],t=l[1],u=(0,_.useCallback)(function(){m.ZP.info("Current count is ".concat(n))},[n]),i=(0,a.Z)(function(){m.ZP.info("Current count is ".concat(n))});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["count: ",n]}),(0,o.jsx)(d.ZP,{type:"primary",onClick:function(){t(function(P){return P+1})},children:"Add Count"}),(0,o.jsxs)("div",{style:{marginTop:16},children:[(0,o.jsx)(d.ZP,{type:"primary",onClick:u,children:"call callbackFn"}),(0,o.jsx)(d.ZP,{type:"primary",onClick:i,style:{marginLeft:8},children:"call memoizedFn"})]})]})}},89876:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(7790),d=e(68475),a=e(21737),o=e(11527);s.default=function(){var l=(0,_.useState)(0),n=c()(l,2),t=n[0],u=n[1],i=(0,_.useCallback)(function(){d.ZP.info("Current count is ".concat(t))},[t]),v=(0,m.Z)(function(){d.ZP.info("Current count is ".concat(t))});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["count: ",t]}),(0,o.jsx)(a.ZP,{type:"primary",onClick:function(){u(function(D){return D+1})},children:"Add Count"}),(0,o.jsx)("p",{children:"You can click the button to see the number of sub-component renderings"}),(0,o.jsxs)("div",{style:{marginTop:32},children:[(0,o.jsx)("h3",{children:"Component with useCallback function:"}),(0,o.jsx)(r,{showCount:i})]}),(0,o.jsxs)("div",{style:{marginTop:32},children:[(0,o.jsx)("h3",{children:"Component with useMemoizedFn function:"}),(0,o.jsx)(r,{showCount:v})]})]})};var r=_.memo(function(l){var n=l.showCount,t=(0,_.useRef)(0);return t.current+=1,(0,o.jsxs)("div",{children:[(0,o.jsxs)("p",{children:["Render Count: ",t.current]}),(0,o.jsx)(a.ZP,{type:"primary",onClick:n,children:"showParentCount"})]})})},24155:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(51989),d=e(66721),a=e(68475),o=e(21737),r=e(11527),l=function(){return(0,m.Z)(function(){a.ZP.info("mount")}),(0,r.jsx)("div",{children:"Hello World"})};s.default=function(){var n=(0,d.Z)(!1),t=c()(n,2),u=t[0],i=t[1].toggle;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.ZP,{type:"primary",onClick:i,children:u?"unmount":"mount"}),u&&(0,r.jsx)(l,{})]})}},18409:function(A,s,e){e.r(s),e.d(s,{default:function(){return l}});var f=e(50959),c=e(28152),_=e.n(c),m=function(){return typeof document!="undefined"?f.useLayoutEffect:f.useEffect},d=m;function a(){if(typeof window=="undefined")return"undetermined";var n=window.navigator.userAgent,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)|(Mac)/i,u=/(Win32)|(Win64)|(Windows)|(WinCE)/i,i=/(iPhone)|(iPad)|(iPod)/i;return t.test(n)?"macos":i.test(n)?"ios":u.test(n)?"windows":/Android/i.test(n)?"android":/Linux/i.test(n)?"linux":"undetermined"}function o(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{getValueInEffect:!0},t=(0,f.useState)(n.getValueInEffect?"undetermined":a()),u=_()(t,2),i=u[0],v=u[1];return d(function(){n.getValueInEffect&&v(a)},[]),i}var r=e(11527),l=function(){var n=o({getValueInEffect:!1});return(0,r.jsxs)("div",{children:["Current operating system: ",n]})}},14629:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(68475),m=e(43497),d=e(21737),a=e(50959),o=e(60667),r=e(11527);function l(n){return new Promise(function(t,u){setTimeout(function(){Math.random()>.5?t():u(new Error("Failed to modify username"))},1e3)})}s.default=function(){var n=(0,a.useState)(""),t=c()(n,2),u=t[0],i=t[1],v=(0,o.Z)(l,{manual:!0,onSuccess:function(U,W){i(""),_.ZP.success('The username was changed to "'.concat(W[0],'" !'))},onError:function(U){_.ZP.error(U.message)}}),P=v.loading,D=v.run,O=v.cancel;return(0,r.jsxs)("div",{children:[(0,r.jsx)(m.Z,{onChange:function(U){return i(U.target.value)},value:u,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,r.jsx)(d.ZP,{disabled:P,type:"primary",onClick:function(){return D(u)},children:P?"Loading":"Edit"}),(0,r.jsx)(d.ZP,{type:"primary",onClick:O,style:{marginLeft:16},children:"Cancel"})]})}},28525:function(A,s,e){e.r(s);var f=e(60667),c=e(90674),_=e.n(c),m=e(50959),d=e(11527);function a(){return new Promise(function(o,r){setTimeout(function(){Math.random()>.5?o(_().mock("@name")):r(new Error("Failed to get username"))},1e3)})}s.default=function(){var o=(0,f.Z)(a),r=o.data,l=o.error,n=o.loading;return l?(0,d.jsx)("div",{children:l.message}):n?(0,d.jsx)("div",{children:"loading..."}):(0,d.jsxs)("div",{children:["Username: ",r]})}},12449:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(68475),d=e(43497),a=e(21737),o=e(60667),r=e(11527);function l(n){return new Promise(function(t,u){setTimeout(function(){Math.random()>.5?t():u(new Error("Failed to modify username"))},1e3)})}s.default=function(){var n=(0,_.useState)(""),t=c()(n,2),u=t[0],i=t[1],v=(0,o.Z)(l,{manual:!0,onBefore:function(C){m.ZP.info("Start Request: ".concat(C[0]))},onSuccess:function(C,U){i(""),m.ZP.success('The username was changed to "'.concat(U[0],'" !'))},onError:function(C){m.ZP.error(C.message)},onFinally:function(C,U,W){m.ZP.info("Request finish")}}),P=v.loading,D=v.run;return(0,r.jsxs)("div",{children:[(0,r.jsx)(d.Z,{value:u,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(C){return i(C.target.value)}}),(0,r.jsx)(a.ZP,{disabled:P,type:"primary",onClick:function(){return D(u)},children:P?"Loading":"Edit"})]})}},39482:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(68475),d=e(43497),a=e(21737),o=e(60667),r=e(11527);function l(n){return new Promise(function(t,u){setTimeout(function(){Math.random()>.5?t():u(new Error("Failed to modify username"))},1e3)})}s.default=function(){var n=(0,_.useState)(""),t=c()(n,2),u=t[0],i=t[1],v=(0,o.Z)(l,{manual:!0,onSuccess:function(C,U){i(""),m.ZP.success('The username was changed to "'.concat(U[0],'" !'))},onError:function(C){m.ZP.error(C.message)}}),P=v.loading,D=v.run;return(0,r.jsxs)("div",{children:[(0,r.jsx)(d.Z,{onChange:function(C){return i(C.target.value)},value:u,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,r.jsx)(a.ZP,{disabled:P,type:"primary",onClick:function(){return D(u)},children:P?"Loading":"Edit"})]})}},5329:function(A,s,e){e.r(s);var f=e(13448),c=e.n(f),_=e(74815),m=e.n(_),d=e(28152),a=e.n(d),o=e(68475),r=e(43497),l=e(21737),n=e(50959),t=e(60667),u=e(11527);function i(v){return new Promise(function(P,D){setTimeout(function(){Math.random()>.5?P():D(new Error("Failed to modify username"))},1e3)})}s.default=function(){var v=(0,n.useState)(""),P=a()(v,2),D=P[0],O=P[1],C=(0,t.Z)(i,{manual:!0}),U=C.loading,W=C.runAsync,$=function(){var V=m()(c()().mark(function N(){return c()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.prev=0,F.next=3,W(D);case 3:O(""),o.ZP.success('The username was changed to "'.concat(D,'" !')),F.next=10;break;case 7:F.prev=7,F.t0=F.catch(0),o.ZP.error(F.t0.message);case 10:case"end":return F.stop()}},N,null,[[0,7]])}));return function(){return V.apply(this,arguments)}}();return(0,u.jsxs)("div",{children:[(0,u.jsx)(r.Z,{value:D,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(N){return O(N.target.value)}}),(0,u.jsx)(l.ZP,{disabled:U,type:"primary",onClick:$,children:U?"Loading":"Edit"})]})}},77862:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(68475),m=e(43497),d=e(21737),a=e(50959),o=e(60667),r=e(90674),l=e.n(r),n=e(11527);function t(){return new Promise(function(i){setTimeout(function(){i(l().mock("@name"))},1e3)})}function u(i){return new Promise(function(v,P){setTimeout(function(){Math.random()>.5?v():P(new Error("Failed to modify username"))},1e3)})}s.default=function(){var i=(0,a.useRef)(),v=(0,a.useState)(""),P=c()(v,2),D=P[0],O=P[1],C=(0,o.Z)(t),U=C.data,W=C.mutate,$=(0,o.Z)(u,{manual:!0,onSuccess:function(F,Y){O(""),_.ZP.success('The username was changed to "'.concat(Y[0],'" !'))},onError:function(F){_.ZP.error(F.message),W(i.current)}}),V=$.run,N=function(){i.current=U,W(D),V(D)};return(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{children:["Username: ",U]}),(0,n.jsx)(m.Z,{value:D,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(F){return O(F.target.value)}}),(0,n.jsx)(d.ZP,{type:"primary",onClick:N,children:"Edit"})]})}},81771:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(60667),d=e(90674),a=e.n(d),o=e(43497),r=e(21737),l=e(11527);function n(t){return new Promise(function(u){setTimeout(function(){u(a().mock("@name"))},1e3)})}s.default=function(){var t=(0,_.useState)(""),u=c()(t,2),i=u[0],v=u[1],P=(0,m.Z)(n,{defaultParams:["1"]}),D=P.data,O=P.run,C=P.params,U=function(){O(i)};return(0,l.jsxs)("div",{children:[(0,l.jsx)(o.Z,{value:i,placeholder:"Please enter userId",style:{width:240,marginRight:16},onChange:function($){return v($.target.value)}}),(0,l.jsx)(r.ZP,{type:"primary",onClick:U,children:"GetUserName"}),(0,l.jsxs)("p",{style:{marginTop:8},children:["UserId: ",C[0]]}),(0,l.jsxs)("p",{children:["Username: ",D]})]})}},69054:function(A,s,e){e.r(s);var f=e(50959),c=e(60667),_=e(90674),m=e.n(_),d=e(21737),a=e(11527);function o(r){return console.log("use-request-refresh-id",r),new Promise(function(l){setTimeout(function(){l(m().mock("@name"))},1e3)})}s.default=function(){var r=(0,c.Z)(function(i){return o(i)},{manual:!0}),l=r.data,n=r.loading,t=r.run,u=r.refresh;return(0,f.useEffect)(function(){t(1)},[]),n?(0,a.jsx)("div",{children:"loading..."}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["Username: ",l]}),(0,a.jsx)(d.ZP,{onClick:u,type:"primary",children:"Refresh"})]})}},59912:function(A,s,e){e.r(s);var f=e(13448),c=e.n(f),_=e(74815),m=e.n(_),d=e(43497),a=e(60667),o=e(90674),r=e.n(o),l=e(50959),n=e(11527);function t(i){return u.apply(this,arguments)}function u(){return u=m()(c()().mark(function i(v){return c()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return console.log("debounce getEmail",v),D.abrupt("return",new Promise(function(O){setTimeout(function(){O(r().mock({"data|5":["@email"]}).data)},300)}));case 2:case"end":return D.stop()}},i)})),u.apply(this,arguments)}s.default=function(){var i=(0,a.Z)(t,{debounceWait:1e3,manual:!0}),v=i.data,P=i.loading,D=i.run;return(0,n.jsxs)("div",{children:[(0,n.jsx)(d.Z,{placeholder:"Search Emails",onChange:function(C){return D(C.target.value)}}),P?(0,n.jsx)("p",{children:"loading"}):(0,n.jsx)("ul",{style:{marginTop:8},children:v==null?void 0:v.map(function(O){return(0,n.jsx)("li",{children:O},O)})})]})}},82861:function(A,s,e){e.r(s);var f=e(60667),c=e(90674),_=e.n(c),m=e(50959),d=e(11527);function a(){return new Promise(function(o){setTimeout(function(){o(_().mock("@name"))},1e3)})}s.default=function(){var o=(0,f.Z)(a),r=o.data,l=o.error,n=o.loading;return l?(0,d.jsx)("div",{children:"failed to load"}):n?(0,d.jsx)("div",{children:"loading..."}):(0,d.jsxs)("div",{children:["Username: ",r]})}},4895:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(68475),d=e(43497),a=e(21737),o=e(60667),r=e(11527);function l(n){return new Promise(function(t){setTimeout(function(){t({success:!0})},1e3)})}s.default=function(){var n=(0,_.useState)(""),t=c()(n,2),u=t[0],i=t[1],v=(0,o.Z)(l,{manual:!0,onSuccess:function(C,U){C.success&&(i(""),m.ZP.success('The username was changed to "'.concat(U[0],'" !')))}}),P=v.loading,D=v.run;return(0,r.jsxs)("div",{children:[(0,r.jsx)(d.Z,{value:u,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(C){return i(C.target.value)}}),(0,r.jsx)(a.ZP,{disabled:P,type:"primary",onClick:function(){return D(u)},children:P?"Loading":"Edit"})]})}},28963:function(A,s,e){e.r(s);var f=e(21737),c=e(60667),_=e(90674),m=e.n(_),d=e(50959),a=e(11527);function o(){return console.log("polling getUsername"),new Promise(function(r){setTimeout(function(){r(m().mock("@name"))},1e3)})}s.default=function(){var r=(0,c.Z)(o,{pollingInterval:1e3,pollingWhenHidden:!1}),l=r.data,n=r.loading,t=r.run,u=r.cancel;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{children:["Username: ",n?"Loading":l]}),(0,a.jsx)(f.ZP,{type:"primary",onClick:t,children:"start"}),(0,a.jsx)(f.ZP,{onClick:u,style:{marginLeft:16},children:"stop"})]})}},58162:function(A,s,e){e.r(s);var f=e(68475),c=e(21737),_=e(60667),m=e(90674),d=e.n(m),a=e(50959),o=e(11527);function r(){return console.log("polling getUsername Error"),new Promise(function(l,n){setTimeout(function(){n(new Error(d().mock("@name")))},1e3)})}s.default=function(){var l=(0,_.Z)(r,{pollingInterval:1e3,pollingWhenHidden:!1,pollingErrorRetryCount:3,manual:!0,onError:function(P){f.ZP.error(P.message)}}),n=l.data,t=l.loading,u=l.run,i=l.cancel;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["Username: ",t?"Loading":n]}),(0,o.jsx)(c.ZP,{type:"primary",onClick:u,children:"start"}),(0,o.jsx)(c.ZP,{onClick:i,style:{marginLeft:16},children:"stop"})]})}},56235:function(A,s,e){e.r(s),e.d(s,{default:function(){return l}});var f=e(28152),c=e.n(f),_=e(21737),m=e(50959),d=e(7790),a=function(t){var u=(0,m.useState)(t),i=c()(u,2),v=i[0],P=i[1],D=(0,d.Z)(function(){P(t)});return[v,P,D]},o=a,r=e(11527),l=function(){var n=o({hello:"",count:0}),t=c()(n,3),u=t[0],i=t[1],v=t[2];return(0,r.jsxs)("div",{children:[(0,r.jsx)("pre",{children:JSON.stringify(u,null,2)}),(0,r.jsxs)("p",{children:[(0,r.jsx)(_.ZP,{style:{marginRight:"8px"},onClick:function(){return i({hello:"world",count:1})},children:"set hello and count"}),(0,r.jsx)(_.ZP,{onClick:v,children:"resetState"})]})]})}},18271:function(A,s,e){e.r(s),e.d(s,{default:function(){return l}});var f=e(28152),c=e.n(f),_=e(50959),m=e(7790);function d(n){var t=function(){return new Set(n)},u=(0,_.useState)(t),i=c()(u,2),v=i[0],P=i[1],D=(0,m.Z)(function(U){v.has(U)||P(function(W){var $=new Set(W);return $.add(U),$})}),O=(0,m.Z)(function(U){v.has(U)&&P(function(W){var $=new Set(W);return $.delete(U),$})}),C=(0,m.Z)(function(){return P(t())});return[v,{add:D,remove:O,reset:C}]}var a=d,o=e(21737),r=e(11527),l=function(){var n=a(["Hello"]),t=c()(n,2),u=t[0],i=t[1],v=i.add,P=i.remove,D=i.reset;return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.ZP,{type:"primary",onClick:function(){return v(String(Date.now()))},children:"Add Timestamp"}),(0,r.jsx)(o.ZP,{type:"primary",onClick:function(){return P("Hello")},disabled:!u.has("Hello"),style:{margin:"0 8px"},children:"Remove Hello"}),(0,r.jsx)(o.ZP,{type:"primary",onClick:function(){return D()},children:"Reset"}),(0,r.jsx)("div",{style:{marginTop:16},children:(0,r.jsx)("pre",{children:JSON.stringify(Array.from(u),null,2)})})]})}},84933:function(A,s,e){e.r(s),e.d(s,{default:function(){return l}});var f=e(28152),c=e.n(f),_=e(43497),m=e(50959),d=e(40477);function a(n,t){var u=(0,m.useState)(n),i=c()(u,2),v=i[0],P=i[1],D=(0,d.Z)(function(){P(n)},t),O=D.run;return(0,m.useEffect)(function(){O()},[n]),v}var o=a,r=e(11527),l=function(){var n=(0,m.useState)(),t=c()(n,2),u=t[0],i=t[1],v=o(u,{wait:500});return(0,r.jsxs)("div",{children:[(0,r.jsx)(_.Z,{value:u,style:{width:280},placeholder:"Typed value",onChange:function(D){return i(D.target.value)}}),(0,r.jsxs)("p",{className:"mt-4",children:["throttledValue: ",v]})]})}},45426:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(21737),m=e(40477),d=e(50959),a=e(11527);s.default=function(){var o=(0,d.useState)(0),r=c()(o,2),l=r[0],n=r[1],t=(0,m.Z)(function(){n(l+1)},{wait:500}),u=t.run;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"mt-4",children:[" Clicked count: ",l," "]}),(0,a.jsx)(_.ZP,{onClick:u,children:"Click fast!"})]})}},15349:function(A,s,e){e.r(s),e.d(s,{default:function(){return r}});var f=e(50959),c=e(12929),_=e(71580),m={restorePrevTitle:!1};function d(l){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m,t=(0,f.useRef)(_.Z?document.title:"");(0,f.useEffect)(function(){l.trim().length>0&&(document.title=l)},[l]),(0,c.Z)(function(){n.restorePrevTitle&&(document.title=t.current)})}var a=d,o=e(11527),r=function(){return a("Page Title"),(0,o.jsx)("div",{children:(0,o.jsx)("p",{children:"Set title of this page."})})}},73451:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(22093),d=e(21737),a=e(11527);s.default=function(){var o=(0,m.Z)(),r=c()(o,2),l=r[0],n=r[1],t=n.toggle,u=n.setLeft,i=n.setRight;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["\u5F53\u524D\u7684 state \u7684\u503C\u4E3A: ","".concat(l)]}),(0,a.jsxs)("p",{children:[(0,a.jsx)(d.ZP,{onClick:t,children:"toggle\u5207\u6362"}),(0,a.jsx)(d.ZP,{onClick:u,children:"setLeft\u5207\u6362"}),(0,a.jsx)(d.ZP,{onClick:i,children:"setRight\u5207\u6362"})]})]})}},18755:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(50959),m=e(22093),d=e(21737),a=e(11527);s.default=function(){var o=(0,m.Z)("OOR","Aimyon"),r=c()(o,2),l=r[0],n=r[1],t=n.toggle,u=n.set,i=n.setLeft,v=n.setRight;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["Effects\uFF1A",l]}),(0,a.jsxs)("p",{children:[(0,a.jsx)(d.ZP,{type:"primary",onClick:t,children:"Toggle"}),(0,a.jsx)(d.ZP,{type:"primary",style:{margin:"0 8px"},onClick:function(){return u("OOR")},children:"Set OOR"}),(0,a.jsx)(d.ZP,{type:"primary",onClick:function(){return u("Aimyon")},children:"Set Aimyon"}),(0,a.jsx)(d.ZP,{type:"primary",onClick:i,style:{margin:"0 8px"},children:"setLeft"}),(0,a.jsx)(d.ZP,{type:"primary",onClick:v,children:"setRight"})]})]})}},25116:function(A,s,e){e.r(s);var f=e(28152),c=e.n(f),_=e(12929),m=e(66721),d=e(68475),a=e(50959),o=e(11527),r=function(){return(0,_.Z)(function(){d.ZP.info("Component unmount")}),(0,o.jsx)("p",{children:"Et cetera!!!"})};s.default=function(){var l=(0,m.Z)(!0),n=c()(l,2),t=n[0],u=n[1].toggle;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{type:"button",onClick:u,children:t?"unmount":"mount"}),t&&(0,o.jsx)(r,{})]})}},58825:function(A,s,e){e.r(s),e.d(s,{default:function(){return t}});var f=e(28152),c=e.n(f),_=e(50959),m=function(){var i=(0,_.useRef)(!1);return(0,_.useEffect)(function(){return i.current=!1,function(){i.current=!0}},[]),i},d=m,a=e(66721),o=e(68475),r=e(21737),l=e(11527),n=function(){var i=d();return(0,_.useEffect)(function(){setTimeout(function(){i.current||o.ZP.info("component is alive")},3e3)},[]),(0,l.jsx)("p",{children:"Hello World!"})},t=function(){var u=(0,a.Z)(!0),i=c()(u,2),v=i[0],P=i[1].toggle;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.ZP,{type:"primary",onClick:P,children:v?"unmount":"mount"}),v&&(0,l.jsx)(n,{})]})}},9007:function(A,s,e){e.r(s);var f=e(50959),c=e(14327),_=e(21737),m=e(11527);s.default=function(){var d=(0,c.Z)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{children:["Time: ",Date.now()]}),(0,m.jsx)(_.ZP,{type:"primary",onClick:d,style:{marginTop:8},children:"update"})]})}},66721:function(A,s,e){e.d(s,{Z:function(){return a}});var f=e(28152),c=e.n(f),_=e(50959),m=e(22093),d=e(83350);function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;(0,d.Z)(o)||(o=!1);var r=(0,m.Z)(o),l=c()(r,2),n=l[0],t=l[1],u=t.toggle,i=t.set,v=(0,_.useMemo)(function(){var P=function(){return i(!0)},D=function(){return i(!1)};return{toggle:u,setTrue:P,setFalse:D,set:function(C){return i(C)}}},[]);return[n,v]}},56973:function(A,s,e){e.d(s,{Z:function(){return _}});var f=e(50959);function c(m,d){if(m===d)return!0;for(var a=0;a-1&&(j=setTimeout(function(){i.delete(h)},E)),i.set(h,u()(u()({},M),{},{timer:j}))},P=function(h){return i.get(h)},D=function(h){if(h){var E=Array.isArray(h)?h:[h];E.forEach(function(M){return i.delete(M)})}else i.clear()},O=new Map,C=function(h){return O.get(h)},U=function(h,E){O.set(h,E),E.then(function(M){return O.delete(h),M}).catch(function(){O.delete(h)})},W={},$=function(h,E){W[h]&&W[h].forEach(function(M){return M(E)})},V=function(h,E){return W[h]||(W[h]=[]),W[h].push(E),function(){var R=W[h].indexOf(E);W[h].splice(R,1)}},N=function(h,E){var M=E.cacheKey,R=E.cacheTime,j=R===void 0?5*60*1e3:R,T=E.staleTime,y=T===void 0?0:T,p=E.setCache,L=E.getCache,g=(0,_.useRef)(),I=(0,_.useRef)(),S=function(b,K){p?p(K):v(b,j,K),$(b,K.data)},H=function(b){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return L?L(K):P(b)};return(0,l.Z)(function(){if(M){var Z=H(M);Z&&Object.hasOwnProperty.call(Z,"data")&&(h.state.data=Z.data,h.state.params=Z.params,(y===-1||new Date().getTime()-Z.time<=y)&&(h.state.loading=!1)),g.current=V(M,function(b){h.setState({data:b})})}},[]),(0,n.Z)(function(){var Z;(Z=g.current)===null||Z===void 0||Z.call(g)}),M?{onBefore:function(b){var K=H(M,b);return!K||!Object.hasOwnProperty.call(K,"data")?{}:y===-1||new Date().getTime()-K.time<=y?{loading:!1,data:K==null?void 0:K.data,error:void 0,returnNow:!0}:{data:K==null?void 0:K.data,error:void 0}},onRequest:function(b,K){var k=C(M);return k&&k!==I.current?{servicePromise:k}:(k=b.apply(void 0,c()(K)),I.current=k,U(M,k),{servicePromise:k})},onSuccess:function(b,K){if(M){var k;(k=g.current)===null||k===void 0||k.call(g),S(M,{data:b,params:K,time:new Date().getTime()}),g.current=V(M,function(ne){h.setState({data:ne})})}},onMutate:function(b){if(M){var K;(K=g.current)===null||K===void 0||K.call(g),S(M,{data:b,params:h.state.params,time:new Date().getTime()}),g.current=V(M,function(k){h.setState({data:k})})}}}:{}},z=N,F=e(16116),Y=function(h,E){var M=E.debounceWait,R=E.debounceLeading,j=E.debounceTrailing,T=E.debounceMaxWait,y=(0,_.useRef)(),p=(0,_.useMemo)(function(){var L={};return R!==void 0&&(L.leading=R),j!==void 0&&(L.trailing=j),T!==void 0&&(L.maxWait=T),L},[R,j,T]);return(0,_.useEffect)(function(){if(M){var L=h.runAsync.bind(h);return y.current=(0,F.Z)(function(g){g()},M,p),h.runAsync=function(){for(var g=arguments.length,I=new Array(g),S=0;S-1&&ee.splice(E,1)}}if(X.Z){var ue=function(){if(!(!w()||!me()))for(var h=0;h3&&arguments[3]!==void 0?arguments[3]:{};We()(this,B),oe()(this,"count",0),oe()(this,"pluginImpls",void 0),oe()(this,"state",{loading:!1,params:void 0,data:void 0,error:void 0}),this.serviceRef=h,this.options=E,this.subscribe=M,this.initState=R,this.state=u()(u()({},this.state),{},{loading:!E.manual},R)}return Se()(B,[{key:"cancel",value:function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}},{key:"run",value:function(){var E=this;this.runAsync.apply(this,arguments).catch(function(M){E.options.onError||console.error(M)})}},{key:"runAsync",value:function(){var h=Be()(ae()().mark(function M(){var R,j,T,y,p,L,g,I,S,H,Z,b,K,k,ne=arguments;return ae()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:for(this.count+=1,R=this.count,j=ne.length,T=new Array(j),y=0;y1?M-1:0),j=1;j0&&arguments[0]!==void 0?arguments[0]:{};this.state=u()(u()({},this.state),E),this.subscribe()}}]),B}(),ke=["manual"],$e=function(h){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],R=E.manual,j=R===void 0?!1:R,T=se()(E,ke);Le.Z&&E.defaultParams&&!Array.isArray(E.defaultParams)&&console.warn("expected defaultParams is array, but got ".concat(Te()(E.defaultParams)));var y=u()({manual:j},T),p=(0,Ae.Z)(h),L=(0,je.Z)(),g=(0,l.Z)(function(){var I=M.map(function(S){var H;return S==null||(H=S.onInit)===null||H===void 0?void 0:H.call(S,y)}).filter(Boolean);return new Fe(p,y,L,Object.assign.apply(Object,[{}].concat(c()(I))))},[]);return g.options=y,g.pluginImpls=M.map(function(I){return I(g,y)}),(0,ye.Z)(function(){if(!j){var I=g.state.params||E.defaultParams||[];g.run.apply(g,c()(I))}}),(0,n.Z)(function(){g.cancel()}),{data:g.state.data,loading:g.state.loading,run:(0,q.Z)(g.run.bind(g)),runAsync:(0,q.Z)(g.runAsync.bind(g)),error:g.state.error,params:g.state.params||[],cancel:(0,q.Z)(g.cancel.bind(g)),mutate:(0,q.Z)(g.mutate.bind(g)),refresh:(0,q.Z)(g.refresh.bind(g)),refreshAsync:(0,q.Z)(g.refreshAsync.bind(g))}},He=$e,Ve=function(h,E,M){return He(h,E,[].concat(c()(M||[]),[Me,z,r,de,Q,ge,te,Ee]))},Ne=Ve,ze=Ne},40477:function(A,s,e){var f=e(27566),c=e.n(f),_=e(20057),m=e(50959),d=e(66476),a=e(12929),o=e(79841),r=e(76139);function l(n,t){var u;r.Z&&((0,o.mf)(n)||console.error("useThrottleFn expected parameter is a function, got ".concat(c()(n))));var i=(0,d.Z)(n),v=(u=t==null?void 0:t.wait)!==null&&u!==void 0?u:1e3,P=(0,m.useMemo)(function(){return(0,_.Z)(function(){return i.current.apply(i,arguments)},v,t)},[]);return(0,a.Z)(function(){P.cancel()}),{run:P,cancel:P.cancel,flush:P.flush}}s.Z=l},22093:function(A,s,e){var f=e(28152),c=e.n(f),_=e(50959);function m(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=arguments.length>1?arguments[1]:void 0,o=(0,_.useState)(d),r=c()(o,2),l=r[0],n=r[1],t=(0,_.useMemo)(function(){var u=a===void 0?!d:a,i=function(){return n(function(C){return C===d?u:d})},v=function(C){return n(C)},P=function(){return n(d)},D=function(){return n(u)};return{set:v,toggle:i,setLeft:P,setRight:D}},[]);return[l,t]}s.Z=m},12929:function(A,s,e){var f=e(27566),c=e.n(f),_=e(50959),m=e(66476),d=e(79841),a=e(76139),o=function(l){a.Z&&((0,d.mf)(l)||console.error("useUnmount expected parameter is a function, but got ".concat(c()(l))));var n=(0,m.Z)(l);(0,_.useEffect)(function(){return function(){return n.current()}},[])};s.Z=o},14327:function(A,s,e){var f=e(28152),c=e.n(f),_=e(50959),m=function(){var a=(0,_.useState)({}),o=c()(a,2),r=o[1];return(0,_.useCallback)(function(){return r({})},[])};s.Z=m},79841:function(A,s,e){e.d(s,{mf:function(){return m}});var f=e(27566),c=e.n(f),_=function(n){return n!==null&&_typeof(n)==="object"},m=function(n){return typeof n=="function"},d=function(n){return typeof n=="string"},a=function(n){return typeof n=="boolean"},o=function(n){return typeof n=="number"},r=function(n){return typeof n=="undefined"}},71580:function(A,s){var e=!!(typeof window!="undefined"&&window.document&&window.document.createElement);s.Z=e},76139:function(A,s){var e=!1;s.Z=e}}]); diff --git a/demos.aa8ec337.async.js b/demos.aa8ec337.async.js new file mode 100644 index 0000000..d9548ef --- /dev/null +++ b/demos.aa8ec337.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[433],{12113:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(66721),i=e(21737),_=e(11527);o.default=function(){var u=(0,m.Z)(!0),s=c()(u,2),l=s[0],t=s[1],r=t.toggle,n=t.setTrue,d=t.setFalse;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["Effects\uFF1A",JSON.stringify(l)]}),(0,_.jsxs)("p",{children:[(0,_.jsx)(i.ZP,{type:"primary",onClick:r,children:"Toggle"}),(0,_.jsx)(i.ZP,{type:"primary",onClick:d,style:{margin:"0 16px"},children:"setFalse"}),(0,_.jsx)(i.ZP,{type:"primary",onClick:n,children:"setTrue"})]})]})}},12846:function(R,o,e){e.r(o),e.d(o,{default:function(){return u}});var f=e(50959),c=function(l){var t=(0,f.useRef)(l);return(0,f.useEffect)(function(){t.current=l}),(0,f.useMemo)(function(){return function(){for(var r,n=arguments.length,d=new Array(n),v=0;v0&&arguments[0]!==void 0?arguments[0]:{},v=d.timeout,h=v===void 0?2e3:v,M=(0,a.useState)(null),O=c()(M,2),C=O[0],U=O[1],W=(0,a.useState)(!1),$=c()(W,2),V=$[0],N=$[1],z=(0,a.useState)(null),F=c()(z,2),Y=F[0],Q=F[1],G=function(J){window.clearTimeout(Y),Q(window.setTimeout(function(){return N(!1)},h)),N(J)},te=function(J){"clipboard"in navigator?navigator.clipboard.writeText(J).then(function(){G(!0),m.ZP.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}).catch(function(re){return U(re)}):U(new Error("useClipboard: navigator.clipboard is not supported"))},X=function(){N(!1),U(null),window.clearTimeout(Y)};return{copy:te,reset:X,error:C,copied:V}},_=i,u=e(43497),s=e(21737),l=e(11527),t=function(){var d=(0,a.useState)("Hello, world!"),v=c()(d,2),h=v[0],M=v[1],O=_({timeout:500});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Z,{value:h,onChange:function(U){return M(U.target.value)}}),(0,l.jsx)(s.ZP,{color:O.copied?"teal":"blue",onClick:function(){return O.copy(h)},children:O.copied?"Copied":"Copy"})]})},r=t},25188:function(R,o,e){e.r(o),e.d(o,{default:function(){return t}});var f=e(50959),c=e(28152),a=e.n(c);function m(r,n){try{return r.addEventListener("change",n),function(){return r.removeEventListener("change",n)}}catch(d){return r.addListener(n),function(){return r.removeListener(n)}}}function i(r,n){return typeof n=="boolean"?n:typeof window!="undefined"&&"matchMedia"in window?window.matchMedia(r).matches:!1}function _(r,n){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{getInitialValueInEffect:!0},v=d.getInitialValueInEffect,h=(0,f.useState)(v?n:i(r,n)),M=a()(h,2),O=M[0],C=M[1],U=(0,f.useRef)();return(0,f.useEffect)(function(){if("matchMedia"in window)return U.current=window.matchMedia(r),C(U.current.matches),m(U.current,function(W){return C(W.matches)})},[r]),O}function u(r,n){return _("(prefers-color-scheme: dark)",r==="dark",n)?"dark":"light"}var s=u,l=e(11527),t=function(){var r=s();return(0,l.jsxs)("div",{className:"dark:text-white",children:["Your system color scheme is ",r]})}},28111:function(R,o,e){e.r(o),e.d(o,{default:function(){return n}});var f=e(28152),c=e.n(f),a=e(50959),m=e(77117),i=e.n(m);function _(d,v,h){return v===void 0&&h===void 0?d:v!==void 0&&h===void 0?Math.max(d,v):Math.min(v===void 0&&h!==void 0?d:Math.max(d,v),h)}var u={min:-1/0,max:1/0},s=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,M=i()(i()({},u),h),O=M.min,C=M.max,U=(0,a.useState)(_(v,O,C)),W=c()(U,2),$=W[0],V=W[1],N=function(G){return V(_(G,O,C))},z=function(){return V(_(v,O,C))},F=function(){return V(function(G){return _(G+1,O,C)})},Y=function(){return V(function(G){return _(G-1,O,C)})};return[$,{set:N,reset:z,increment:F,decrement:Y}]},l=s,t=e(21737),r=e(11527),n=function(){var d=l(0,{min:0,max:10}),v=c()(d,2),h=v[0],M=v[1];return(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{style:{marginTop:16},children:[" ",h," "]}),(0,r.jsxs)("div",{style:{display:"flex",gap:2},children:[(0,r.jsx)(t.ZP,{onClick:M.increment,children:"Increment"}),(0,r.jsx)(t.ZP,{onClick:M.decrement,children:"Decrement"}),(0,r.jsx)(t.ZP,{onClick:M.reset,children:"Reset"}),(0,r.jsx)(t.ZP,{onClick:function(){return M.set(5)},children:"Set 5"})]})]})}},34453:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(96345),m=e.n(a),i=e(15033),_=e.n(i),u=e(21320),s=e.n(u),l=e(50959),t=e(56973),r=e(21737),n=e(11527),d=m()(function v(){_()(this,v),s()(this,"data",void 0),this.data=Math.random()});o.default=function(){var v=(0,t.Z)(function(){return new d},[]),h=(0,l.useState)({}),M=c()(h,2),O=M[1];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:v.data}),(0,n.jsx)(r.ZP,{type:"primary",onClick:function(){O({})},children:"Rerender"})]})}},15647:function(R,o,e){e.r(o),e.d(o,{default:function(){return l}});var f=e(28152),c=e.n(f),a=e(50959),m=e(73066),i=function(r,n){var d=(0,a.useState)(r),v=c()(d,2),h=v[0],M=v[1],O=(0,m.Z)(function(){M(r)},n),C=O.run;return(0,a.useEffect)(function(){C()},[r]),h},_=i,u=e(43497),s=e(11527),l=function(){var t=(0,a.useState)(),r=c()(t,2),n=r[0],d=r[1],v=_(n,{wait:500});return(0,s.jsxs)("div",{children:[(0,s.jsx)(u.Z,{value:n,onChange:function(M){return d(M.target.value)},placeholder:"Typed value",style:{width:280}}),(0,s.jsxs)("p",{style:{marginTop:16},children:["DebouncedValue: ",v]})]})}},17876:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(73066),m=e(50959),i=e(21737),_=e(11527);o.default=function(){var u=(0,m.useState)(0),s=c()(u,2),l=s[0],t=s[1],r=(0,a.Z)(function(){t(l+1)},{wait:500}),n=r.run;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{style:{marginTop:16},children:[" Clicked count: ",l," "]}),(0,_.jsx)(i.ZP,{type:"primary",onClick:n,children:"Click fast!"})]})}},3726:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(66476),i=e(11527);o.default=function(){var _=(0,a.useState)(0),u=c()(_,2),s=u[0],l=u[1],t=(0,m.Z)(s);return(0,a.useEffect)(function(){var r=setInterval(function(){l(t.current+1)},1e3);return function(){return clearInterval(r)}},[]),(0,i.jsxs)("p",{children:["count: ",s]})}},22370:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(68475),i=e(21737),_=e(7790),u=e(11527);o.default=function(){var s=(0,a.useState)(0),l=c()(s,2),t=l[0],r=l[1],n=(0,a.useCallback)(function(){m.ZP.info("Current count is ".concat(t))},[t]),d=(0,_.Z)(function(){m.ZP.info("Current count is ".concat(t))});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("p",{children:["count: ",t]}),(0,u.jsx)(i.ZP,{type:"primary",onClick:function(){r(function(h){return h+1})},children:"Add Count"}),(0,u.jsxs)("div",{style:{marginTop:16},children:[(0,u.jsx)(i.ZP,{type:"primary",onClick:n,children:"call callbackFn"}),(0,u.jsx)(i.ZP,{type:"primary",onClick:d,style:{marginLeft:8},children:"call memoizedFn"})]})]})}},89876:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(7790),i=e(68475),_=e(21737),u=e(11527);o.default=function(){var l=(0,a.useState)(0),t=c()(l,2),r=t[0],n=t[1],d=(0,a.useCallback)(function(){i.ZP.info("Current count is ".concat(r))},[r]),v=(0,m.Z)(function(){i.ZP.info("Current count is ".concat(r))});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("p",{children:["count: ",r]}),(0,u.jsx)(_.ZP,{type:"primary",onClick:function(){n(function(M){return M+1})},children:"Add Count"}),(0,u.jsx)("p",{children:"You can click the button to see the number of sub-component renderings"}),(0,u.jsxs)("div",{style:{marginTop:32},children:[(0,u.jsx)("h3",{children:"Component with useCallback function:"}),(0,u.jsx)(s,{showCount:d})]}),(0,u.jsxs)("div",{style:{marginTop:32},children:[(0,u.jsx)("h3",{children:"Component with useMemoizedFn function:"}),(0,u.jsx)(s,{showCount:v})]})]})};var s=a.memo(function(l){var t=l.showCount,r=(0,a.useRef)(0);return r.current+=1,(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:["Render Count: ",r.current]}),(0,u.jsx)(_.ZP,{type:"primary",onClick:t,children:"showParentCount"})]})})},24155:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(51989),i=e(66721),_=e(68475),u=e(21737),s=e(11527),l=function(){return(0,m.Z)(function(){_.ZP.info("mount")}),(0,s.jsx)("div",{children:"Hello World"})};o.default=function(){var t=(0,i.Z)(!1),r=c()(t,2),n=r[0],d=r[1].toggle;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.ZP,{type:"primary",onClick:d,children:n?"unmount":"mount"}),n&&(0,s.jsx)(l,{})]})}},80078:function(R,o,e){e.r(o),e.d(o,{default:function(){return t}});var f=e(77117),c=e.n(f),a=e(28152),m=e.n(a),i=e(50959),_=e(73721);function u(){if(typeof navigator=="undefined")return{};var r=navigator,n=r.connection||r.mozConnection||r.webkitConnection;return n?{rtt:n==null?void 0:n.rtt,type:n==null?void 0:n.type,saveData:n==null?void 0:n.saveData,downlink:n==null?void 0:n.downlink,downlinkMax:n==null?void 0:n.downlinkMax,effectiveType:n==null?void 0:n.effectiveType}:{}}function s(){var r=(0,i.useState)({online:!0}),n=m()(r,2),d=n[0],v=n[1],h=(0,i.useCallback)(function(){return v(function(M){return c()(c()({},M),u())})},[]);return(0,_.Z)("online",function(){return v(c()({online:!0},u()))}),(0,_.Z)("offline",function(){return v(c()({online:!1},u()))}),(0,i.useEffect)(function(){var M=navigator;if(M.connection)return v(c()({online:M.onLine},u())),M.connection.addEventListener("change",h),function(){return M.connection.removeEventListener("change",h)}},[]),d}var l=e(11527),t=function(){var r=s();return(0,l.jsxs)("div",{children:[(0,l.jsxs)("p",{children:["\u5728\u7EBF\u72B6\u6001: ",r.online?"\u5728\u7EBF":"\u79BB\u7EBF"]}),(0,l.jsxs)("p",{children:["\u7F51\u7EDC\u7C7B\u578B: ",r.type]}),(0,l.jsxs)("p",{children:["\u5B9E\u65F6\u5F80\u8FD4\u65F6\u95F4: ",r.rtt]}),(0,l.jsxs)("p",{children:["\u4E0B\u884C\u901F\u5EA6: ",r.downlink]})]})}},18409:function(R,o,e){e.r(o),e.d(o,{default:function(){return l}});var f=e(50959),c=e(28152),a=e.n(c),m=function(){return typeof document!="undefined"?f.useLayoutEffect:f.useEffect},i=m;function _(){if(typeof window=="undefined")return"undetermined";var t=window.navigator.userAgent,r=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)|(Mac)/i,n=/(Win32)|(Win64)|(Windows)|(WinCE)/i,d=/(iPhone)|(iPad)|(iPod)/i;return r.test(t)?"macos":d.test(t)?"ios":n.test(t)?"windows":/Android/i.test(t)?"android":/Linux/i.test(t)?"linux":"undetermined"}function u(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{getValueInEffect:!0},r=(0,f.useState)(t.getValueInEffect?"undetermined":_()),n=a()(r,2),d=n[0],v=n[1];return i(function(){t.getValueInEffect&&v(_)},[]),d}var s=e(11527),l=function(){var t=u({getValueInEffect:!1});return(0,s.jsxs)("div",{children:["Current operating system: ",t]})}},14629:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(68475),m=e(43497),i=e(21737),_=e(50959),u=e(60667),s=e(11527);function l(t){return new Promise(function(r,n){setTimeout(function(){Math.random()>.5?r():n(new Error("Failed to modify username"))},1e3)})}o.default=function(){var t=(0,_.useState)(""),r=c()(t,2),n=r[0],d=r[1],v=(0,u.Z)(l,{manual:!0,onSuccess:function(U,W){d(""),a.ZP.success('The username was changed to "'.concat(W[0],'" !'))},onError:function(U){a.ZP.error(U.message)}}),h=v.loading,M=v.run,O=v.cancel;return(0,s.jsxs)("div",{children:[(0,s.jsx)(m.Z,{onChange:function(U){return d(U.target.value)},value:n,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,s.jsx)(i.ZP,{disabled:h,type:"primary",onClick:function(){return M(n)},children:h?"Loading":"Edit"}),(0,s.jsx)(i.ZP,{type:"primary",onClick:O,style:{marginLeft:16},children:"Cancel"})]})}},28525:function(R,o,e){e.r(o);var f=e(60667),c=e(90674),a=e.n(c),m=e(50959),i=e(11527);function _(){return new Promise(function(u,s){setTimeout(function(){Math.random()>.5?u(a().mock("@name")):s(new Error("Failed to get username"))},1e3)})}o.default=function(){var u=(0,f.Z)(_),s=u.data,l=u.error,t=u.loading;return l?(0,i.jsx)("div",{children:l.message}):t?(0,i.jsx)("div",{children:"loading..."}):(0,i.jsxs)("div",{children:["Username: ",s]})}},12449:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(68475),i=e(43497),_=e(21737),u=e(60667),s=e(11527);function l(t){return new Promise(function(r,n){setTimeout(function(){Math.random()>.5?r():n(new Error("Failed to modify username"))},1e3)})}o.default=function(){var t=(0,a.useState)(""),r=c()(t,2),n=r[0],d=r[1],v=(0,u.Z)(l,{manual:!0,onBefore:function(C){m.ZP.info("Start Request: ".concat(C[0]))},onSuccess:function(C,U){d(""),m.ZP.success('The username was changed to "'.concat(U[0],'" !'))},onError:function(C){m.ZP.error(C.message)},onFinally:function(C,U,W){m.ZP.info("Request finish")}}),h=v.loading,M=v.run;return(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{value:n,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(C){return d(C.target.value)}}),(0,s.jsx)(_.ZP,{disabled:h,type:"primary",onClick:function(){return M(n)},children:h?"Loading":"Edit"})]})}},39482:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(68475),i=e(43497),_=e(21737),u=e(60667),s=e(11527);function l(t){return new Promise(function(r,n){setTimeout(function(){Math.random()>.5?r():n(new Error("Failed to modify username"))},1e3)})}o.default=function(){var t=(0,a.useState)(""),r=c()(t,2),n=r[0],d=r[1],v=(0,u.Z)(l,{manual:!0,onSuccess:function(C,U){d(""),m.ZP.success('The username was changed to "'.concat(U[0],'" !'))},onError:function(C){m.ZP.error(C.message)}}),h=v.loading,M=v.run;return(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{onChange:function(C){return d(C.target.value)},value:n,placeholder:"Please enter username",style:{width:240,marginRight:16}}),(0,s.jsx)(_.ZP,{disabled:h,type:"primary",onClick:function(){return M(n)},children:h?"Loading":"Edit"})]})}},5329:function(R,o,e){e.r(o);var f=e(13448),c=e.n(f),a=e(74815),m=e.n(a),i=e(28152),_=e.n(i),u=e(68475),s=e(43497),l=e(21737),t=e(50959),r=e(60667),n=e(11527);function d(v){return new Promise(function(h,M){setTimeout(function(){Math.random()>.5?h():M(new Error("Failed to modify username"))},1e3)})}o.default=function(){var v=(0,t.useState)(""),h=_()(v,2),M=h[0],O=h[1],C=(0,r.Z)(d,{manual:!0}),U=C.loading,W=C.runAsync,$=function(){var V=m()(c()().mark(function N(){return c()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.prev=0,F.next=3,W(M);case 3:O(""),u.ZP.success('The username was changed to "'.concat(M,'" !')),F.next=10;break;case 7:F.prev=7,F.t0=F.catch(0),u.ZP.error(F.t0.message);case 10:case"end":return F.stop()}},N,null,[[0,7]])}));return function(){return V.apply(this,arguments)}}();return(0,n.jsxs)("div",{children:[(0,n.jsx)(s.Z,{value:M,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(N){return O(N.target.value)}}),(0,n.jsx)(l.ZP,{disabled:U,type:"primary",onClick:$,children:U?"Loading":"Edit"})]})}},77862:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(68475),m=e(43497),i=e(21737),_=e(50959),u=e(60667),s=e(90674),l=e.n(s),t=e(11527);function r(){return new Promise(function(d){setTimeout(function(){d(l().mock("@name"))},1e3)})}function n(d){return new Promise(function(v,h){setTimeout(function(){Math.random()>.5?v():h(new Error("Failed to modify username"))},1e3)})}o.default=function(){var d=(0,_.useRef)(),v=(0,_.useState)(""),h=c()(v,2),M=h[0],O=h[1],C=(0,u.Z)(r),U=C.data,W=C.mutate,$=(0,u.Z)(n,{manual:!0,onSuccess:function(F,Y){O(""),a.ZP.success('The username was changed to "'.concat(Y[0],'" !'))},onError:function(F){a.ZP.error(F.message),W(d.current)}}),V=$.run,N=function(){d.current=U,W(M),V(M)};return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{children:["Username: ",U]}),(0,t.jsx)(m.Z,{value:M,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(F){return O(F.target.value)}}),(0,t.jsx)(i.ZP,{type:"primary",onClick:N,children:"Edit"})]})}},81771:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(60667),i=e(90674),_=e.n(i),u=e(43497),s=e(21737),l=e(11527);function t(r){return new Promise(function(n){setTimeout(function(){n(_().mock("@name"))},1e3)})}o.default=function(){var r=(0,a.useState)(""),n=c()(r,2),d=n[0],v=n[1],h=(0,m.Z)(t,{defaultParams:["1"]}),M=h.data,O=h.run,C=h.params,U=function(){O(d)};return(0,l.jsxs)("div",{children:[(0,l.jsx)(u.Z,{value:d,placeholder:"Please enter userId",style:{width:240,marginRight:16},onChange:function($){return v($.target.value)}}),(0,l.jsx)(s.ZP,{type:"primary",onClick:U,children:"GetUserName"}),(0,l.jsxs)("p",{style:{marginTop:8},children:["UserId: ",C[0]]}),(0,l.jsxs)("p",{children:["Username: ",M]})]})}},69054:function(R,o,e){e.r(o);var f=e(50959),c=e(60667),a=e(90674),m=e.n(a),i=e(21737),_=e(11527);function u(s){return console.log("use-request-refresh-id",s),new Promise(function(l){setTimeout(function(){l(m().mock("@name"))},1e3)})}o.default=function(){var s=(0,c.Z)(function(d){return u(d)},{manual:!0}),l=s.data,t=s.loading,r=s.run,n=s.refresh;return(0,f.useEffect)(function(){r(1)},[]),t?(0,_.jsx)("div",{children:"loading..."}):(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["Username: ",l]}),(0,_.jsx)(i.ZP,{onClick:n,type:"primary",children:"Refresh"})]})}},59912:function(R,o,e){e.r(o);var f=e(13448),c=e.n(f),a=e(74815),m=e.n(a),i=e(43497),_=e(60667),u=e(90674),s=e.n(u),l=e(50959),t=e(11527);function r(d){return n.apply(this,arguments)}function n(){return n=m()(c()().mark(function d(v){return c()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return console.log("debounce getEmail",v),M.abrupt("return",new Promise(function(O){setTimeout(function(){O(s().mock({"data|5":["@email"]}).data)},300)}));case 2:case"end":return M.stop()}},d)})),n.apply(this,arguments)}o.default=function(){var d=(0,_.Z)(r,{debounceWait:1e3,manual:!0}),v=d.data,h=d.loading,M=d.run;return(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Z,{placeholder:"Search Emails",onChange:function(C){return M(C.target.value)}}),h?(0,t.jsx)("p",{children:"loading"}):(0,t.jsx)("ul",{style:{marginTop:8},children:v==null?void 0:v.map(function(O){return(0,t.jsx)("li",{children:O},O)})})]})}},82861:function(R,o,e){e.r(o);var f=e(60667),c=e(90674),a=e.n(c),m=e(50959),i=e(11527);function _(){return new Promise(function(u){setTimeout(function(){u(a().mock("@name"))},1e3)})}o.default=function(){var u=(0,f.Z)(_),s=u.data,l=u.error,t=u.loading;return l?(0,i.jsx)("div",{children:"failed to load"}):t?(0,i.jsx)("div",{children:"loading..."}):(0,i.jsxs)("div",{children:["Username: ",s]})}},4895:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(68475),i=e(43497),_=e(21737),u=e(60667),s=e(11527);function l(t){return new Promise(function(r){setTimeout(function(){r({success:!0})},1e3)})}o.default=function(){var t=(0,a.useState)(""),r=c()(t,2),n=r[0],d=r[1],v=(0,u.Z)(l,{manual:!0,onSuccess:function(C,U){C.success&&(d(""),m.ZP.success('The username was changed to "'.concat(U[0],'" !')))}}),h=v.loading,M=v.run;return(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{value:n,placeholder:"Please enter username",style:{width:240,marginRight:16},onChange:function(C){return d(C.target.value)}}),(0,s.jsx)(_.ZP,{disabled:h,type:"primary",onClick:function(){return M(n)},children:h?"Loading":"Edit"})]})}},28963:function(R,o,e){e.r(o);var f=e(21737),c=e(60667),a=e(90674),m=e.n(a),i=e(50959),_=e(11527);function u(){return console.log("polling getUsername"),new Promise(function(s){setTimeout(function(){s(m().mock("@name"))},1e3)})}o.default=function(){var s=(0,c.Z)(u,{pollingInterval:1e3,pollingWhenHidden:!1}),l=s.data,t=s.loading,r=s.run,n=s.cancel;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("p",{children:["Username: ",t?"Loading":l]}),(0,_.jsx)(f.ZP,{type:"primary",onClick:r,children:"start"}),(0,_.jsx)(f.ZP,{onClick:n,style:{marginLeft:16},children:"stop"})]})}},58162:function(R,o,e){e.r(o);var f=e(68475),c=e(21737),a=e(60667),m=e(90674),i=e.n(m),_=e(50959),u=e(11527);function s(){return console.log("polling getUsername Error"),new Promise(function(l,t){setTimeout(function(){t(new Error(i().mock("@name")))},1e3)})}o.default=function(){var l=(0,a.Z)(s,{pollingInterval:1e3,pollingWhenHidden:!1,pollingErrorRetryCount:3,manual:!0,onError:function(h){f.ZP.error(h.message)}}),t=l.data,r=l.loading,n=l.run,d=l.cancel;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("p",{children:["Username: ",r?"Loading":t]}),(0,u.jsx)(c.ZP,{type:"primary",onClick:n,children:"start"}),(0,u.jsx)(c.ZP,{onClick:d,style:{marginLeft:16},children:"stop"})]})}},56235:function(R,o,e){e.r(o),e.d(o,{default:function(){return l}});var f=e(28152),c=e.n(f),a=e(21737),m=e(50959),i=e(7790),_=function(r){var n=(0,m.useState)(r),d=c()(n,2),v=d[0],h=d[1],M=(0,i.Z)(function(){h(r)});return[v,h,M]},u=_,s=e(11527),l=function(){var t=u({hello:"",count:0}),r=c()(t,3),n=r[0],d=r[1],v=r[2];return(0,s.jsxs)("div",{children:[(0,s.jsx)("pre",{children:JSON.stringify(n,null,2)}),(0,s.jsxs)("p",{children:[(0,s.jsx)(a.ZP,{style:{marginRight:"8px"},onClick:function(){return d({hello:"world",count:1})},children:"set hello and count"}),(0,s.jsx)(a.ZP,{onClick:v,children:"resetState"})]})]})}},18271:function(R,o,e){e.r(o),e.d(o,{default:function(){return l}});var f=e(28152),c=e.n(f),a=e(50959),m=e(7790);function i(t){var r=function(){return new Set(t)},n=(0,a.useState)(r),d=c()(n,2),v=d[0],h=d[1],M=(0,m.Z)(function(U){v.has(U)||h(function(W){var $=new Set(W);return $.add(U),$})}),O=(0,m.Z)(function(U){v.has(U)&&h(function(W){var $=new Set(W);return $.delete(U),$})}),C=(0,m.Z)(function(){return h(r())});return[v,{add:M,remove:O,reset:C}]}var _=i,u=e(21737),s=e(11527),l=function(){var t=_(["Hello"]),r=c()(t,2),n=r[0],d=r[1],v=d.add,h=d.remove,M=d.reset;return(0,s.jsxs)("div",{children:[(0,s.jsx)(u.ZP,{type:"primary",onClick:function(){return v(String(Date.now()))},children:"Add Timestamp"}),(0,s.jsx)(u.ZP,{type:"primary",onClick:function(){return h("Hello")},disabled:!n.has("Hello"),style:{margin:"0 8px"},children:"Remove Hello"}),(0,s.jsx)(u.ZP,{type:"primary",onClick:function(){return M()},children:"Reset"}),(0,s.jsx)("div",{style:{marginTop:16},children:(0,s.jsx)("pre",{children:JSON.stringify(Array.from(n),null,2)})})]})}},84933:function(R,o,e){e.r(o),e.d(o,{default:function(){return l}});var f=e(28152),c=e.n(f),a=e(43497),m=e(50959),i=e(40477);function _(t,r){var n=(0,m.useState)(t),d=c()(n,2),v=d[0],h=d[1],M=(0,i.Z)(function(){h(t)},r),O=M.run;return(0,m.useEffect)(function(){O()},[t]),v}var u=_,s=e(11527),l=function(){var t=(0,m.useState)(),r=c()(t,2),n=r[0],d=r[1],v=u(n,{wait:500});return(0,s.jsxs)("div",{children:[(0,s.jsx)(a.Z,{value:n,style:{width:280},placeholder:"Typed value",onChange:function(M){return d(M.target.value)}}),(0,s.jsxs)("p",{className:"mt-4",children:["throttledValue: ",v]})]})}},45426:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(21737),m=e(40477),i=e(50959),_=e(11527);o.default=function(){var u=(0,i.useState)(0),s=c()(u,2),l=s[0],t=s[1],r=(0,m.Z)(function(){t(l+1)},{wait:500}),n=r.run;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{className:"mt-4",children:[" Clicked count: ",l," "]}),(0,_.jsx)(a.ZP,{onClick:n,children:"Click fast!"})]})}},15349:function(R,o,e){e.r(o),e.d(o,{default:function(){return s}});var f=e(50959),c=e(12929),a=e(71580),m={restorePrevTitle:!1};function i(l){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m,r=(0,f.useRef)(a.Z?document.title:"");(0,f.useEffect)(function(){l.trim().length>0&&(document.title=l)},[l]),(0,c.Z)(function(){t.restorePrevTitle&&(document.title=r.current)})}var _=i,u=e(11527),s=function(){return _("Page Title"),(0,u.jsx)("div",{children:(0,u.jsx)("p",{children:"Set title of this page."})})}},73451:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(22093),i=e(21737),_=e(11527);o.default=function(){var u=(0,m.Z)(),s=c()(u,2),l=s[0],t=s[1],r=t.toggle,n=t.setLeft,d=t.setRight;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["\u5F53\u524D\u7684 state \u7684\u503C\u4E3A: ","".concat(l)]}),(0,_.jsxs)("p",{children:[(0,_.jsx)(i.ZP,{onClick:r,children:"toggle\u5207\u6362"}),(0,_.jsx)(i.ZP,{onClick:n,children:"setLeft\u5207\u6362"}),(0,_.jsx)(i.ZP,{onClick:d,children:"setRight\u5207\u6362"})]})]})}},18755:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(50959),m=e(22093),i=e(21737),_=e(11527);o.default=function(){var u=(0,m.Z)("OOR","Aimyon"),s=c()(u,2),l=s[0],t=s[1],r=t.toggle,n=t.set,d=t.setLeft,v=t.setRight;return(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{children:["Effects\uFF1A",l]}),(0,_.jsxs)("p",{children:[(0,_.jsx)(i.ZP,{type:"primary",onClick:r,children:"Toggle"}),(0,_.jsx)(i.ZP,{type:"primary",style:{margin:"0 8px"},onClick:function(){return n("OOR")},children:"Set OOR"}),(0,_.jsx)(i.ZP,{type:"primary",onClick:function(){return n("Aimyon")},children:"Set Aimyon"}),(0,_.jsx)(i.ZP,{type:"primary",onClick:d,style:{margin:"0 8px"},children:"setLeft"}),(0,_.jsx)(i.ZP,{type:"primary",onClick:v,children:"setRight"})]})]})}},25116:function(R,o,e){e.r(o);var f=e(28152),c=e.n(f),a=e(12929),m=e(66721),i=e(68475),_=e(50959),u=e(11527),s=function(){return(0,a.Z)(function(){i.ZP.info("Component unmount")}),(0,u.jsx)("p",{children:"Et cetera!!!"})};o.default=function(){var l=(0,m.Z)(!0),t=c()(l,2),r=t[0],n=t[1].toggle;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("button",{type:"button",onClick:n,children:r?"unmount":"mount"}),r&&(0,u.jsx)(s,{})]})}},58825:function(R,o,e){e.r(o),e.d(o,{default:function(){return r}});var f=e(28152),c=e.n(f),a=e(50959),m=function(){var d=(0,a.useRef)(!1);return(0,a.useEffect)(function(){return d.current=!1,function(){d.current=!0}},[]),d},i=m,_=e(66721),u=e(68475),s=e(21737),l=e(11527),t=function(){var d=i();return(0,a.useEffect)(function(){setTimeout(function(){d.current||u.ZP.info("component is alive")},3e3)},[]),(0,l.jsx)("p",{children:"Hello World!"})},r=function(){var n=(0,_.Z)(!0),d=c()(n,2),v=d[0],h=d[1].toggle;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.ZP,{type:"primary",onClick:h,children:v?"unmount":"mount"}),v&&(0,l.jsx)(t,{})]})}},9007:function(R,o,e){e.r(o);var f=e(50959),c=e(14327),a=e(21737),m=e(11527);o.default=function(){var i=(0,c.Z)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{children:["Time: ",Date.now()]}),(0,m.jsx)(a.ZP,{type:"primary",onClick:i,style:{marginTop:8},children:"update"})]})}},53011:function(R,o,e){e.r(o);var f=e(73721),c=e(50959),a=e(11527);o.default=function(){return(0,f.Z)("resize",function(m){console.log("\u7A97\u53E3\u5927\u5C0F\u5DF2\u66F4\u6539",m)}),(0,f.Z)("myCustomEvent",function(m){console.log("\u81EA\u5B9A\u4E49\u4E8B\u4EF6\u89E6\u53D1",m)}),(0,a.jsx)("div",{children:"\u793A\u4F8B\u7EC4\u4EF6"})}},66721:function(R,o,e){e.d(o,{Z:function(){return _}});var f=e(28152),c=e.n(f),a=e(50959),m=e(22093),i=e(83350);function _(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;(0,i.Z)(u)||(u=!1);var s=(0,m.Z)(u),l=c()(s,2),t=l[0],r=l[1],n=r.toggle,d=r.set,v=(0,a.useMemo)(function(){var h=function(){return d(!0)},M=function(){return d(!1)};return{toggle:n,setTrue:h,setFalse:M,set:function(C){return d(C)}}},[]);return[t,v]}},56973:function(R,o,e){e.d(o,{Z:function(){return a}});var f=e(50959);function c(m,i){if(m===i)return!0;for(var _=0;_-1&&(j=setTimeout(function(){d.delete(E)},P)),d.set(E,n()(n()({},D),{},{timer:j}))},h=function(E){return d.get(E)},M=function(E){if(E){var P=Array.isArray(E)?E:[E];P.forEach(function(D){return d.delete(D)})}else d.clear()},O=new Map,C=function(E){return O.get(E)},U=function(E,P){O.set(E,P),P.then(function(D){return O.delete(E),D}).catch(function(){O.delete(E)})},W={},$=function(E,P){W[E]&&W[E].forEach(function(D){return D(P)})},V=function(E,P){return W[E]||(W[E]=[]),W[E].push(P),function(){var A=W[E].indexOf(P);W[E].splice(A,1)}},N=function(E,P){var D=P.cacheKey,A=P.cacheTime,j=A===void 0?5*60*1e3:A,T=P.staleTime,y=T===void 0?0:T,B=P.setCache,L=P.getCache,g=(0,a.useRef)(),I=(0,a.useRef)(),S=function(b,K){B?B(K):v(b,j,K),$(b,K.data)},H=function(b){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return L?L(K):h(b)};return(0,l.Z)(function(){if(D){var x=H(D);x&&Object.hasOwnProperty.call(x,"data")&&(E.state.data=x.data,E.state.params=x.params,(y===-1||new Date().getTime()-x.time<=y)&&(E.state.loading=!1)),g.current=V(D,function(b){E.setState({data:b})})}},[]),(0,t.Z)(function(){var x;(x=g.current)===null||x===void 0||x.call(g)}),D?{onBefore:function(b){var K=H(D,b);return!K||!Object.hasOwnProperty.call(K,"data")?{}:y===-1||new Date().getTime()-K.time<=y?{loading:!1,data:K==null?void 0:K.data,error:void 0,returnNow:!0}:{data:K==null?void 0:K.data,error:void 0}},onRequest:function(b,K){var k=C(D);return k&&k!==I.current?{servicePromise:k}:(k=b.apply(void 0,c()(K)),I.current=k,U(D,k),{servicePromise:k})},onSuccess:function(b,K){if(D){var k;(k=g.current)===null||k===void 0||k.call(g),S(D,{data:b,params:K,time:new Date().getTime()}),g.current=V(D,function(ne){E.setState({data:ne})})}},onMutate:function(b){if(D){var K;(K=g.current)===null||K===void 0||K.call(g),S(D,{data:b,params:E.state.params,time:new Date().getTime()}),g.current=V(D,function(k){E.setState({data:k})})}}}:{}},z=N,F=e(16116),Y=function(E,P){var D=P.debounceWait,A=P.debounceLeading,j=P.debounceTrailing,T=P.debounceMaxWait,y=(0,a.useRef)(),B=(0,a.useMemo)(function(){var L={};return A!==void 0&&(L.leading=A),j!==void 0&&(L.trailing=j),T!==void 0&&(L.maxWait=T),L},[A,j,T]);return(0,a.useEffect)(function(){if(D){var L=E.runAsync.bind(E);return y.current=(0,F.Z)(function(g){g()},D,B),E.runAsync=function(){for(var g=arguments.length,I=new Array(g),S=0;S-1&&ee.splice(P,1)}}if(X.Z){var ue=function(){if(!(!w()||!me()))for(var E=0;E3&&arguments[3]!==void 0?arguments[3]:{};We()(this,p),oe()(this,"count",0),oe()(this,"pluginImpls",void 0),oe()(this,"state",{loading:!1,params:void 0,data:void 0,error:void 0}),this.serviceRef=E,this.options=P,this.subscribe=D,this.initState=A,this.state=n()(n()({},this.state),{},{loading:!P.manual},A)}return Se()(p,[{key:"cancel",value:function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")}},{key:"run",value:function(){var P=this;this.runAsync.apply(this,arguments).catch(function(D){P.options.onError||console.error(D)})}},{key:"runAsync",value:function(){var E=pe()(ae()().mark(function D(){var A,j,T,y,B,L,g,I,S,H,x,b,K,k,ne=arguments;return ae()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:for(this.count+=1,A=this.count,j=ne.length,T=new Array(j),y=0;y1?D-1:0),j=1;j0&&arguments[0]!==void 0?arguments[0]:{};this.state=n()(n()({},this.state),P),this.subscribe()}}]),p}(),ke=["manual"],$e=function(E){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],A=P.manual,j=A===void 0?!1:A,T=se()(P,ke);Le.Z&&P.defaultParams&&!Array.isArray(P.defaultParams)&&console.warn("expected defaultParams is array, but got ".concat(Te()(P.defaultParams)));var y=n()({manual:j},T),B=(0,Ae.Z)(E),L=(0,je.Z)(),g=(0,l.Z)(function(){var I=D.map(function(S){var H;return S==null||(H=S.onInit)===null||H===void 0?void 0:H.call(S,y)}).filter(Boolean);return new Fe(B,y,L,Object.assign.apply(Object,[{}].concat(c()(I))))},[]);return g.options=y,g.pluginImpls=D.map(function(I){return I(g,y)}),(0,ye.Z)(function(){if(!j){var I=g.state.params||P.defaultParams||[];g.run.apply(g,c()(I))}}),(0,t.Z)(function(){g.cancel()}),{data:g.state.data,loading:g.state.loading,run:(0,q.Z)(g.run.bind(g)),runAsync:(0,q.Z)(g.runAsync.bind(g)),error:g.state.error,params:g.state.params||[],cancel:(0,q.Z)(g.cancel.bind(g)),mutate:(0,q.Z)(g.mutate.bind(g)),refresh:(0,q.Z)(g.refresh.bind(g)),refreshAsync:(0,q.Z)(g.refreshAsync.bind(g))}},He=$e,Ve=function(E,P,D){return He(E,P,[].concat(c()(D||[]),[Me,z,s,de,Q,ge,te,he]))},Ne=Ve,ze=Ne},40477:function(R,o,e){var f=e(27566),c=e.n(f),a=e(20057),m=e(50959),i=e(66476),_=e(12929),u=e(79841),s=e(76139);function l(t,r){var n;s.Z&&((0,u.mf)(t)||console.error("useThrottleFn expected parameter is a function, got ".concat(c()(t))));var d=(0,i.Z)(t),v=(n=r==null?void 0:r.wait)!==null&&n!==void 0?n:1e3,h=(0,m.useMemo)(function(){return(0,a.Z)(function(){return d.current.apply(d,arguments)},v,r)},[]);return(0,_.Z)(function(){h.cancel()}),{run:h,cancel:h.cancel,flush:h.flush}}o.Z=l},22093:function(R,o,e){var f=e(28152),c=e.n(f),a=e(50959);function m(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_=arguments.length>1?arguments[1]:void 0,u=(0,a.useState)(i),s=c()(u,2),l=s[0],t=s[1],r=(0,a.useMemo)(function(){var n=_===void 0?!i:_,d=function(){return t(function(C){return C===i?n:i})},v=function(C){return t(C)},h=function(){return t(i)},M=function(){return t(n)};return{set:v,toggle:d,setLeft:h,setRight:M}},[]);return[l,r]}o.Z=m},12929:function(R,o,e){var f=e(27566),c=e.n(f),a=e(50959),m=e(66476),i=e(79841),_=e(76139),u=function(l){_.Z&&((0,i.mf)(l)||console.error("useUnmount expected parameter is a function, but got ".concat(c()(l))));var t=(0,m.Z)(l);(0,a.useEffect)(function(){return function(){return t.current()}},[])};o.Z=u},14327:function(R,o,e){var f=e(28152),c=e.n(f),a=e(50959),m=function(){var _=(0,a.useState)({}),u=c()(_,2),s=u[1];return(0,a.useCallback)(function(){return s({})},[])};o.Z=m},73721:function(R,o,e){e.d(o,{Z:function(){return c}});var f=e(50959);function c(a,m,i){(0,f.useEffect)(function(){return window.addEventListener(a,m,i),function(){return window.removeEventListener(a,m,i)}},[a,m])}},79841:function(R,o,e){e.d(o,{mf:function(){return m}});var f=e(27566),c=e.n(f),a=function(t){return t!==null&&_typeof(t)==="object"},m=function(t){return typeof t=="function"},i=function(t){return typeof t=="string"},_=function(t){return typeof t=="boolean"},u=function(t){return typeof t=="number"},s=function(t){return typeof t=="undefined"}},71580:function(R,o){var e=!!(typeof window!="undefined"&&window.document&&window.document.createElement);o.Z=e},76139:function(R,o){var e=!1;o.Z=e}}]); diff --git a/dumi__tmp-production__dumi__theme__ContextWrapper.818538dc.async.js b/dumi__tmp-production__dumi__theme__ContextWrapper.ba813b55.async.js similarity index 60% rename from dumi__tmp-production__dumi__theme__ContextWrapper.818538dc.async.js rename to dumi__tmp-production__dumi__theme__ContextWrapper.ba813b55.async.js index 899d697..59234b3 100644 --- a/dumi__tmp-production__dumi__theme__ContextWrapper.818538dc.async.js +++ b/dumi__tmp-production__dumi__theme__ContextWrapper.ba813b55.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[923],{24986:function(g,s,e){e.r(s),e.d(s,{default:function(){return d}});var u=e(28152),r=e.n(u),t=e(50959),o=e(64205),h=e(50807),l=e(52678),a=e(14078),k=e(11527),c={};function d(){var m=(0,o.pC)(),f=(0,t.useState)(!1),n=r()(f,2),p=n[0],E=n[1],i=(0,t.useRef)(o.m8.location.pathname);return(0,t.useEffect)(function(){return o.m8.listen(function(_){_.location.pathname!==i.current&&(i.current=_.location.pathname,document.documentElement.scrollTo(0,0))})},[]),(0,k.jsx)(h.D.Provider,{value:{pkg:{name:"etc-hooks",description:"",version:"1.0.0",license:"ISC",author:""},historyType:"browser",entryExports:c,demos:l.DE,components:l.wx,locales:a.k,loading:p,setLoading:E,hostname:void 0,themeConfig:{logo:"/etc-hooks/short-logo.png",title:"Etcetera hooks",footer:'Powered by etcetera',prefersColor:{default:"light",switch:!0},nprogress:!0,lastUpdated:!0,nav:[{title:"\u6307\u5357",link:"/guide"},{title:"Hooks",link:"/hooks/index"},{title:"GitHub",link:"https://github.com/AmbitionsXXXV/etc-hooks"}],sidebar:{"/":[{title:"\u9996\u9875",children:[{title:"\u9996\u9875",link:"/"}]}],"/guide":[{title:"\u4ECB\u7ECD",children:[{title:"\u4ECB\u7ECD",link:"/guide"}]}],"/hooks":[{title:"\u8BF7\u6C42",children:[{title:"\u5FEB\u901F\u4E0A\u624B",link:"/hooks/index"},{title:"\u57FA\u672C\u7528\u6CD5",link:"/hooks/basic"},{title:"\u9632\u6296",link:"/hooks/debounce"},{title:"\u8F6E\u8BAD",link:"/hooks/polling"}]},{title:"\u751F\u547D\u5468\u671F",link:"/hooks",children:[{title:"useCallbackRef",link:"/hooks/use-callback-ref"},{title:"useMount",link:"/hooks/use-mount"},{title:"useUnmount",link:"/hooks/use-unmount"},{title:"useUnmountRef",link:"/hooks/use-unmount-ref"}]},{title:"\u72B6\u6001",children:[{title:"useBoolean",link:"/hooks/use-boolean"},{title:"useCounter",link:"/hooks/use-counter"},{title:"useDebounce",link:"/hooks/use-debounce"},{title:"useResetState",link:"/hooks/use-reset-state"},{title:"useSet",link:"/hooks/use-set"},{title:"useThrottle",link:"/hooks/use-throttle"},{title:"useToggle",link:"/hooks/use-toggle"},{title:"useUpdate",link:"/hooks/use-update"}]},{title:"DOM",children:[{title:"useTitle",link:"/hooks/use-title"},{title:"useColorSchema",link:"/hooks/use-color-schema"}]},{title:"Effect",children:[{title:"useDebounceFn",link:"/hooks/use-debounce-fn"},{title:"useThrottleFn",link:"/hooks/use-throttle-fn"},{title:"useUpdateEffect",link:"/hooks/use-update-effect"}]},{title:"\u8FDB\u9636\u5DE5\u5177 hooks",children:[{title:"useAntPagination",link:"/hooks/use-ant-pagination"},{title:"useClipboard",link:"/hooks/use-clipboard"},{title:"useLatest",link:"/hooks/use-latest"},{title:"useMemoizedFn",link:"/hooks/use-memoized-fn"},{title:"useOs",link:"/hooks/use-os"}]}]}},_2_level_nav_available:!0},children:m})}}}]); +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[923],{24986:function(g,s,e){e.r(s),e.d(s,{default:function(){return c}});var _=e(28152),r=e.n(_),t=e(50959),o=e(64205),h=e(50807),n=e(14836),k=e(14078),a=e(11527),d={};function c(){var m=(0,o.pC)(),f=(0,t.useState)(!1),l=r()(f,2),E=l[0],p=l[1],i=(0,t.useRef)(o.m8.location.pathname);return(0,t.useEffect)(function(){return o.m8.listen(function(u){u.location.pathname!==i.current&&(i.current=u.location.pathname,document.documentElement.scrollTo(0,0))})},[]),(0,a.jsx)(h.D.Provider,{value:{pkg:{name:"etc-hooks",description:"",version:"1.0.0",license:"ISC",author:""},historyType:"browser",entryExports:d,demos:n.DE,components:n.wx,locales:k.k,loading:E,setLoading:p,hostname:void 0,themeConfig:{logo:"/etc-hooks/short-logo.png",title:"Etcetera hooks",footer:'Powered by etcetera',prefersColor:{default:"light",switch:!0},nprogress:!0,lastUpdated:!0,nav:[{title:"\u6307\u5357",link:"/guide"},{title:"Hooks",link:"/hooks/index"},{title:"GitHub",link:"https://github.com/AmbitionsXXXV/etc-hooks"}],sidebar:{"/":[{title:"\u9996\u9875",children:[{title:"\u9996\u9875",link:"/"}]}],"/guide":[{title:"\u4ECB\u7ECD",children:[{title:"\u4ECB\u7ECD",link:"/guide"}]}],"/hooks":[{title:"\u8BF7\u6C42",children:[{title:"\u5FEB\u901F\u4E0A\u624B",link:"/hooks/index"},{title:"\u57FA\u672C\u7528\u6CD5",link:"/hooks/basic"},{title:"\u9632\u6296",link:"/hooks/debounce"},{title:"\u8F6E\u8BAD",link:"/hooks/polling"}]},{title:"\u751F\u547D\u5468\u671F",link:"/hooks",children:[{title:"useCallbackRef",link:"/hooks/use-callback-ref"},{title:"useMount",link:"/hooks/use-mount"},{title:"useUnmount",link:"/hooks/use-unmount"},{title:"useUnmountRef",link:"/hooks/use-unmount-ref"}]},{title:"\u72B6\u6001",children:[{title:"useBoolean",link:"/hooks/use-boolean"},{title:"useCounter",link:"/hooks/use-counter"},{title:"useDebounce",link:"/hooks/use-debounce"},{title:"useResetState",link:"/hooks/use-reset-state"},{title:"useSet",link:"/hooks/use-set"},{title:"useThrottle",link:"/hooks/use-throttle"},{title:"useToggle",link:"/hooks/use-toggle"},{title:"useUpdate",link:"/hooks/use-update"}]},{title:"DOM",children:[{title:"useTitle",link:"/hooks/use-title"},{title:"useColorSchema",link:"/hooks/use-color-schema"},{title:"useWindowEvent",link:"/hooks/use-window-event"}]},{title:"Effect",children:[{title:"useDebounceFn",link:"/hooks/use-debounce-fn"},{title:"useThrottleFn",link:"/hooks/use-throttle-fn"},{title:"useUpdateEffect",link:"/hooks/use-update-effect"}]},{title:"\u8FDB\u9636\u5DE5\u5177 hooks",children:[{title:"useAntPagination",link:"/hooks/use-ant-pagination"},{title:"useClipboard",link:"/hooks/use-clipboard"},{title:"useLatest",link:"/hooks/use-latest"},{title:"useMemoizedFn",link:"/hooks/use-memoized-fn"},{title:"useNetwork",link:"/hooks/use-network"},{title:"useOs",link:"/hooks/use-os"}]}]}},_2_level_nav_available:!0},children:m})}}}]); diff --git a/guide/index.html b/guide/index.html index 531d00c..cada7b3 100644 --- a/guide/index.html +++ b/guide/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/basic/index.html b/hooks/basic/index.html index 531d00c..cada7b3 100644 --- a/hooks/basic/index.html +++ b/hooks/basic/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/debounce/index.html b/hooks/debounce/index.html index 531d00c..cada7b3 100644 --- a/hooks/debounce/index.html +++ b/hooks/debounce/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/index/index.html b/hooks/index/index.html index 531d00c..cada7b3 100644 --- a/hooks/index/index.html +++ b/hooks/index/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/polling/index.html b/hooks/polling/index.html index 531d00c..cada7b3 100644 --- a/hooks/polling/index.html +++ b/hooks/polling/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-ant-pagination/index.html b/hooks/use-ant-pagination/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-ant-pagination/index.html +++ b/hooks/use-ant-pagination/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-boolean/index.html b/hooks/use-boolean/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-boolean/index.html +++ b/hooks/use-boolean/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-callback-ref/index.html b/hooks/use-callback-ref/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-callback-ref/index.html +++ b/hooks/use-callback-ref/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-clipboard/index.html b/hooks/use-clipboard/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-clipboard/index.html +++ b/hooks/use-clipboard/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-color-schema/index.html b/hooks/use-color-schema/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-color-schema/index.html +++ b/hooks/use-color-schema/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-counter/index.html b/hooks/use-counter/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-counter/index.html +++ b/hooks/use-counter/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-creation/index/index.html b/hooks/use-creation/index/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-creation/index/index.html +++ b/hooks/use-creation/index/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-debounce-fn/index.html b/hooks/use-debounce-fn/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-debounce-fn/index.html +++ b/hooks/use-debounce-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-debounce/index.html b/hooks/use-debounce/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-debounce/index.html +++ b/hooks/use-debounce/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-latest/index.html b/hooks/use-latest/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-latest/index.html +++ b/hooks/use-latest/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-memoized-fn/index.html b/hooks/use-memoized-fn/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-memoized-fn/index.html +++ b/hooks/use-memoized-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-mount/index.html b/hooks/use-mount/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-mount/index.html +++ b/hooks/use-mount/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-network/index.html b/hooks/use-network/index.html new file mode 100644 index 0000000..cada7b3 --- /dev/null +++ b/hooks/use-network/index.html @@ -0,0 +1,12 @@ + + + + +Etcetera hooks + + + +
+ + + \ No newline at end of file diff --git a/hooks/use-os/index.html b/hooks/use-os/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-os/index.html +++ b/hooks/use-os/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-reset-state/index.html b/hooks/use-reset-state/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-reset-state/index.html +++ b/hooks/use-reset-state/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-set/index.html b/hooks/use-set/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-set/index.html +++ b/hooks/use-set/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-throttle-fn/index.html b/hooks/use-throttle-fn/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-throttle-fn/index.html +++ b/hooks/use-throttle-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-throttle/index.html b/hooks/use-throttle/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-throttle/index.html +++ b/hooks/use-throttle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-title/index.html b/hooks/use-title/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-title/index.html +++ b/hooks/use-title/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-toggle/index.html b/hooks/use-toggle/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-toggle/index.html +++ b/hooks/use-toggle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-unmount-ref/index.html b/hooks/use-unmount-ref/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-unmount-ref/index.html +++ b/hooks/use-unmount-ref/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-unmount/index.html b/hooks/use-unmount/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-unmount/index.html +++ b/hooks/use-unmount/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-update-effect/index.html b/hooks/use-update-effect/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-update-effect/index.html +++ b/hooks/use-update-effect/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-update/index.html b/hooks/use-update/index.html index 531d00c..cada7b3 100644 --- a/hooks/use-update/index.html +++ b/hooks/use-update/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-window-event/index.html b/hooks/use-window-event/index.html new file mode 100644 index 0000000..cada7b3 --- /dev/null +++ b/hooks/use-window-event/index.html @@ -0,0 +1,12 @@ + + + + +Etcetera hooks + + + +
+ + + \ No newline at end of file diff --git a/index.html b/index.html index 531d00c..cada7b3 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/packages__hooks__src__useNetwork__index.md.778c6473.chunk.css b/packages__hooks__src__useNetwork__index.md.778c6473.chunk.css new file mode 100644 index 0000000..563c5c9 --- /dev/null +++ b/packages__hooks__src__useNetwork__index.md.778c6473.chunk.css @@ -0,0 +1 @@ +.dumi-default-table{margin:24px 0 32px;transform:translate(0)}.dumi-default-table-content{overflow:auto}.dumi-default-table-content:before,.dumi-default-table-content:after{content:"";display:block;position:fixed;z-index:1;top:0;bottom:0;width:6px;pointer-events:none}.dumi-default-table-content[data-left-folded]:before{left:0;background-image:linear-gradient(to right,rgba(0,0,0,.1),rgba(0,0,0,0))}[data-prefers-color=dark] .dumi-default-table-content[data-left-folded]:before{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.dumi-default-table-content[data-right-folded]:after{right:0;background-image:linear-gradient(to left,rgba(0,0,0,.1),rgba(0,0,0,0))}[data-prefers-color=dark] .dumi-default-table-content[data-right-folded]:after{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.dumi-default-table-content>table>thead>tr>th,.dumi-default-table-content>table>tr>th{white-space:nowrap}.dumi-default-badge{display:inline-block;margin-inline-start:2px;padding:1px 8px;font-size:12px;font-weight:400;line-height:20px;border-radius:4px;vertical-align:top}.dumi-default-badge:not([type]),.dumi-default-badge[type=info]{color:#1677ff;background:#e2eeff}[data-prefers-color=dark] .dumi-default-badge:not([type]),[data-prefers-color=dark] .dumi-default-badge[type=info]{color:#1677ff;background:#002962}.dumi-default-badge[type=warning]{color:#d59200;background:#ffefcb}[data-prefers-color=dark] .dumi-default-badge[type=warning]{color:#d59200;background:#231800}.dumi-default-badge[type=success]{color:#208a41;background:#cbf3d7}[data-prefers-color=dark] .dumi-default-badge[type=success]{color:#208a41;background:#092712}.dumi-default-badge[type=error]{color:#ce1f31;background:#fbe2e5}[data-prefers-color=dark] .dumi-default-badge[type=error]{color:#ce1f31;background:#3c090e}.dumi-default-tree{padding:16px;margin:24px 0 32px;background:#fbfcfd;border:1px solid #e4e9ec;border-radius:2px;color:#30363f;overflow-y:auto}[data-prefers-color=dark] .dumi-default-tree{color:#c6c9cd;background:#020305;border-color:#1c2022}.dumi-default-tree small{padding-left:24px;color:#616d7f;font-size:14px;white-space:nowrap}[data-prefers-color=dark] .dumi-default-tree small{color:#616d7f}.dumi-default-tree small:before{content:"# "}.dumi-default-tree.rc-tree{transition:all .3s;line-height:1.5715;list-style:none;font-size:14px}.dumi-default-tree.rc-tree .rc-tree-treenode{position:relative;display:flex;align-items:flex-start}.dumi-default-tree.rc-tree .rc-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background .3s;content:""}.dumi-default-tree.rc-tree .rc-tree-treenode:hover:before{background:#eeeff0}[data-prefers-color=dark] .dumi-default-tree.rc-tree .rc-tree-treenode:hover:before{background:#1c1d1e}.dumi-default-tree.rc-tree .rc-tree-treenode>*{z-index:1}.dumi-default-tree.rc-tree .rc-tree-treenode span.rc-tree-switcher{display:flex;align-items:center;justify-content:center;width:24px;height:28px;margin-right:2px;line-height:28px;background:transparent;cursor:pointer;flex-shrink:0}.dumi-default-tree.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{flex:auto;min-height:28px;margin:0;padding:0 4px;line-height:28px;cursor:pointer;white-space:nowrap}.dumi-default-tree.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper .rc-tree-iconEle{margin-right:6px;vertical-align:0}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent{display:inline-block;height:0;vertical-align:bottom;flex-shrink:0}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit{position:relative;display:inline-block;width:24px;height:28px}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit-end:before{display:none}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%;text-align:center}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line:before{position:absolute;top:0;bottom:-4px;margin-left:-1px;border-left:1px solid #d9d9d9;content:" "}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line:after{position:absolute;top:0;bottom:14px;width:12px;margin-left:-1px;border-bottom:1px solid #d9d9d9;content:" "}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-treenode-leaf-last .tree-switcher-leaf-line:before{height:14px}.dumi-default-tree-icon{width:16px;color:#30363f;vertical-align:-.225em;display:inline-block}[data-prefers-color=dark] .dumi-default-tree-icon{color:#c6c9cd}.ant-motion-collapse{overflow:hidden;transition:height .2s ease-in-out,opacity .2s ease-in-out!important} diff --git a/packages__hooks__src__useNetwork__index.md.ce2305fc.async.js b/packages__hooks__src__useNetwork__index.md.ce2305fc.async.js new file mode 100644 index 0000000..7bf2c34 --- /dev/null +++ b/packages__hooks__src__useNetwork__index.md.ce2305fc.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[529],{86435:function(i,l,s){s.r(l);var u=s(1261),a=s(49014),c=s(13111),r=s(87007),t=s(16744),h=s(30899),x=s(55174),d=s(64205),m=s(50959),_=s(11527);function n(){var o=(0,d.eL)(),e=o.texts;return(0,_.jsx)(d.dY,{children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"markdown",children:[(0,_.jsxs)("h1",{id:"usenetwork",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#usenetwork",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"useNetwork"]}),(0,_.jsxs)("p",{children:[(0,_.jsx)("code",{children:e[0].value}),e[1].value]}),(0,_.jsxs)("h2",{id:"api",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#api",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"API"]}),(0,_.jsxs)("p",{children:[e[2].value,(0,_.jsx)("code",{children:e[3].value}),e[4].value]}),(0,_.jsxs)("ul",{children:[(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[5].value}),e[6].value,(0,_.jsx)("code",{children:e[7].value}),e[8].value]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[9].value}),e[10].value,(0,_.jsx)("code",{children:e[11].value}),e[12].value]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[13].value}),e[14].value,(0,_.jsx)("code",{children:e[15].value}),e[16].value]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[17].value}),e[18].value,(0,_.jsx)("code",{children:e[19].value}),e[20].value]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[21].value}),e[22].value,(0,_.jsx)("code",{children:e[23].value}),e[24].value]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[25].value}),e[26].value,(0,_.jsx)("code",{children:e[27].value}),e[28].value]}),(0,_.jsxs)("li",{children:[(0,_.jsx)("code",{children:e[29].value}),e[30].value,(0,_.jsx)("code",{children:e[31].value}),e[32].value]})]}),(0,_.jsxs)("h2",{id:"\u793A\u4F8B\u7528\u6CD5",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#\u793A\u4F8B\u7528\u6CD5",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"\u793A\u4F8B\u7528\u6CD5"]})]}),(0,_.jsx)(d.Dl,{demo:{id:"packages-hooks-src-use-network-demo-example"},previewerProps:{filename:"packages/hooks/src/useNetwork/example/example.tsx"}}),(0,_.jsx)("div",{className:"markdown",children:(0,_.jsxs)("p",{children:[e[33].value,(0,_.jsx)("code",{children:e[34].value}),e[35].value]})})]})})}l.default=n}}]); diff --git a/packages__hooks__src__useWindowEvent__index.md.778c6473.chunk.css b/packages__hooks__src__useWindowEvent__index.md.778c6473.chunk.css new file mode 100644 index 0000000..563c5c9 --- /dev/null +++ b/packages__hooks__src__useWindowEvent__index.md.778c6473.chunk.css @@ -0,0 +1 @@ +.dumi-default-table{margin:24px 0 32px;transform:translate(0)}.dumi-default-table-content{overflow:auto}.dumi-default-table-content:before,.dumi-default-table-content:after{content:"";display:block;position:fixed;z-index:1;top:0;bottom:0;width:6px;pointer-events:none}.dumi-default-table-content[data-left-folded]:before{left:0;background-image:linear-gradient(to right,rgba(0,0,0,.1),rgba(0,0,0,0))}[data-prefers-color=dark] .dumi-default-table-content[data-left-folded]:before{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.dumi-default-table-content[data-right-folded]:after{right:0;background-image:linear-gradient(to left,rgba(0,0,0,.1),rgba(0,0,0,0))}[data-prefers-color=dark] .dumi-default-table-content[data-right-folded]:after{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.dumi-default-table-content>table>thead>tr>th,.dumi-default-table-content>table>tr>th{white-space:nowrap}.dumi-default-badge{display:inline-block;margin-inline-start:2px;padding:1px 8px;font-size:12px;font-weight:400;line-height:20px;border-radius:4px;vertical-align:top}.dumi-default-badge:not([type]),.dumi-default-badge[type=info]{color:#1677ff;background:#e2eeff}[data-prefers-color=dark] .dumi-default-badge:not([type]),[data-prefers-color=dark] .dumi-default-badge[type=info]{color:#1677ff;background:#002962}.dumi-default-badge[type=warning]{color:#d59200;background:#ffefcb}[data-prefers-color=dark] .dumi-default-badge[type=warning]{color:#d59200;background:#231800}.dumi-default-badge[type=success]{color:#208a41;background:#cbf3d7}[data-prefers-color=dark] .dumi-default-badge[type=success]{color:#208a41;background:#092712}.dumi-default-badge[type=error]{color:#ce1f31;background:#fbe2e5}[data-prefers-color=dark] .dumi-default-badge[type=error]{color:#ce1f31;background:#3c090e}.dumi-default-tree{padding:16px;margin:24px 0 32px;background:#fbfcfd;border:1px solid #e4e9ec;border-radius:2px;color:#30363f;overflow-y:auto}[data-prefers-color=dark] .dumi-default-tree{color:#c6c9cd;background:#020305;border-color:#1c2022}.dumi-default-tree small{padding-left:24px;color:#616d7f;font-size:14px;white-space:nowrap}[data-prefers-color=dark] .dumi-default-tree small{color:#616d7f}.dumi-default-tree small:before{content:"# "}.dumi-default-tree.rc-tree{transition:all .3s;line-height:1.5715;list-style:none;font-size:14px}.dumi-default-tree.rc-tree .rc-tree-treenode{position:relative;display:flex;align-items:flex-start}.dumi-default-tree.rc-tree .rc-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background .3s;content:""}.dumi-default-tree.rc-tree .rc-tree-treenode:hover:before{background:#eeeff0}[data-prefers-color=dark] .dumi-default-tree.rc-tree .rc-tree-treenode:hover:before{background:#1c1d1e}.dumi-default-tree.rc-tree .rc-tree-treenode>*{z-index:1}.dumi-default-tree.rc-tree .rc-tree-treenode span.rc-tree-switcher{display:flex;align-items:center;justify-content:center;width:24px;height:28px;margin-right:2px;line-height:28px;background:transparent;cursor:pointer;flex-shrink:0}.dumi-default-tree.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{flex:auto;min-height:28px;margin:0;padding:0 4px;line-height:28px;cursor:pointer;white-space:nowrap}.dumi-default-tree.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper .rc-tree-iconEle{margin-right:6px;vertical-align:0}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent{display:inline-block;height:0;vertical-align:bottom;flex-shrink:0}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit{position:relative;display:inline-block;width:24px;height:28px}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-indent-unit-end:before{display:none}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%;text-align:center}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line:before{position:absolute;top:0;bottom:-4px;margin-left:-1px;border-left:1px solid #d9d9d9;content:" "}.dumi-default-tree.rc-tree.rc-tree-show-line .tree-switcher-leaf-line:after{position:absolute;top:0;bottom:14px;width:12px;margin-left:-1px;border-bottom:1px solid #d9d9d9;content:" "}.dumi-default-tree.rc-tree.rc-tree-show-line .rc-tree-treenode-leaf-last .tree-switcher-leaf-line:before{height:14px}.dumi-default-tree-icon{width:16px;color:#30363f;vertical-align:-.225em;display:inline-block}[data-prefers-color=dark] .dumi-default-tree-icon{color:#c6c9cd}.ant-motion-collapse{overflow:hidden;transition:height .2s ease-in-out,opacity .2s ease-in-out!important} diff --git a/packages__hooks__src__useWindowEvent__index.md.f9e1b11f.async.js b/packages__hooks__src__useWindowEvent__index.md.f9e1b11f.async.js new file mode 100644 index 0000000..4e09af8 --- /dev/null +++ b/packages__hooks__src__useWindowEvent__index.md.f9e1b11f.async.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunketc_hooks=self.webpackChunketc_hooks||[]).push([[147],{53018:function(i,d,n){n.r(d);var u=n(1261),a=n(49014),c=n(13111),r=n(87007),t=n(16744),h=n(30899),x=n(55174),s=n(64205),v=n(50959),_=n(11527);function l(){var o=(0,s.eL)(),e=o.texts;return(0,_.jsx)(s.dY,{children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:"markdown",children:[(0,_.jsxs)("h1",{id:"usewindowevent",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#usewindowevent",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"useWindowEvent"]}),(0,_.jsxs)("p",{children:[(0,_.jsx)("code",{children:e[0].value}),e[1].value]}),(0,_.jsxs)("h2",{id:"api",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#api",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"API"]}),(0,_.jsx)("p",{children:e[2].value}),(0,_.jsxs)("ol",{children:[(0,_.jsx)("li",{children:(0,_.jsxs)("p",{children:[(0,_.jsx)("strong",{children:e[3].value}),e[4].value,(0,_.jsx)("code",{children:e[5].value}),e[6].value,(0,_.jsx)("code",{children:e[7].value}),e[8].value,(0,_.jsx)("code",{children:e[9].value}),e[10].value,(0,_.jsx)("code",{children:e[11].value}),e[12].value]})}),(0,_.jsx)("li",{children:(0,_.jsxs)("p",{children:[(0,_.jsx)("strong",{children:e[13].value}),e[14].value,(0,_.jsx)("code",{children:e[15].value}),e[16].value,(0,_.jsx)("code",{children:e[17].value}),e[18].value,(0,_.jsx)("code",{children:e[19].value}),e[20].value,(0,_.jsx)("code",{children:e[21].value}),e[22].value]})}),(0,_.jsx)("li",{children:(0,_.jsxs)("p",{children:[(0,_.jsx)("strong",{children:e[23].value}),e[24].value,(0,_.jsx)("code",{children:e[25].value}),e[26].value,(0,_.jsx)("code",{children:e[27].value}),e[28].value,(0,_.jsx)("code",{children:e[29].value}),e[30].value,(0,_.jsx)("code",{children:e[31].value}),e[32].value]})})]}),(0,_.jsxs)("h2",{id:"\u793A\u4F8B\u7528\u6CD5",children:[(0,_.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",href:"#\u793A\u4F8B\u7528\u6CD5",children:(0,_.jsx)("span",{className:"icon icon-link"})}),"\u793A\u4F8B\u7528\u6CD5"]})]}),(0,_.jsx)(s.Dl,{demo:{id:"packages-hooks-src-use-window-event-demo-example"},previewerProps:{filename:"packages/hooks/src/useWindowEvent/example/example.tsx"}}),(0,_.jsx)("div",{className:"markdown",children:(0,_.jsxs)("p",{children:[e[33].value,(0,_.jsx)("code",{children:e[34].value}),e[35].value]})})]})})}d.default=l}}]); diff --git a/umi.56e2e626.js b/umi.b88eda91.js similarity index 75% rename from umi.56e2e626.js rename to umi.b88eda91.js index 6a584b0..fbc01f5 100644 --- a/umi.56e2e626.js +++ b/umi.b88eda91.js @@ -1,67 +1,67 @@ -!(function(){var hd=Object.defineProperty,yd=Object.defineProperties;var gd=Object.getOwnPropertyDescriptors;var $c=Object.getOwnPropertySymbols;var Id=Object.prototype.hasOwnProperty,xd=Object.prototype.propertyIsEnumerable;var Hc=(l,f,e)=>f in l?hd(l,f,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[f]=e,Zc=(l,f)=>{for(var e in f||(f={}))Id.call(f,e)&&Hc(l,e,f[e]);if($c)for(var e of $c(f))xd.call(f,e)&&Hc(l,e,f[e]);return l},Wc=(l,f)=>yd(l,gd(f));(function(){var __webpack_modules__={86622:function(l,f,e){"use strict";e.d(f,{kG:function(){return p}});function o(y){return Math.floor(Math.log(y)*Math.LOG10E)}function a(y,g){if(typeof y.repeat=="function")return y.repeat(g);for(var S=new Array(g),w=0;w0}),Oe=[],Me=0,Ue=ne;Me1)throw new RangeError("integer-width stems only accept a single optional option");Ue.options[0].replace(de,function(ft,vt,_t,Ce,tt,$e){if(vt)ne.minimumIntegerDigits=_t.length;else{if(Ce&&tt)throw new Error("We currently do not support maximum integer digits");if($e)throw new Error("We currently do not support exact integer digits")}return""});continue}if(be.test(Ue.stem)){ne.minimumIntegerDigits=Ue.stem.length;continue}if(te.test(Ue.stem)){if(Ue.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");Ue.stem.replace(te,function(ft,vt,_t,Ce,tt,$e){return _t==="*"?ne.minimumFractionDigits=vt.length:Ce&&Ce[0]==="#"?ne.maximumFractionDigits=Ce.length:tt&&$e?(ne.minimumFractionDigits=tt.length,ne.maximumFractionDigits=tt.length+$e.length):(ne.minimumFractionDigits=vt.length,ne.maximumFractionDigits=vt.length),""});var Ge=Ue.options[0];Ge==="w"?ne=(0,o.pi)((0,o.pi)({},ne),{trailingZeroDisplay:"stripIfInteger"}):Ge&&(ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ge)));continue}if(ee.test(Ue.stem)){ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ue.stem));continue}var Te=se(Ue.stem);Te&&(ne=(0,o.pi)((0,o.pi)({},ne),Te));var st=oe(Ue.stem);st&&(ne=(0,o.pi)((0,o.pi)({},ne),st))}return ne}var J={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function G(I,ne){for(var Oe="",Me=0;Me>1),ft="a",vt=E(ne);for((vt=="H"||vt=="k")&&(st=0);st-- >0;)Oe+=ft;for(;Te-- >0;)Oe=vt+Oe}else Ue==="J"?Oe+="H":Oe+=Ue}return Oe}function E(I){var ne=I.hourCycle;if(ne===void 0&&I.hourCycles&&I.hourCycles.length&&(ne=I.hourCycles[0]),ne)switch(ne){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var Oe=I.language,Me;Oe!=="root"&&(Me=I.maximize().region);var Ue=J[Me||""]||J[Oe||""]||J["".concat(Oe,"-001")]||J["001"];return Ue[0]}var O,$=new RegExp("^".concat(j.source,"*")),K=new RegExp("".concat(j.source,"*$"));function W(I,ne){return{start:I,end:ne}}var T=!!String.prototype.startsWith&&"_a".startsWith("a",1),Z=!!String.fromCodePoint,H=!!Object.fromEntries,X=!!String.prototype.codePointAt,q=!!String.prototype.trimStart,Pe=!!String.prototype.trimEnd,_e=!!Number.isSafeInteger,Xe=_e?Number.isSafeInteger:function(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I&&Math.abs(I)<=9007199254740991},Qe=!0;try{var He=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qe=((O=He.exec("a"))===null||O===void 0?void 0:O[0])==="a"}catch(I){Qe=!1}var et=T?function(ne,Oe,Me){return ne.startsWith(Oe,Me)}:function(ne,Oe,Me){return ne.slice(Me,Me+Oe.length)===Oe},re=Z?String.fromCodePoint:function(){for(var ne=[],Oe=0;OeGe;){if(Te=ne[Ge++],Te>1114111)throw RangeError(Te+" is not a valid code point");Me+=Te<65536?String.fromCharCode(Te):String.fromCharCode(((Te-=65536)>>10)+55296,Te%1024+56320)}return Me},fe=H?Object.fromEntries:function(ne){for(var Oe={},Me=0,Ue=ne;Me=Me)){var Ue=ne.charCodeAt(Oe),Ge;return Ue<55296||Ue>56319||Oe+1===Me||(Ge=ne.charCodeAt(Oe+1))<56320||Ge>57343?Ue:(Ue-55296<<10)+(Ge-56320)+65536}},ye=q?function(ne){return ne.trimStart()}:function(ne){return ne.replace($,"")},we=Pe?function(ne){return ne.trimEnd()}:function(ne){return ne.replace(K,"")};function ue(I,ne){return new RegExp(I,ne)}var me;if(Qe){var Ie=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");me=function(ne,Oe){var Me;Ie.lastIndex=Oe;var Ue=Ie.exec(ne);return(Me=Ue[1])!==null&&Me!==void 0?Me:""}}else me=function(ne,Oe){for(var Me=[];;){var Ue=pe(ne,Oe);if(Ue===void 0||je(Ue)||We(Ue))break;Me.push(Ue),Oe+=Ue>=65536?2:1}return re.apply(void 0,Me)};var le=function(){function I(ne,Oe){Oe===void 0&&(Oe={}),this.message=ne,this.position={offset:0,line:1,column:1},this.ignoreTag=!!Oe.ignoreTag,this.locale=Oe.locale,this.requiresOtherClause=!!Oe.requiresOtherClause,this.shouldParseSkeletons=!!Oe.shouldParseSkeletons}return I.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},I.prototype.parseMessage=function(ne,Oe,Me){for(var Ue=[];!this.isEOF();){var Ge=this.char();if(Ge===123){var Te=this.parseArgument(ne,Me);if(Te.err)return Te;Ue.push(Te.val)}else{if(Ge===125&&ne>0)break;if(Ge===35&&(Oe==="plural"||Oe==="selectordinal")){var st=this.clonePosition();this.bump(),Ue.push({type:n.pound,location:W(st,this.clonePosition())})}else if(Ge===60&&!this.ignoreTag&&this.peek()===47){if(Me)break;return this.error(a.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()))}else if(Ge===60&&!this.ignoreTag&&Se(this.peek()||0)){var Te=this.parseTag(ne,Oe);if(Te.err)return Te;Ue.push(Te.val)}else{var Te=this.parseLiteral(ne,Oe);if(Te.err)return Te;Ue.push(Te.val)}}}return{val:Ue,err:null}},I.prototype.parseTag=function(ne,Oe){var Me=this.clonePosition();this.bump();var Ue=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:n.literal,value:"<".concat(Ue,"/>"),location:W(Me,this.clonePosition())},err:null};if(this.bumpIf(">")){var Ge=this.parseMessage(ne+1,Oe,!0);if(Ge.err)return Ge;var Te=Ge.val,st=this.clonePosition();if(this.bumpIf("")?{val:{type:n.tag,value:Ue,children:Te,location:W(Me,this.clonePosition())},err:null}:this.error(a.INVALID_TAG,W(st,this.clonePosition())))}else return this.error(a.UNCLOSED_TAG,W(Me,this.clonePosition()))}else return this.error(a.INVALID_TAG,W(Me,this.clonePosition()))},I.prototype.parseTagName=function(){var ne=this.offset();for(this.bump();!this.isEOF()&&Le(this.char());)this.bump();return this.message.slice(ne,this.offset())},I.prototype.parseLiteral=function(ne,Oe){for(var Me=this.clonePosition(),Ue="";;){var Ge=this.tryParseQuote(Oe);if(Ge){Ue+=Ge;continue}var Te=this.tryParseUnquoted(ne,Oe);if(Te){Ue+=Te;continue}var st=this.tryParseLeftAngleBracket();if(st){Ue+=st;continue}break}var ft=W(Me,this.clonePosition());return{val:{type:n.literal,value:Ue,location:ft},err:null}},I.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Fe(this.peek()||0))?(this.bump(),"<"):null},I.prototype.tryParseQuote=function(ne){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(ne==="plural"||ne==="selectordinal")break;return null;default:return null}this.bump();var Oe=[this.char()];for(this.bump();!this.isEOF();){var Me=this.char();if(Me===39)if(this.peek()===39)Oe.push(39),this.bump();else{this.bump();break}else Oe.push(Me);this.bump()}return re.apply(void 0,Oe)},I.prototype.tryParseUnquoted=function(ne,Oe){if(this.isEOF())return null;var Me=this.char();return Me===60||Me===123||Me===35&&(Oe==="plural"||Oe==="selectordinal")||Me===125&&ne>0?null:(this.bump(),re(Me))},I.prototype.parseArgument=function(ne,Oe){var Me=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(a.EMPTY_ARGUMENT,W(Me,this.clonePosition()));var Ue=this.parseIdentifierIfPossible().value;if(!Ue)return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:n.argument,value:Ue,location:W(Me,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition())):this.parseArgumentOptions(ne,Oe,Ue,Me);default:return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()))}},I.prototype.parseIdentifierIfPossible=function(){var ne=this.clonePosition(),Oe=this.offset(),Me=me(this.message,Oe),Ue=Oe+Me.length;this.bumpTo(Ue);var Ge=this.clonePosition(),Te=W(ne,Ge);return{value:Me,location:Te}},I.prototype.parseArgumentOptions=function(ne,Oe,Me,Ue){var Ge,Te=this.clonePosition(),st=this.parseIdentifierIfPossible().value,ft=this.clonePosition();switch(st){case"":return this.error(a.EXPECT_ARGUMENT_TYPE,W(Te,ft));case"number":case"date":case"time":{this.bumpSpace();var vt=null;if(this.bumpIf(",")){this.bumpSpace();var _t=this.clonePosition(),Ce=this.parseSimpleArgStyleIfPossible();if(Ce.err)return Ce;var tt=we(Ce.val);if(tt.length===0)return this.error(a.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));var $e=W(_t,this.clonePosition());vt={style:tt,styleLocation:$e}}var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var nt=W(Ue,this.clonePosition());if(vt&&et(vt==null?void 0:vt.style,"::",0)){var ut=ye(vt.style.slice(2));if(st==="number"){var Ce=this.parseNumberSkeletonFromString(ut,vt.styleLocation);return Ce.err?Ce:{val:{type:n.number,value:Me,location:nt,style:Ce.val},err:null}}else{if(ut.length===0)return this.error(a.EXPECT_DATE_TIME_SKELETON,nt);var Et=ut;this.locale&&(Et=G(ut,this.locale));var tt={type:s.dateTime,pattern:Et,location:vt.styleLocation,parsedOptions:this.shouldParseSkeletons?A(Et):{}},kt=st==="date"?n.date:n.time;return{val:{type:kt,value:Me,location:nt,style:tt},err:null}}}return{val:{type:st==="number"?n.number:st==="date"?n.date:n.time,value:Me,location:nt,style:(Ge=vt==null?void 0:vt.style)!==null&&Ge!==void 0?Ge:null},err:null}}case"plural":case"selectordinal":case"select":{var Vt=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(a.EXPECT_SELECT_ARGUMENT_OPTIONS,W(Vt,(0,o.pi)({},Vt)));this.bumpSpace();var hr=this.parseIdentifierIfPossible(),sr=0;if(st!=="select"&&hr.value==="offset"){if(!this.bumpIf(":"))return this.error(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();var Ce=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,a.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(Ce.err)return Ce;this.bumpSpace(),hr=this.parseIdentifierIfPossible(),sr=Ce.val}var yr=this.tryParsePluralOrSelectOptions(ne,st,Oe,hr);if(yr.err)return yr;var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var Br=W(Ue,this.clonePosition());return st==="select"?{val:{type:n.select,value:Me,options:fe(yr.val),location:Br},err:null}:{val:{type:n.plural,value:Me,options:fe(yr.val),offset:sr,pluralType:st==="plural"?"cardinal":"ordinal",location:Br},err:null}}default:return this.error(a.INVALID_ARGUMENT_TYPE,W(Te,ft))}},I.prototype.tryParseArgumentClose=function(ne){return this.isEOF()||this.char()!==125?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(ne,this.clonePosition())):(this.bump(),{val:!0,err:null})},I.prototype.parseSimpleArgStyleIfPossible=function(){for(var ne=0,Oe=this.clonePosition();!this.isEOF();){var Me=this.char();switch(Me){case 39:{this.bump();var Ue=this.clonePosition();if(!this.bumpUntil("'"))return this.error(a.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(Ue,this.clonePosition()));this.bump();break}case 123:{ne+=1,this.bump();break}case 125:{if(ne>0)ne-=1;else return{val:this.message.slice(Oe.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(Oe.offset,this.offset()),err:null}},I.prototype.parseNumberSkeletonFromString=function(ne,Oe){var Me=[];try{Me=z(ne)}catch(Ue){return this.error(a.INVALID_NUMBER_SKELETON,Oe)}return{val:{type:s.number,tokens:Me,location:Oe,parsedOptions:this.shouldParseSkeletons?V(Me):{}},err:null}},I.prototype.tryParsePluralOrSelectOptions=function(ne,Oe,Me,Ue){for(var Ge,Te=!1,st=[],ft=new Set,vt=Ue.value,_t=Ue.location;;){if(vt.length===0){var Ce=this.clonePosition();if(Oe!=="select"&&this.bumpIf("=")){var tt=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_SELECTOR,a.INVALID_PLURAL_ARGUMENT_SELECTOR);if(tt.err)return tt;_t=W(Ce,this.clonePosition()),vt=this.message.slice(Ce.offset,this.offset())}else break}if(ft.has(vt))return this.error(Oe==="select"?a.DUPLICATE_SELECT_ARGUMENT_SELECTOR:a.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,_t);vt==="other"&&(Te=!0),this.bumpSpace();var $e=this.clonePosition();if(!this.bumpIf("{"))return this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:a.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));var De=this.parseMessage(ne+1,Oe,Me);if(De.err)return De;var nt=this.tryParseArgumentClose($e);if(nt.err)return nt;st.push([vt,{value:De.val,location:W($e,this.clonePosition())}]),ft.add(vt),this.bumpSpace(),Ge=this.parseIdentifierIfPossible(),vt=Ge.value,_t=Ge.location}return st.length===0?this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR:a.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!Te?this.error(a.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:st,err:null}},I.prototype.tryParseDecimalInteger=function(ne,Oe){var Me=1,Ue=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(Me=-1);for(var Ge=!1,Te=0;!this.isEOF();){var st=this.char();if(st>=48&&st<=57)Ge=!0,Te=Te*10+(st-48),this.bump();else break}var ft=W(Ue,this.clonePosition());return Ge?(Te*=Me,Xe(Te)?{val:Te,err:null}:this.error(Oe,ft)):this.error(ne,ft)},I.prototype.offset=function(){return this.position.offset},I.prototype.isEOF=function(){return this.offset()===this.message.length},I.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},I.prototype.char=function(){var ne=this.position.offset;if(ne>=this.message.length)throw Error("out of bound");var Oe=pe(this.message,ne);if(Oe===void 0)throw Error("Offset ".concat(ne," is at invalid UTF-16 code unit boundary"));return Oe},I.prototype.error=function(ne,Oe){return{val:null,err:{kind:ne,message:this.message,location:Oe}}},I.prototype.bump=function(){if(!this.isEOF()){var ne=this.char();ne===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=ne<65536?1:2)}},I.prototype.bumpIf=function(ne){if(et(this.message,ne,this.offset())){for(var Oe=0;Oe=0?(this.bumpTo(Me),!0):(this.bumpTo(this.message.length),!1)},I.prototype.bumpTo=function(ne){if(this.offset()>ne)throw Error("targetOffset ".concat(ne," must be greater than or equal to the current offset ").concat(this.offset()));for(ne=Math.min(ne,this.message.length);;){var Oe=this.offset();if(Oe===ne)break;if(Oe>ne)throw Error("targetOffset ".concat(ne," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},I.prototype.bumpSpace=function(){for(;!this.isEOF()&&je(this.char());)this.bump()},I.prototype.peek=function(){if(this.isEOF())return null;var ne=this.char(),Oe=this.offset(),Me=this.message.charCodeAt(Oe+(ne>=65536?2:1));return Me!=null?Me:null},I}();function Se(I){return I>=97&&I<=122||I>=65&&I<=90}function Fe(I){return Se(I)||I===47}function Le(I){return I===45||I===46||I>=48&&I<=57||I===95||I>=97&&I<=122||I>=65&&I<=90||I==183||I>=192&&I<=214||I>=216&&I<=246||I>=248&&I<=893||I>=895&&I<=8191||I>=8204&&I<=8205||I>=8255&&I<=8256||I>=8304&&I<=8591||I>=11264&&I<=12271||I>=12289&&I<=55295||I>=63744&&I<=64975||I>=65008&&I<=65533||I>=65536&&I<=983039}function je(I){return I>=9&&I<=13||I===32||I===133||I>=8206&&I<=8207||I===8232||I===8233}function We(I){return I>=33&&I<=35||I===36||I>=37&&I<=39||I===40||I===41||I===42||I===43||I===44||I===45||I>=46&&I<=47||I>=58&&I<=59||I>=60&&I<=62||I>=63&&I<=64||I===91||I===92||I===93||I===94||I===96||I===123||I===124||I===125||I===126||I===161||I>=162&&I<=165||I===166||I===167||I===169||I===171||I===172||I===174||I===176||I===177||I===182||I===187||I===191||I===215||I===247||I>=8208&&I<=8213||I>=8214&&I<=8215||I===8216||I===8217||I===8218||I>=8219&&I<=8220||I===8221||I===8222||I===8223||I>=8224&&I<=8231||I>=8240&&I<=8248||I===8249||I===8250||I>=8251&&I<=8254||I>=8257&&I<=8259||I===8260||I===8261||I===8262||I>=8263&&I<=8273||I===8274||I===8275||I>=8277&&I<=8286||I>=8592&&I<=8596||I>=8597&&I<=8601||I>=8602&&I<=8603||I>=8604&&I<=8607||I===8608||I>=8609&&I<=8610||I===8611||I>=8612&&I<=8613||I===8614||I>=8615&&I<=8621||I===8622||I>=8623&&I<=8653||I>=8654&&I<=8655||I>=8656&&I<=8657||I===8658||I===8659||I===8660||I>=8661&&I<=8691||I>=8692&&I<=8959||I>=8960&&I<=8967||I===8968||I===8969||I===8970||I===8971||I>=8972&&I<=8991||I>=8992&&I<=8993||I>=8994&&I<=9e3||I===9001||I===9002||I>=9003&&I<=9083||I===9084||I>=9085&&I<=9114||I>=9115&&I<=9139||I>=9140&&I<=9179||I>=9180&&I<=9185||I>=9186&&I<=9254||I>=9255&&I<=9279||I>=9280&&I<=9290||I>=9291&&I<=9311||I>=9472&&I<=9654||I===9655||I>=9656&&I<=9664||I===9665||I>=9666&&I<=9719||I>=9720&&I<=9727||I>=9728&&I<=9838||I===9839||I>=9840&&I<=10087||I===10088||I===10089||I===10090||I===10091||I===10092||I===10093||I===10094||I===10095||I===10096||I===10097||I===10098||I===10099||I===10100||I===10101||I>=10132&&I<=10175||I>=10176&&I<=10180||I===10181||I===10182||I>=10183&&I<=10213||I===10214||I===10215||I===10216||I===10217||I===10218||I===10219||I===10220||I===10221||I===10222||I===10223||I>=10224&&I<=10239||I>=10240&&I<=10495||I>=10496&&I<=10626||I===10627||I===10628||I===10629||I===10630||I===10631||I===10632||I===10633||I===10634||I===10635||I===10636||I===10637||I===10638||I===10639||I===10640||I===10641||I===10642||I===10643||I===10644||I===10645||I===10646||I===10647||I===10648||I>=10649&&I<=10711||I===10712||I===10713||I===10714||I===10715||I>=10716&&I<=10747||I===10748||I===10749||I>=10750&&I<=11007||I>=11008&&I<=11055||I>=11056&&I<=11076||I>=11077&&I<=11078||I>=11079&&I<=11084||I>=11085&&I<=11123||I>=11124&&I<=11125||I>=11126&&I<=11157||I===11158||I>=11159&&I<=11263||I>=11776&&I<=11777||I===11778||I===11779||I===11780||I===11781||I>=11782&&I<=11784||I===11785||I===11786||I===11787||I===11788||I===11789||I>=11790&&I<=11798||I===11799||I>=11800&&I<=11801||I===11802||I===11803||I===11804||I===11805||I>=11806&&I<=11807||I===11808||I===11809||I===11810||I===11811||I===11812||I===11813||I===11814||I===11815||I===11816||I===11817||I>=11818&&I<=11822||I===11823||I>=11824&&I<=11833||I>=11834&&I<=11835||I>=11836&&I<=11839||I===11840||I===11841||I===11842||I>=11843&&I<=11855||I>=11856&&I<=11857||I===11858||I>=11859&&I<=11903||I>=12289&&I<=12291||I===12296||I===12297||I===12298||I===12299||I===12300||I===12301||I===12302||I===12303||I===12304||I===12305||I>=12306&&I<=12307||I===12308||I===12309||I===12310||I===12311||I===12312||I===12313||I===12314||I===12315||I===12316||I===12317||I>=12318&&I<=12319||I===12320||I===12336||I===64830||I===64831||I>=65093&&I<=65094}function ht(I){I.forEach(function(ne){if(delete ne.location,p(ne)||y(ne))for(var Oe in ne.options)delete ne.options[Oe].location,ht(ne.options[Oe].value);else c(ne)&&w(ne.style)||(h(ne)||m(ne))&&b(ne.style)?delete ne.style.location:S(ne)&&ht(ne.children)})}function ot(I,ne){ne===void 0&&(ne={}),ne=(0,o.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},ne);var Oe=new le(I,ne).parse();if(Oe.err){var Me=SyntaxError(a[Oe.err.kind]);throw Me.location=Oe.err.location,Me.originalMessage=Oe.err.message,Me}return ne!=null&&ne.captureLocation||ht(Oe.val),Oe.val}var St=null},33725:function(l,f,e){"use strict";e.d(f,{$6:function(){return m},OV:function(){return u},Qe:function(){return c},X9:function(){return h},gb:function(){return v},wI:function(){return s}});var o=e(99938),a;(function(p){p.FORMAT_ERROR="FORMAT_ERROR",p.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",p.INVALID_CONFIG="INVALID_CONFIG",p.MISSING_DATA="MISSING_DATA",p.MISSING_TRANSLATION="MISSING_TRANSLATION"})(a||(a={}));var n=function(p){(0,o.ZT)(y,p);function y(g,S,w){var b=this,k=w?w instanceof Error?w:new Error(String(w)):void 0;return b=p.call(this,"[@formatjs/intl Error ".concat(g,"] ").concat(S,` +!(function(){var hd=Object.defineProperty,yd=Object.defineProperties;var gd=Object.getOwnPropertyDescriptors;var $c=Object.getOwnPropertySymbols;var Id=Object.prototype.hasOwnProperty,xd=Object.prototype.propertyIsEnumerable;var Hc=(l,f,e)=>f in l?hd(l,f,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[f]=e,Zc=(l,f)=>{for(var e in f||(f={}))Id.call(f,e)&&Hc(l,e,f[e]);if($c)for(var e of $c(f))xd.call(f,e)&&Hc(l,e,f[e]);return l},Wc=(l,f)=>yd(l,gd(f));(function(){var __webpack_modules__={86622:function(l,f,e){"use strict";e.d(f,{kG:function(){return p}});function o(y){return Math.floor(Math.log(y)*Math.LOG10E)}function a(y,g){if(typeof y.repeat=="function")return y.repeat(g);for(var S=new Array(g),T=0;T0}),Oe=[],Me=0,Ue=ne;Me1)throw new RangeError("integer-width stems only accept a single optional option");Ue.options[0].replace(de,function(ft,vt,_t,Ce,tt,$e){if(vt)ne.minimumIntegerDigits=_t.length;else{if(Ce&&tt)throw new Error("We currently do not support maximum integer digits");if($e)throw new Error("We currently do not support exact integer digits")}return""});continue}if(be.test(Ue.stem)){ne.minimumIntegerDigits=Ue.stem.length;continue}if(te.test(Ue.stem)){if(Ue.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");Ue.stem.replace(te,function(ft,vt,_t,Ce,tt,$e){return _t==="*"?ne.minimumFractionDigits=vt.length:Ce&&Ce[0]==="#"?ne.maximumFractionDigits=Ce.length:tt&&$e?(ne.minimumFractionDigits=tt.length,ne.maximumFractionDigits=tt.length+$e.length):(ne.minimumFractionDigits=vt.length,ne.maximumFractionDigits=vt.length),""});var Ge=Ue.options[0];Ge==="w"?ne=(0,o.pi)((0,o.pi)({},ne),{trailingZeroDisplay:"stripIfInteger"}):Ge&&(ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ge)));continue}if(ee.test(Ue.stem)){ne=(0,o.pi)((0,o.pi)({},ne),Ae(Ue.stem));continue}var we=se(Ue.stem);we&&(ne=(0,o.pi)((0,o.pi)({},ne),we));var st=oe(Ue.stem);st&&(ne=(0,o.pi)((0,o.pi)({},ne),st))}return ne}var J={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function G(I,ne){for(var Oe="",Me=0;Me>1),ft="a",vt=E(ne);for((vt=="H"||vt=="k")&&(st=0);st-- >0;)Oe+=ft;for(;we-- >0;)Oe=vt+Oe}else Ue==="J"?Oe+="H":Oe+=Ue}return Oe}function E(I){var ne=I.hourCycle;if(ne===void 0&&I.hourCycles&&I.hourCycles.length&&(ne=I.hourCycles[0]),ne)switch(ne){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var Oe=I.language,Me;Oe!=="root"&&(Me=I.maximize().region);var Ue=J[Me||""]||J[Oe||""]||J["".concat(Oe,"-001")]||J["001"];return Ue[0]}var O,$=new RegExp("^".concat(j.source,"*")),K=new RegExp("".concat(j.source,"*$"));function W(I,ne){return{start:I,end:ne}}var w=!!String.prototype.startsWith&&"_a".startsWith("a",1),Z=!!String.fromCodePoint,H=!!Object.fromEntries,X=!!String.prototype.codePointAt,q=!!String.prototype.trimStart,Pe=!!String.prototype.trimEnd,_e=!!Number.isSafeInteger,Xe=_e?Number.isSafeInteger:function(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I&&Math.abs(I)<=9007199254740991},Qe=!0;try{var He=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qe=((O=He.exec("a"))===null||O===void 0?void 0:O[0])==="a"}catch(I){Qe=!1}var et=w?function(ne,Oe,Me){return ne.startsWith(Oe,Me)}:function(ne,Oe,Me){return ne.slice(Me,Me+Oe.length)===Oe},re=Z?String.fromCodePoint:function(){for(var ne=[],Oe=0;OeGe;){if(we=ne[Ge++],we>1114111)throw RangeError(we+" is not a valid code point");Me+=we<65536?String.fromCharCode(we):String.fromCharCode(((we-=65536)>>10)+55296,we%1024+56320)}return Me},fe=H?Object.fromEntries:function(ne){for(var Oe={},Me=0,Ue=ne;Me=Me)){var Ue=ne.charCodeAt(Oe),Ge;return Ue<55296||Ue>56319||Oe+1===Me||(Ge=ne.charCodeAt(Oe+1))<56320||Ge>57343?Ue:(Ue-55296<<10)+(Ge-56320)+65536}},ye=q?function(ne){return ne.trimStart()}:function(ne){return ne.replace($,"")},Te=Pe?function(ne){return ne.trimEnd()}:function(ne){return ne.replace(K,"")};function ue(I,ne){return new RegExp(I,ne)}var me;if(Qe){var Ie=ue("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");me=function(ne,Oe){var Me;Ie.lastIndex=Oe;var Ue=Ie.exec(ne);return(Me=Ue[1])!==null&&Me!==void 0?Me:""}}else me=function(ne,Oe){for(var Me=[];;){var Ue=pe(ne,Oe);if(Ue===void 0||je(Ue)||We(Ue))break;Me.push(Ue),Oe+=Ue>=65536?2:1}return re.apply(void 0,Me)};var le=function(){function I(ne,Oe){Oe===void 0&&(Oe={}),this.message=ne,this.position={offset:0,line:1,column:1},this.ignoreTag=!!Oe.ignoreTag,this.locale=Oe.locale,this.requiresOtherClause=!!Oe.requiresOtherClause,this.shouldParseSkeletons=!!Oe.shouldParseSkeletons}return I.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},I.prototype.parseMessage=function(ne,Oe,Me){for(var Ue=[];!this.isEOF();){var Ge=this.char();if(Ge===123){var we=this.parseArgument(ne,Me);if(we.err)return we;Ue.push(we.val)}else{if(Ge===125&&ne>0)break;if(Ge===35&&(Oe==="plural"||Oe==="selectordinal")){var st=this.clonePosition();this.bump(),Ue.push({type:n.pound,location:W(st,this.clonePosition())})}else if(Ge===60&&!this.ignoreTag&&this.peek()===47){if(Me)break;return this.error(a.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()))}else if(Ge===60&&!this.ignoreTag&&Se(this.peek()||0)){var we=this.parseTag(ne,Oe);if(we.err)return we;Ue.push(we.val)}else{var we=this.parseLiteral(ne,Oe);if(we.err)return we;Ue.push(we.val)}}}return{val:Ue,err:null}},I.prototype.parseTag=function(ne,Oe){var Me=this.clonePosition();this.bump();var Ue=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:n.literal,value:"<".concat(Ue,"/>"),location:W(Me,this.clonePosition())},err:null};if(this.bumpIf(">")){var Ge=this.parseMessage(ne+1,Oe,!0);if(Ge.err)return Ge;var we=Ge.val,st=this.clonePosition();if(this.bumpIf("")?{val:{type:n.tag,value:Ue,children:we,location:W(Me,this.clonePosition())},err:null}:this.error(a.INVALID_TAG,W(st,this.clonePosition())))}else return this.error(a.UNCLOSED_TAG,W(Me,this.clonePosition()))}else return this.error(a.INVALID_TAG,W(Me,this.clonePosition()))},I.prototype.parseTagName=function(){var ne=this.offset();for(this.bump();!this.isEOF()&&Le(this.char());)this.bump();return this.message.slice(ne,this.offset())},I.prototype.parseLiteral=function(ne,Oe){for(var Me=this.clonePosition(),Ue="";;){var Ge=this.tryParseQuote(Oe);if(Ge){Ue+=Ge;continue}var we=this.tryParseUnquoted(ne,Oe);if(we){Ue+=we;continue}var st=this.tryParseLeftAngleBracket();if(st){Ue+=st;continue}break}var ft=W(Me,this.clonePosition());return{val:{type:n.literal,value:Ue,location:ft},err:null}},I.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Fe(this.peek()||0))?(this.bump(),"<"):null},I.prototype.tryParseQuote=function(ne){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(ne==="plural"||ne==="selectordinal")break;return null;default:return null}this.bump();var Oe=[this.char()];for(this.bump();!this.isEOF();){var Me=this.char();if(Me===39)if(this.peek()===39)Oe.push(39),this.bump();else{this.bump();break}else Oe.push(Me);this.bump()}return re.apply(void 0,Oe)},I.prototype.tryParseUnquoted=function(ne,Oe){if(this.isEOF())return null;var Me=this.char();return Me===60||Me===123||Me===35&&(Oe==="plural"||Oe==="selectordinal")||Me===125&&ne>0?null:(this.bump(),re(Me))},I.prototype.parseArgument=function(ne,Oe){var Me=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(a.EMPTY_ARGUMENT,W(Me,this.clonePosition()));var Ue=this.parseIdentifierIfPossible().value;if(!Ue)return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:n.argument,value:Ue,location:W(Me,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(Me,this.clonePosition())):this.parseArgumentOptions(ne,Oe,Ue,Me);default:return this.error(a.MALFORMED_ARGUMENT,W(Me,this.clonePosition()))}},I.prototype.parseIdentifierIfPossible=function(){var ne=this.clonePosition(),Oe=this.offset(),Me=me(this.message,Oe),Ue=Oe+Me.length;this.bumpTo(Ue);var Ge=this.clonePosition(),we=W(ne,Ge);return{value:Me,location:we}},I.prototype.parseArgumentOptions=function(ne,Oe,Me,Ue){var Ge,we=this.clonePosition(),st=this.parseIdentifierIfPossible().value,ft=this.clonePosition();switch(st){case"":return this.error(a.EXPECT_ARGUMENT_TYPE,W(we,ft));case"number":case"date":case"time":{this.bumpSpace();var vt=null;if(this.bumpIf(",")){this.bumpSpace();var _t=this.clonePosition(),Ce=this.parseSimpleArgStyleIfPossible();if(Ce.err)return Ce;var tt=Te(Ce.val);if(tt.length===0)return this.error(a.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));var $e=W(_t,this.clonePosition());vt={style:tt,styleLocation:$e}}var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var nt=W(Ue,this.clonePosition());if(vt&&et(vt==null?void 0:vt.style,"::",0)){var ut=ye(vt.style.slice(2));if(st==="number"){var Ce=this.parseNumberSkeletonFromString(ut,vt.styleLocation);return Ce.err?Ce:{val:{type:n.number,value:Me,location:nt,style:Ce.val},err:null}}else{if(ut.length===0)return this.error(a.EXPECT_DATE_TIME_SKELETON,nt);var Et=ut;this.locale&&(Et=G(ut,this.locale));var tt={type:s.dateTime,pattern:Et,location:vt.styleLocation,parsedOptions:this.shouldParseSkeletons?A(Et):{}},kt=st==="date"?n.date:n.time;return{val:{type:kt,value:Me,location:nt,style:tt},err:null}}}return{val:{type:st==="number"?n.number:st==="date"?n.date:n.time,value:Me,location:nt,style:(Ge=vt==null?void 0:vt.style)!==null&&Ge!==void 0?Ge:null},err:null}}case"plural":case"selectordinal":case"select":{var Vt=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(a.EXPECT_SELECT_ARGUMENT_OPTIONS,W(Vt,(0,o.pi)({},Vt)));this.bumpSpace();var hr=this.parseIdentifierIfPossible(),sr=0;if(st!=="select"&&hr.value==="offset"){if(!this.bumpIf(":"))return this.error(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();var Ce=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,a.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(Ce.err)return Ce;this.bumpSpace(),hr=this.parseIdentifierIfPossible(),sr=Ce.val}var yr=this.tryParsePluralOrSelectOptions(ne,st,Oe,hr);if(yr.err)return yr;var De=this.tryParseArgumentClose(Ue);if(De.err)return De;var Fr=W(Ue,this.clonePosition());return st==="select"?{val:{type:n.select,value:Me,options:fe(yr.val),location:Fr},err:null}:{val:{type:n.plural,value:Me,options:fe(yr.val),offset:sr,pluralType:st==="plural"?"cardinal":"ordinal",location:Fr},err:null}}default:return this.error(a.INVALID_ARGUMENT_TYPE,W(we,ft))}},I.prototype.tryParseArgumentClose=function(ne){return this.isEOF()||this.char()!==125?this.error(a.EXPECT_ARGUMENT_CLOSING_BRACE,W(ne,this.clonePosition())):(this.bump(),{val:!0,err:null})},I.prototype.parseSimpleArgStyleIfPossible=function(){for(var ne=0,Oe=this.clonePosition();!this.isEOF();){var Me=this.char();switch(Me){case 39:{this.bump();var Ue=this.clonePosition();if(!this.bumpUntil("'"))return this.error(a.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(Ue,this.clonePosition()));this.bump();break}case 123:{ne+=1,this.bump();break}case 125:{if(ne>0)ne-=1;else return{val:this.message.slice(Oe.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(Oe.offset,this.offset()),err:null}},I.prototype.parseNumberSkeletonFromString=function(ne,Oe){var Me=[];try{Me=z(ne)}catch(Ue){return this.error(a.INVALID_NUMBER_SKELETON,Oe)}return{val:{type:s.number,tokens:Me,location:Oe,parsedOptions:this.shouldParseSkeletons?V(Me):{}},err:null}},I.prototype.tryParsePluralOrSelectOptions=function(ne,Oe,Me,Ue){for(var Ge,we=!1,st=[],ft=new Set,vt=Ue.value,_t=Ue.location;;){if(vt.length===0){var Ce=this.clonePosition();if(Oe!=="select"&&this.bumpIf("=")){var tt=this.tryParseDecimalInteger(a.EXPECT_PLURAL_ARGUMENT_SELECTOR,a.INVALID_PLURAL_ARGUMENT_SELECTOR);if(tt.err)return tt;_t=W(Ce,this.clonePosition()),vt=this.message.slice(Ce.offset,this.offset())}else break}if(ft.has(vt))return this.error(Oe==="select"?a.DUPLICATE_SELECT_ARGUMENT_SELECTOR:a.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,_t);vt==="other"&&(we=!0),this.bumpSpace();var $e=this.clonePosition();if(!this.bumpIf("{"))return this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:a.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));var De=this.parseMessage(ne+1,Oe,Me);if(De.err)return De;var nt=this.tryParseArgumentClose($e);if(nt.err)return nt;st.push([vt,{value:De.val,location:W($e,this.clonePosition())}]),ft.add(vt),this.bumpSpace(),Ge=this.parseIdentifierIfPossible(),vt=Ge.value,_t=Ge.location}return st.length===0?this.error(Oe==="select"?a.EXPECT_SELECT_ARGUMENT_SELECTOR:a.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!we?this.error(a.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:st,err:null}},I.prototype.tryParseDecimalInteger=function(ne,Oe){var Me=1,Ue=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(Me=-1);for(var Ge=!1,we=0;!this.isEOF();){var st=this.char();if(st>=48&&st<=57)Ge=!0,we=we*10+(st-48),this.bump();else break}var ft=W(Ue,this.clonePosition());return Ge?(we*=Me,Xe(we)?{val:we,err:null}:this.error(Oe,ft)):this.error(ne,ft)},I.prototype.offset=function(){return this.position.offset},I.prototype.isEOF=function(){return this.offset()===this.message.length},I.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},I.prototype.char=function(){var ne=this.position.offset;if(ne>=this.message.length)throw Error("out of bound");var Oe=pe(this.message,ne);if(Oe===void 0)throw Error("Offset ".concat(ne," is at invalid UTF-16 code unit boundary"));return Oe},I.prototype.error=function(ne,Oe){return{val:null,err:{kind:ne,message:this.message,location:Oe}}},I.prototype.bump=function(){if(!this.isEOF()){var ne=this.char();ne===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=ne<65536?1:2)}},I.prototype.bumpIf=function(ne){if(et(this.message,ne,this.offset())){for(var Oe=0;Oe=0?(this.bumpTo(Me),!0):(this.bumpTo(this.message.length),!1)},I.prototype.bumpTo=function(ne){if(this.offset()>ne)throw Error("targetOffset ".concat(ne," must be greater than or equal to the current offset ").concat(this.offset()));for(ne=Math.min(ne,this.message.length);;){var Oe=this.offset();if(Oe===ne)break;if(Oe>ne)throw Error("targetOffset ".concat(ne," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},I.prototype.bumpSpace=function(){for(;!this.isEOF()&&je(this.char());)this.bump()},I.prototype.peek=function(){if(this.isEOF())return null;var ne=this.char(),Oe=this.offset(),Me=this.message.charCodeAt(Oe+(ne>=65536?2:1));return Me!=null?Me:null},I}();function Se(I){return I>=97&&I<=122||I>=65&&I<=90}function Fe(I){return Se(I)||I===47}function Le(I){return I===45||I===46||I>=48&&I<=57||I===95||I>=97&&I<=122||I>=65&&I<=90||I==183||I>=192&&I<=214||I>=216&&I<=246||I>=248&&I<=893||I>=895&&I<=8191||I>=8204&&I<=8205||I>=8255&&I<=8256||I>=8304&&I<=8591||I>=11264&&I<=12271||I>=12289&&I<=55295||I>=63744&&I<=64975||I>=65008&&I<=65533||I>=65536&&I<=983039}function je(I){return I>=9&&I<=13||I===32||I===133||I>=8206&&I<=8207||I===8232||I===8233}function We(I){return I>=33&&I<=35||I===36||I>=37&&I<=39||I===40||I===41||I===42||I===43||I===44||I===45||I>=46&&I<=47||I>=58&&I<=59||I>=60&&I<=62||I>=63&&I<=64||I===91||I===92||I===93||I===94||I===96||I===123||I===124||I===125||I===126||I===161||I>=162&&I<=165||I===166||I===167||I===169||I===171||I===172||I===174||I===176||I===177||I===182||I===187||I===191||I===215||I===247||I>=8208&&I<=8213||I>=8214&&I<=8215||I===8216||I===8217||I===8218||I>=8219&&I<=8220||I===8221||I===8222||I===8223||I>=8224&&I<=8231||I>=8240&&I<=8248||I===8249||I===8250||I>=8251&&I<=8254||I>=8257&&I<=8259||I===8260||I===8261||I===8262||I>=8263&&I<=8273||I===8274||I===8275||I>=8277&&I<=8286||I>=8592&&I<=8596||I>=8597&&I<=8601||I>=8602&&I<=8603||I>=8604&&I<=8607||I===8608||I>=8609&&I<=8610||I===8611||I>=8612&&I<=8613||I===8614||I>=8615&&I<=8621||I===8622||I>=8623&&I<=8653||I>=8654&&I<=8655||I>=8656&&I<=8657||I===8658||I===8659||I===8660||I>=8661&&I<=8691||I>=8692&&I<=8959||I>=8960&&I<=8967||I===8968||I===8969||I===8970||I===8971||I>=8972&&I<=8991||I>=8992&&I<=8993||I>=8994&&I<=9e3||I===9001||I===9002||I>=9003&&I<=9083||I===9084||I>=9085&&I<=9114||I>=9115&&I<=9139||I>=9140&&I<=9179||I>=9180&&I<=9185||I>=9186&&I<=9254||I>=9255&&I<=9279||I>=9280&&I<=9290||I>=9291&&I<=9311||I>=9472&&I<=9654||I===9655||I>=9656&&I<=9664||I===9665||I>=9666&&I<=9719||I>=9720&&I<=9727||I>=9728&&I<=9838||I===9839||I>=9840&&I<=10087||I===10088||I===10089||I===10090||I===10091||I===10092||I===10093||I===10094||I===10095||I===10096||I===10097||I===10098||I===10099||I===10100||I===10101||I>=10132&&I<=10175||I>=10176&&I<=10180||I===10181||I===10182||I>=10183&&I<=10213||I===10214||I===10215||I===10216||I===10217||I===10218||I===10219||I===10220||I===10221||I===10222||I===10223||I>=10224&&I<=10239||I>=10240&&I<=10495||I>=10496&&I<=10626||I===10627||I===10628||I===10629||I===10630||I===10631||I===10632||I===10633||I===10634||I===10635||I===10636||I===10637||I===10638||I===10639||I===10640||I===10641||I===10642||I===10643||I===10644||I===10645||I===10646||I===10647||I===10648||I>=10649&&I<=10711||I===10712||I===10713||I===10714||I===10715||I>=10716&&I<=10747||I===10748||I===10749||I>=10750&&I<=11007||I>=11008&&I<=11055||I>=11056&&I<=11076||I>=11077&&I<=11078||I>=11079&&I<=11084||I>=11085&&I<=11123||I>=11124&&I<=11125||I>=11126&&I<=11157||I===11158||I>=11159&&I<=11263||I>=11776&&I<=11777||I===11778||I===11779||I===11780||I===11781||I>=11782&&I<=11784||I===11785||I===11786||I===11787||I===11788||I===11789||I>=11790&&I<=11798||I===11799||I>=11800&&I<=11801||I===11802||I===11803||I===11804||I===11805||I>=11806&&I<=11807||I===11808||I===11809||I===11810||I===11811||I===11812||I===11813||I===11814||I===11815||I===11816||I===11817||I>=11818&&I<=11822||I===11823||I>=11824&&I<=11833||I>=11834&&I<=11835||I>=11836&&I<=11839||I===11840||I===11841||I===11842||I>=11843&&I<=11855||I>=11856&&I<=11857||I===11858||I>=11859&&I<=11903||I>=12289&&I<=12291||I===12296||I===12297||I===12298||I===12299||I===12300||I===12301||I===12302||I===12303||I===12304||I===12305||I>=12306&&I<=12307||I===12308||I===12309||I===12310||I===12311||I===12312||I===12313||I===12314||I===12315||I===12316||I===12317||I>=12318&&I<=12319||I===12320||I===12336||I===64830||I===64831||I>=65093&&I<=65094}function ht(I){I.forEach(function(ne){if(delete ne.location,p(ne)||y(ne))for(var Oe in ne.options)delete ne.options[Oe].location,ht(ne.options[Oe].value);else c(ne)&&T(ne.style)||(h(ne)||m(ne))&&b(ne.style)?delete ne.style.location:S(ne)&&ht(ne.children)})}function ot(I,ne){ne===void 0&&(ne={}),ne=(0,o.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},ne);var Oe=new le(I,ne).parse();if(Oe.err){var Me=SyntaxError(a[Oe.err.kind]);throw Me.location=Oe.err.location,Me.originalMessage=Oe.err.message,Me}return ne!=null&&ne.captureLocation||ht(Oe.val),Oe.val}var St=null},33725:function(l,f,e){"use strict";e.d(f,{$6:function(){return m},OV:function(){return u},Qe:function(){return c},X9:function(){return h},gb:function(){return v},wI:function(){return s}});var o=e(99938),a;(function(p){p.FORMAT_ERROR="FORMAT_ERROR",p.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",p.INVALID_CONFIG="INVALID_CONFIG",p.MISSING_DATA="MISSING_DATA",p.MISSING_TRANSLATION="MISSING_TRANSLATION"})(a||(a={}));var n=function(p){(0,o.ZT)(y,p);function y(g,S,T){var b=this,k=T?T instanceof Error?T:new Error(String(T)):void 0;return b=p.call(this,"[@formatjs/intl Error ".concat(g,"] ").concat(S,` `).concat(k?` `.concat(k.message,` -`).concat(k.stack):""))||this,b.code=g,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(b,y),b}return y}(Error),s=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.UNSUPPORTED_FORMATTER,g,S)||this}return y}(n),u=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.INVALID_CONFIG,g,S)||this}return y}(n),v=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.MISSING_DATA,g,S)||this}return y}(n),c=function(p){(0,o.ZT)(y,p);function y(g,S,w){var b=p.call(this,a.FORMAT_ERROR,"".concat(g,` +`).concat(k.stack):""))||this,b.code=g,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(b,y),b}return y}(Error),s=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.UNSUPPORTED_FORMATTER,g,S)||this}return y}(n),u=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.INVALID_CONFIG,g,S)||this}return y}(n),v=function(p){(0,o.ZT)(y,p);function y(g,S){return p.call(this,a.MISSING_DATA,g,S)||this}return y}(n),c=function(p){(0,o.ZT)(y,p);function y(g,S,T){var b=p.call(this,a.FORMAT_ERROR,"".concat(g,` Locale: `).concat(S,` -`),w)||this;return b.locale=S,b}return y}(n),h=function(p){(0,o.ZT)(y,p);function y(g,S,w,b){var k=p.call(this,"".concat(g,` -MessageID: `).concat(w==null?void 0:w.id,` -Default Message: `).concat(w==null?void 0:w.defaultMessage,` -Description: `).concat(w==null?void 0:w.description,` -`),S,b)||this;return k.descriptor=w,k.locale=S,k}return y}(c),m=function(p){(0,o.ZT)(y,p);function y(g,S){var w=p.call(this,a.MISSING_TRANSLATION,'Missing message: "'.concat(g.id,'" for locale "').concat(S,'", using ').concat(g.defaultMessage?"default message (".concat(typeof g.defaultMessage=="string"?g.defaultMessage:g.defaultMessage.map(function(b){var k;return(k=b.value)!==null&&k!==void 0?k:JSON.stringify(b)}).join(),")"):"id"," as fallback."))||this;return w.descriptor=g,w}return y}(n)},94543:function(l,f,e){"use strict";e.d(f,{L6:function(){return u},Sn:function(){return m},TB:function(){return g},Z0:function(){return h},ax:function(){return y}});var o=e(99938),a=e(58974),n=e(75344),s=e(33725);function u(S,w,b){return b===void 0&&(b={}),w.reduce(function(k,R){return R in S?k[R]=S[R]:R in b&&(k[R]=b[R]),k},{})}var v=function(S){},c=function(S){},h={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:v,onWarn:c};function m(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function p(S){return{create:function(){return{get:function(w){return S[w]},set:function(w,b){S[w]=b}}}}}function y(S){S===void 0&&(S=m());var w=Intl.RelativeTimeFormat,b=Intl.ListFormat,k=Intl.DisplayNames,R=(0,n.H)(function(){for(var B,A=[],L=0;L0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return M.length!==D.length||M.some((_,ce)=>!Object.is(_,D[ce]))}function N(M){if(M==null||typeof M.didCatch!="boolean"||typeof M.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found");return!0}function B(){const M=useContext(b);N(M);const[D,_]=useState({error:null,hasError:!1}),ce=useMemo(()=>({resetBoundary:()=>{M==null||M.resetErrorBoundary(),_({error:null,hasError:!1})},showBoundary:Ee=>_({error:Ee,hasError:!0})}),[M==null?void 0:M.resetErrorBoundary]);if(D.hasError)throw D.error;return ce}function A(M,D){const _=forwardRef((Ee,Ke)=>createElement(R,D,createElement(M,Wc(Zc({},Ee),{ref:Ke})))),ce=M.displayName||M.name||"Unknown";return _.displayName="withErrorBoundary(".concat(ce,")"),_}function L(){return L=Object.assign?Object.assign.bind():function(M){for(var D=1;DM.length)&&(D=M.length);for(var _=0,ce=new Array(D);_1&&(typeof window=="undefined"||window.innerWidth>1024)){for(var ir=0;irM.length)&&(D=M.length);for(var _=0,ce=new Array(D);_M.length)&&(D=M.length);for(var _=0,ce=new Array(D);_M.length)&&(D=M.length);for(var _=0,ce=new Array(D);_',isBinary:!1},at[Nt]={content:(0,re.AM)(ct.react),isBinary:!1};var tr=re.EV.applyPlugins({type:o.Ac.modify,key:"modifyCodeSandboxData",initialValue:{files:at},args:M});return(0,et.Z)(tr)}var Se=function(D,_){var ce,Ee=document.createElement("form"),Ke=document.createElement("input"),Ve=le(D);Ee.method="POST",Ee.target="_blank",Ee.style.display="none",Ee.action=(_==null?void 0:_.api)||Ie,Ee.appendChild(Ke),Ee.setAttribute("data-demo",((ce=D.assets)===null||ce===void 0?void 0:ce.id)||""),Ke.name="parameters",Ke.value=Ve,document.body.appendChild(Ee),Ee.submit(),Ee.remove()},Fe=e(77117),Le=e.n(Fe),je=e(15033),We=e.n(je),ht=e(96345),ot=e.n(ht),St=e(27566),I=e.n(St),ne=e(28152),Oe=e.n(ne),Me=500,Ue=20,Ge=300,Te="https://stackblitz.com",st=["angular-cli","create-react-app","html","javascript","node","polymer","typescript","vue"],ft=["project","search","ports","settings"],vt=["light","dark"],_t=["editor","preview"],Ce={clickToLoad:function(D){return $e("ctl",D)},devToolsHeight:function(D){return nt("devtoolsheight",D)},forceEmbedLayout:function(D){return $e("embed",D)},hideDevTools:function(D){return $e("hidedevtools",D)},hideExplorer:function(D){return $e("hideExplorer",D)},hideNavigation:function(D){return $e("hideNavigation",D)},openFile:function(D){return Et("file",D)},showSidebar:function(D){return De("showSidebar",D)},sidebarView:function(D){return ut("sidebarView",D,ft)},startScript:function(D){return Et("startScript",D)},terminalHeight:function(D){return nt("terminalHeight",D)},theme:function(D){return ut("theme",D,vt)},view:function(D){return ut("view",D,_t)},zenMode:function(D){return $e("zenMode",D)}};function tt(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=Object.entries(M).map(function(_){var ce=Oe()(_,2),Ee=ce[0],Ke=ce[1];return Ke!=null&&Ce.hasOwnProperty(Ee)?Ce[Ee](Ke):""}).filter(Boolean);return D.length?"?".concat(D.join("&")):""}function $e(M,D){return D===!0?"".concat(M,"=1"):""}function De(M,D){return typeof D=="boolean"?"".concat(M,"=").concat(D?"1":"0"):""}function nt(M,D){if(typeof D=="number"&&!Number.isNaN(D)){var _=Math.min(100,Math.max(0,D));return"".concat(M,"=").concat(encodeURIComponent(Math.round(_)))}return""}function ut(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return _.includes(D)?"".concat(M,"=").concat(encodeURIComponent(D)):""}function Et(M,D){var _=Array.isArray(D)?D:[D];return _.filter(function(ce){return typeof ce=="string"&&ce.trim()!==""}).map(function(ce){return"".concat(M,"=").concat(encodeURIComponent(ce))}).join("&")}function kt(){return Math.random().toString(36).slice(2,6)+Math.random().toString(36).slice(2,6)}function Vt(M,D){return"".concat(sr(D)).concat(M).concat(tt(D))}function hr(M,D){var _={forceEmbedLayout:!0};return D&&I()(D)==="object"&&Object.assign(_,D),"".concat(sr(_)).concat(M).concat(tt(_))}function sr(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=typeof M.origin=="string"?M.origin:Te;return D.replace(/\/$/,"")}function yr(M,D,_){if(!D||!M||!M.parentNode)throw new Error("Invalid Element");M.id&&(D.id=M.id),M.className&&(D.className=M.className),zn(D,_),M.replaceWith(D)}function Br(M){if(typeof M=="string"){var D=document.getElementById(M);if(!D)throw new Error("Could not find element with id '".concat(M,"'"));return D}else if(M instanceof HTMLElement)return M;throw new Error("Invalid element: ".concat(M))}function Mn(M){return M&&M.newWindow===!1?"_self":"_blank"}function zn(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=Object.hasOwnProperty.call(D,"height")?"".concat(D.height):"".concat(Ge),ce=Object.hasOwnProperty.call(D,"width")?"".concat(D.width):void 0;M.setAttribute("height",_),ce?M.setAttribute("width",ce):M.setAttribute("style","width:100%;")}var gn=function(){function M(D){We()(this,M),this.pending={},this.port=D,this.port.onmessage=this.messageListener.bind(this)}return ot()(M,[{key:"request",value:function(_){var ce=this,Ee=_.type,Ke=_.payload;return new Promise(function(Ve,rt){var at=kt();ce.pending[at]={resolve:Ve,reject:rt},ce.port.postMessage({type:Ee,payload:Le()(Le()({},Ke),{},{__reqid:at})})})}},{key:"messageListener",value:function(_){var ce;if(typeof((ce=_.data.payload)===null||ce===void 0?void 0:ce.__reqid)=="string"){var Ee=_.data,Ke=Ee.type,Ve=Ee.payload,rt=Ve.__reqid,at=Ve.__success,ct=Ve.__error;this.pending[rt]&&(at?this.pending[rt].resolve(this.cleanResult(Ve)):this.pending[rt].reject(ct?"".concat(Ke,": ").concat(ct):Ke),delete this.pending[rt])}}},{key:"cleanResult",value:function(_){var ce=Le()({},_);return delete ce.__reqid,delete ce.__success,delete ce.__error,Object.keys(ce).length?ce:null}}]),M}(),cn=function(){function M(D,_){var ce=this;We()(this,M),this.editor={openFile:function(Ke){return ce._rdc.request({type:"SDK_OPEN_FILE",payload:{path:Ke}})},setCurrentFile:function(Ke){return ce._rdc.request({type:"SDK_SET_CURRENT_FILE",payload:{path:Ke}})},setTheme:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_THEME",payload:{theme:Ke}})},setView:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_VIEW",payload:{view:Ke}})},showSidebar:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ce._rdc.request({type:"SDK_TOGGLE_SIDEBAR",payload:{visible:Ke}})}},this.preview={origin:"",getUrl:function(){return ce._rdc.request({type:"SDK_GET_PREVIEW_URL",payload:{}}).then(function(Ke){var Ve;return(Ve=Ke==null?void 0:Ke.url)!==null&&Ve!==void 0?Ve:null})},setUrl:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";if(typeof Ke!="string"||!Ke.startsWith("/"))throw new Error("Invalid argument: expected a path starting with '/', got '".concat(Ke,"'"));return ce._rdc.request({type:"SDK_SET_PREVIEW_URL",payload:{path:Ke}})}},this._rdc=new gn(D),Object.defineProperty(this.preview,"origin",{value:typeof _.previewOrigin=="string"?_.previewOrigin:null,writable:!1})}return ot()(M,[{key:"applyFsDiff",value:function(_){var ce=function(Ke){return Ke!==null&&I()(Ke)==="object"};if(!ce(_)||!ce(_.create))throw new Error("Invalid diff object: expected diff.create to be an object.");if(!Array.isArray(_.destroy))throw new Error("Invalid diff object: expected diff.destroy to be an array.");return this._rdc.request({type:"SDK_APPLY_FS_DIFF",payload:_})}},{key:"getDependencies",value:function(){return this._rdc.request({type:"SDK_GET_DEPS_SNAPSHOT",payload:{}})}},{key:"getFsSnapshot",value:function(){return this._rdc.request({type:"SDK_GET_FS_SNAPSHOT",payload:{}})}}]),M}(),Rr=[],vn=ot()(function M(D){var _=this;We()(this,M),this.id=kt(),this.element=D,this.pending=new Promise(function(ce,Ee){var Ke=function(tr){var $t=tr.data,Ut=tr.ports;($t==null?void 0:$t.action)==="SDK_INIT_SUCCESS"&&$t.id===_.id&&(_.vm=new cn(Ut[0],$t.payload),ce(_.vm),rt())},Ve=function(){var tr;(tr=_.element.contentWindow)===null||tr===void 0||tr.postMessage({action:"SDK_INIT",id:_.id},"*")};function rt(){window.clearInterval(ct),window.removeEventListener("message",Ke)}window.addEventListener("message",Ke),Ve();var at=0,ct=window.setInterval(function(){if(_.vm){rt();return}if(at>=Ue){rt(),Ee("Timeout: Unable to establish a connection with the StackBlitz VM"),Rr.forEach(function(Nt,tr){Nt.id===_.id&&Rr.splice(tr,1)});return}at++,Ve()},Me)}),Rr.push(this)}),fa=function(D){var _,ce=D instanceof Element?"element":"id";return(_=Rr.find(function(Ee){return Ee[ce]===D}))!==null&&_!==void 0?_:null};function ba(M,D){var _=document.createElement("input");return _.type="hidden",_.name=M,_.value=D,_}function aa(M){return M.replace(/\[/g,"%5B").replace(/\]/g,"%5D")}function va(M){var D=M.template,_=M.title,ce=M.description,Ee=M.dependencies,Ke=M.files,Ve=M.settings;if(!st.includes(D)){var rt=st.map(function(tr){return"'".concat(tr,"'")}).join(", ");console.warn("Unsupported project.template: must be one of ".concat(rt))}var at=[],ct=function($t,Ut){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";at.push(ba($t,typeof Ut=="string"?Ut:ir))};ct("project[title]",_),typeof ce=="string"&&ce.length>0&&ct("project[description]",ce),ct("project[template]",D,"javascript"),Ee&&(D==="node"?console.warn("Invalid project.dependencies: dependencies must be provided as a 'package.json' file when using the 'node' template."):ct("project[dependencies]",JSON.stringify(Ee))),Ve&&ct("project[settings]",JSON.stringify(Ve)),Object.entries(Ke).forEach(function(tr){var $t=Oe()(tr,2),Ut=$t[0],ir=$t[1];ct("project[files][".concat(aa(Ut),"]"),ir)});var Nt=document.createElement("form");return Nt.method="POST",Nt.setAttribute("style","display:none!important;"),Nt.append.apply(Nt,at),Nt}function jn(M,D){var _=va(M);_.action=hr("/run",D),_.id="sb_run";var ce=` +For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Te(Ce,tt){var $e=(0,B.ax)(tt),De=(0,A.pi)((0,A.pi)({},B.Z0),Ce),nt=De.locale,ut=De.defaultLocale,Et=De.onError;return nt?!Intl.NumberFormat.supportedLocalesOf(nt).length&&Et?Et(new Q.gb('Missing locale data for locale: "'.concat(nt,'" in Intl.NumberFormat. Using default locale: "').concat(ut,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(nt).length&&Et&&Et(new Q.gb('Missing locale data for locale: "'.concat(nt,'" in Intl.DateTimeFormat. Using default locale: "').concat(ut,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(Et&&Et(new Q.OV('"locale" was not configured, using "'.concat(ut,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),De.locale=De.defaultLocale||"en"),ye(De),(0,A.pi)((0,A.pi)({},De),{formatters:$e,formatNumber:ve.bind(null,De,$e.getNumberFormat),formatNumberToParts:V.bind(null,De,$e.getNumberFormat),formatRelativeTime:O.bind(null,De,$e.getRelativeTimeFormat),formatDate:W.bind(null,De,$e.getDateTimeFormat),formatDateToParts:H.bind(null,De,$e.getDateTimeFormat),formatTime:w.bind(null,De,$e.getDateTimeFormat),formatDateTimeRange:Z.bind(null,De,$e.getDateTimeFormat),formatTimeToParts:X.bind(null,De,$e.getDateTimeFormat),formatPlural:Pe.bind(null,De,$e.getPluralRules),formatMessage:Ae.bind(null,De,$e),$t:Ae.bind(null,De,$e),formatList:He.bind(null,De,$e.getListFormat),formatListToParts:et.bind(null,De,$e.getListFormat),formatDisplayName:fe.bind(null,De,$e.getDisplayNames)})}var ue=e(85030),me=e(76853),Ie=e(59370);function le(Ce){return{locale:Ce.locale,timeZone:Ce.timeZone,fallbackOnEmptyString:Ce.fallbackOnEmptyString,formats:Ce.formats,textComponent:Ce.textComponent,messages:Ce.messages,defaultLocale:Ce.defaultLocale,defaultFormats:Ce.defaultFormats,onError:Ce.onError,onWarn:Ce.onWarn,wrapRichTextChunksInFragment:Ce.wrapRichTextChunksInFragment,defaultRichTextElements:Ce.defaultRichTextElements}}function Se(Ce){return Ce&&Object.keys(Ce).reduce(function(tt,$e){var De=Ce[$e];return tt[$e]=(0,Ie.Gt)(De)?(0,ue.dt)(De):De,tt},{})}var Fe=function(Ce,tt,$e,De){for(var nt=[],ut=4;ut0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return M.length!==D.length||M.some((_,ce)=>!Object.is(_,D[ce]))}function N(M){if(M==null||typeof M.didCatch!="boolean"||typeof M.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found");return!0}function B(){const M=useContext(b);N(M);const[D,_]=useState({error:null,hasError:!1}),ce=useMemo(()=>({resetBoundary:()=>{M==null||M.resetErrorBoundary(),_({error:null,hasError:!1})},showBoundary:Ee=>_({error:Ee,hasError:!0})}),[M==null?void 0:M.resetErrorBoundary]);if(D.hasError)throw D.error;return ce}function A(M,D){const _=forwardRef((Ee,Ke)=>createElement(R,D,createElement(M,Wc(Zc({},Ee),{ref:Ke})))),ce=M.displayName||M.name||"Unknown";return _.displayName="withErrorBoundary(".concat(ce,")"),_}function L(){return L=Object.assign?Object.assign.bind():function(M){for(var D=1;DM.length)&&(D=M.length);for(var _=0,ce=new Array(D);_1&&(typeof window=="undefined"||window.innerWidth>1024)){for(var ir=0;irM.length)&&(D=M.length);for(var _=0,ce=new Array(D);_M.length)&&(D=M.length);for(var _=0,ce=new Array(D);_M.length)&&(D=M.length);for(var _=0,ce=new Array(D);_',isBinary:!1},at[Nt]={content:(0,re.AM)(ct.react),isBinary:!1};var tr=re.EV.applyPlugins({type:o.Ac.modify,key:"modifyCodeSandboxData",initialValue:{files:at},args:M});return(0,et.Z)(tr)}var Se=function(D,_){var ce,Ee=document.createElement("form"),Ke=document.createElement("input"),Ve=le(D);Ee.method="POST",Ee.target="_blank",Ee.style.display="none",Ee.action=(_==null?void 0:_.api)||Ie,Ee.appendChild(Ke),Ee.setAttribute("data-demo",((ce=D.assets)===null||ce===void 0?void 0:ce.id)||""),Ke.name="parameters",Ke.value=Ve,document.body.appendChild(Ee),Ee.submit(),Ee.remove()},Fe=e(77117),Le=e.n(Fe),je=e(15033),We=e.n(je),ht=e(96345),ot=e.n(ht),St=e(27566),I=e.n(St),ne=e(28152),Oe=e.n(ne),Me=500,Ue=20,Ge=300,we="https://stackblitz.com",st=["angular-cli","create-react-app","html","javascript","node","polymer","typescript","vue"],ft=["project","search","ports","settings"],vt=["light","dark"],_t=["editor","preview"],Ce={clickToLoad:function(D){return $e("ctl",D)},devToolsHeight:function(D){return nt("devtoolsheight",D)},forceEmbedLayout:function(D){return $e("embed",D)},hideDevTools:function(D){return $e("hidedevtools",D)},hideExplorer:function(D){return $e("hideExplorer",D)},hideNavigation:function(D){return $e("hideNavigation",D)},openFile:function(D){return Et("file",D)},showSidebar:function(D){return De("showSidebar",D)},sidebarView:function(D){return ut("sidebarView",D,ft)},startScript:function(D){return Et("startScript",D)},terminalHeight:function(D){return nt("terminalHeight",D)},theme:function(D){return ut("theme",D,vt)},view:function(D){return ut("view",D,_t)},zenMode:function(D){return $e("zenMode",D)}};function tt(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=Object.entries(M).map(function(_){var ce=Oe()(_,2),Ee=ce[0],Ke=ce[1];return Ke!=null&&Ce.hasOwnProperty(Ee)?Ce[Ee](Ke):""}).filter(Boolean);return D.length?"?".concat(D.join("&")):""}function $e(M,D){return D===!0?"".concat(M,"=1"):""}function De(M,D){return typeof D=="boolean"?"".concat(M,"=").concat(D?"1":"0"):""}function nt(M,D){if(typeof D=="number"&&!Number.isNaN(D)){var _=Math.min(100,Math.max(0,D));return"".concat(M,"=").concat(encodeURIComponent(Math.round(_)))}return""}function ut(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return _.includes(D)?"".concat(M,"=").concat(encodeURIComponent(D)):""}function Et(M,D){var _=Array.isArray(D)?D:[D];return _.filter(function(ce){return typeof ce=="string"&&ce.trim()!==""}).map(function(ce){return"".concat(M,"=").concat(encodeURIComponent(ce))}).join("&")}function kt(){return Math.random().toString(36).slice(2,6)+Math.random().toString(36).slice(2,6)}function Vt(M,D){return"".concat(sr(D)).concat(M).concat(tt(D))}function hr(M,D){var _={forceEmbedLayout:!0};return D&&I()(D)==="object"&&Object.assign(_,D),"".concat(sr(_)).concat(M).concat(tt(_))}function sr(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=typeof M.origin=="string"?M.origin:we;return D.replace(/\/$/,"")}function yr(M,D,_){if(!D||!M||!M.parentNode)throw new Error("Invalid Element");M.id&&(D.id=M.id),M.className&&(D.className=M.className),zn(D,_),M.replaceWith(D)}function Fr(M){if(typeof M=="string"){var D=document.getElementById(M);if(!D)throw new Error("Could not find element with id '".concat(M,"'"));return D}else if(M instanceof HTMLElement)return M;throw new Error("Invalid element: ".concat(M))}function kn(M){return M&&M.newWindow===!1?"_self":"_blank"}function zn(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=Object.hasOwnProperty.call(D,"height")?"".concat(D.height):"".concat(Ge),ce=Object.hasOwnProperty.call(D,"width")?"".concat(D.width):void 0;M.setAttribute("height",_),ce?M.setAttribute("width",ce):M.setAttribute("style","width:100%;")}var In=function(){function M(D){We()(this,M),this.pending={},this.port=D,this.port.onmessage=this.messageListener.bind(this)}return ot()(M,[{key:"request",value:function(_){var ce=this,Ee=_.type,Ke=_.payload;return new Promise(function(Ve,rt){var at=kt();ce.pending[at]={resolve:Ve,reject:rt},ce.port.postMessage({type:Ee,payload:Le()(Le()({},Ke),{},{__reqid:at})})})}},{key:"messageListener",value:function(_){var ce;if(typeof((ce=_.data.payload)===null||ce===void 0?void 0:ce.__reqid)=="string"){var Ee=_.data,Ke=Ee.type,Ve=Ee.payload,rt=Ve.__reqid,at=Ve.__success,ct=Ve.__error;this.pending[rt]&&(at?this.pending[rt].resolve(this.cleanResult(Ve)):this.pending[rt].reject(ct?"".concat(Ke,": ").concat(ct):Ke),delete this.pending[rt])}}},{key:"cleanResult",value:function(_){var ce=Le()({},_);return delete ce.__reqid,delete ce.__success,delete ce.__error,Object.keys(ce).length?ce:null}}]),M}(),cn=function(){function M(D,_){var ce=this;We()(this,M),this.editor={openFile:function(Ke){return ce._rdc.request({type:"SDK_OPEN_FILE",payload:{path:Ke}})},setCurrentFile:function(Ke){return ce._rdc.request({type:"SDK_SET_CURRENT_FILE",payload:{path:Ke}})},setTheme:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_THEME",payload:{theme:Ke}})},setView:function(Ke){return ce._rdc.request({type:"SDK_SET_UI_VIEW",payload:{view:Ke}})},showSidebar:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ce._rdc.request({type:"SDK_TOGGLE_SIDEBAR",payload:{visible:Ke}})}},this.preview={origin:"",getUrl:function(){return ce._rdc.request({type:"SDK_GET_PREVIEW_URL",payload:{}}).then(function(Ke){var Ve;return(Ve=Ke==null?void 0:Ke.url)!==null&&Ve!==void 0?Ve:null})},setUrl:function(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";if(typeof Ke!="string"||!Ke.startsWith("/"))throw new Error("Invalid argument: expected a path starting with '/', got '".concat(Ke,"'"));return ce._rdc.request({type:"SDK_SET_PREVIEW_URL",payload:{path:Ke}})}},this._rdc=new In(D),Object.defineProperty(this.preview,"origin",{value:typeof _.previewOrigin=="string"?_.previewOrigin:null,writable:!1})}return ot()(M,[{key:"applyFsDiff",value:function(_){var ce=function(Ke){return Ke!==null&&I()(Ke)==="object"};if(!ce(_)||!ce(_.create))throw new Error("Invalid diff object: expected diff.create to be an object.");if(!Array.isArray(_.destroy))throw new Error("Invalid diff object: expected diff.destroy to be an array.");return this._rdc.request({type:"SDK_APPLY_FS_DIFF",payload:_})}},{key:"getDependencies",value:function(){return this._rdc.request({type:"SDK_GET_DEPS_SNAPSHOT",payload:{}})}},{key:"getFsSnapshot",value:function(){return this._rdc.request({type:"SDK_GET_FS_SNAPSHOT",payload:{}})}}]),M}(),Rr=[],vn=ot()(function M(D){var _=this;We()(this,M),this.id=kt(),this.element=D,this.pending=new Promise(function(ce,Ee){var Ke=function(tr){var $t=tr.data,Ut=tr.ports;($t==null?void 0:$t.action)==="SDK_INIT_SUCCESS"&&$t.id===_.id&&(_.vm=new cn(Ut[0],$t.payload),ce(_.vm),rt())},Ve=function(){var tr;(tr=_.element.contentWindow)===null||tr===void 0||tr.postMessage({action:"SDK_INIT",id:_.id},"*")};function rt(){window.clearInterval(ct),window.removeEventListener("message",Ke)}window.addEventListener("message",Ke),Ve();var at=0,ct=window.setInterval(function(){if(_.vm){rt();return}if(at>=Ue){rt(),Ee("Timeout: Unable to establish a connection with the StackBlitz VM"),Rr.forEach(function(Nt,tr){Nt.id===_.id&&Rr.splice(tr,1)});return}at++,Ve()},Me)}),Rr.push(this)}),pa=function(D){var _,ce=D instanceof Element?"element":"id";return(_=Rr.find(function(Ee){return Ee[ce]===D}))!==null&&_!==void 0?_:null};function Ta(M,D){var _=document.createElement("input");return _.type="hidden",_.name=M,_.value=D,_}function oa(M){return M.replace(/\[/g,"%5B").replace(/\]/g,"%5D")}function ma(M){var D=M.template,_=M.title,ce=M.description,Ee=M.dependencies,Ke=M.files,Ve=M.settings;if(!st.includes(D)){var rt=st.map(function(tr){return"'".concat(tr,"'")}).join(", ");console.warn("Unsupported project.template: must be one of ".concat(rt))}var at=[],ct=function($t,Ut){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";at.push(Ta($t,typeof Ut=="string"?Ut:ir))};ct("project[title]",_),typeof ce=="string"&&ce.length>0&&ct("project[description]",ce),ct("project[template]",D,"javascript"),Ee&&(D==="node"?console.warn("Invalid project.dependencies: dependencies must be provided as a 'package.json' file when using the 'node' template."):ct("project[dependencies]",JSON.stringify(Ee))),Ve&&ct("project[settings]",JSON.stringify(Ve)),Object.entries(Ke).forEach(function(tr){var $t=Oe()(tr,2),Ut=$t[0],ir=$t[1];ct("project[files][".concat(oa(Ut),"]"),ir)});var Nt=document.createElement("form");return Nt.method="POST",Nt.setAttribute("style","display:none!important;"),Nt.append.apply(Nt,at),Nt}function jn(M,D){var _=ma(M);_.action=hr("/run",D),_.id="sb_run";var ce=` `.concat(_.outerHTML,` + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-boolean-demo-example/index.html b/~demos/packages-hooks-src-use-boolean-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-boolean-demo-example/index.html +++ b/~demos/packages-hooks-src-use-boolean-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html b/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html +++ b/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-clipboard-demo-example/index.html b/~demos/packages-hooks-src-use-clipboard-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-clipboard-demo-example/index.html +++ b/~demos/packages-hooks-src-use-clipboard-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-color-schema-demo-example/index.html b/~demos/packages-hooks-src-use-color-schema-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-color-schema-demo-example/index.html +++ b/~demos/packages-hooks-src-use-color-schema-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-counter-demo-example/index.html b/~demos/packages-hooks-src-use-counter-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-counter-demo-example/index.html +++ b/~demos/packages-hooks-src-use-counter-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-creation-index-demo-example/index.html b/~demos/packages-hooks-src-use-creation-index-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-creation-index-demo-example/index.html +++ b/~demos/packages-hooks-src-use-creation-index-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-debounce-demo-example/index.html b/~demos/packages-hooks-src-use-debounce-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-debounce-demo-example/index.html +++ b/~demos/packages-hooks-src-use-debounce-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html b/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-latest-demo-example/index.html b/~demos/packages-hooks-src-use-latest-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-latest-demo-example/index.html +++ b/~demos/packages-hooks-src-use-latest-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html b/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html b/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html +++ b/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-mount-demo-example/index.html b/~demos/packages-hooks-src-use-mount-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-mount-demo-example/index.html +++ b/~demos/packages-hooks-src-use-mount-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-network-demo-example/index.html b/~demos/packages-hooks-src-use-network-demo-example/index.html new file mode 100644 index 0000000..cada7b3 --- /dev/null +++ b/~demos/packages-hooks-src-use-network-demo-example/index.html @@ -0,0 +1,12 @@ + + + + +Etcetera hooks + + + +
+ + + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-os-demo-example/index.html b/~demos/packages-hooks-src-use-os-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-os-demo-example/index.html +++ b/~demos/packages-hooks-src-use-os-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-debounce-demo-debounce/index.html b/~demos/packages-hooks-src-use-request-doc-debounce-demo-debounce/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-debounce-demo-debounce/index.html +++ b/~demos/packages-hooks-src-use-request-doc-debounce-demo-debounce/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html b/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html +++ b/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html b/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html +++ b/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-polling-demo-polling/index.html b/~demos/packages-hooks-src-use-request-doc-polling-demo-polling/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-polling-demo-polling/index.html +++ b/~demos/packages-hooks-src-use-request-doc-polling-demo-polling/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-polling-demo-pollingerror/index.html b/~demos/packages-hooks-src-use-request-doc-polling-demo-pollingerror/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-request-doc-polling-demo-pollingerror/index.html +++ b/~demos/packages-hooks-src-use-request-doc-polling-demo-pollingerror/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-reset-state-demo-example/index.html b/~demos/packages-hooks-src-use-reset-state-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-reset-state-demo-example/index.html +++ b/~demos/packages-hooks-src-use-reset-state-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-set-demo-example/index.html b/~demos/packages-hooks-src-use-set-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-set-demo-example/index.html +++ b/~demos/packages-hooks-src-use-set-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-throttle-demo-example/index.html b/~demos/packages-hooks-src-use-throttle-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-throttle-demo-example/index.html +++ b/~demos/packages-hooks-src-use-throttle-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-throttle-fn-demo-example/index.html b/~demos/packages-hooks-src-use-throttle-fn-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-throttle-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-throttle-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-title-demo-example/index.html b/~demos/packages-hooks-src-use-title-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-title-demo-example/index.html +++ b/~demos/packages-hooks-src-use-title-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-toggle-demo-example/index.html b/~demos/packages-hooks-src-use-toggle-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-toggle-demo-example/index.html +++ b/~demos/packages-hooks-src-use-toggle-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-toggle-demo-example2/index.html b/~demos/packages-hooks-src-use-toggle-demo-example2/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-toggle-demo-example2/index.html +++ b/~demos/packages-hooks-src-use-toggle-demo-example2/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-unmount-demo-example/index.html b/~demos/packages-hooks-src-use-unmount-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-unmount-demo-example/index.html +++ b/~demos/packages-hooks-src-use-unmount-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html b/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html +++ b/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-update-demo-example/index.html b/~demos/packages-hooks-src-use-update-demo-example/index.html index 531d00c..cada7b3 100644 --- a/~demos/packages-hooks-src-use-update-demo-example/index.html +++ b/~demos/packages-hooks-src-use-update-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-window-event-demo-example/index.html b/~demos/packages-hooks-src-use-window-event-demo-example/index.html new file mode 100644 index 0000000..cada7b3 --- /dev/null +++ b/~demos/packages-hooks-src-use-window-event-demo-example/index.html @@ -0,0 +1,12 @@ + + + + +Etcetera hooks + + + +
+ + + \ No newline at end of file