From eaa09a88d385d19cc93bc9b26597caad239eead8 Mon Sep 17 00:00:00 2001 From: sergeysova <5620073+sergeysova@users.noreply.github.com> Date: Fri, 15 Dec 2023 12:04:15 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20effector?= =?UTF-8?q?/patronum@d74cbd961e3c46fb4e13d6e1e362a49a6d6c970a=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 | 18 ++++++------ assets/css/styles.163bd5ee.css | 1 + assets/css/styles.9614547d.css | 1 - assets/js/08154ee9.011f7e3f.js | 1 + assets/js/08154ee9.20f2322d.js | 1 - assets/js/08f30e7d.ad0ac244.js | 1 + assets/js/08f30e7d.b55ffd9c.js | 1 - assets/js/1178bc06.2ff96855.js | 1 - assets/js/1178bc06.b61c1d3d.js | 1 + assets/js/17896441.091b0213.js | 1 - assets/js/17896441.98c8b99a.js | 1 + assets/js/1a4e3797.67205d40.js | 2 ++ assets/js/1a4e3797.67205d40.js.LICENSE.txt | 1 + assets/js/1a4e3797.bbf5a46b.js | 2 -- assets/js/1a4e3797.bbf5a46b.js.LICENSE.txt | 1 - assets/js/1ae5d93b.85fac64d.js | 1 + assets/js/1ae5d93b.cbd18f44.js | 1 - assets/js/1be78505.51b45561.js | 1 + assets/js/1be78505.a3fef0ca.js | 1 - ...93b7f.37dfdc4a.js => 1df93b7f.52a1d67f.js} | 2 +- assets/js/1f391b9e.48bd894a.js | 1 + assets/js/1f391b9e.d7a93e55.js | 1 - assets/js/2b95ca9d.9f76bd77.js | 1 - assets/js/2b95ca9d.d3b76552.js | 1 + assets/js/308aca62.59e32b7c.js | 1 - assets/js/308aca62.b045aa80.js | 1 + assets/js/33c22581.0eb23410.js | 1 - assets/js/33c22581.de5322e1.js | 1 + assets/js/391.9664fa7c.js | 1 - assets/js/4af54caf.0b1ea9c3.js | 1 + assets/js/4af54caf.ceab87e8.js | 1 - assets/js/4d9d995f.4ead4532.js | 1 - assets/js/4d9d995f.aa00eebb.js | 1 + assets/js/530.f5cc4ef9.js | 1 + assets/js/5b0e0e08.975d4ae9.js | 1 + assets/js/5b0e0e08.ffc5f899.js | 1 - assets/js/6256d5c3.49478c67.js | 1 + assets/js/6256d5c3.8607788e.js | 1 - assets/js/638.b54116d7.js | 1 + .../js/{183.fbf1cbae.js => 654.d636b64d.js} | 2 +- assets/js/67c026b6.3a469de0.js | 1 - assets/js/67c026b6.8e6669d1.js | 1 + assets/js/7921cf10.f96dc439.js | 1 + assets/js/84071e39.321abdbd.js | 1 + assets/js/84071e39.c7a34779.js | 1 - assets/js/8d76850e.662cf357.js | 1 + assets/js/8d76850e.ac0fc698.js | 1 - .../js/{803.7f7c270e.js => 901.5fd7132c.js} | 2 +- assets/js/93.a2b79ba7.js | 1 - assets/js/935f2afb.95e49b9c.js | 1 + assets/js/935f2afb.bcb89381.js | 1 - .../js/{874.519a8f23.js => 967.d43ac743.js} | 2 +- ...828ab.e1fb4f64.js => 978828ab.1ad8f25b.js} | 2 +- assets/js/97ffe59f.983e3cb0.js | 1 + assets/js/97ffe59f.e6e36e03.js | 1 - assets/js/9dc53199.034d793b.js | 1 - assets/js/9dc53199.13b40e3c.js | 1 + assets/js/a765e1a2.4454540d.js | 1 - assets/js/a765e1a2.b6852205.js | 1 + assets/js/a7fdbc71.624c5cce.js | 1 - assets/js/a7fdbc71.8c5cb0f4.js | 1 + assets/js/a9298e25.a535df35.js | 1 + assets/js/a9298e25.d4bdbfaa.js | 1 - assets/js/ad512b16.2de7ded0.js | 1 + assets/js/ad512b16.823efa27.js | 1 - assets/js/b41febc4.c1f4a408.js | 1 - assets/js/b41febc4.fb3c65a7.js | 1 + assets/js/c7a80478.c92878af.js | 1 - assets/js/c7a80478.e20ccc9f.js | 1 + assets/js/c9ae8b2d.e7ae4f05.js | 1 - assets/js/c9ae8b2d.e7e15d92.js | 1 + assets/js/deda2cf3.6f2a713d.js | 1 + assets/js/deda2cf3.7cf3a9b3.js | 1 - assets/js/e09d216d.1cad6e0f.js | 1 - assets/js/e09d216d.5c109b9d.js | 1 + assets/js/e55f1e0e.0eeec080.js | 1 - assets/js/e55f1e0e.1e3aaf8e.js | 1 + assets/js/e9221267.5d0d64ec.js | 1 - assets/js/e9221267.8faa3552.js | 1 + assets/js/f304a758.6729241d.js | 1 - assets/js/f304a758.756c8e8b.js | 1 + assets/js/f6536843.20f6a121.js | 1 + assets/js/f6536843.7e6a94bf.js | 1 - assets/js/main.535b577d.js | 2 -- assets/js/main.849a2d8c.js | 2 ++ ...CENSE.txt => main.849a2d8c.js.LICENSE.txt} | 10 +++++++ assets/js/runtime~main.c0401702.js | 1 - assets/js/runtime~main.c83f3d46.js | 1 + docs/installation/index.html | 18 ++++++------ docs/migration-guide/index.html | 20 ++++++------- index.html | 18 ++++++------ methods/and/index.html | 20 ++++++------- methods/combine-events/index.html | 19 ++++++------ methods/condition/index.html | 18 ++++++------ methods/debounce/index.html | 23 ++++++++------- methods/debug/index.html | 24 +++++++-------- methods/delay/index.html | 27 ++++++++++------- methods/either/index.html | 20 ++++++------- methods/empty/index.html | 20 ++++++------- methods/equals/index.html | 18 ++++++------ methods/every/index.html | 24 +++++++-------- methods/format/index.html | 20 ++++++------- methods/in-flight/index.html | 23 ++++++++------- methods/index.html | 18 ++++++------ methods/interval/index.html | 24 +++++++-------- methods/not/index.html | 20 ++++++------- methods/once/index.html | 22 +++++++------- methods/or/index.html | 20 ++++++------- methods/pending/index.html | 29 ++++++++++--------- methods/previous/index.html | 16 ++++++++++ methods/reset/index.html | 18 ++++++------ methods/reshape/index.html | 20 ++++++------- methods/snapshot/index.html | 20 ++++++------- methods/some/index.html | 24 +++++++-------- methods/split-map/index.html | 20 ++++++------- methods/spread/index.html | 23 ++++++++------- methods/status/index.html | 21 +++++++------- methods/throttle/index.html | 23 ++++++++------- methods/time/index.html | 22 +++++++------- search/index.html | 18 ++++++------ sitemap.xml | 2 +- 121 files changed, 418 insertions(+), 377 deletions(-) create mode 100644 assets/css/styles.163bd5ee.css delete mode 100644 assets/css/styles.9614547d.css create mode 100644 assets/js/08154ee9.011f7e3f.js delete mode 100644 assets/js/08154ee9.20f2322d.js create mode 100644 assets/js/08f30e7d.ad0ac244.js delete mode 100644 assets/js/08f30e7d.b55ffd9c.js delete mode 100644 assets/js/1178bc06.2ff96855.js create mode 100644 assets/js/1178bc06.b61c1d3d.js delete mode 100644 assets/js/17896441.091b0213.js create mode 100644 assets/js/17896441.98c8b99a.js create mode 100644 assets/js/1a4e3797.67205d40.js create mode 100644 assets/js/1a4e3797.67205d40.js.LICENSE.txt delete mode 100644 assets/js/1a4e3797.bbf5a46b.js delete mode 100644 assets/js/1a4e3797.bbf5a46b.js.LICENSE.txt create mode 100644 assets/js/1ae5d93b.85fac64d.js delete mode 100644 assets/js/1ae5d93b.cbd18f44.js create mode 100644 assets/js/1be78505.51b45561.js delete mode 100644 assets/js/1be78505.a3fef0ca.js rename assets/js/{1df93b7f.37dfdc4a.js => 1df93b7f.52a1d67f.js} (99%) create mode 100644 assets/js/1f391b9e.48bd894a.js delete mode 100644 assets/js/1f391b9e.d7a93e55.js delete mode 100644 assets/js/2b95ca9d.9f76bd77.js create mode 100644 assets/js/2b95ca9d.d3b76552.js delete mode 100644 assets/js/308aca62.59e32b7c.js create mode 100644 assets/js/308aca62.b045aa80.js delete mode 100644 assets/js/33c22581.0eb23410.js create mode 100644 assets/js/33c22581.de5322e1.js delete mode 100644 assets/js/391.9664fa7c.js create mode 100644 assets/js/4af54caf.0b1ea9c3.js delete mode 100644 assets/js/4af54caf.ceab87e8.js delete mode 100644 assets/js/4d9d995f.4ead4532.js create mode 100644 assets/js/4d9d995f.aa00eebb.js create mode 100644 assets/js/530.f5cc4ef9.js create mode 100644 assets/js/5b0e0e08.975d4ae9.js delete mode 100644 assets/js/5b0e0e08.ffc5f899.js create mode 100644 assets/js/6256d5c3.49478c67.js delete mode 100644 assets/js/6256d5c3.8607788e.js create mode 100644 assets/js/638.b54116d7.js rename assets/js/{183.fbf1cbae.js => 654.d636b64d.js} (59%) delete mode 100644 assets/js/67c026b6.3a469de0.js create mode 100644 assets/js/67c026b6.8e6669d1.js create mode 100644 assets/js/7921cf10.f96dc439.js create mode 100644 assets/js/84071e39.321abdbd.js delete mode 100644 assets/js/84071e39.c7a34779.js create mode 100644 assets/js/8d76850e.662cf357.js delete mode 100644 assets/js/8d76850e.ac0fc698.js rename assets/js/{803.7f7c270e.js => 901.5fd7132c.js} (59%) delete mode 100644 assets/js/93.a2b79ba7.js create mode 100644 assets/js/935f2afb.95e49b9c.js delete mode 100644 assets/js/935f2afb.bcb89381.js rename assets/js/{874.519a8f23.js => 967.d43ac743.js} (88%) rename assets/js/{978828ab.e1fb4f64.js => 978828ab.1ad8f25b.js} (63%) create mode 100644 assets/js/97ffe59f.983e3cb0.js delete mode 100644 assets/js/97ffe59f.e6e36e03.js delete mode 100644 assets/js/9dc53199.034d793b.js create mode 100644 assets/js/9dc53199.13b40e3c.js delete mode 100644 assets/js/a765e1a2.4454540d.js create mode 100644 assets/js/a765e1a2.b6852205.js delete mode 100644 assets/js/a7fdbc71.624c5cce.js create mode 100644 assets/js/a7fdbc71.8c5cb0f4.js create mode 100644 assets/js/a9298e25.a535df35.js delete mode 100644 assets/js/a9298e25.d4bdbfaa.js create mode 100644 assets/js/ad512b16.2de7ded0.js delete mode 100644 assets/js/ad512b16.823efa27.js delete mode 100644 assets/js/b41febc4.c1f4a408.js create mode 100644 assets/js/b41febc4.fb3c65a7.js delete mode 100644 assets/js/c7a80478.c92878af.js create mode 100644 assets/js/c7a80478.e20ccc9f.js delete mode 100644 assets/js/c9ae8b2d.e7ae4f05.js create mode 100644 assets/js/c9ae8b2d.e7e15d92.js create mode 100644 assets/js/deda2cf3.6f2a713d.js delete mode 100644 assets/js/deda2cf3.7cf3a9b3.js delete mode 100644 assets/js/e09d216d.1cad6e0f.js create mode 100644 assets/js/e09d216d.5c109b9d.js delete mode 100644 assets/js/e55f1e0e.0eeec080.js create mode 100644 assets/js/e55f1e0e.1e3aaf8e.js delete mode 100644 assets/js/e9221267.5d0d64ec.js create mode 100644 assets/js/e9221267.8faa3552.js delete mode 100644 assets/js/f304a758.6729241d.js create mode 100644 assets/js/f304a758.756c8e8b.js create mode 100644 assets/js/f6536843.20f6a121.js delete mode 100644 assets/js/f6536843.7e6a94bf.js delete mode 100644 assets/js/main.535b577d.js create mode 100644 assets/js/main.849a2d8c.js rename assets/js/{main.535b577d.js.LICENSE.txt => main.849a2d8c.js.LICENSE.txt} (83%) delete mode 100644 assets/js/runtime~main.c0401702.js create mode 100644 assets/js/runtime~main.c83f3d46.js create mode 100644 methods/previous/index.html diff --git a/404.html b/404.html index 91cd5a9d..21ee1b42 100644 --- a/404.html +++ b/404.html @@ -1,16 +1,16 @@ - + - -Page Not Found | effector patronum - - + +Page Not Found | effector patronum + + -
-
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - +
+
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + \ No newline at end of file diff --git a/assets/css/styles.163bd5ee.css b/assets/css/styles.163bd5ee.css new file mode 100644 index 00000000..895286a1 --- /dev/null +++ b/assets/css/styles.163bd5ee.css @@ -0,0 +1 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal)}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.toggleButton_sInD,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:rgba(0,0,0,.1);--ifm-menu-link-padding-vertical:0.1875rem;--ifm-color-primary:#ff8c00;--ifm-color-primary-dark:#d66a00;--ifm-color-primary-darker:#be5e00;--ifm-color-primary-darkest:#a65200;--ifm-color-primary-light:#ef8319;--ifm-color-primary-lighter:#f19132;--ifm-color-primary-lightest:#f39f4c;--ifm-paper-background:#fff;--ifm-paper-foreground:#111827;--docusaurus-announcement-bar-height:auto;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base)}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_vWKg,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width);width:100%}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_TmB7 .wordWrapButtonIcon_GNhC{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_gRWy,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Vaj9:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_vzIZ article>:first-child,.docItemContainer_vzIZ header+*,.footer__item{margin-top:0}.admonitionContent_Jrgk>:last-child,.collapsibleContent_x598>:last-child,.footer__items{margin-bottom:0}.codeBlockStandalone_d_GO,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_J6f6[data-collapsed=false].isBrowser_iidN>summary:before,.details_J6f6[open]:not(.isBrowser_iidN)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter);content:""}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_g7nS,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_vkt6>li)>.containsTaskList_vkt6{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docusaurus-highlighted-code-line-bg:rgba(0,0,0,.3);--ifm-color-primary:#ff8c00;--ifm-color-primary-dark:#d66a00;--ifm-color-primary-darker:#be5e00;--ifm-color-primary-darkest:#a65200;--ifm-color-primary-light:#ef8319;--ifm-color-primary-lighter:#f19132;--ifm-color-primary-lightest:#f39f4c;--ifm-background-color:#1e293b;--ifm-navbar-background-color:#292524;--ifm-paper-background:var(--ifm-background-color);--ifm-paper-foreground:#f9fafb;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}.container{width:100%}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.hero{background-color:var(--ifm-paper-background);text-align:center;vertical-align:middle}.hero-logo{height:350px;max-width:100vw}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_W5ax,.sidebarLogo__qwC,.themedImage_Q_MY,[data-theme=dark] .lightToggleIcon_gNSF,[data-theme=light] .darkToggleIcon_udOP,html[data-announcement-bar-initially-dismissed=true] .announcementBar_MW_A{display:none}.skipToContent_gZEN{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_gZEN:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_nECp{line-height:0;padding:0}.content_OYtk{font-size:85%;padding:5px 0;text-align:center}.content_OYtk a{color:inherit;text-decoration:underline}.DocSearch-Container a,.tag_jiDT:hover{text-decoration:none}.announcementBar_MW_A{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_m5YH{flex:0 0 10px}.announcementBarClose_uNNo{align-self:stretch;flex:0 0 30px}.toggle_siZM{height:2rem;width:2rem}.toggleButton_sInD{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_sInD:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_TX_f{cursor:not-allowed}.darkNavbarColorModeToggle_VBZG:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedImage--dark_U_dk,[data-theme=light] .themedImage--light_UdwQ,html:not([data-theme]) .themedComponent--light_PNuK{display:initial}.iconExternalLink_Vz7m{margin-left:.3rem}.iconLanguage_gkzn{margin-right:5px;vertical-align:text-bottom}.navbarHideable_RgHW{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_IgQW{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_Isv5{color:red;white-space:pre-wrap}.footerLogoLink_BlGw{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BlGw:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_v8uG{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.iconEdit_v04G{margin-right:.3em;vertical-align:sub}.tag_jiDT{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_jiDT:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_mKrJ{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_LI1M{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_LI1M:after,.tagWithCount_LI1M:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_LI1M:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_LI1M:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_LI1M span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_hLb7{display:inline}.tag_vasp{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_S6mm{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_ohIc{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_ohIc:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_oZtt:after,.tocCollapsibleExpanded_lBZr{transform:none}.tocCollapsible_AjIu{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_aY0v>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_aY0v ul li{margin:.4rem .8rem}.tocCollapsibleContent_aY0v a{display:block}.searchQueryInput_BM1b,.searchVersionInput_u4og{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_BM1b:focus,.searchVersionInput_u4og:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_BM1b::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_DUrA{font-size:.9rem;font-weight:700}.algoliaLogo_T26C{max-width:150px}.algoliaLogoPathFill_Er6V{fill:var(--ifm-font-color-base)}.searchResultItem_hKZE{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_rcVX{font-weight:400;margin-bottom:0}.searchResultItemPath_M30Q{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_y6_V{font-style:italic;margin:.5rem 0 0}.loadingSpinner_sKue{animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes a{to{transform:rotate(1turn)}}.loader_vKX8{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_wjXS{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_wjXS:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_LjNE{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_WBDK{display:none;margin:0}.docMainContainer_Fdyb,.docPage_KBb8{display:flex;width:100%}.docPage_KBb8{flex:1 0}.docsWrapper_r438{display:flex;flex:1 0 auto}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup_mXgh button,.codeBlockContainer_N84M{background:var(--prism-background-color);color:var(--prism-color)}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_N84M{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_nxR4{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_qqJV{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_pCfA{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_qqJV+.codeBlockContent_nxR4 .codeBlock_pCfA{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_C3nw{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_g2nt{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup_mXgh{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup_mXgh button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup_mXgh button:focus-visible,.buttonGroup_mXgh button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup_mXgh button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_a7vS{counter-increment:a;display:table-row}.codeLineNumber_Vaj9{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Vaj9:before{content:counter(a);opacity:.4}.codeLineContent_p_Up{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_EpAB{opacity:1!important}.copyButtonIcons_XaES{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_BCoP,.copyButtonSuccessIcon_PRrX{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_PRrX{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_EpAB .copyButtonIcon_BCoP{opacity:0;transform:scale(.33)}.copyButtonCopied_EpAB .copyButtonSuccessIcon_PRrX{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_GNhC{height:1.2rem;width:1.2rem}.details_J6f6{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_J6f6>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_J6f6>summary::-webkit-details-marker{display:none}.details_J6f6>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_x598{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_HIJU{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.anchorWithStickyNavbar_Gdrn{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_NKWY{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.containsTaskList_vkt6{list-style:none}.img_zDip{height:auto}.tableOfContents_TE6K{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.admonition_q2U6{margin-bottom:1em}.admonitionHeading_gRWy{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_gRWy code{text-transform:none}.admonitionIcon_mc_3{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_mc_3 svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbHomeIcon_pDXS{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_rQtB{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.mdxPageWrapper_d0_V{justify-content:center}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:997px){.collapseSidebarButton_WBDK,.expandButton_NYYN{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_uNNo,.announcementBarPlaceholder_m5YH{flex-basis:50px}.searchBox_TfO7{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_S6mm{text-align:right}.tocMobile_GnNV{display:none}.collapseSidebarButton_WBDK{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_sMPD{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_jkcN,[dir=rtl] .collapseSidebarButtonIcon_sMPD{transform:rotate(0)}.collapseSidebarButton_WBDK:focus,.collapseSidebarButton_WBDK:hover,.expandButton_NYYN:focus,.expandButton_NYYN:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_Cp6y{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_K20X{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_K20X{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_cY_F{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_NDxv{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_rmep{padding-top:0}.sidebarHidden_Z6rM{opacity:0;visibility:hidden}.sidebarLogo__qwC{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo__qwC img{height:2rem;margin-right:.5rem}.expandButton_NYYN{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_jkcN{transform:rotate(180deg)}.docSidebarContainer_W5ax{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_JML0{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_h21Y{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_Fdyb{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_ZmJB{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_lHeq{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.docItemCol_lsiV{max-width:75%!important}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (min-width:1536px){.container{max-width:1536px}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_KMRx,.footer__link-separator,.navbar__item,.tableOfContents_TE6K{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_TfO7{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_DDqM{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_N5Y9,.searchResultsColumn_DUrA{max-width:60%!important}.searchLogoColumn_Bcxi,.searchVersionColumn_jBZU{max-width:40%!important}.searchLogoColumn_Bcxi{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_N5Y9{max-width:100%!important}.searchVersionColumn_jBZU{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_wjXS:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_MW_A,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_GnNV{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_C3nw{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/css/styles.9614547d.css b/assets/css/styles.9614547d.css deleted file mode 100644 index 5acc8021..00000000 --- a/assets/css/styles.9614547d.css +++ /dev/null @@ -1 +0,0 @@ -.col,.container{padding:0 var(--ifm-spacing-horizontal)}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.toggleButton_NzqH,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:rgba(0,0,0,.1);--ifm-menu-link-padding-vertical:0.1875rem;--ifm-color-primary:#ff8c00;--ifm-color-primary-dark:#d66a00;--ifm-color-primary-darker:#be5e00;--ifm-color-primary-darkest:#a65200;--ifm-color-primary-light:#ef8319;--ifm-color-primary-lighter:#f19132;--ifm-color-primary-lightest:#f39f4c;--ifm-paper-background:#fff;--ifm-paper-foreground:#111827;--docusaurus-announcement-bar-height:auto;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base)}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_xagx,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width);width:100%}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_n_SG .wordWrapButtonIcon_n3i3{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_xONs,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{-webkit-text-decoration-color:var(--ifm-alert-border-color);text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area.breadcrumbs__link[href]:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-webkit-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_ta_H:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_zvnQ article>:first-child,.docItemContainer_zvnQ header+*,.footer__item{margin-top:0}.admonitionContent_ZETI>:last-child,.collapsibleContent_nsBE>:last-child,.footer__items{margin-bottom:0}.codeBlockStandalone_FLaY,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_fNUO[data-collapsed=false].isBrowser_m527>summary:before,.details_fNUO[open]:not(.isBrowser_m527)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter);content:""}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.docsWrapper_xhvl,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.announcementBar_gdXL,.skipToContent_DFnh{z-index:calc(var(--ifm-z-index-fixed) + 1)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_Bgx6,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);transform:translate3d(-100%,0,0);transition-duration:.25s;transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);right:0;transition-duration:.1s;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_IdXS>li)>.containsTaskList_IdXS{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docusaurus-highlighted-code-line-bg:rgba(0,0,0,.3);--ifm-color-primary:#ff8c00;--ifm-color-primary-dark:#d66a00;--ifm-color-primary-darker:#be5e00;--ifm-color-primary-darkest:#a65200;--ifm-color-primary-light:#ef8319;--ifm-color-primary-lighter:#f19132;--ifm-color-primary-lightest:#f39f4c;--ifm-background-color:#1e293b;--ifm-navbar-background-color:#292524;--ifm-paper-background:var(--ifm-background-color);--ifm-paper-foreground:#f9fafb;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}.container{width:100%}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.hero{background-color:var(--ifm-paper-background);text-align:center;vertical-align:middle}.hero-logo{height:350px;max-width:100vw}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#docusaurus-base-url-issue-banner-container,.collapseSidebarButton_20pw,.docSidebarContainer_SbZl,.sidebarLogo_rW_A,.themedImage_JqrV,[data-theme=dark] .lightToggleIcon_eGum,[data-theme=light] .darkToggleIcon_MhaW,html[data-announcement-bar-initially-dismissed=true] .announcementBar_gdXL{display:none}.skipToContent_DFnh{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem}.skipToContent_DFnh:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_aLKC{line-height:0;padding:0}.content_sjNs{font-size:85%;padding:5px 0;text-align:center}.content_sjNs a{color:inherit;text-decoration:underline}.DocSearch-Container a,.tag_OJTx:hover{text-decoration:none}.announcementBar_gdXL{align-items:center;background-color:var(--ifm-color-white);box-shadow:var(--ifm-global-shadow-lw);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_iu6U{flex:0 0 10px}.announcementBarClose_fzSQ{align-self:stretch;flex:0 0 30px}.toggle_XYdl{height:2rem;width:2rem}.toggleButton_NzqH{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_NzqH:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_e800{cursor:not-allowed}[data-theme=dark] .themedImage--dark_CF8W,[data-theme=light] .themedImage--light_AmQA{display:initial}.iconExternalLink_yUT8{margin-left:.3rem}.iconLanguage_CwT7{margin-right:5px;vertical-align:text-bottom}.navbarHideable_aRw6{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_mobg{transform:translate3d(0,calc(-100% - 2px),0)}.footerLogoLink_OPts{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_OPts:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_SqHV{flex:1 0 auto}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.iconEdit_bqwS{margin-right:.3em;vertical-align:sub}.tag_OJTx{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_OJTx:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_p84Z{border-radius:.5rem;font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_KvJq{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_KvJq:after,.tagWithCount_KvJq:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_KvJq:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_KvJq:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_KvJq span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_fgNO{display:inline}.tag_IOSv{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_k34H{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_A4pk{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.tocCollapsibleButton_A4pk:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MmQk:after,.tocCollapsibleExpanded_0Ya2{transform:none}.tocCollapsible_ara1{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_eVeL>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_eVeL ul li{margin:.4rem .8rem}.tocCollapsibleContent_eVeL a{display:block}.searchQueryInput_N2Mv,.searchVersionInput_mzOm{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_N2Mv:focus,.searchVersionInput_mzOm:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_N2Mv::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_Q7AL{font-size:.9rem;font-weight:700}.algoliaLogo_H3D8{max-width:150px}.algoliaLogoPathFill_lzwp{fill:var(--ifm-font-color-base)}.searchResultItem_G2Tx{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_Y6Gv{font-weight:400;margin-bottom:0}.searchResultItemPath_wx6a{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_zBvJ{font-style:italic;margin:.5rem 0 0}.loadingSpinner_d0rt{animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes a{to{transform:rotate(1turn)}}.loader_RUz9{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_bUYD{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_bUYD:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_GKGC{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.docMainContainer_mKWM,.docPage_IabX{display:flex;width:100%}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:focus{outline:0}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup_uJ_n button,.codeBlockContainer_E88J{background:var(--prism-background-color);color:var(--prism-color)}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_E88J{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_jIuT{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_JuD6{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_jcrH{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_JuD6+.codeBlockContent_jIuT .codeBlock_jcrH{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_IV0G{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_DH6K{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup_uJ_n{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup_uJ_n button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity .2s ease-in-out}.buttonGroup_uJ_n button:focus-visible,.buttonGroup_uJ_n button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup_uJ_n button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_OVZT{counter-increment:a;display:table-row}.codeLineNumber_ta_H{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_ta_H:before{content:counter(a);opacity:.4}.codeLineContent_UnBW{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_SiMD{opacity:1!important}.copyButtonIcons_Cx0t{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_Ay8k,.copyButtonSuccessIcon_zkyL{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:.15s;width:inherit}.copyButtonSuccessIcon_zkyL{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_SiMD .copyButtonIcon_Ay8k{opacity:0;transform:scale(.33)}.copyButtonCopied_SiMD .copyButtonSuccessIcon_zkyL{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_n3i3{height:1.2rem;width:1.2rem}.details_fNUO{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_fNUO>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_fNUO>summary::-webkit-details-marker{display:none}.details_fNUO>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_nsBE{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_FtqB{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.anchorWithStickyNavbar_Ucjl{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_ijol{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.containsTaskList_IdXS{list-style:none}.img_ictY{height:auto}.tableOfContents_w9Ty{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.admonition_jq0h{margin-bottom:1em}.admonitionHeading_xONs{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_xONs code{text-transform:none}.admonitionIcon_eUWp{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_eUWp svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbsContainer_Wds5{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.breadcrumbHomeIcon_p01m{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.mdxPageWrapper_R1t2{justify-content:center}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:997px){.collapseSidebarButton_20pw,.expandButton_XWmA{background-color:var(--docusaurus-collapse-button-bg);position:sticky}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_fzSQ,.announcementBarPlaceholder_iu6U{flex-basis:50px}.searchBox_u3D6{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_k34H{text-align:right}.tocMobile_rOnY{display:none}.collapseSidebarButton_20pw{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px}.collapseSidebarButtonIcon_MSDn{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_EVv8,[dir=rtl] .collapseSidebarButtonIcon_MSDn{transform:rotate(0)}.collapseSidebarButton_20pw:focus,.collapseSidebarButton_20pw:hover,.expandButton_XWmA:focus,.expandButton_XWmA:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_xQpJ{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_xo_M{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_xo_M{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_XMVB{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_lvUT{display:flex;flex-direction:column;height:100%;max-height:100vh;padding-top:var(--ifm-navbar-height);position:sticky;top:0;transition:opacity 50ms;width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar__E2B{padding-top:0}.sidebarHidden_fRAk{height:0;opacity:0;overflow:hidden;visibility:hidden}.sidebarLogo_rW_A{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_rW_A img{height:2rem;margin-right:.5rem}.expandButton_XWmA{align-items:center;display:flex;height:100%;justify-content:center;max-height:100vh;top:0;transition:background-color var(--ifm-transition-fast) ease}[dir=rtl] .expandButtonIcon_EVv8{transform:rotate(180deg)}.docSidebarContainer_SbZl{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_bib7{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.docMainContainer_mKWM{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_XBhc{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_ARiA{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.docItemCol_AEfU{max-width:75%!important}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (min-width:1536px){.container{max-width:1536px}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_FBo2,.footer__link-separator,.navbar__item,.tableOfContents_w9Ty{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_u3D6{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_JBEH{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_ZBpa,.searchResultsColumn_Q7AL{max-width:60%!important}.searchLogoColumn_ATLi,.searchVersionColumn_dyVq{max-width:40%!important}.searchLogoColumn_ATLi{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_ZBpa{max-width:100%!important}.searchVersionColumn_dyVq{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_bUYD:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_gdXL,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_rOnY{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_IV0G{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/08154ee9.011f7e3f.js b/assets/js/08154ee9.011f7e3f.js new file mode 100644 index 00000000..2ebff08e --- /dev/null +++ b/assets/js/08154ee9.011f7e3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[896],{4852:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var m=r.createContext({}),p=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return r.createElement(m.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,m=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),u=p(n),d=a,f=u["".concat(m,".").concat(d)]||u[d]||c[d]||o;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var m in t)hasOwnProperty.call(t,m)&&(i[m]=t[m]);i.originalType=e,i[u]="string"==typeof e?e:a,l[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(4011),a=(n(9231),n(4852));const o={},l="throttle",i={unversionedId:"throttle/readme",id:"throttle/readme",title:"throttle",description:"target = throttle(source, timeout)",source:"@site/../src/throttle/readme.md",sourceDirName:"throttle",slug:"/throttle/",permalink:"/methods/throttle/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/throttle/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"status",permalink:"/methods/status/"},next:{title:"time",permalink:"/methods/time/"}},m={},p=[{value:"target = throttle(source, timeout)",id:"target--throttlesource-timeout",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Usage",id:"usage",level:3},{value:"throttle({ source, timeout, target })",id:"throttle-source-timeout-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Usage",id:"usage-1",level:3},{value:"Example with timeout as store",id:"example-with-timeout-as-store",level:3},{value:"target = throttle({ source, timeout })",id:"target--throttle-source-timeout-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Usage",id:"usage-2",level:3}],s={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"throttle"},"throttle"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum';\n// or\nimport { throttle } from 'patronum/throttle';\n")),(0,a.kt)("h2",{id:"target--throttlesource-timeout"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = throttle(source, timeout)")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"This method allows to trigger ",(0,a.kt)("inlineCode",{parentName:"p"},"target")," in equal timeouts regardless of source trigger frequency.\nIt is useful in live search in UI."),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,a.kt)("inlineCode",{parentName:"p"},"throttle({ source, timeout })")," with patronum < 2.1.0")),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = throttle(source, timeout);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Triggers ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," at most once per ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," (",(0,a.kt)("a",{parentName:"li",href:"https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Number"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"number")))," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store"),") \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," after last trigger or ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," trigger")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event"))),") \u2014 new event, that triggered each time after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," with argument from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"Create event that should be throttled:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\n\nconst someHappened = createEvent();\n")),(0,a.kt)("p",null,"Create throttled event from it:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum';\n\nconst THROTTLE_TIMEOUT_IN_MS = 200;\n\nconst throttled = throttle(someHappened, THROTTLE_TIMEOUT_IN_MS);\n")),(0,a.kt)("p",null,"When you call ",(0,a.kt)("inlineCode",{parentName:"p"},"someHappened")," it will make throttled call the ",(0,a.kt)("inlineCode",{parentName:"p"},"throttled")," event:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"throttled.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// after 200 ms after first call\n// => someHappened now 4\n")),(0,a.kt)("p",null,"Also you can use ",(0,a.kt)("inlineCode",{parentName:"p"},"Effect")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"Store")," as trigger. ",(0,a.kt)("inlineCode",{parentName:"p"},"throttle")," always returns ",(0,a.kt)("inlineCode",{parentName:"p"},"Event"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const event = createEvent();\nconst throttledEvent: Event = throttle(event, 100);\n\nconst fx = createEffect();\nconst throttledEffect: Event = throttle(fx, 100);\n\nconst $store = createStore(0);\nconst throttledStore: Event = throttle($store, 100);\n")),(0,a.kt)("h2",{id:"throttle-source-timeout-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"throttle({ source, timeout, target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload allows to receive target instead of returning it.\nThis is useful when you already have a unit that should be triggered."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"throttle({ source, timeout, target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Triggers ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," at most once per ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," (",(0,a.kt)("a",{parentName:"li",href:"https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Number"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"number")))," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store"),") \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," after last trigger or ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," trigger"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Target unit, that triggered each time after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," with argument from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Target unit passed to arguments")),(0,a.kt)("h3",{id:"usage-1"},"Usage"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const change = createEvent();\nconst $source = createStore(0).on(change, (state) => state + 1);\n\nconst $dumped = createStore(0);\n$dumped.watch((payload) => {\n localStorage.setItem('dump', JSON.stringify(payload));\n});\n\nthrottle({ source: $source, timeout: 40, target: $dumped });\n\nchange();\nchange();\nchange();\n\n// after 40ms after first call, 3 will be saved to localStorage\n")),(0,a.kt)("h3",{id:"example-with-timeout-as-store"},"Example with timeout as store"),(0,a.kt)("p",null,"The new timeout will be used after the previous is over (if there was a delayed ",(0,a.kt)("inlineCode",{parentName:"p"},"target")," trigger when the ",(0,a.kt)("inlineCode",{parentName:"p"},"timeout")," store changed)."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { throttle } from 'patronum';\n\nconst someHappened = createEvent();\nconst changeTimeout = createEvent();\nconst $timeout = createStore(200).on(changeTimeout, (_, value) => value);\n\nconst throttled = throttle({\n source: someHappened,\n timeout: $timeout,\n});\nthrottled.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nchangeTimeout(300); // will be used for next timeout\nsomeHappened(2);\n\nsetTimout(() => {\n // console.log: someHappened now 2\n someHappened(3);\n someHappened(4);\n}, 200);\n\nsetTimeout(() => {\n // console.log: someHappened now 4\n}, 500);\n")),(0,a.kt)("h2",{id:"target--throttle-source-timeout-"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = throttle({ source, timeout })")),(0,a.kt)("h3",{id:"motivation-2"},"Motivation"),(0,a.kt)("p",null,"This overload recieves ",(0,a.kt)("inlineCode",{parentName:"p"},"source")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"timeout")," as an object. May be useful for additional clarity, but it's longer to write"),(0,a.kt)("h3",{id:"formulae-2"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = throttle({ source, timeout });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Triggers ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," at most once per ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments-2"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," (",(0,a.kt)("a",{parentName:"li",href:"https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Number"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"number")))," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store"),") \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," after last trigger or ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," trigger")),(0,a.kt)("h3",{id:"returns-2"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event"))),") \u2014 new event, that triggered each time after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," with argument from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"usage-2"},"Usage"),(0,a.kt)("p",null,"Create event that should be throttled:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\n\nconst someHappened = createEvent();\n")),(0,a.kt)("p",null,"Create throttled event from it:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum';\n\nconst THROTTLE_TIMEOUT_IN_MS = 200;\n\nconst throttled = throttle({\n source: someHappened,\n timeout: THROTTLE_TIMEOUT_IN_MS,\n});\n")),(0,a.kt)("p",null,"When you call ",(0,a.kt)("inlineCode",{parentName:"p"},"someHappened")," it will make throttled call the ",(0,a.kt)("inlineCode",{parentName:"p"},"throttled")," event:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"throttled.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// after 200 ms after first call\n// => someHappened now 4\n")),(0,a.kt)("p",null,"Also you can use ",(0,a.kt)("inlineCode",{parentName:"p"},"Effect")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"Store")," as trigger. ",(0,a.kt)("inlineCode",{parentName:"p"},"throttle")," always returns ",(0,a.kt)("inlineCode",{parentName:"p"},"Event"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const event = createEvent();\nconst throttledEvent: Event = throttle({ source: event, timeout: 100 });\n\nconst fx = createEffect();\nconst throttledEffect: Event = throttle({ source: fx, timeout: 100 });\n\nconst $store = createStore(0);\nconst throttledStore: Event = throttle({\n source: $store,\n timeout: 100,\n});\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/08154ee9.20f2322d.js b/assets/js/08154ee9.20f2322d.js deleted file mode 100644 index 3457c979..00000000 --- a/assets/js/08154ee9.20f2322d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[896],{9613:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>d});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var m=n.createContext({}),p=function(e){var t=n.useContext(m),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,m=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=p(r),d=a,f=c["".concat(m,".").concat(d)]||c[d]||u[d]||o;return r?n.createElement(f,i(i({ref:t},s),{},{components:r})):n.createElement(f,i({ref:t},s))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=c;var l={};for(var m in t)hasOwnProperty.call(t,m)&&(l[m]=t[m]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>m,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(2081),a=(r(9496),r(9613));const o={},i="throttle",l={unversionedId:"throttle/readme",id:"throttle/readme",title:"throttle",description:"target = throttle({ source, timeout })",source:"@site/../src/throttle/readme.md",sourceDirName:"throttle",slug:"/throttle/",permalink:"/methods/throttle/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/throttle/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"status",permalink:"/methods/status/"},next:{title:"time",permalink:"/methods/time/"}},m={},p=[{value:"target = throttle({ source, timeout })",id:"target--throttle-source-timeout-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Usage",id:"usage",level:3},{value:"throttle({ source, timeout, target })",id:"throttle-source-timeout-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Usage",id:"usage-1",level:3},{value:"Example with timeout as store",id:"example-with-timeout-as-store",level:3}],s={toc:p};function u(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"throttle"},"throttle"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum';\n// or\nimport { throttle } from 'patronum/throttle';\n")),(0,a.kt)("h2",{id:"target--throttle-source-timeout-"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = throttle({ source, timeout })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"This method allows to trigger ",(0,a.kt)("inlineCode",{parentName:"p"},"target")," in equal timeouts regardless of source trigger frequency.\nIt is useful in live search in UI."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = throttle({ source, timeout });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Triggers ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," at most once per ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," (",(0,a.kt)("a",{parentName:"li",href:"https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Number"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"number")))," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store"),") \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," after last trigger or ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," trigger")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event"))),") \u2014 new event, that triggered each time after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," with argument from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"Create event that should be throttled:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\n\nconst someHappened = createEvent();\n")),(0,a.kt)("p",null,"Create throttled event from it:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum/throttle';\n\nconst THROTTLE_TIMEOUT_IN_MS = 200;\n\nconst throttled = throttle({\n source: someHappened,\n timeout: THROTTLE_TIMEOUT_IN_MS,\n});\n")),(0,a.kt)("p",null,"When you call ",(0,a.kt)("inlineCode",{parentName:"p"},"someHappened")," it will make throttled call the ",(0,a.kt)("inlineCode",{parentName:"p"},"throttled")," event:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"throttled.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// after 200 ms after first call\n// => someHappened now 4\n")),(0,a.kt)("p",null,"Also you can use ",(0,a.kt)("inlineCode",{parentName:"p"},"Effect")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"Store")," as trigger. ",(0,a.kt)("inlineCode",{parentName:"p"},"throttle")," always returns ",(0,a.kt)("inlineCode",{parentName:"p"},"Event"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const event = createEvent();\nconst throttledEvent: Event = throttle({ source: event, timeout: 100 });\n\nconst fx = createEffect();\nconst throttledEffect: Event = throttle({ source: fx, timeout: 100 });\n\nconst $store = createStore(0);\nconst throttledStore: Event = throttle({\n source: $store,\n timeout: 100,\n});\n")),(0,a.kt)("h2",{id:"throttle-source-timeout-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"throttle({ source, timeout, target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload allows to receive target instead of returning it.\nThis is useful when you already have a unit that should be triggered."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"throttle({ source, timeout, target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Triggers ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," at most once per ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," (",(0,a.kt)("a",{parentName:"li",href:"https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Number"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"number")))," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store"),") \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," after last trigger or ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," trigger"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Target unit, that triggered each time after triggering ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," with argument from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Target unit passed to arguments")),(0,a.kt)("h3",{id:"usage-1"},"Usage"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const change = createEvent();\nconst $source = createStore(0).on(change, (state) => state + 1);\n\nconst $dumped = createStore(0);\n$dumped.watch((payload) => {\n localStorage.setItem('dump', JSON.stringify(payload));\n});\n\nthrottle({ source: $source, timeout: 40, target: $dumped });\n\nchange();\nchange();\nchange();\n\n// after 40ms after first call, 3 will be saved to localStorage\n")),(0,a.kt)("h3",{id:"example-with-timeout-as-store"},"Example with timeout as store"),(0,a.kt)("p",null,"The new timeout will be used after the previous is over (if there was a delayed ",(0,a.kt)("inlineCode",{parentName:"p"},"target")," trigger when the ",(0,a.kt)("inlineCode",{parentName:"p"},"timeout")," store changed)."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { throttle } from 'patronum/throttle';\n\nconst someHappened = createEvent();\nconst changeTimeout = createEvent();\nconst $timeout = createStore(200).on(changeTimeout, (_, value) => value);\n\nconst throttled = throttle({\n source: someHappened,\n timeout: $timeout,\n});\nthrottled.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nchangeTimeout(300); // will be used for next timeout\nsomeHappened(2);\n\nsetTimout(() => {\n // console.log: someHappened now 2\n someHappened(3);\n someHappened(4);\n}, 200);\n\nsetTimeout(() => {\n // console.log: someHappened now 4\n}, 500);\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/08f30e7d.ad0ac244.js b/assets/js/08f30e7d.ad0ac244.js new file mode 100644 index 00000000..b4a360ad --- /dev/null +++ b/assets/js/08f30e7d.ad0ac244.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[222],{4852:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>v});var n=r(9231);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),m=u(r),c=a,v=m["".concat(s,".").concat(c)]||m[c]||d[c]||i;return r?n.createElement(v,l(l({ref:t},p),{},{components:r})):n.createElement(v,l({ref:t},p))}));function v(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,l=new Array(i);l[0]=c;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[m]="string"==typeof e?e:a,l[1]=o;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>u});var n=r(4011),a=(r(9231),r(4852));const i={},l="every",o={unversionedId:"every/readme",id:"every/readme",title:"every",description:"every({ predicate: Function, stores })",source:"@site/../src/every/readme.md",sourceDirName:"every",slug:"/every/",permalink:"/methods/every/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/every/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"equals",permalink:"/methods/equals/"},next:{title:"format",permalink:"/methods/format/"}},s={},u=[{value:"every({ predicate: Function, stores })",id:"every-predicate-function-stores-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Return",id:"return",level:3},{value:"Example",id:"example",level:3},{value:"every({ predicate: value, stores })",id:"every-predicate-value-stores-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Return",id:"return-1",level:3},{value:"Example",id:"example-1",level:3},{value:"every({ predicate: Store, stores })",id:"every-predicate-store-stores-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Return",id:"return-2",level:3},{value:"Example",id:"example-2",level:3},{value:"Shorthands",id:"shorthands",level:2},{value:"Arguments",id:"arguments-3",level:3}],p={toc:u},m="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"every"},"every"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { every } from 'patronum';\n// or\nimport { every } from 'patronum/every';\n")),(0,a.kt)("h2",{id:"every-predicate-function-stores-"},(0,a.kt)("inlineCode",{parentName:"h2"},"every({ predicate: Function, stores })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method calculates boolean value if each store satisfies the condition in ",(0,a.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful to check that user has correct values in each state."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every({ predicate: fn, stores });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each call ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," on each store value from ",(0,a.kt)("inlineCode",{parentName:"li"},"values")," returns ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),", otherwise it will be ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate: (value: T) => boolean")," \u2014 Function to check store value"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores: Array>")," \u2014 List of stores")),(0,a.kt)("h3",{id:"return"},"Return"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store")," \u2014 ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each store corresponds to ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $width = createStore(440);\nconst $height = createStore(780);\n\nconst $fitsSquare = every({\n predicate: (size) => size < 800,\n stores: [$width, $height],\n});\n\nconsole.assert(true === $fitsSquare.getState());\n")),(0,a.kt)("h2",{id:"every-predicate-value-stores-"},(0,a.kt)("inlineCode",{parentName:"h2"},"every({ predicate: value, stores })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload compares each store to specific value in ",(0,a.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,a.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,a.kt)("inlineCode",{parentName:"p"},"&&")," very often, for example to create a pending state or a form valid flag."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every({ predicate: value, stores });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each value in ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," equals ",(0,a.kt)("inlineCode",{parentName:"li"},"value"),", otherwise it will be ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(T)")," \u2014 Data to compare stores values with"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"value")),(0,a.kt)("li",{parentName:"ol"},"type of ",(0,a.kt)("inlineCode",{parentName:"li"},"value")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," should be the same")),(0,a.kt)("h3",{id:"return-1"},"Return"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"value"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormCorrect = every({\n predicate: true,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(true === $isFormCorrect.getState());\n")),(0,a.kt)("h2",{id:"every-predicate-store-stores-"},(0,a.kt)("inlineCode",{parentName:"h2"},"every({ predicate: Store, stores })")),(0,a.kt)("h3",{id:"motivation-2"},"Motivation"),(0,a.kt)("p",null,"This overload compares each store to specific value in the store ",(0,a.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,a.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,a.kt)("inlineCode",{parentName:"p"},"&&")," very often, for example to create a pending state or a form valid flag."),(0,a.kt)("h3",{id:"formulae-2"},"Formulae"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every({ predicate: $value, stores });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each value in ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," equals value in the ",(0,a.kt)("inlineCode",{parentName:"li"},"$value"),", otherwise it will be ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments-2"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 Store contains value to compare values from ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," with"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"$value")," store"),(0,a.kt)("li",{parentName:"ol"},"type of ",(0,a.kt)("inlineCode",{parentName:"li"},"value")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," should be the same")),(0,a.kt)("h3",{id:"return-2"},"Return"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each store contains value from the ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," store")),(0,a.kt)("h3",{id:"example-2"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $allowToCompare = createStore(true);\n\nconst $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormCorrect = every({\n predicate: $allowToCompare,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(true === $isFormCorrect.getState());\n")),(0,a.kt)("h2",{id:"shorthands"},"Shorthands"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every(stores, value);\n$result = every(stores, (value) => false);\n$result = every(stores, $predicate);\n")),(0,a.kt)("p",null,"Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form."),(0,a.kt)("h3",{id:"arguments-3"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with predicate in the second argument"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store | (value: T) => boolean | T)")," \u2014 Predicate to compare with")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/08f30e7d.b55ffd9c.js b/assets/js/08f30e7d.b55ffd9c.js deleted file mode 100644 index 2ce26f8d..00000000 --- a/assets/js/08f30e7d.b55ffd9c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[222],{9613:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>c});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=u(r),c=a,v=d["".concat(s,".").concat(c)]||d[c]||m[c]||i;return r?n.createElement(v,l(l({ref:t},p),{},{components:r})):n.createElement(v,l({ref:t},p))}));function c(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>u});var n=r(2081),a=(r(9496),r(9613));const i={},l="every",o={unversionedId:"every/readme",id:"every/readme",title:"every",description:"every({ predicate: Function, stores })",source:"@site/../src/every/readme.md",sourceDirName:"every",slug:"/every/",permalink:"/methods/every/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/every/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"equals",permalink:"/methods/equals/"},next:{title:"format",permalink:"/methods/format/"}},s={},u=[{value:"every({ predicate: Function, stores })",id:"every-predicate-function-stores-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Return",id:"return",level:3},{value:"Example",id:"example",level:3},{value:"every({ predicate: value, stores })",id:"every-predicate-value-stores-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Return",id:"return-1",level:3},{value:"Example",id:"example-1",level:3},{value:"every({ predicate: Store, stores })",id:"every-predicate-store-stores-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Return",id:"return-2",level:3},{value:"Example",id:"example-2",level:3},{value:"Shorthands",id:"shorthands",level:2},{value:"Arguments",id:"arguments-3",level:3}],p={toc:u};function m(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"every"},"every"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { every } from 'patronum';\n// or\nimport { every } from 'patronum/every';\n")),(0,a.kt)("h2",{id:"every-predicate-function-stores-"},(0,a.kt)("inlineCode",{parentName:"h2"},"every({ predicate: Function, stores })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method calculates boolean value if each store satisfies the condition in ",(0,a.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful to check that user has correct values in each state."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every({ predicate: fn, stores });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each call ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," on each store value from ",(0,a.kt)("inlineCode",{parentName:"li"},"values")," returns ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),", otherwise it will be ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate: (value: T) => boolean")," \u2014 Function to check store value"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores: Array>")," \u2014 List of stores")),(0,a.kt)("h3",{id:"return"},"Return"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store")," \u2014 ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each store corresponds to ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $width = createStore(440);\nconst $height = createStore(780);\n\nconst $fitsSquare = every({\n predicate: (size) => size < 800,\n stores: [$width, $height],\n});\n\nconsole.assert(true === $fitsSquare.getState());\n")),(0,a.kt)("h2",{id:"every-predicate-value-stores-"},(0,a.kt)("inlineCode",{parentName:"h2"},"every({ predicate: value, stores })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload compares each store to specific value in ",(0,a.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,a.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,a.kt)("inlineCode",{parentName:"p"},"&&")," very often, for example to create a pending state or a form valid flag."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every({ predicate: value, stores });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each value in ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," equals ",(0,a.kt)("inlineCode",{parentName:"li"},"value"),", otherwise it will be ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(T)")," \u2014 Data to compare stores values with"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"value")),(0,a.kt)("li",{parentName:"ol"},"type of ",(0,a.kt)("inlineCode",{parentName:"li"},"value")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," should be the same")),(0,a.kt)("h3",{id:"return-1"},"Return"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"value"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormCorrect = every({\n predicate: true,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(true === $isFormCorrect.getState());\n")),(0,a.kt)("h2",{id:"every-predicate-store-stores-"},(0,a.kt)("inlineCode",{parentName:"h2"},"every({ predicate: Store, stores })")),(0,a.kt)("h3",{id:"motivation-2"},"Motivation"),(0,a.kt)("p",null,"This overload compares each store to specific value in the store ",(0,a.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,a.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,a.kt)("inlineCode",{parentName:"p"},"&&")," very often, for example to create a pending state or a form valid flag."),(0,a.kt)("h3",{id:"formulae-2"},"Formulae"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every({ predicate: $value, stores });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each value in ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," equals value in the ",(0,a.kt)("inlineCode",{parentName:"li"},"$value"),", otherwise it will be ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments-2"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 Store contains value to compare values from ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," with"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"$value")," store"),(0,a.kt)("li",{parentName:"ol"},"type of ",(0,a.kt)("inlineCode",{parentName:"li"},"value")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"stores")," should be the same")),(0,a.kt)("h3",{id:"return-2"},"Return"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if each store contains value from the ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," store")),(0,a.kt)("h3",{id:"example-2"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $allowToCompare = createStore(true);\n\nconst $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormCorrect = every({\n predicate: $allowToCompare,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(true === $isFormCorrect.getState());\n")),(0,a.kt)("h2",{id:"shorthands"},"Shorthands"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = every(stores, value);\n$result = every(stores, (value) => false);\n$result = every(stores, $predicate);\n")),(0,a.kt)("p",null,"Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form."),(0,a.kt)("h3",{id:"arguments-3"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with predicate in the second argument"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store | (value: T) => boolean | T)")," \u2014 Predicate to compare with")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1178bc06.2ff96855.js b/assets/js/1178bc06.2ff96855.js deleted file mode 100644 index df886f86..00000000 --- a/assets/js/1178bc06.2ff96855.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[502],{9613:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>u});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),d=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=d(r),u=a,f=m["".concat(s,".").concat(u)]||m[u]||c[u]||o;return r?n.createElement(f,l(l({ref:t},p),{},{components:r})):n.createElement(f,l({ref:t},p))}));function u(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var d=2;d{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=r(2081),a=(r(9496),r(9613));const o={},l="spread",i={unversionedId:"spread/readme",id:"spread/readme",title:"spread",description:"spread({ source, targets })",source:"@site/../src/spread/readme.md",sourceDirName:"spread",slug:"/spread/",permalink:"/methods/spread/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/spread/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"splitMap",permalink:"/methods/split-map/"},next:{title:"status",permalink:"/methods/status/"}},s={},d=[{value:"spread({ source, targets })",id:"spread-source-targets-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Example",id:"example",level:3},{value:"Save fields of payload to different stores",id:"save-fields-of-payload-to-different-stores",level:4},{value:"Call events on store changes",id:"call-events-on-store-changes",level:4},{value:"source = spread({ targets })",id:"source--spread-targets-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example-1",level:3},{value:"Conditionally save value to stores",id:"conditionally-save-value-to-stores",level:4},{value:"Nested spreading",id:"nested-spreading",level:4}],p={toc:d};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"spread"},"spread"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { spread } from 'patronum';\n// or\nimport { spread } from 'patronum/spread';\n")),(0,a.kt)("h2",{id:"spread-source-targets-"},(0,a.kt)("inlineCode",{parentName:"h2"},"spread({ source, targets })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"This method allows to trigger many target at once, if they match the source structure.\nIt is useful when you need to destructure object and save values to different stores."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"spread({ source, targets: { field: target, ... } })\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered with ",(0,a.kt)("strong",{parentName:"li"},"object"),", extract ",(0,a.kt)("inlineCode",{parentName:"li"},"field")," from data, and trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"targets")," can have multiple properties"),(0,a.kt)("li",{parentName:"ul"},"If the ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered with non-object, nothing would be happening"),(0,a.kt)("li",{parentName:"ul"},"If ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered with object but without propertpy ",(0,a.kt)("inlineCode",{parentName:"li"},"field"),", target for this ",(0,a.kt)("inlineCode",{parentName:"li"},"field")," will not be triggered")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect)")," \u2014 Source unit, data passed to it should be an object with fields from ",(0,a.kt)("inlineCode",{parentName:"li"},"targets")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"targets")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Record | Store | Effect>)")," \u2014 Flat object which key is key in ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload, and value is unit to store value to.")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("h4",{id:"save-fields-of-payload-to-different-stores"},"Save fields of payload to different stores"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent } from 'effector';\nimport { spread } from 'patronum/spread';\n\nconst $first = createStore('');\nconst $last = createStore('');\n\nconst formReceived = createEvent();\n\nspread({\n source: formReceived,\n targets: {\n first: $first,\n last: $last,\n },\n});\n\n$first.watch((first) => console.log('First name', first));\n$last.watch((last) => console.log('Last name', last));\n\nformReceived({ first: 'Sergey', last: 'Sova' });\n// => First name Sergey\n// => Last name Sova\n\nformReceived({ first: 'Patronum' });\n// => First name Patronum\n")),(0,a.kt)("h4",{id:"call-events-on-store-changes"},"Call events on store changes"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent } from 'effector';\nimport { spread } from 'patronum/spread';\n\nconst save = createEvent();\nconst $form = createStore(null).on(save, (_, form) => form);\n\nconst firstNameChanged = createEvent();\nconst lastNameChanged = createEvent();\n\nspread({\n source: $form,\n targets: {\n first: firstNameChanged,\n last: lastNameChanged,\n },\n});\n\nfirstNameChanged.watch((first) => console.log('First name', first));\nlastNameChanged.watch((last) => console.log('Last name', last));\n\nsave({ first: 'Sergey', last: 'Sova' });\n// => First name Sergey\n// => Last name Sova\n\nsave(null);\n// Nothing, because store is null\n")),(0,a.kt)("h2",{id:"source--spread-targets-"},(0,a.kt)("inlineCode",{parentName:"h2"},"source = spread({ targets })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload creates event ",(0,a.kt)("inlineCode",{parentName:"p"},"source")," that should be triggered and returns it.\nIt is useful to pass ",(0,a.kt)("inlineCode",{parentName:"p"},"source")," immediately to another method as argument."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"source = spread({ targets: { field: target, ... } })\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered with ",(0,a.kt)("strong",{parentName:"li"},"object"),", extract ",(0,a.kt)("inlineCode",{parentName:"li"},"field")," from data, and trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"targets")," can have multiple properties"),(0,a.kt)("li",{parentName:"ul"},"If the ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered with non-object, nothing would be happening"),(0,a.kt)("li",{parentName:"ul"},"If ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered with object but without propertpy ",(0,a.kt)("inlineCode",{parentName:"li"},"field"),", target for this ",(0,a.kt)("inlineCode",{parentName:"li"},"field")," will not be triggered")),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"targets")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Record | Store | Effect>)")," \u2014 Flat object which key is key in ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload, and value is unit to store value to.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect)")," \u2014 Source unit, data passed to it should be an object with fields from ",(0,a.kt)("inlineCode",{parentName:"li"},"targets"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("h4",{id:"conditionally-save-value-to-stores"},"Conditionally save value to stores"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent, guard } from 'effector';\nimport { spread } from 'patronum/spread';\n\nconst $first = createStore('');\nconst $last = createStore('');\n\nconst formReceived = createEvent();\n\nguard({\n source: formReceived,\n filter: (form) => form.first.length > 0 && form.last.length > 0,\n target: spread({\n targets: {\n first: $first,\n last: $last,\n },\n }),\n});\n\n$first.watch((first) => console.log('First name', first));\n$last.watch((last) => console.log('Last name', last));\n\nformReceived({ first: '', last: '' });\n// Nothing, because filter returned true\n\nformReceived({ first: 'Hello', last: 'World' });\n// => First name Hello\n// => Last name World\n")),(0,a.kt)("h4",{id:"nested-spreading"},"Nested spreading"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const trigger = createEvent();\n\nconst $targetA = createStore('');\nconst $targetB = createStore(0);\nconst $targetC = createStore(false);\n\nspread({\n source: trigger,\n targets: {\n first: $targetA,\n second: spread({\n targets: {\n foo: $targetB,\n bar: $targetC,\n },\n }),\n },\n});\n\n$targetA.watch((payload) => console.log('targetA', payload));\n$targetB.watch((payload) => console.log('targetB', payload));\n$targetC.watch((payload) => console.log('targetC', payload));\n\ntrigger({\n first: 'Hello',\n second: {\n foo: 200,\n bar: true,\n },\n});\n// => targetA Hello\n// => targetB 200\n// => targetC true\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1178bc06.b61c1d3d.js b/assets/js/1178bc06.b61c1d3d.js new file mode 100644 index 00000000..7247f935 --- /dev/null +++ b/assets/js/1178bc06.b61c1d3d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[502],{4852:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>g});var a=r(9231);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),d=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=d(r),m=n,g=u["".concat(s,".").concat(m)]||u[m]||c[m]||o;return r?a.createElement(g,i(i({ref:t},p),{},{components:r})):a.createElement(g,i({ref:t},p))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:n,i[1]=l;for(var d=2;d{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var a=r(4011),n=(r(9231),r(4852));const o={},i="spread",l={unversionedId:"spread/readme",id:"spread/readme",title:"spread",description:"source = spread(targets)",source:"@site/../src/spread/readme.md",sourceDirName:"spread",slug:"/spread/",permalink:"/methods/spread/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/spread/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"splitMap",permalink:"/methods/split-map/"},next:{title:"status",permalink:"/methods/status/"}},s={},d=[{value:"source = spread(targets)",id:"source--spreadtargets",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Conditionally save value to stores",id:"conditionally-save-value-to-stores",level:4},{value:"Nested spreading",id:"nested-spreading",level:4},{value:"spread({ source, targets })",id:"spread-source-targets-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Example",id:"example-1",level:3},{value:"Save fields of payload to different stores",id:"save-fields-of-payload-to-different-stores",level:4},{value:"Call events on store changes",id:"call-events-on-store-changes",level:4},{value:"source = spread({ targets })",id:"source--spread-targets-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-1",level:3}],p={toc:d},u="wrapper";function c(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"spread"},"spread"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"import { spread } from 'patronum';\n// or\nimport { spread } from 'patronum/spread';\n")),(0,n.kt)("h2",{id:"source--spreadtargets"},(0,n.kt)("inlineCode",{parentName:"h2"},"source = spread(targets)")),(0,n.kt)("admonition",{title:"since",type:"note"},(0,n.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,n.kt)("inlineCode",{parentName:"p"},"spread({ targets })")," with patronum < 2.1.0")),(0,n.kt)("h3",{id:"motivation"},"Motivation"),(0,n.kt)("p",null,"This method allows to trigger many target at once, if they match the source structure.\nIt is useful when you need to destructure object and save values to different stores."),(0,n.kt)("h3",{id:"formulae"},"Formulae"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"source = spread({ field: target, ... })\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"When ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," is triggered with ",(0,n.kt)("strong",{parentName:"li"},"object"),", extract ",(0,n.kt)("inlineCode",{parentName:"li"},"field")," from data, and trigger ",(0,n.kt)("inlineCode",{parentName:"li"},"target")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"targets")," can have multiple properties"),(0,n.kt)("li",{parentName:"ul"},"If the ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," was triggered with non-object, nothing would be happening"),(0,n.kt)("li",{parentName:"ul"},"If ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," is triggered with object but without propertpy ",(0,n.kt)("inlineCode",{parentName:"li"},"field"),", target for this ",(0,n.kt)("inlineCode",{parentName:"li"},"field")," will not be triggered")),(0,n.kt)("h3",{id:"arguments"},"Arguments"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"targets")," ",(0,n.kt)("inlineCode",{parentName:"li"},"(Record | Store | Effect>)")," \u2014 Flat object which key is key in ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," payload, and value is unit to store value to.")),(0,n.kt)("h3",{id:"returns"},"Returns"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"source")," ",(0,n.kt)("inlineCode",{parentName:"li"},"(Event)")," \u2014 Source event, data passed to it should be an object with fields from ",(0,n.kt)("inlineCode",{parentName:"li"},"targets"))),(0,n.kt)("h3",{id:"example"},"Example"),(0,n.kt)("h4",{id:"conditionally-save-value-to-stores"},"Conditionally save value to stores"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent, sample } from 'effector';\nimport { spread } from 'patronum';\n\nconst $first = createStore('');\nconst $last = createStore('');\n\nconst formReceived = createEvent();\n\nsample({\n source: formReceived,\n filter: (form) => form.first.length > 0 && form.last.length > 0,\n target: spread({\n first: $first,\n last: $last,\n }),\n});\n\n$first.watch((first) => console.log('First name', first));\n$last.watch((last) => console.log('Last name', last));\n\nformReceived({ first: '', last: '' });\n// Nothing, because filter returned true\n\nformReceived({ first: 'Hello', last: 'World' });\n// => First name Hello\n// => Last name World\n")),(0,n.kt)("h4",{id:"nested-spreading"},"Nested spreading"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"const $targetA = createStore('');\nconst $targetB = createStore(0);\nconst $targetC = createStore(false);\n\nconst trigger = spread({\n first: $targetA,\n second: spread({\n foo: $targetB,\n bar: $targetC,\n }),\n});\n\n$targetA.watch((payload) => console.log('targetA', payload));\n$targetB.watch((payload) => console.log('targetB', payload));\n$targetC.watch((payload) => console.log('targetC', payload));\n\ntrigger({\n first: 'Hello',\n second: {\n foo: 200,\n bar: true,\n },\n});\n// => targetA Hello\n// => targetB 200\n// => targetC true\n")),(0,n.kt)("h2",{id:"spread-source-targets-"},(0,n.kt)("inlineCode",{parentName:"h2"},"spread({ source, targets })")),(0,n.kt)("h3",{id:"motivation-1"},"Motivation"),(0,n.kt)("p",null,"This method allows to trigger many target at once, if they match the source structure.\nIt is useful when you need to destructure object and save values to different stores."),(0,n.kt)("h3",{id:"formulae-1"},"Formulae"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"spread({ source, targets: { field: target, ... } })\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"When ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," is triggered with ",(0,n.kt)("strong",{parentName:"li"},"object"),", extract ",(0,n.kt)("inlineCode",{parentName:"li"},"field")," from data, and trigger ",(0,n.kt)("inlineCode",{parentName:"li"},"target")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"targets")," can have multiple properties"),(0,n.kt)("li",{parentName:"ul"},"If the ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," was triggered with non-object, nothing would be happening"),(0,n.kt)("li",{parentName:"ul"},"If ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," is triggered with object but without propertpy ",(0,n.kt)("inlineCode",{parentName:"li"},"field"),", target for this ",(0,n.kt)("inlineCode",{parentName:"li"},"field")," will not be triggered")),(0,n.kt)("h3",{id:"arguments-1"},"Arguments"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"source")," ",(0,n.kt)("inlineCode",{parentName:"li"},"(Event")," | ",(0,n.kt)("inlineCode",{parentName:"li"},"Store")," | ",(0,n.kt)("inlineCode",{parentName:"li"},"Effect)")," \u2014 Source unit, data passed to it should be an object with fields from ",(0,n.kt)("inlineCode",{parentName:"li"},"targets")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"targets")," ",(0,n.kt)("inlineCode",{parentName:"li"},"(Record | Store | Effect>)")," \u2014 Flat object which key is key in ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," payload, and value is unit to store value to.")),(0,n.kt)("h3",{id:"example-1"},"Example"),(0,n.kt)("h4",{id:"save-fields-of-payload-to-different-stores"},"Save fields of payload to different stores"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent } from 'effector';\nimport { spread } from 'patronum';\n\nconst $first = createStore('');\nconst $last = createStore('');\n\nconst formReceived = createEvent();\n\nspread({\n source: formReceived,\n targets: {\n first: $first,\n last: $last,\n },\n});\n\n$first.watch((first) => console.log('First name', first));\n$last.watch((last) => console.log('Last name', last));\n\nformReceived({ first: 'Sergey', last: 'Sova' });\n// => First name Sergey\n// => Last name Sova\n\nformReceived({ first: 'Patronum' });\n// => First name Patronum\n")),(0,n.kt)("h4",{id:"call-events-on-store-changes"},"Call events on store changes"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent } from 'effector';\nimport { spread } from 'patronum/spread';\n\nconst save = createEvent();\nconst $form = createStore(null).on(save, (_, form) => form);\n\nconst firstNameChanged = createEvent();\nconst lastNameChanged = createEvent();\n\nspread({\n source: $form,\n targets: {\n first: firstNameChanged,\n last: lastNameChanged,\n },\n});\n\nfirstNameChanged.watch((first) => console.log('First name', first));\nlastNameChanged.watch((last) => console.log('Last name', last));\n\nsave({ first: 'Sergey', last: 'Sova' });\n// => First name Sergey\n// => Last name Sova\n\nsave(null);\n// Nothing, because store is null\n")),(0,n.kt)("h2",{id:"source--spread-targets-"},(0,n.kt)("inlineCode",{parentName:"h2"},"source = spread({ targets })")),(0,n.kt)("h3",{id:"motivation-2"},"Motivation"),(0,n.kt)("p",null,"This overload recieves ",(0,n.kt)("inlineCode",{parentName:"p"},"targets")," as an object. May be useful for additional clarity, but it's longer to write"),(0,n.kt)("h3",{id:"formulae-2"},"Formulae"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-ts"},"source = spread({ targets: { field: target, ... } })\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"When ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," is triggered with ",(0,n.kt)("strong",{parentName:"li"},"object"),", extract ",(0,n.kt)("inlineCode",{parentName:"li"},"field")," from data, and trigger ",(0,n.kt)("inlineCode",{parentName:"li"},"target")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"targets")," can have multiple properties"),(0,n.kt)("li",{parentName:"ul"},"If the ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," was triggered with non-object, nothing would be happening"),(0,n.kt)("li",{parentName:"ul"},"If ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," is triggered with object but without propertpy ",(0,n.kt)("inlineCode",{parentName:"li"},"field"),", target for this ",(0,n.kt)("inlineCode",{parentName:"li"},"field")," will not be triggered")),(0,n.kt)("h3",{id:"arguments-2"},"Arguments"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("inlineCode",{parentName:"li"},"targets")," ",(0,n.kt)("inlineCode",{parentName:"li"},"(Record | Store | Effect>)")," \u2014 Flat object which key is key in ",(0,n.kt)("inlineCode",{parentName:"li"},"source")," payload, and value is unit to store value to.")),(0,n.kt)("h3",{id:"returns-1"},"Returns"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("inlineCode",{parentName:"li"},"source")," ",(0,n.kt)("inlineCode",{parentName:"li"},"(Event)")," \u2014 Source event, data passed to it should be an object with fields from ",(0,n.kt)("inlineCode",{parentName:"li"},"targets"))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/17896441.091b0213.js b/assets/js/17896441.091b0213.js deleted file mode 100644 index 733680c3..00000000 --- a/assets/js/17896441.091b0213.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[918],{8275:(e,t,a)=>{a.r(t),a.d(t,{default:()=>_e});var n=a(9496),l=a(5163),r=a(5651);const s=n.createContext(null);function o(e){let{children:t,content:a}=e;const l=function(e){return(0,n.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(a);return n.createElement(s.Provider,{value:l},t)}function c(){const e=(0,n.useContext)(s);if(null===e)throw new r.i6("DocProvider");return e}function i(){const{metadata:e,frontMatter:t,assets:a}=c();return n.createElement(l.d,{title:e.title,description:e.description,keywords:t.keywords,image:a.image??t.image})}var d=a(5924),m=a(8757),u=a(2081),b=a(464),p=a(3054);function h(e){const{permalink:t,title:a,subLabel:l,isNext:r}=e;return n.createElement(p.Z,{className:(0,d.Z)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},l&&n.createElement("div",{className:"pagination-nav__sublabel"},l),n.createElement("div",{className:"pagination-nav__label"},a))}function v(e){const{previous:t,next:a}=e;return n.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,b.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},t&&n.createElement(h,(0,u.Z)({},t,{subLabel:n.createElement(b.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),a&&n.createElement(h,(0,u.Z)({},a,{subLabel:n.createElement(b.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}function E(){const{metadata:e}=c();return n.createElement(v,{previous:e.previous,next:e.next})}var g=a(6226),f=a(4743),_=a(4797),N=a(4390),k=a(502);const L={unreleased:function(e){let{siteTitle:t,versionMetadata:a}=e;return n.createElement(b.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:a}=e;return n.createElement(b.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function Z(e){const t=L[e.versionMetadata.banner];return n.createElement(t,e)}function T(e){let{versionLabel:t,to:a,onClick:l}=e;return n.createElement(b.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:n.createElement("b",null,n.createElement(p.Z,{to:a,onClick:l},n.createElement(b.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function U(e){let{className:t,versionMetadata:a}=e;const{siteConfig:{title:l}}=(0,g.Z)(),{pluginId:r}=(0,f.gA)({failfast:!0}),{savePreferredVersionName:s}=(0,N.J)(r),{latestDocSuggestion:o,latestVersionSuggestion:c}=(0,f.Jo)(r),i=o??(m=c).docs.find((e=>e.id===m.mainDocId));var m;return n.createElement("div",{className:(0,d.Z)(t,_.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},n.createElement("div",null,n.createElement(Z,{siteTitle:l,versionMetadata:a})),n.createElement("div",{className:"margin-top--md"},n.createElement(T,{versionLabel:c.label,to:i.path,onClick:()=>s(c.name)})))}function w(e){let{className:t}=e;const a=(0,k.E)();return a.banner?n.createElement(U,{className:t,versionMetadata:a}):null}function C(e){let{className:t}=e;const a=(0,k.E)();return a.badge?n.createElement("span",{className:(0,d.Z)(t,_.k.docs.docVersionBadge,"badge badge--secondary")},n.createElement(b.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:a.label}},"Version: {versionLabel}")):null}function x(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:a}=e;return n.createElement(b.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:n.createElement("b",null,n.createElement("time",{dateTime:new Date(1e3*t).toISOString()},a))}}," on {date}")}function y(e){let{lastUpdatedBy:t}=e;return n.createElement(b.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:n.createElement("b",null,t)}}," by {user}")}function A(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:a,lastUpdatedBy:l}=e;return n.createElement("span",{className:_.k.common.lastUpdated},n.createElement(b.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&a?n.createElement(x,{lastUpdatedAt:t,formattedLastUpdatedAt:a}):"",byUser:l?n.createElement(y,{lastUpdatedBy:l}):""}},"Last updated{atDate}{byUser}"),!1)}const M="iconEdit_bqwS";function B(e){let{className:t,...a}=e;return n.createElement("svg",(0,u.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.Z)(M,t),"aria-hidden":"true"},a),n.createElement("g",null,n.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function I(e){let{editUrl:t}=e;return n.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:_.k.common.editThisPage},n.createElement(B,null),n.createElement(b.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}const H="tag_OJTx",P="tagRegular_p84Z",V="tagWithCount_KvJq";function S(e){let{permalink:t,label:a,count:l}=e;return n.createElement(p.Z,{href:t,className:(0,d.Z)(H,l?V:P)},a,l&&n.createElement("span",null,l))}const D="tags_fgNO",O="tag_IOSv";function z(e){let{tags:t}=e;return n.createElement(n.Fragment,null,n.createElement("b",null,n.createElement(b.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),n.createElement("ul",{className:(0,d.Z)(D,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:a}=e;return n.createElement("li",{key:a,className:O},n.createElement(S,{label:t,permalink:a}))}))))}const F="lastUpdated_k34H";function R(e){return n.createElement("div",{className:(0,d.Z)(_.k.docs.docFooterTagsRow,"row margin-bottom--sm")},n.createElement("div",{className:"col"},n.createElement(z,e)))}function q(e){let{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:l,formattedLastUpdatedAt:r}=e;return n.createElement("div",{className:(0,d.Z)(_.k.docs.docFooterEditMetaRow,"row")},n.createElement("div",{className:"col"},t&&n.createElement(I,{editUrl:t})),n.createElement("div",{className:(0,d.Z)("col",F)},(a||l)&&n.createElement(A,{lastUpdatedAt:a,formattedLastUpdatedAt:r,lastUpdatedBy:l})))}function J(){const{metadata:e}=c(),{editUrl:t,lastUpdatedAt:a,formattedLastUpdatedAt:l,lastUpdatedBy:r,tags:s}=e,o=s.length>0,i=!!(t||a||r);return o||i?n.createElement("footer",{className:(0,d.Z)(_.k.docs.docFooter,"docusaurus-mt-lg")},o&&n.createElement(R,{tags:s}),i&&n.createElement(q,{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:r,formattedLastUpdatedAt:l})):null}var Q=a(2414),W=a(1698);const Y="tocCollapsibleButton_A4pk",G="tocCollapsibleButtonExpanded_MmQk";function K(e){let{collapsed:t,...a}=e;return n.createElement("button",(0,u.Z)({type:"button"},a,{className:(0,d.Z)("clean-btn",Y,!t&&G,a.className)}),n.createElement(b.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const $="tocCollapsible_ara1",j="tocCollapsibleContent_eVeL",X="tocCollapsibleExpanded_0Ya2";function ee(e){let{toc:t,className:a,minHeadingLevel:l,maxHeadingLevel:r}=e;const{collapsed:s,toggleCollapsed:o}=(0,Q.u)({initialState:!0});return n.createElement("div",{className:(0,d.Z)($,!s&&X,a)},n.createElement(K,{collapsed:s,onClick:o}),n.createElement(Q.z,{lazy:!0,className:j,collapsed:s},n.createElement(W.Z,{toc:t,minHeadingLevel:l,maxHeadingLevel:r})))}const te="tocMobile_rOnY";function ae(){const{toc:e,frontMatter:t}=c();return n.createElement(ee,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,d.Z)(_.k.docs.docTocMobile,te)})}var ne=a(7211);function le(){const{toc:e,frontMatter:t}=c();return n.createElement(ne.Z,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:_.k.docs.docTocDesktop})}var re=a(3328),se=a(2274);function oe(e){let{children:t}=e;const a=function(){const{metadata:e,frontMatter:t,contentTitle:a}=c();return t.hide_title||void 0!==a?null:e.title}();return n.createElement("div",{className:(0,d.Z)(_.k.docs.docMarkdown,"markdown")},a&&n.createElement("header",null,n.createElement(re.Z,{as:"h1"},a)),n.createElement(se.Z,null,t))}var ce=a(5205),ie=a(3318),de=a(887);function me(e){return n.createElement("svg",(0,u.Z)({viewBox:"0 0 24 24"},e),n.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const ue={breadcrumbsContainer:"breadcrumbsContainer_Wds5",breadcrumbHomeIcon:"breadcrumbHomeIcon_p01m"};function be(e){let{children:t,href:a,isLast:l}=e;const r="breadcrumbs__link";return l?n.createElement("span",{className:r,itemProp:"name"},t):a?n.createElement(p.Z,{className:r,href:a,itemProp:"item"},n.createElement("span",{itemProp:"name"},t)):n.createElement("span",{className:r},t)}function pe(e){let{children:t,active:a,index:l,addMicrodata:r}=e;return n.createElement("li",(0,u.Z)({},r&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,d.Z)("breadcrumbs__item",{"breadcrumbs__item--active":a})}),t,n.createElement("meta",{itemProp:"position",content:String(l+1)}))}function he(){const e=(0,de.Z)("/");return n.createElement("li",{className:"breadcrumbs__item"},n.createElement(p.Z,{"aria-label":(0,b.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:(0,d.Z)("breadcrumbs__link",ue.breadcrumbsItemLink),href:e},n.createElement(me,{className:ue.breadcrumbHomeIcon})))}function ve(){const e=(0,ce.s1)(),t=(0,ie.Ns)();return e?n.createElement("nav",{className:(0,d.Z)(_.k.docs.docBreadcrumbs,ue.breadcrumbsContainer),"aria-label":(0,b.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},n.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&n.createElement(he,null),e.map(((t,a)=>{const l=a===e.length-1;return n.createElement(pe,{key:a,active:l,index:a,addMicrodata:!!t.href},n.createElement(be,{href:t.href,isLast:l},t.label))})))):null}const Ee="docItemContainer_zvnQ",ge="docItemCol_AEfU";function fe(e){let{children:t}=e;const a=function(){const{frontMatter:e,toc:t}=c(),a=(0,m.i)(),l=e.hide_table_of_contents,r=!l&&t.length>0;return{hidden:l,mobile:r?n.createElement(ae,null):void 0,desktop:!r||"desktop"!==a&&"ssr"!==a?void 0:n.createElement(le,null)}}();return n.createElement("div",{className:"row"},n.createElement("div",{className:(0,d.Z)("col",!a.hidden&&ge)},n.createElement(w,null),n.createElement("div",{className:Ee},n.createElement("article",null,n.createElement(ve,null),n.createElement(C,null),a.mobile,n.createElement(oe,null,t),n.createElement(J,null)),n.createElement(E,null))),a.desktop&&n.createElement("div",{className:"col col--3"},a.desktop))}function _e(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,a=e.content;return n.createElement(o,{content:e.content},n.createElement(l.FG,{className:t},n.createElement(i,null),n.createElement(fe,null,n.createElement(a,null))))}},502:(e,t,a)=>{a.d(t,{E:()=>o,q:()=>s});var n=a(9496),l=a(5651);const r=n.createContext(null);function s(e){let{children:t,version:a}=e;return n.createElement(r.Provider,{value:a},t)}function o(){const e=(0,n.useContext)(r);if(null===e)throw new l.i6("DocsVersionProvider");return e}}}]); \ No newline at end of file diff --git a/assets/js/17896441.98c8b99a.js b/assets/js/17896441.98c8b99a.js new file mode 100644 index 00000000..f3693db2 --- /dev/null +++ b/assets/js/17896441.98c8b99a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[918],{1340:(e,t,a)=>{a.r(t),a.d(t,{default:()=>pe});var n=a(9231),l=a(9211),r=a(6291);const o=n.createContext(null);function s(e){let{children:t,content:a}=e;const l=function(e){return(0,n.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(a);return n.createElement(o.Provider,{value:l},t)}function c(){const e=(0,n.useContext)(o);if(null===e)throw new r.i6("DocProvider");return e}function i(){const{metadata:e,frontMatter:t,assets:a}=c();return n.createElement(l.d,{title:e.title,description:e.description,keywords:t.keywords,image:a.image??t.image})}var d=a(9841),m=a(4642),u=a(4011),b=a(4428),p=a(6299);function E(e){const{permalink:t,title:a,subLabel:l,isNext:r}=e;return n.createElement(p.Z,{className:(0,d.Z)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},l&&n.createElement("div",{className:"pagination-nav__sublabel"},l),n.createElement("div",{className:"pagination-nav__label"},a))}function h(e){const{previous:t,next:a}=e;return n.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,b.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&n.createElement(E,(0,u.Z)({},t,{subLabel:n.createElement(b.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),a&&n.createElement(E,(0,u.Z)({},a,{subLabel:n.createElement(b.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}function v(){const{metadata:e}=c();return n.createElement(h,{previous:e.previous,next:e.next})}var g=a(8607),f=a(527),_=a(7847),N=a(636),Z=a(826);const L={unreleased:function(e){let{siteTitle:t,versionMetadata:a}=e;return n.createElement(b.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:a}=e;return n.createElement(b.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function C(e){const t=L[e.versionMetadata.banner];return n.createElement(t,e)}function k(e){let{versionLabel:t,to:a,onClick:l}=e;return n.createElement(b.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:n.createElement("b",null,n.createElement(p.Z,{to:a,onClick:l},n.createElement(b.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function T(e){let{className:t,versionMetadata:a}=e;const{siteConfig:{title:l}}=(0,g.Z)(),{pluginId:r}=(0,f.gA)({failfast:!0}),{savePreferredVersionName:o}=(0,N.J)(r),{latestDocSuggestion:s,latestVersionSuggestion:c}=(0,f.Jo)(r),i=s??(m=c).docs.find((e=>e.id===m.mainDocId));var m;return n.createElement("div",{className:(0,d.Z)(t,_.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},n.createElement("div",null,n.createElement(C,{siteTitle:l,versionMetadata:a})),n.createElement("div",{className:"margin-top--md"},n.createElement(k,{versionLabel:c.label,to:i.path,onClick:()=>o(c.name)})))}function U(e){let{className:t}=e;const a=(0,Z.E)();return a.banner?n.createElement(T,{className:t,versionMetadata:a}):null}function w(e){let{className:t}=e;const a=(0,Z.E)();return a.badge?n.createElement("span",{className:(0,d.Z)(t,_.k.docs.docVersionBadge,"badge badge--secondary")},n.createElement(b.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:a.label}},"Version: {versionLabel}")):null}function x(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:a}=e;return n.createElement(b.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:n.createElement("b",null,n.createElement("time",{dateTime:new Date(1e3*t).toISOString()},a))}}," on {date}")}function y(e){let{lastUpdatedBy:t}=e;return n.createElement(b.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:n.createElement("b",null,t)}}," by {user}")}function A(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:a,lastUpdatedBy:l}=e;return n.createElement("span",{className:_.k.common.lastUpdated},n.createElement(b.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&a?n.createElement(x,{lastUpdatedAt:t,formattedLastUpdatedAt:a}):"",byUser:l?n.createElement(y,{lastUpdatedBy:l}):""}},"Last updated{atDate}{byUser}"),!1)}const B={iconEdit:"iconEdit_v04G"};function I(e){let{className:t,...a}=e;return n.createElement("svg",(0,u.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.Z)(B.iconEdit,t),"aria-hidden":"true"},a),n.createElement("g",null,n.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function M(e){let{editUrl:t}=e;return n.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:_.k.common.editThisPage},n.createElement(I,null),n.createElement(b.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}const V={tag:"tag_jiDT",tagRegular:"tagRegular_mKrJ",tagWithCount:"tagWithCount_LI1M"};function H(e){let{permalink:t,label:a,count:l}=e;return n.createElement(p.Z,{href:t,className:(0,d.Z)(V.tag,l?V.tagWithCount:V.tagRegular)},a,l&&n.createElement("span",null,l))}const P={tags:"tags_hLb7",tag:"tag_vasp"};function D(e){let{tags:t}=e;return n.createElement(n.Fragment,null,n.createElement("b",null,n.createElement(b.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),n.createElement("ul",{className:(0,d.Z)(P.tags,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:a}=e;return n.createElement("li",{key:a,className:P.tag},n.createElement(H,{label:t,permalink:a}))}))))}const S={lastUpdated:"lastUpdated_S6mm"};function R(e){return n.createElement("div",{className:(0,d.Z)(_.k.docs.docFooterTagsRow,"row margin-bottom--sm")},n.createElement("div",{className:"col"},n.createElement(D,e)))}function z(e){let{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:l,formattedLastUpdatedAt:r}=e;return n.createElement("div",{className:(0,d.Z)(_.k.docs.docFooterEditMetaRow,"row")},n.createElement("div",{className:"col"},t&&n.createElement(M,{editUrl:t})),n.createElement("div",{className:(0,d.Z)("col",S.lastUpdated)},(a||l)&&n.createElement(A,{lastUpdatedAt:a,formattedLastUpdatedAt:r,lastUpdatedBy:l})))}function F(){const{metadata:e}=c(),{editUrl:t,lastUpdatedAt:a,formattedLastUpdatedAt:l,lastUpdatedBy:r,tags:o}=e,s=o.length>0,i=!!(t||a||r);return s||i?n.createElement("footer",{className:(0,d.Z)(_.k.docs.docFooter,"docusaurus-mt-lg")},s&&n.createElement(R,{tags:o}),i&&n.createElement(z,{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:r,formattedLastUpdatedAt:l})):null}var O=a(3071),q=a(3707);const G={tocCollapsibleButton:"tocCollapsibleButton_ohIc",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_oZtt"};function J(e){let{collapsed:t,...a}=e;return n.createElement("button",(0,u.Z)({type:"button"},a,{className:(0,d.Z)("clean-btn",G.tocCollapsibleButton,!t&&G.tocCollapsibleButtonExpanded,a.className)}),n.createElement(b.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const W={tocCollapsible:"tocCollapsible_AjIu",tocCollapsibleContent:"tocCollapsibleContent_aY0v",tocCollapsibleExpanded:"tocCollapsibleExpanded_lBZr"};function j(e){let{toc:t,className:a,minHeadingLevel:l,maxHeadingLevel:r}=e;const{collapsed:o,toggleCollapsed:s}=(0,O.u)({initialState:!0});return n.createElement("div",{className:(0,d.Z)(W.tocCollapsible,!o&&W.tocCollapsibleExpanded,a)},n.createElement(J,{collapsed:o,onClick:s}),n.createElement(O.z,{lazy:!0,className:W.tocCollapsibleContent,collapsed:o},n.createElement(q.Z,{toc:t,minHeadingLevel:l,maxHeadingLevel:r})))}const K={tocMobile:"tocMobile_GnNV"};function Q(){const{toc:e,frontMatter:t}=c();return n.createElement(j,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,d.Z)(_.k.docs.docTocMobile,K.tocMobile)})}var X=a(7645);function Y(){const{toc:e,frontMatter:t}=c();return n.createElement(X.Z,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:_.k.docs.docTocDesktop})}var $=a(9687),ee=a(9996);function te(e){let{children:t}=e;const a=function(){const{metadata:e,frontMatter:t,contentTitle:a}=c();return t.hide_title||void 0!==a?null:e.title}();return n.createElement("div",{className:(0,d.Z)(_.k.docs.docMarkdown,"markdown")},a&&n.createElement("header",null,n.createElement($.Z,{as:"h1"},a)),n.createElement(ee.Z,null,t))}var ae=a(2397),ne=a(8521),le=a(4590);function re(e){return n.createElement("svg",(0,u.Z)({viewBox:"0 0 24 24"},e),n.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const oe={breadcrumbHomeIcon:"breadcrumbHomeIcon_pDXS"};function se(){const e=(0,le.Z)("/");return n.createElement("li",{className:"breadcrumbs__item"},n.createElement(p.Z,{"aria-label":(0,b.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},n.createElement(re,{className:oe.breadcrumbHomeIcon})))}const ce={breadcrumbsContainer:"breadcrumbsContainer_rQtB"};function ie(e){let{children:t,href:a,isLast:l}=e;const r="breadcrumbs__link";return l?n.createElement("span",{className:r,itemProp:"name"},t):a?n.createElement(p.Z,{className:r,href:a,itemProp:"item"},n.createElement("span",{itemProp:"name"},t)):n.createElement("span",{className:r},t)}function de(e){let{children:t,active:a,index:l,addMicrodata:r}=e;return n.createElement("li",(0,u.Z)({},r&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,d.Z)("breadcrumbs__item",{"breadcrumbs__item--active":a})}),t,n.createElement("meta",{itemProp:"position",content:String(l+1)}))}function me(){const e=(0,ae.s1)(),t=(0,ne.Ns)();return e?n.createElement("nav",{className:(0,d.Z)(_.k.docs.docBreadcrumbs,ce.breadcrumbsContainer),"aria-label":(0,b.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},n.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&n.createElement(se,null),e.map(((t,a)=>{const l=a===e.length-1;return n.createElement(de,{key:a,active:l,index:a,addMicrodata:!!t.href},n.createElement(ie,{href:t.href,isLast:l},t.label))})))):null}const ue={docItemContainer:"docItemContainer_vzIZ",docItemCol:"docItemCol_lsiV"};function be(e){let{children:t}=e;const a=function(){const{frontMatter:e,toc:t}=c(),a=(0,m.i)(),l=e.hide_table_of_contents,r=!l&&t.length>0;return{hidden:l,mobile:r?n.createElement(Q,null):void 0,desktop:!r||"desktop"!==a&&"ssr"!==a?void 0:n.createElement(Y,null)}}();return n.createElement("div",{className:"row"},n.createElement("div",{className:(0,d.Z)("col",!a.hidden&&ue.docItemCol)},n.createElement(U,null),n.createElement("div",{className:ue.docItemContainer},n.createElement("article",null,n.createElement(me,null),n.createElement(w,null),a.mobile,n.createElement(te,null,t),n.createElement(F,null)),n.createElement(v,null))),a.desktop&&n.createElement("div",{className:"col col--3"},a.desktop))}function pe(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,a=e.content;return n.createElement(s,{content:e.content},n.createElement(l.FG,{className:t},n.createElement(i,null),n.createElement(be,null,n.createElement(a,null))))}},826:(e,t,a)=>{a.d(t,{E:()=>s,q:()=>o});var n=a(9231),l=a(6291);const r=n.createContext(null);function o(e){let{children:t,version:a}=e;return n.createElement(r.Provider,{value:a},t)}function s(){const e=(0,n.useContext)(r);if(null===e)throw new l.i6("DocsVersionProvider");return e}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.67205d40.js b/assets/js/1a4e3797.67205d40.js new file mode 100644 index 00000000..f3c18e75 --- /dev/null +++ b/assets/js/1a4e3797.67205d40.js @@ -0,0 +1,2 @@ +/*! For license information please see 1a4e3797.67205d40.js.LICENSE.txt */ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[920],{9660:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8284:(e,t,r)=>{"use strict";var n=r(7521),i=r(8702),a=r(2350);function s(e,t,r,i){return new n(e,t,r,i)}s.version=r(2218),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},7666:(e,t,r)=>{"use strict";var n=r(9660);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(8056)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},4374:(e,t,r)=>{"use strict";var n=r(2686),i=r(9670),a=r(5526),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},8702:(e,t,r)=>{"use strict";var n=r(2686),i=r(4853),a=r(2706),s=r(3036),c=r(9670),u=r(5526),o=r(6370),h=r(7580),f=r(4374);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return s({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=o(r);if(this.isNumericRefined(e,t,n))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,o(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a,s,c=o(r),u=void 0!==(a=this.numericRefinements[e][t],s=c,i(a,(function(e){return l(e,s)})));return n&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},3646:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=a(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,a){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var n=r(2576),i=r(2686),a=r(5675),s=r(4853),c=r(5710),u=r(2912),o=r(3036),h=r(2195),f=a.escapeFacetValue,l=a.unescapeFacetValue,m=r(3646);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var a=t[0];this._rawResults=t;var u=this;Object.keys(a).forEach((function(e){u[e]=a[e]}));var h=o({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){u[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),v=d(e.facets),g=d(e.disjunctiveFacets),y=1,R=a.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],o=(r=e.hierarchicalFacets,n=t,s(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(o){var h=o.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===o.name}));u.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=g[t],u.disjunctiveFacets[l]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(u.disjunctiveFacets[l],a.facets_stats,t)),d&&(l=v[t],u.facets[l]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(u.facets[l],a.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],s=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,f=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(u.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;u.hierarchicalFacets[r][m].data=o({},u.hierarchicalFacets[r][m].data,f)}else{r=g[t];var d=a.facets&&a.facets[t]||{};u.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(u.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!u.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(u.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var o=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(u.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0&&!u.persistHierarchicalRootCount){var m=s[0].split(a)[0];l[m]=u.hierarchicalFacets[h][f].data[m]}u.hierarchicalFacets[h][f].data=i(l,o,u.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=v[t];u.facets[n]={name:t,data:R[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){u.facets[n]=u.facets[n]||{name:t},u.facets[n].data=u.facets[n].data||{},u.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(c),o=l(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(c.rootPath)&&(o=o.replace(c.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=s(i,(function(e){return e.name===r})),c=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,a=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))n=[e];else n=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var a,s=t.sortRemainingBy;return"hidden"===s?r:(a="alpha"===s?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(a.sortBy)){var n=u(a.sortBy,v.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),c=r.split(a),u=s(n,(function(e){return e.name===t})),o=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},7521:(e,t,r)=>{"use strict";var n=r(9660),i=r(7666),a=r(5675).escapeFacetValue,s=r(8056),c=r(3036),u=r(9670),o=r(5526),h=r(8651),f=r(8702),l=r(2350),m=r(2218);function d(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var i=r||{};i.index=t,this.state=f.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._searchResultsOptions=n}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}s(d,n),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new l(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new l(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:o(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(n.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f,l=this;return i?f=this.client.searchForFacetValues([{indexName:c.index,params:o}]):s?f=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,f=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),f.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=p,d.prototype.setPage=p,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},d.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=v,d.prototype.getPage=v,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},2576:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},2686:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},5675:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},4853:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(4853);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},8056:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},2706:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},3036:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},5526:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},2195:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},6370:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},8651:(e,t,r)=>{"use strict";var n=r(3036);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},7580:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},2218:e=>{"use strict";e.exports="3.16.0"},5814:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},I=1,D=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return I>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return D>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.22.0","-").concat(e)}),u()]}),userAgent:_("4.22.0").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.22.0",V}()},1962:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(9231),i=r(9841),a=r(8284),s=r.n(a),c=r(5814),u=r.n(c),o=r(7698),h=r(5070),f=r(6299),l=r(527),m=r(8607);const d=["zero","one","two","few","many","other"];function p(e){return d.filter((t=>e.includes(t)))}const v={locale:"en",pluralForms:p(["one","other"]),select:e=>1===e?"one":"other"};function g(){const{i18n:{currentLocale:e}}=(0,m.Z)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:p(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),v}}),[e])}function y(){const e=g();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}var R=r(9761),F=r(6291),b=r(9211),P=r(4760),j=r(4428),_=r(9871),E=r(8034),x=r(9450);const O={searchQueryInput:"searchQueryInput_BM1b",searchVersionInput:"searchVersionInput_u4og",searchResultsColumn:"searchResultsColumn_DUrA",algoliaLogo:"algoliaLogo_T26C",algoliaLogoPathFill:"algoliaLogoPathFill_Er6V",searchResultItem:"searchResultItem_hKZE",searchResultItemHeading:"searchResultItemHeading_rcVX",searchResultItemPath:"searchResultItemPath_M30Q",searchResultItemSummary:"searchResultItemSummary_y6_V",searchQueryColumn:"searchQueryColumn_N5Y9",searchVersionColumn:"searchVersionColumn_jBZU",searchLogoColumn:"searchLogoColumn_Bcxi",loadingSpinner:"loadingSpinner_sKue","loading-spin":"loading-spin_keak",loader:"loader_vKX8"};function w(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",O.searchVersionColumn)},r.map((e=>{let[i,a]=e;const s=r.length>1?`${i}: `:"";return n.createElement("select",{key:i,onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:O.searchVersionInput},a.versions.map(((e,t)=>n.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function N(){const{i18n:{currentLocale:e}}=(0,m.Z)(),{algolia:{appId:t,apiKey:r,indexName:a}}=(0,_.L)(),c=(0,E.l)(),d=function(){const{selectMessage:e}=y();return t=>e(t,(0,j.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),p=function(){const e=(0,l._r)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),[v,g]=(0,R.K)(),b={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[N,A]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return b;case"loading":return{...e,loading:!0};case"update":return v!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),b),H=u()(t,r),S=s()(H,a,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});S.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void A({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),u=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=Object.keys(r).map((e=>s(r[e].value)));return{title:i.pop(),url:c(t),summary:n.content?`${s(n.content.value)}...`:"",breadcrumbs:i}}));A({type:"update",value:{items:u,query:t,totalResults:i,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})}));const[T,Q]=(0,n.useState)(null),C=(0,n.useRef)(0),k=(0,n.useRef)(o.Z.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&C.current>r&&A({type:"advance"}),C.current=r}),{threshold:1})),I=()=>v?(0,j.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:v}):(0,j.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),D=(0,F.zX)((function(t){void 0===t&&(t=0),S.addDisjunctiveFacetRefinement("docusaurus_tag","default"),S.addDisjunctiveFacetRefinement("language",e),Object.entries(p.searchVersions).forEach((e=>{let[t,r]=e;S.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),S.setQuery(v).setPage(t).search()}));return(0,n.useEffect)((()=>{if(!T)return;const e=k.current;return e?(e.observe(T),()=>e.unobserve(T)):()=>!0}),[T]),(0,n.useEffect)((()=>{A({type:"reset"}),v&&(A({type:"loading"}),setTimeout((()=>{D()}),300))}),[v,p.searchVersions,D]),(0,n.useEffect)((()=>{N.lastPage&&0!==N.lastPage&&D(N.lastPage)}),[D,N.lastPage]),n.createElement(x.Z,null,n.createElement(h.Z,null,n.createElement("title",null,(0,P.p)(I())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,I()),n.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},n.createElement("div",{className:(0,i.Z)("col",O.searchQueryColumn,{"col--9":p.versioningEnabled,"col--12":!p.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:O.searchQueryInput,placeholder:(0,j.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,j.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>g(e.target.value),value:v,autoComplete:"off",autoFocus:!0})),p.versioningEnabled&&n.createElement(w,{docsSearchVersionsHelpers:p})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",O.searchResultsColumn)},!!N.totalResults&&d(N.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",O.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,j.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:O.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:O.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),N.items.length>0?n.createElement("main",null,N.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return n.createElement("article",{key:t,className:O.searchResultItem},n.createElement("h2",{className:O.searchResultItemHeading},n.createElement(f.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",O.searchResultItemPath)},c.map(((e,t)=>n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&n.createElement("p",{className:O.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[v&&!N.loading&&n.createElement("p",{key:"no-results"},n.createElement(j.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!N.loading&&n.createElement("div",{key:"spinner",className:O.loadingSpinner})],N.hasMore&&n.createElement("div",{className:O.loader,ref:Q},n.createElement(j.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function A(){return n.createElement(b.FG,{className:"search-page-wrapper"},n.createElement(N,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.67205d40.js.LICENSE.txt b/assets/js/1a4e3797.67205d40.js.LICENSE.txt new file mode 100644 index 00000000..aeed7c01 --- /dev/null +++ b/assets/js/1a4e3797.67205d40.js.LICENSE.txt @@ -0,0 +1 @@ +/*! algoliasearch-lite.umd.js | 4.22.0 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/assets/js/1a4e3797.bbf5a46b.js b/assets/js/1a4e3797.bbf5a46b.js deleted file mode 100644 index 54af7d6c..00000000 --- a/assets/js/1a4e3797.bbf5a46b.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1a4e3797.bbf5a46b.js.LICENSE.txt */ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[920],{3698:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},851:(e,t,r)=>{"use strict";var n=r(2034),i=r(3122),a=r(5257);function s(e,t,r){return new n(e,t,r)}s.version=r(9730),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},743:(e,t,r)=>{"use strict";var n=r(3698);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(4838)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},1886:(e,t,r)=>{"use strict";var n=r(6439),i=r(9900),a=r(8063),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},3122:(e,t,r)=>{"use strict";var n=r(5717),i=r(6439),a=r(4497),s=r(9435),c=r(7473),u=r(9900),o=r(8063),h=r(863),f=r(1886);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&o(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=c(r);if(this.isNumericRefined(e,t,i))return this;var a=n({},this.numericRefinements);return a[e]=n({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&l(n.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,u=c(r),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6731:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var s=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[s.name]&&e.hierarchicalFacetsRefinements[s.name][0]||"",h=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s),l=e._getHierarchicalShowParentLevel(s),m=a(e._getHierarchicalFacetSortBy(s)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,a,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var n=r(5717),i=r(6439),a=r(1154),s=r(1611),c=r(9435),u=r(6102),o=r(2789),h=r(2398),f=h.escapeFacetValue,l=h.unescapeFacetValue,m=r(6731);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var a=t[0];this._rawResults=t;var o=this;Object.keys(a).forEach((function(e){o[e]=a[e]})),Object.keys(r||{}).forEach((function(e){o[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),f=d(e.facets),v=d(e.disjunctiveFacets),g=1,y=a.facets||{};Object.keys(y).forEach((function(t){var r,n,i=y[t],s=(r=e.hierarchicalFacets,n=t,c(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(s){var h=s.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===s.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=v[t],o.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),h.forEach((function(r){var s=t[g],c=s&&s.facets?s.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(c).forEach((function(t){var r,f=c[t];if(h){r=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=n({},o.hierarchicalFacets[r][m].data,f)}else{r=v[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],s.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var c=r[t],h=u(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];o.facets[n]={name:t,data:a.facets[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function g(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return g(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function y(e,t){var r=c(e,(function(e){return e.name===t}));return r&&r.stats}function R(e,t,r,n,i){var a=c(i,(function(e){return e.name===r})),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=c(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,r)}(this,e);if(r){var n,s=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),u=this;if(Array.isArray(r))n=[e];else n=u._state.getHierarchicalFacetByName(r.name).attributes;return g((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(u,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(a(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,v.DEFAULT_SORT);return a(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(R(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(R(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(R(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=c(n,(function(e){return e.name===t})),o=s.reduce((function(e,t){var r=e&&c(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},2034:(e,t,r)=>{"use strict";var n=r(3122),i=r(5257),a=r(743),s=r(3746),c=r(3698),u=r(4838),o=r(8063),h=r(9900),f=r(5717),l=r(9730),m=r(2398).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=s._getQueries(r.index,r),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(s._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var c=this.client.initIndex(n.index);if("function"!=typeof c.findAnswers)throw new Error(a);return c.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=s.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=p,d.prototype.setPage=p,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=v,d.prototype.getPage=v,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=s._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=s._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},1611:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},6439:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2398:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},9435:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(9435);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},4838:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4497:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},5717:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},9900:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},1154:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},7473:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},3746:(e,t,r)=>{"use strict";var n=r(5717);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,i){var s=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===i),c=u[i-1];s.facetFilters=i>0?[c.attribute+":"+c.value]:void 0,r.push({indexName:e,params:s})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},863:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},9730:e=>{"use strict";e.exports="3.11.0"},2488:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:w(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",O(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,w(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function w(e){return e.map((function(e){return O(e)}))}function O(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,I=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return I>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.14.2","-").concat(e)}),u()]}),userAgent:_("4.14.2").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.14.2",V}()},3699:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(9496),i=r(5924),a=r(2488),s=r.n(a),c=r(851),u=r.n(c),o=r(6904),h=r(3054),f=r(5292),l=r(6226);const m=["zero","one","two","few","many","other"];function d(e){return m.filter((t=>e.includes(t)))}const p={locale:"en",pluralForms:d(["one","other"]),select:e=>1===e?"one":"other"};function v(){const{i18n:{currentLocale:e}}=(0,l.Z)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:d(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),p}}),[e])}function g(){const e=v();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}var y=r(831),R=r(5651),F=r(5163),b=r(7608),P=r(699),j=r(4743),_=r(464),E=r(5886);const x="searchQueryInput_N2Mv",w="searchVersionInput_mzOm",O="searchResultsColumn_Q7AL",N="algoliaLogo_H3D8",A="algoliaLogoPathFill_lzwp",H="searchResultItem_G2Tx",S="searchResultItemHeading_Y6Gv",T="searchResultItemPath_wx6a",Q="searchResultItemSummary_zBvJ",C="searchQueryColumn_ZBpa",k="searchVersionColumn_dyVq",D="searchLogoColumn_ATLi",I="loadingSpinner_d0rt",q="loader_RUz9";function V(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",k)},r.map((e=>{let[i,a]=e;const s=r.length>1?`${i}: `:"";return n.createElement("select",{key:i,onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:w},a.versions.map(((e,t)=>n.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function L(){const{siteConfig:{themeConfig:e},i18n:{currentLocale:t}}=(0,l.Z)(),{algolia:{appId:r,apiKey:a,indexName:c,externalUrlRegex:m}}=e,d=function(){const{selectMessage:e}=g();return t=>e(t,(0,_.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),p=function(){const e=(0,j._r)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),{searchQuery:v,setSearchQuery:F}=(0,b.O)(),w={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[k,L]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return w;case"loading":return{...e,loading:!0};case"update":return v!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),w),z=s()(r,a),B=u()(z,c,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});B.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void L({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),c=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=new URL(t),a=Object.keys(r).map((e=>s(r[e].value)));return{title:a.pop(),url:(0,y.F)(m,i.href)?i.href:i.pathname+i.hash,summary:n.content?`${s(n.content.value)}...`:"",breadcrumbs:a}}));L({type:"update",value:{items:c,query:t,totalResults:i,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})}));const[M,J]=(0,n.useState)(null),U=(0,n.useRef)(0),W=(0,n.useRef)(f.Z.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&U.current>r&&L({type:"advance"}),U.current=r}),{threshold:1})),Z=()=>v?(0,_.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:v}):(0,_.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),$=(0,R.zX)((function(e){void 0===e&&(e=0),B.addDisjunctiveFacetRefinement("docusaurus_tag","default"),B.addDisjunctiveFacetRefinement("language",t),Object.entries(p.searchVersions).forEach((e=>{let[t,r]=e;B.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),B.setQuery(v).setPage(e).search()}));return(0,n.useEffect)((()=>{if(!M)return;const e=W.current;return e?(e.observe(M),()=>e.unobserve(M)):()=>!0}),[M]),(0,n.useEffect)((()=>{L({type:"reset"}),v&&(L({type:"loading"}),setTimeout((()=>{$()}),300))}),[v,p.searchVersions,$]),(0,n.useEffect)((()=>{k.lastPage&&0!==k.lastPage&&$(k.lastPage)}),[$,k.lastPage]),n.createElement(E.Z,null,n.createElement(o.Z,null,n.createElement("title",null,(0,P.p)(Z())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,Z()),n.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},n.createElement("div",{className:(0,i.Z)("col",C,{"col--9":p.versioningEnabled,"col--12":!p.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:x,placeholder:(0,_.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,_.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>F(e.target.value),value:v,autoComplete:"off",autoFocus:!0})),p.versioningEnabled&&n.createElement(V,{docsSearchVersionsHelpers:p})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",O)},!!k.totalResults&&d(k.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",D)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,_.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:N},n.createElement("g",{fill:"none"},n.createElement("path",{className:A,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),k.items.length>0?n.createElement("main",null,k.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return n.createElement("article",{key:t,className:H},n.createElement("h2",{className:S},n.createElement(h.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",T)},c.map(((e,t)=>n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&n.createElement("p",{className:Q,dangerouslySetInnerHTML:{__html:s}}))}))):[v&&!k.loading&&n.createElement("p",{key:"no-results"},n.createElement(_.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!k.loading&&n.createElement("div",{key:"spinner",className:I})],k.hasMore&&n.createElement("div",{className:q,ref:J},n.createElement(_.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function z(){return n.createElement(F.FG,{className:"search-page-wrapper"},n.createElement(L,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.bbf5a46b.js.LICENSE.txt b/assets/js/1a4e3797.bbf5a46b.js.LICENSE.txt deleted file mode 100644 index 1d9697b9..00000000 --- a/assets/js/1a4e3797.bbf5a46b.js.LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -/*! algoliasearch-lite.umd.js | 4.14.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/assets/js/1ae5d93b.85fac64d.js b/assets/js/1ae5d93b.85fac64d.js new file mode 100644 index 00000000..980b8ab8 --- /dev/null +++ b/assets/js/1ae5d93b.85fac64d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[900],{4852:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(9231);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(r),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return r?n.createElement(f,l(l({ref:t},c),{},{components:r})):n.createElement(f,l({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=r(4011),a=(r(9231),r(4852));const o={},l="equals",i={unversionedId:"equals/readme",id:"equals/readme",title:"equals",description:"patronum 1.11.0",source:"@site/../src/equals/readme.md",sourceDirName:"equals",slug:"/equals/",permalink:"/methods/equals/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/equals/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"empty (experimental)",permalink:"/methods/empty/"},next:{title:"every",permalink:"/methods/every/"}},s={},u=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Composition",id:"composition",level:3},{value:"Alternative",id:"alternative",level:3}],c={toc:u},p="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"equals"},"equals"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { equals } from 'patronum';\n// or\nimport { equals } from 'patronum/equals';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to compare store value with another value wrote as literal or contained in another store."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$isEquals = equals(first, second);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$isEquals")," will be store with ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if value in ",(0,a.kt)("inlineCode",{parentName:"li"},"first")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"second")," is equals by comparing them with ",(0,a.kt)("inlineCode",{parentName:"li"},"==="))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"first: Store | T")," \u2014 A value or the store to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"second")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"second: Store | T")," \u2014 A value or the store to be compared with ",(0,a.kt)("inlineCode",{parentName:"li"},"first"))),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$isEquals: Store")," \u2014 The store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if values is equals")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $first = createStore('foo bar');\nconst $isEquals = equals($first, 'foo bar');\n\nconsole.assert(true === $isEquals.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/UtAWVd9r"},"Try it")),(0,a.kt)("h3",{id:"composition"},"Composition"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"equals")," operator can be composed with any other method of patronum:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $account = createStore(null);\nconst $authorized = not(equals($account, null));\n// $authorized contains `true` only when $account contains not `null`\n")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("p",null,"Compare to literal value:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nconst $first = createStore('foo bar');\nconst $isEquals = $first.map((first) => first === 'foo bar');\n\nconsole.assert(true === $isEquals.getState());\n")),(0,a.kt)("p",null,"Compare to another store:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, combine } from 'effector';\nconst $first = createStore('foo bar');\nconst $second = createStore('foo bar');\nconst $isEquals = combine($first, $second, (first, second) => first === second);\n\nconsole.assert(true === $isEquals.getState());\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ae5d93b.cbd18f44.js b/assets/js/1ae5d93b.cbd18f44.js deleted file mode 100644 index bf0f2a58..00000000 --- a/assets/js/1ae5d93b.cbd18f44.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[900],{9613:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=u(r),d=a,f=m["".concat(s,".").concat(d)]||m[d]||p[d]||o;return r?n.createElement(f,l(l({ref:t},c),{},{components:r})):n.createElement(f,l({ref:t},c))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=r(2081),a=(r(9496),r(9613));const o={},l="equals",i={unversionedId:"equals/readme",id:"equals/readme",title:"equals",description:"patronum 1.11.0",source:"@site/../src/equals/readme.md",sourceDirName:"equals",slug:"/equals/",permalink:"/methods/equals/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/equals/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"empty (experimental)",permalink:"/methods/empty/"},next:{title:"every",permalink:"/methods/every/"}},s={},u=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Composition",id:"composition",level:3},{value:"Alternative",id:"alternative",level:3}],c={toc:u};function p(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"equals"},"equals"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { equals } from 'patronum';\n// or\nimport { equals } from 'patronum/equals';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to compare store value with another value wrote as literal or contained in another store."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$isEquals = equals(first, second);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$isEquals")," will be store with ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if value in ",(0,a.kt)("inlineCode",{parentName:"li"},"first")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"second")," is equals by comparing them with ",(0,a.kt)("inlineCode",{parentName:"li"},"==="))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"first: Store | T")," \u2014 A value or the store to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"second")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"second: Store | T")," \u2014 A value or the store to be compared with ",(0,a.kt)("inlineCode",{parentName:"li"},"first"))),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$isEquals: Store")," \u2014 The store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if values is equals")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $first = createStore('foo bar');\nconst $isEquals = equals($first, 'foo bar');\n\nconsole.assert(true === $isEquals.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/UtAWVd9r"},"Try it")),(0,a.kt)("h3",{id:"composition"},"Composition"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"equals")," operator can be composed with any other method of patronum:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $account = createStore(null);\nconst $authorized = not(equals($account, null));\n// $authorized contains `true` only when $account contains not `null`\n")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("p",null,"Compare to literal value:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nconst $first = createStore('foo bar');\nconst $isEquals = $first.map((first) => first === 'foo bar');\n\nconsole.assert(true === $isEquals.getState());\n")),(0,a.kt)("p",null,"Compare to another store:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, combine } from 'effector';\nconst $first = createStore('foo bar');\nconst $second = createStore('foo bar');\nconst $isEquals = combine($first, $second, (first, second) => first === second);\n\nconsole.assert(true === $isEquals.getState());\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1be78505.51b45561.js b/assets/js/1be78505.51b45561.js new file mode 100644 index 00000000..dacfc68c --- /dev/null +++ b/assets/js/1be78505.51b45561.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[514,967],{3206:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ge});var a=n(9231),o=n(9841),l=n(9211),r=n(7847),c=n(9373),i=n(2397),s=n(826),d=n(7731),m=n(9450),u=n(4428),b=n(8083),p=n(8337);const h={backToTopButton:"backToTopButton_wjXS",backToTopButtonShow:"backToTopButtonShow_LjNE"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),l=(0,a.useRef)(!1),{startScroll:r,cancelScroll:c}=(0,b.Ct)();return(0,b.RF)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(l.current?l.current=!1:a>=r?(c(),o(!1)):a{e.location.hash&&(l.current=!0,o(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.Z)("clean-btn",r.k.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(5641),g=n(9409),v=n(4642),k=n(4176),_=n(4833),C=n(4011);function S(e){return a.createElement("svg",(0,C.Z)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const I={collapseSidebarButton:"collapseSidebarButton_WBDK",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_sMPD"};function N(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.Z)("button button--secondary button--outline",I.collapseSidebarButton),onClick:t},a.createElement(S,{className:I.collapseSidebarButtonIcon}))}var Z=n(8918),x=n(6291);const T=Symbol("EmptyContext"),B=a.createContext(T);function w(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),l=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return a.createElement(B.Provider,{value:l},t)}var y=n(3071),L=n(8521),A=n(6299),M=n(6852);function H(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function P(e){let{item:t,onItemClick:n,activePath:l,level:c,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,k.L)(),f=function(e){const t=(0,M.Z)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,i.Wl)(e):void 0),[e,t])}(t),g=(0,i._F)(t,l),v=(0,L.Mg)(h,l),{collapsed:_,setCollapsed:S}=(0,y.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:I,setExpandedItem:N}=function(){const e=(0,a.useContext)(B);if(e===T)throw new x.i6("DocSidebarItemsExpandedStateProvider");return e}(),Z=function(e){void 0===e&&(e=!_),N(e?null:s),S(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const l=(0,x.D9)(t);(0,a.useEffect)((()=>{t&&!l&&n&&o(!1)}),[t,l,n,o])}({isActive:g,collapsed:_,updateCollapsed:Z}),(0,a.useEffect)((()=>{b&&null!=I&&I!==s&&E&&S(!0)}),[b,I,s,S,E]),a.createElement("li",{className:(0,o.Z)(r.k.docs.docSidebarItemCategory,r.k.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":_},p)},a.createElement("div",{className:(0,o.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v})},a.createElement(A.Z,(0,C.Z)({className:(0,o.Z)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?Z(!1):(e.preventDefault(),Z())}:()=>{n?.(t)},"aria-current":v?"page":void 0,"aria-expanded":b?!_:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(H,{categoryLabel:u,onClick:e=>{e.preventDefault(),Z()}})),a.createElement(y.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:_},a.createElement(z,{items:m,tabIndex:_?-1:0,onItemClick:n,activePath:l,level:c+1})))}var F=n(6111),W=n(7085);const D={menuExternalLink:"menuExternalLink_vWKg"};function R(e){let{item:t,onItemClick:n,activePath:l,level:c,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,i._F)(t,l),E=(0,F.Z)(m);return a.createElement("li",{className:(0,o.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(c),"menu__list-item",b),key:u},a.createElement(A.Z,(0,C.Z)({className:(0,o.Z)("menu__link",!E&&D.menuExternalLink,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(W.Z,null)))}const V={menuHtmlItem:"menuHtmlItem_Cp6y"};function Y(e){let{item:t,level:n,index:l}=e;const{value:c,defaultStyle:i,className:s}=t;return a.createElement("li",{className:(0,o.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(n),i&&[V.menuHtmlItem,"menu__list-item"],s),key:l,dangerouslySetInnerHTML:{__html:c}})}function K(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(P,(0,C.Z)({item:t},n));case"html":return a.createElement(Y,(0,C.Z)({item:t},n));default:return a.createElement(R,(0,C.Z)({item:t},n))}}function q(e){let{items:t,...n}=e;return a.createElement(w,null,t.map(((e,t)=>a.createElement(K,(0,C.Z)({key:t,item:e,index:t},n)))))}const z=(0,a.memo)(q),j={menu:"menu_K20X",menuWithAnnouncementBar:"menuWithAnnouncementBar_cY_F"};function U(e){let{path:t,sidebar:n,className:l}=e;const c=function(){const{isActive:e}=(0,Z.nT)(),[t,n]=(0,a.useState)(e);return(0,b.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{"aria-label":(0,u.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.Z)("menu thin-scrollbar",j.menu,c&&j.menuWithAnnouncementBar,l)},a.createElement("ul",{className:(0,o.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(z,{items:n,activePath:t,level:1})))}const J="sidebar_NDxv",X="sidebarWithHideableNavbar_rmep",G="sidebarHidden_Z6rM",O="sidebarLogo__qwC";function Q(e){let{path:t,sidebar:n,onCollapse:l,isHidden:r}=e;const{navbar:{hideOnScroll:c},docs:{sidebar:{hideable:i}}}=(0,k.L)();return a.createElement("div",{className:(0,o.Z)(J,c&&X,r&&G)},c&&a.createElement(_.Z,{tabIndex:-1,className:O}),a.createElement(U,{path:t,sidebar:n}),i&&a.createElement(N,{onClick:l}))}const $=a.memo(Q);var ee=n(2251),te=n(1450);const ne=e=>{let{sidebar:t,path:n}=e;const l=(0,te.e)();return a.createElement("ul",{className:(0,o.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(z,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&l.toggle(),"link"===e.type&&l.toggle()},level:1}))};function ae(e){return a.createElement(ee.Zo,{component:ne,props:e})}const oe=a.memo(ae);function le(e){const t=(0,v.i)(),n="desktop"===t||"ssr"===t,o="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement($,e),o&&a.createElement(oe,e))}const re={expandButton:"expandButton_NYYN",expandButtonIcon:"expandButtonIcon_jkcN"};function ce(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:re.expandButton,title:(0,u.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(S,{className:re.expandButtonIcon}))}const ie={docSidebarContainer:"docSidebarContainer_W5ax",docSidebarContainerHidden:"docSidebarContainerHidden_JML0",sidebarViewport:"sidebarViewport_h21Y"};function se(e){let{children:t}=e;const n=(0,d.V)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function de(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:l}=e;const{pathname:c}=(0,g.TH)(),[i,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{i&&s(!1),!i&&(0,f.n)()&&s(!0),l((e=>!e))}),[l,i]);return a.createElement("aside",{className:(0,o.Z)(r.k.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&s(!0)}},a.createElement(se,null,a.createElement("div",{className:(0,o.Z)(ie.sidebarViewport,i&&ie.sidebarViewportHidden)},a.createElement(le,{sidebar:t,path:c,onCollapse:d,isHidden:i}),i&&a.createElement(ce,{toggleSidebar:d}))))}const me={docMainContainer:"docMainContainer_Fdyb",docMainContainerEnhanced:"docMainContainerEnhanced_ZmJB",docItemWrapperEnhanced:"docItemWrapperEnhanced_lHeq"};function ue(e){let{hiddenSidebarContainer:t,children:n}=e;const l=(0,d.V)();return a.createElement("main",{className:(0,o.Z)(me.docMainContainer,(t||!l)&&me.docMainContainerEnhanced)},a.createElement("div",{className:(0,o.Z)("container padding-top--md padding-bottom--lg",me.docItemWrapper,t&&me.docItemWrapperEnhanced)},n))}const be={docPage:"docPage_KBb8",docsWrapper:"docsWrapper_r438","themedComponent--light":"themedComponent--light_PNuK"};function pe(e){let{children:t}=e;const n=(0,d.V)(),[o,l]=(0,a.useState)(!1);return a.createElement(m.Z,{wrapperClassName:be.docsWrapper},a.createElement(E,null),a.createElement("div",{className:be.docPage},n&&a.createElement(de,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:l}),a.createElement(ue,{hiddenSidebarContainer:o},t)))}var he=n(967),Ee=n(1701);function fe(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(Ee.Z,{version:t.version,tag:(0,c.os)(t.pluginId,t.version)}),a.createElement(l.d,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function ge(e){const{versionMetadata:t}=e,n=(0,i.hI)(e);if(!n)return a.createElement(he.default,null);const{docElement:c,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(fe,e),a.createElement(l.FG,{className:(0,o.Z)(r.k.wrapper.docsPages,r.k.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.q,{version:t},a.createElement(d.b,{name:m,items:u},a.createElement(pe,null,c)))))}},967:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(9231),o=n(4428),l=n(9211),r=n(9450);function c(){return a.createElement(a.Fragment,null,a.createElement(l.d,{title:(0,o.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},826:(e,t,n)=>{n.d(t,{E:()=>c,q:()=>r});var a=n(9231),o=n(6291);const l=a.createContext(null);function r(e){let{children:t,version:n}=e;return a.createElement(l.Provider,{value:n},t)}function c(){const e=(0,a.useContext)(l);if(null===e)throw new o.i6("DocsVersionProvider");return e}}}]); \ No newline at end of file diff --git a/assets/js/1be78505.a3fef0ca.js b/assets/js/1be78505.a3fef0ca.js deleted file mode 100644 index f753e8d9..00000000 --- a/assets/js/1be78505.a3fef0ca.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[514,874],{5454:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ie});var a=n(9496),l=n(5924),o=n(5163),r=n(4797),c=n(7913),i=n(5205),s=n(502),d=n(5914),m=n(5886),u=n(464),b=n(948),p=n(3374);const h="backToTopButton_bUYD",E="backToTopButtonShow_GKGC";function f(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,l]=(0,a.useState)(!1),o=(0,a.useRef)(!1),{startScroll:r,cancelScroll:c}=(0,b.Ct)();return(0,b.RF)(((e,n)=>{let{scrollY:a}=e;const r=null==n?void 0:n.scrollY;r&&(o.current?o.current=!1:a>=r?(c(),l(!1)):a{e.location.hash&&(o.current=!0,l(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.Z)("clean-btn",r.k.common.backToTopButton,h,e&&E),type:"button",onClick:t})}var v=n(3226),g=n(8757),_=n(1773),k=n(3862),C=n(2081);function I(e){return a.createElement("svg",(0,C.Z)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const S="collapseSidebarButton_20pw",N="collapseSidebarButtonIcon_MSDn";function Z(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,l.Z)("button button--secondary button--outline",S),onClick:t},a.createElement(I,{className:N}))}var x=n(5802),T=n(5651);const y=Symbol("EmptyContext"),w=a.createContext(y);function A(e){let{children:t}=e;const[n,l]=(0,a.useState)(null),o=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:l})),[n]);return a.createElement(w.Provider,{value:o},t)}var L=n(2414),M=n(3318),B=n(3054),F=n(3887);function P(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function H(e){let{item:t,onItemClick:n,activePath:o,level:c,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,_.L)(),f=function(e){const t=(0,F.Z)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,i.Wl)(e):void 0),[e,t])}(t),v=(0,i._F)(t,o),g=(0,M.Mg)(h,o),{collapsed:k,setCollapsed:I}=(0,L.u)({initialState:()=>!!b&&(!v&&t.collapsed)}),{expandedItem:S,setExpandedItem:N}=function(){const e=(0,a.useContext)(w);if(e===y)throw new T.i6("DocSidebarItemsExpandedStateProvider");return e}(),Z=function(e){void 0===e&&(e=!k),N(e?null:s),I(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:l}=e;const o=(0,T.D9)(t);(0,a.useEffect)((()=>{t&&!o&&n&&l(!1)}),[t,o,n,l])}({isActive:v,collapsed:k,updateCollapsed:Z}),(0,a.useEffect)((()=>{b&&null!=S&&S!==s&&E&&I(!0)}),[b,S,s,I,E]),a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemCategory,r.k.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":k},p)},a.createElement("div",{className:(0,l.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":g})},a.createElement(B.Z,(0,C.Z)({className:(0,l.Z)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":v}),onClick:b?e=>{null==n||n(t),h?Z(!1):(e.preventDefault(),Z())}:()=>{null==n||n(t)},"aria-current":g?"page":void 0,"aria-expanded":b?!k:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(P,{categoryLabel:u,onClick:e=>{e.preventDefault(),Z()}})),a.createElement(L.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:k},a.createElement(G,{items:m,tabIndex:k?-1:0,onItemClick:n,activePath:o,level:c+1})))}var W=n(4038),D=n(7054);const R="menuExternalLink_xagx";function V(e){let{item:t,onItemClick:n,activePath:o,level:c,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,i._F)(t,o),E=(0,W.Z)(m);return a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(c),"menu__list-item",b),key:u},a.createElement(B.Z,(0,C.Z)({className:(0,l.Z)("menu__link",!E&&R,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(D.Z,null)))}const U="menuHtmlItem_xQpJ";function z(e){let{item:t,level:n,index:o}=e;const{value:c,defaultStyle:i,className:s}=t;return a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(n),i&&[U,"menu__list-item"],s),key:o,dangerouslySetInnerHTML:{__html:c}})}function X(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(H,(0,C.Z)({item:t},n));case"html":return a.createElement(z,(0,C.Z)({item:t},n));default:return a.createElement(V,(0,C.Z)({item:t},n))}}function Y(e){let{items:t,...n}=e;return a.createElement(A,null,t.map(((e,t)=>a.createElement(X,(0,C.Z)({key:t,item:e,index:t},n)))))}const G=(0,a.memo)(Y),K="menu_xo_M",q="menuWithAnnouncementBar_XMVB";function J(e){let{path:t,sidebar:n,className:o}=e;const c=function(){const{isActive:e}=(0,x.nT)(),[t,n]=(0,a.useState)(e);return(0,b.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{className:(0,l.Z)("menu thin-scrollbar",K,c&&q,o)},a.createElement("ul",{className:(0,l.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(G,{items:n,activePath:t,level:1})))}const O="sidebar_lvUT",Q="sidebarWithHideableNavbar__E2B",j="sidebarHidden_fRAk",$="sidebarLogo_rW_A";function ee(e){let{path:t,sidebar:n,onCollapse:o,isHidden:r}=e;const{navbar:{hideOnScroll:c},docs:{sidebar:{hideable:i}}}=(0,_.L)();return a.createElement("div",{className:(0,l.Z)(O,c&&Q,r&&j)},c&&a.createElement(k.Z,{tabIndex:-1,className:$}),a.createElement(J,{path:t,sidebar:n}),i&&a.createElement(Z,{onClick:o}))}const te=a.memo(ee);var ne=n(3687),ae=n(760);const le=e=>{let{sidebar:t,path:n}=e;const o=(0,ae.e)();return a.createElement("ul",{className:(0,l.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(G,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&o.toggle(),"link"===e.type&&o.toggle()},level:1}))};function oe(e){return a.createElement(ne.Zo,{component:le,props:e})}const re=a.memo(oe);function ce(e){const t=(0,g.i)(),n="desktop"===t||"ssr"===t,l="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(te,e),l&&a.createElement(re,e))}const ie="expandButton_XWmA",se="expandButtonIcon_EVv8";function de(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:ie,title:(0,u.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(I,{className:se}))}const me="docSidebarContainer_SbZl",ue="docSidebarContainerHidden_bib7";function be(e){let{children:t}=e;const n=(0,d.V)();return a.createElement(a.Fragment,{key:(null==n?void 0:n.name)??"noSidebar"},t)}function pe(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:o}=e;const{pathname:c}=(0,v.TH)(),[i,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{i&&s(!1),o((e=>!e))}),[o,i]);return a.createElement("aside",{className:(0,l.Z)(r.k.docs.docSidebarContainer,me,n&&ue),onTransitionEnd:e=>{e.currentTarget.classList.contains(me)&&n&&s(!0)}},a.createElement(be,null,a.createElement(ce,{sidebar:t,path:c,onCollapse:d,isHidden:i})),i&&a.createElement(de,{toggleSidebar:d}))}const he={docMainContainer:"docMainContainer_mKWM",docMainContainerEnhanced:"docMainContainerEnhanced_XBhc",docItemWrapperEnhanced:"docItemWrapperEnhanced_ARiA"};function Ee(e){let{hiddenSidebarContainer:t,children:n}=e;const o=(0,d.V)();return a.createElement("main",{className:(0,l.Z)(he.docMainContainer,(t||!o)&&he.docMainContainerEnhanced)},a.createElement("div",{className:(0,l.Z)("container padding-top--md padding-bottom--lg",he.docItemWrapper,t&&he.docItemWrapperEnhanced)},n))}const fe="docPage_IabX",ve="docsWrapper_xhvl";function ge(e){let{children:t}=e;const n=(0,d.V)(),[l,o]=(0,a.useState)(!1);return a.createElement(m.Z,{wrapperClassName:ve},a.createElement(f,null),a.createElement("div",{className:fe},n&&a.createElement(pe,{sidebar:n.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),a.createElement(Ee,{hiddenSidebarContainer:l},t)))}var _e=n(7874),ke=n(8530);function Ce(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(ke.Z,{version:t.version,tag:(0,c.os)(t.pluginId,t.version)}),a.createElement(o.d,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function Ie(e){const{versionMetadata:t}=e,n=(0,i.hI)(e);if(!n)return a.createElement(_e.default,null);const{docElement:c,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(Ce,e),a.createElement(o.FG,{className:(0,l.Z)(r.k.wrapper.docsPages,r.k.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.q,{version:t},a.createElement(d.b,{name:m,items:u},a.createElement(ge,null,c)))))}},7874:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(9496),l=n(464),o=n(5163),r=n(5886);function c(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},502:(e,t,n)=>{n.d(t,{E:()=>c,q:()=>r});var a=n(9496),l=n(5651);const o=a.createContext(null);function r(e){let{children:t,version:n}=e;return a.createElement(o.Provider,{value:n},t)}function c(){const e=(0,a.useContext)(o);if(null===e)throw new l.i6("DocsVersionProvider");return e}}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.37dfdc4a.js b/assets/js/1df93b7f.52a1d67f.js similarity index 99% rename from assets/js/1df93b7f.37dfdc4a.js rename to assets/js/1df93b7f.52a1d67f.js index 9888cde5..35c6af78 100644 --- a/assets/js/1df93b7f.37dfdc4a.js +++ b/assets/js/1df93b7f.52a1d67f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[237],{5751:(c,e,t)=>{t.r(e),t.d(e,{default:()=>M});var h,l,a,v,Z=t(9496),r=t(5886),m=t(6226),n=t(3054);function i(){return i=Object.assign?Object.assign.bind():function(c){for(var e=1;e{let{title:e,titleId:t,...r}=c;return Z.createElement("svg",i({width:1041,height:445,viewBox:"0 0 1041 445",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},r),e?Z.createElement("title",{id:t},e):null,h||(h=Z.createElement("rect",{width:1041,height:445,rx:44,fill:"var(--ifm-paper-background, white)"})),l||(l=Z.createElement("path",{d:"M151.589 291.682h15.927v-43.413h.959c2.877 5.22 8.736 14.329 23.651 14.329 19.815 0 34.197-15.874 34.197-42.347 0-26.527-14.595-42.135-34.357-42.135-15.181 0-20.668 9.269-23.491 14.329h-1.332v-13.263h-15.554v112.5Zm15.608-71.591c0-17.099 7.457-28.445 21.36-28.445 14.435 0 21.68 12.198 21.68 28.445 0 16.406-7.458 28.924-21.68 28.924-13.69 0-21.36-11.719-21.36-28.924Zm100.781 42.72c13.53 0 21.147-6.871 24.183-12.997h.639V261h15.554v-54.332c0-23.811-18.75-28.552-31.747-28.552-14.808 0-28.444 5.966-33.771 20.881l14.968 3.409c2.344-5.806 8.31-11.399 19.016-11.399 10.281 0 15.554 5.38 15.554 14.649v.372c0 5.807-5.966 5.7-20.667 7.405-15.501 1.811-31.375 5.859-31.375 24.449 0 16.087 12.092 24.929 27.646 24.929Zm3.462-12.784c-9.002 0-15.5-4.048-15.5-11.932 0-8.523 7.564-11.559 16.779-12.784 5.167-.692 17.418-2.077 19.709-4.368v10.547c0 9.695-7.724 18.537-20.988 18.537Zm96.32-70.845h-16.779V159.58h-15.926v19.602h-11.986v12.784h11.986v48.313c-.054 14.862 11.292 22.053 23.863 21.786 5.061-.053 8.47-1.012 10.334-1.704l-2.876-13.157c-1.066.213-3.037.692-5.594.692-5.166 0-9.801-1.704-9.801-10.919v-45.011h16.779v-12.784ZM385.379 261h15.926v-49.964c0-10.707 8.257-18.431 19.549-18.431 3.303 0 7.032.586 8.31.959V178.33c-1.598-.214-4.741-.373-6.765-.373-9.588 0-17.791 5.433-20.774 14.222h-.852v-12.997h-15.394V261Zm89.102 1.651c23.065 0 38.139-16.885 38.139-42.187 0-25.462-15.074-42.348-38.139-42.348-23.065 0-38.139 16.886-38.139 42.348 0 25.302 15.074 42.187 38.139 42.187Zm.053-13.37c-15.074 0-22.106-13.157-22.106-28.87 0-15.661 7.032-28.978 22.106-28.978 14.968 0 22 13.317 22 28.978 0 15.713-7.032 28.87-22 28.87Zm71.791-36.861c0-13.05 7.99-20.507 19.07-20.507 10.813 0 17.365 7.084 17.365 18.963V261h15.926v-52.042c0-20.241-11.132-30.842-27.858-30.842-12.305 0-20.348 5.7-24.13 14.383h-1.012v-13.317h-15.288V261h15.927v-48.58Zm125.55 14.649c.054 13.903-10.28 20.508-19.229 20.508-9.854 0-16.673-7.138-16.673-18.271v-50.124h-15.926v52.042c0 20.294 11.132 30.841 26.846 30.841 12.305 0 20.668-6.498 24.45-15.234h.852V261h15.66v-81.818h-15.98v47.887ZM709.256 261h15.926v-50.444c0-11.026 7.724-18.697 16.779-18.697 8.843 0 14.969 5.86 14.969 14.755V261h15.873v-52.148c0-9.855 6.019-16.993 16.406-16.993 8.417 0 15.341 4.688 15.341 15.767V261h15.927v-54.865c0-18.697-10.44-28.019-25.248-28.019-11.773 0-20.615 5.647-24.557 14.383h-.852c-3.569-8.949-11.079-14.383-21.999-14.383-10.813 0-18.857 5.38-22.266 14.383h-1.012v-13.317h-15.287V261ZM429.032 287.909h-5.358v-6.011h-3.855v6.011h-3.79v3.267h3.79v15.682c0 4.378 3.528 6.469 6.796 6.469 1.437 0 2.352-.262 2.875-.458l-.785-3.463c-.326.066-.849.196-1.698.196-1.699 0-3.333-.522-3.333-3.79v-14.636h5.358v-3.267Zm10.193 9.997c0-4.378 2.794-6.861 6.6-6.861 3.626 0 5.815 2.287 5.815 6.273V313h3.855v-15.943c0-6.453-3.43-9.475-8.559-9.475-3.954 0-6.208 1.65-7.384 4.248h-.327v-12.285h-3.855V313h3.855v-15.094Zm33.843 15.617c5.096 0 8.821-2.549 9.997-6.338l-3.724-1.046c-.981 2.614-3.251 3.921-6.273 3.921-4.525 0-7.645-2.924-7.825-8.299h18.214v-1.633c0-9.344-5.554-12.546-10.781-12.546-6.796 0-11.304 5.358-11.304 13.069 0 7.71 4.443 12.872 11.696 12.872Zm-7.825-15.094c.262-3.904 3.022-7.384 7.433-7.384 4.182 0 6.861 3.137 6.861 7.384h-14.294Zm47.536 15.094c5.096 0 8.821-2.549 9.997-6.338l-3.725-1.046c-.98 2.614-3.25 3.921-6.272 3.921-4.525 0-7.645-2.924-7.825-8.299h18.214v-1.633c0-9.344-5.554-12.546-10.781-12.546-6.796 0-11.304 5.358-11.304 13.069 0 7.71 4.443 12.872 11.696 12.872Zm-7.825-15.094c.262-3.904 3.022-7.384 7.433-7.384 4.182 0 6.861 3.137 6.861 7.384h-14.294Zm35.252-10.52h-5.62v-2.548c0-2.483 1.046-3.79 3.594-3.79 1.111 0 1.764.261 2.156.392l1.111-3.332c-.588-.262-1.764-.654-3.659-.654-3.594 0-7.057 2.157-7.057 6.469v3.463h-4.051v3.267h4.051V313h3.855v-21.824h5.62v-3.267Zm16.576 0h-5.62v-2.548c0-2.483 1.046-3.79 3.594-3.79 1.111 0 1.764.261 2.156.392l1.111-3.332c-.588-.262-1.764-.654-3.659-.654-3.594 0-7.057 2.157-7.057 6.469v3.463h-4.051v3.267h4.051V313h3.855v-21.824h5.62v-3.267Zm14.889 25.614c5.097 0 8.821-2.549 9.998-6.338l-3.725-1.046c-.98 2.614-3.251 3.921-6.273 3.921-4.525 0-7.645-2.924-7.824-8.299h18.214v-1.633c0-9.344-5.554-12.546-10.782-12.546-6.795 0-11.304 5.358-11.304 13.069 0 7.71 4.444 12.872 11.696 12.872Zm-7.824-15.094c.261-3.904 3.022-7.384 7.432-7.384 4.182 0 6.861 3.137 6.861 7.384h-14.293Zm34.271 15.094c5.554 0 9.213-3.398 9.867-7.841h-3.856c-.718 2.744-3.005 4.378-6.011 4.378-4.574 0-7.514-3.79-7.514-9.605 0-5.685 3.006-9.41 7.514-9.41 3.398 0 5.423 2.091 6.011 4.378h3.856c-.654-4.704-4.64-7.841-9.932-7.841-6.796 0-11.304 5.358-11.304 13.003 0 7.514 4.312 12.938 11.369 12.938Zm26.414-25.614h-5.358v-6.011h-3.855v6.011h-3.79v3.267h3.79v15.682c0 4.378 3.528 6.469 6.796 6.469 1.437 0 2.352-.262 2.875-.458l-.785-3.463c-.326.066-.849.196-1.698.196-1.699 0-3.333-.522-3.333-3.79v-14.636h5.358v-3.267Zm15.723 25.614c6.795 0 11.369-5.162 11.369-12.938 0-7.841-4.574-13.003-11.369-13.003-6.796 0-11.37 5.162-11.37 13.003 0 7.776 4.574 12.938 11.37 12.938Zm0-3.463c-5.162 0-7.514-4.444-7.514-9.475s2.352-9.54 7.514-9.54c5.162 0 7.514 4.509 7.514 9.54 0 5.031-2.352 9.475-7.514 9.475Zm17.254 2.94h3.855v-15.878c0-3.398 2.679-5.881 6.338-5.881 1.029 0 2.091.197 2.352.262v-3.921a37.766 37.766 0 0 0-2.025-.065c-3.006 0-5.62 1.699-6.534 4.182h-.262v-3.79h-3.724V313Zm33.908-33.455h-3.855V313h3.855v-33.455ZM698.478 313h3.855v-25.091h-3.855V313Zm1.96-29.273c1.503 0 2.744-1.176 2.744-2.613 0-1.438-1.241-2.614-2.744-2.614-1.503 0-2.744 1.176-2.744 2.614 0 1.437 1.241 2.613 2.744 2.613ZM709.916 313h3.725v-3.855h.457c.85 1.372 2.483 4.378 7.318 4.378 6.273 0 10.651-5.032 10.651-13.003 0-7.906-4.378-12.938-10.716-12.938-4.901 0-6.403 3.006-7.253 4.313h-.327v-12.35h-3.855V313Zm3.79-12.545c0-5.62 2.483-9.41 7.188-9.41 4.9 0 7.318 4.117 7.318 9.41 0 5.357-2.483 9.605-7.318 9.605-4.64 0-7.188-3.921-7.188-9.605ZM737.964 313h3.855v-15.878c0-3.398 2.679-5.881 6.338-5.881 1.029 0 2.091.197 2.352.262v-3.921a37.732 37.732 0 0 0-2.025-.065c-3.006 0-5.619 1.699-6.534 4.182h-.262v-3.79h-3.724V313Zm24.499.588c4.378 0 6.664-2.352 7.449-3.986h.196V313h3.855v-16.531c0-7.972-6.077-8.887-9.279-8.887-3.789 0-8.102 1.307-10.062 5.881l3.659 1.307c.849-1.83 2.859-3.79 6.534-3.79 3.545 0 5.293 1.879 5.293 5.097v.13c0 1.863-1.895 1.699-6.469 2.287-4.656.605-9.736 1.634-9.736 7.384 0 4.9 3.79 7.71 8.56 7.71Zm.588-3.463c-3.071 0-5.293-1.372-5.293-4.051 0-2.94 2.679-3.855 5.685-4.247 1.633-.196 6.011-.654 6.665-1.438v3.529c0 3.136-2.483 6.207-7.057 6.207ZM780.999 313h3.855v-15.878c0-3.398 2.679-5.881 6.338-5.881 1.029 0 2.091.197 2.353.262v-3.921a37.771 37.771 0 0 0-2.026-.065c-3.006 0-5.619 1.699-6.534 4.182h-.261v-3.79h-3.725V313Zm20.362 9.409c3.479 0 5.93-1.846 7.383-5.75l10.684-28.685-4.215-.065-6.926 19.994h-.261l-6.926-19.994h-4.182l9.278 25.222-.719 1.96c-1.404 3.822-3.136 4.182-5.946 3.463l-.98 3.398c.392.196 1.503.457 2.81.457Z",fill:"var(--ifm-paper-foreground, black)"})),a||(a=Z.createElement("g",{clipPath:"url(#a)"},Z.createElement("path",{d:"M830.5 192.8c-2.3-15.1-3.3-17-10.8-20.8-4.6-2.3-7.4-3-11.9-3-9 0-6.8-1.6 3.1-2.3 10.4-.7 15.7-2.6 17.1-6.1.5-1.4 1.5-7.3 2.2-13.1.8-7.2 1.6-10.5 2.5-10.5.8 0 1.3 1.4 1.3 3.8.1 8 2.8 19.5 5.2 21.9 2.6 2.5 10.4 4.3 19.1 4.3 6.5 0 5.2 1.6-2 2.4-7.4.8-15.9 4.9-17.7 8.5-.8 1.5-2.3 8-3.3 14.4s-2.1 11.7-2.4 11.7c-.4 0-1.4-5.1-2.4-11.2Z",fill:"#FC9538"}),Z.createElement("path",{d:"M879.5 195.3c-3.1-22.1-7.8-47.2-9.6-50.9-5.3-11-21.6-18.9-41.6-20.1-5.7-.3-10.3-.9-10.3-1.4 0-.4 5.3-1 11.8-1.3 26.4-1.3 36.5-4.5 40.8-12.7 1.4-2.9 4.3-19.3 7-39.7.9-7.3 2-13.5 2.4-13.7.4-.3 1.5 5.5 2.4 12.8 2.9 22.8 5.5 36.5 7.6 40.7 2.2 4.2 7.8 8.1 14.5 9.9 2.2.6 11.3 1.6 20.3 2.3 8.9.7 16.2 1.5 16.2 1.9 0 .3-4 1.2-8.9 1.8-21.6 2.7-36.4 10.3-40.9 20.9-2 4.7-9.2 44.2-9.2 50.8 0 5.1-1.8 4.1-2.5-1.3ZM808.6 120.3c-1.9-14.3-3.9-22.5-6.2-25.2-3-3.7-10.3-7.1-15-7.1-6.3 0-3.4-2.4 3.7-3.1 8.1-.7 12.3-2.9 13.8-7.1.6-1.7 1.7-8.3 2.3-14.5.8-6.7 1.6-11.2 2.3-11 .5.2 1.5 4.8 2.1 10.3 2.3 19.2 3.3 20.7 15.9 22.5 7.3 1.1 10.2 2.9 4.8 2.9-3.8 0-13.2 4.9-15.5 8.1-1.3 1.7-2.6 7-4.1 15.7-1.2 7.3-2.4 13.2-2.8 13.2-.3 0-.9-2.1-1.3-4.7Z",fill:"#FC9538"}),Z.createElement("path",{d:"M832.3 198.2c-.3-6.2-2.8-18.4-4.4-21.4-.5-1-1.7-1.8-2.5-1.8s-1.3-.4-1-.9c.6-.8-.9-1.8-2.8-1.9-.5 0-1.2-.4-1.5-.9-1.9-2.5-5.6-3.4-11.7-2.8-4.5.5-6.4.4-6.4-.4 0-.7 2.2-1.1 5.9-1.1 3.3 0 6.7-.3 7.7-.7 1.2-.4 1.5-.3 1 .5-.4.7-.2 1.2.3 1.2.6 0 1.1-.4 1.1-.9 0-.8 4.9-2.4 6.5-2.2 1.5.2 4.6-4.4 5.6-8.5.7-2.5 1.8-4.8 2.6-5.1 1.1-.4 1.2-1.9.7-6.7-.4-3.3-1.2-6.4-1.8-6.8-.7-.5-.4-.8.7-.8 1.3 0 1.7.9 1.7 3.8.1 7.4 2.8 19.4 4.9 21.6 1.2 1.3 1.9 2.4 1.7 2.7-.2.2.5.5 1.7.5 11.4.7 20.5 1.9 20 2.6-.3.6-1.8.8-3.3.5-1.5-.3-3.3-.1-4 .6-1 .9-1.1.9-.6 0 .5-1-.5-1.3-4.1-1.2-4 .1-4.3.2-1.8.8l3 .6-4.1 1.3c-4.4 1.3-10.8 6.7-9.9 8.2.4.6.1 1-.5 1-.7 0-.9.8-.5 1.9.3 1.1.1 2.2-.5 2.6-.7.4-.9 1.8-.6 3.4.5 2 .4 2.3-.4 1.1-.9-1.2-1-.5-.7 2.8.3 2.3.2 4.2-.2 4.2-.5 0-.6 1.8-.4 4 .2 2.2 0 4-.4 4s-.9-2.6-1-5.8ZM879.5 195.9c-.4-2.2-.4-4.3-.1-4.6.3-.4.6.3.6 1.5 0 1.1.5 2.4 1 2.7 1.3.8 1.3 4.5.1 4.5-.5 0-1.2-1.8-1.6-4.1Z",fill:"#FCB43C"}),Z.createElement("path",{d:"M878.6 188.4c-.9-2.4-.6-4.2.4-1.9l.9 2v-2c.1-3.3-1.7-9.7-2.9-10.5-.7-.4-.8-1.8-.4-3.3.3-1.6.2-2.7-.4-2.7-.6 0-.8-1.8-.6-4.1.3-2.7.1-3.8-.7-3.4-.7.5-.8-.7-.4-3.7.4-3.3.3-3.9-.5-2.8-.9 1.2-1.1.8-.8-1.7.3-1.8.1-3-.4-2.7-.5.3-.6-.7-.2-2.2.5-1.8.3-2.5-.3-2.1-1 .6-2.9-3.8-2.4-5.6.1-.5-.3-.6-.8-.3-.8.5-2.3-1.6-2.5-3.6-.1-.3-.5-1-1-1.5s-.6-.2-.1.7c.4.8-.6 0-2.4-1.8-1.8-1.9-3.6-3-4.3-2.6-.7.5-.8.3-.3-.6.6-1 .4-1.2-.9-.7-1.1.5-1.5.3-1-.5s.2-.9-1-.5c-.9.4-1.5.3-1.2-.2.8-1.2-7-4.5-8.9-3.7-1.1.4-1.4.2-.9-.6.5-.7 0-.9-1.4-.6-1.4.4-1.9.2-1.6-.7.4-.9-.8-1.4-3.9-1.6-3.5-.3-4.3-.1-3.9 1 .4 1 .1 1.2-.8.6-.8-.5-4.5-.8-8.2-.7-4.4.2-6.8-.1-6.8-.8 0-.6 1.7-1.1 3.8-1.1 8.3 0 29.8-1.3 31.2-1.9.3-.1 1.6-.1 3 0s2.2-.1 1.8-.5c-.4-.4 1.6-1.9 4.5-3.4 6.3-3.1 9.4-7.6 10.3-14.4.5-3.7.9-4.6 1.4-3.2 1 2.7 2.4-7.5 1.5-10.7-.5-1.9-.4-2 .5-.8s1.1.5.7-3.2c-.2-2.6-.1-4.5.3-4.3.4.3.7-1.4.6-3.8-.2-2.3.2-4.5.8-4.9.7-.5.7-.8-.2-.8-.7 0-1-.5-.7-1 .3-.6.8-3.6 1.1-6.7.3-3.2.9-6.2 1.3-6.6 1-1 2.4 9.3 2.4 17.6.1 2.6.4 4.7.7 4.7.4 0 .5 1.8.3 4.1-.2 2.6.1 3.8.7 3.4.7-.4.8.7.4 3.3-.4 2.3-.2 4.2.4 4.6.6.3.8 1.5.5 2.6-.3 1.1-.1 2 .4 2 .6 0 .8 1.1.5 2.5-.2 1.4 0 2.5.7 2.5.5 0 .8.7.5 1.5-.4.8-.2 1.5.4 1.5.5 0 1.5 1.4 2.2 3.1.7 1.7 2.8 4.1 4.6 5.3 1.9 1.3 3.1 2.6 2.7 3-.4.4.1.4 1.1 0 1.3-.5 1.7-.4 1.3.3-.9 1.5 2.8 2.8 15.6 5.7 3.6.8 3.4 1.9-.8 3.6-1.9.7-3.1 1.8-2.8 2.3.3.6.1.7-.5.3-1.9-1.1-12.4 5.1-15.7 9.3-1.6 2.1-3.3 3.7-3.7 3.4-.4-.2-.5.4-.1 1.3.4 1.1.3 1.5-.5 1-1.3-.8-3.5 6.4-2.6 8.8.3.9.1 1.6-.6 1.6-.6 0-1 .8-.9 1.8.2.9 0 2.6-.4 3.7-1 3.2-3 15.4-3.2 20-.1 1.7-.7 2.9-1.3 2.8-.7-.2-1.2.9-1.2 2.6 0 3.4-1.5 4.9-2.4 2.5Zm2.1-116.6c-.2-1.8-.4-.4-.4 3.2s.2 5 .4 3.3c.2-1.8.2-4.8 0-6.5Zm0-9c-.2-1.3-.4-.5-.4 1.7-.1 2.2.1 3.2.4 2.3.2-1 .2-2.8 0-4ZM810.6 117.3c.8-4.2 1.1-7.9.9-8.2-.3-.2-.5.3-.5 1.1 0 1.9-3 3.3-3.1 1.5 0-.7-.2-2.1-.5-3.2-.2-1.1-.5-3-.6-4.2-.1-1.3-.6-2.3-1.1-2.3-.4 0-.5-.5-.2-1 .7-1.2-1.1-4.4-5-8.5-2.4-2.7-3.9-3.2-12.2-4.2-2.4-.3-4.3-.8-4.3-1.2 0-1.6 1.3-1.9 4-.9 4.1 1.4 15.2-3.8 17.5-8.2.9-1.7 1.3-3.5 1-3.9-.3-.5-.1-2.1.5-3.5.5-1.4 1-6.2 1.1-10.6.2-11.2 2.1-9.9 3.5 2.6 2.3 19.2 3.3 20.7 15.9 22.5 7.1 1.1 10.3 2.9 5.1 2.9-1.3 0-4 .7-6 1.5-2 .9-4.2 1.3-4.8.9-.6-.4-.8-.3-.5.3.4.6-.5 1.8-1.9 2.8-3.5 2.3-4.8 6-7 19.8-1 6.4-2.1 11.7-2.4 11.7-.4 0-.1-3.5.6-7.7ZM934.2 123.9c.6-1.7 6.8-2.5 6.8-.9 0 .6-1 1-2.2.9-1.3-.2-2.9 0-3.7.5-.9.6-1.2.5-.9-.5Z",fill:"#FCB43C"}),Z.createElement("path",{d:"M832.2 190.5c.4-4.3-2.4-12.2-5.6-15.8-1.8-2-3.8-3.7-4.4-3.7-1.6 0-2.2-1.4-1.1-3 .8-1.3 1-1.3 1.8-.1 1.4 2.2 5.9-1.2 8.1-6.2 1.7-4.1 1.8-4.2 2.5-1.6.9 3.7 5.7 8 9.7 8.8l3.3.7-4.1 2.6c-4.3 2.8-8.3 9.3-8.5 13.9 0 1.3-.5 3.3-1 4.4l-.9 2 .2-2ZM880.2 177.9c-.7-1.1-1.9-7.3-2.7-13.9-2.2-19.3-7.8-28.4-21.3-35-4.8-2.3-6.6-4-4.2-4 .6 0 1-.7 1-1.5s1.2-1.7 2.8-2.1c12.2-2.6 17-8.2 19.7-23 .9-4.9 1.9-10 2.3-11.4l.6-2.5.3 2.5c.2 1.4 1.3 3.6 2.4 5 1.7 2.1 1.9 2.2 1.5.5-1-3.8-1.5-10.8-.7-9.9.4.5 1.3 5 2 9.9 1.6 12.2 3.4 17.2 8.2 22.7 3.1 3.6 5.3 5.1 9.5 6.4 4.1 1.4 5.3 2.2 4.9 3.4-.4 1.3.2 1.5 3.2 1.3 3.5-.3 3.2-.1-2.3 2-7 2.7-11.2 5.4-17.2 11.1-5.6 5.4-7.2 10.7-7.8 27.1-.3 7.1-.6 13-.7 13.2-.2.1-.8-.7-1.5-1.8ZM802 168c0-.5 1.6-1 3.6-1 2.1 0 3.3.4 2.9 1-.3.6-1.9 1-3.6 1-1.6 0-2.9-.4-2.9-1ZM852.1 167.8c-4.1-.5-8.2-1.4-9-1.9-1.3-.9-1.3-.9.3-.5 1 .4 5.8.9 10.7 1.3 4.9.3 8.6 1 8.3 1.4-.3.5-1.1.8-1.7.8-.7-.1-4.6-.6-8.6-1.1Z",fill:"#FDE049"}),Z.createElement("path",{d:"M835.8 163.3c-.6-.8-.8-1.6-.4-2 .3-.3.6 0 .6.8 0 1.1.2 1.1.8.1.7-1 1.2-.8 2.5.6 1.5 1.7 1.5 1.8-.4 1.8-1.1 0-2.5-.6-3.1-1.3ZM814 99.9c0-.9.9-2.8 2.1-4.3 1.1-1.4 1.6-2.6 1-2.6-.5 0-1.3.5-1.6 1-.4.6-1.1.8-1.6.5-.5-.4-1.4.5-2.1 1.9-1.3 3.1-2.4 3.3-3.3.7-.8-2.6-6.8-9.1-8.4-9.1-.7 0-.3.9 1 2.1l2.4 2-2.5-1.2c-5.2-2.6-5.2-3.5-.1-6.6 4.1-2.6 5-3.7 5.9-7.6.7-2.5 1.3-6.1 1.3-7.9l.1-3.3.8 3c.6 2.5.8 2.7 1.5 1.2.4-1 .5-3.7.2-5.9-.4-2.8-.2-3.7.4-2.7 1.2 1.9 1.1 8.6-.1 9.4-.5.3-1 2.3-1 4.4 0 2.8.7 4.4 2.6 6.2l2.6 2.4-.7-2.3c-.7-2.3-.7-2.4 1.2-.5 2 1.9 2 4.8-.1 3.6-.6-.3-.3.3.7 1.5 1.1 1.1 1.6 2.6 1.2 3.2-.6.9-.2.9 1.3.1 3.7-2 4.8-1.1 1.7 1.5-2.7 2.3-2.8 2.4-.5 1.4s2.3-.9-.4 1.1c-1.5 1.2-3.4 3.6-4.2 5.3-.7 1.7-1.3 2.4-1.4 1.5ZM784 87.1c0-.6.5-1.3 1-1.6.6-.3 1-.2 1 .4 0 .5.8 1.2 1.8 1.4 1 .3.6.5-1 .6-1.6 0-2.8-.3-2.8-.8Z",fill:"#FDE049"}),Z.createElement("path",{d:"M818 84.9c0-.8 9.1-.1 10 .7.2.3-1.9.4-4.8.3-2.8-.2-5.2-.6-5.2-1ZM811.4 76.8c.3-1.3.6-3.2.7-4.3 0-1.4.3-1.1 1 1 1 3.4.5 5.5-1.2 5.5-.7 0-.9-.9-.5-2.2Z",fill:"#FDE049"}),Z.createElement("path",{d:"M802 168c0-.6 1.5-1 3.4-.8 1.9.1 3.2.6 3 1-.8 1.2-6.4 1-6.4-.2ZM852.5 167.9c-8.1-1.1-11.4-2.2-4.1-1.4 2.7.3 7.1.5 9.8.5 3 0 4.7.4 4.3 1-.3.6-1.2.9-1.8.9-.7-.1-4.3-.6-8.2-1ZM838.4 163.6c-1-.8-1.6-1.7-1.3-2 .3-.3 1.4.3 2.4 1.4 2.1 2.3 1.7 2.6-1.1.6ZM832.8 139.5c-.3-1.4-.1-2.5.3-2.5.5 0 .9 1.1.9 2.5s-.2 2.5-.4 2.5-.6-1.1-.8-2.5ZM809.8 122.5c.2-1.4.6-2.5.8-2.5.2 0 .4 1.1.4 2.5s-.4 2.5-.9 2.5c-.4 0-.6-1.1-.3-2.5ZM818 123c0-.6 1.9-.9 4.4-.8 2.4.2 4.2.6 3.9 1.1-.7 1.1-8.3.8-8.3-.3ZM871.2 113c1.3-2.1 2.4-3.7 2.7-3.5.7.8-2.1 6.4-3.5 6.9-1 .4-.7-.7.8-3.4ZM887.1 112.4c-2.9-3.7-4.8-11.8-4.1-17.4.1-1.1.4-.9.9.5.5 1.1.6 3.5.3 5.4-.4 2.6-.2 3.2.8 2.6.8-.5 1.1-.4.6.3-.3.6-.2 1.3.4 1.7.5.3 1 1.4 1 2.4 0 .9.5 2.2 1.2 2.9 1.1 1.1 2 4.2 1.3 4.2-.2 0-1.3-1.2-2.4-2.6ZM812.2 110.5c0-1.6.4-4.3.8-6 1.1-4.2 1.1-.1.1 5-.7 3.4-.9 3.5-.9 1ZM814 99.9c0-2.1 3.6-6.6 6.3-8 1.4-.6 1.2-.2-.7 1.2-1.5 1.2-3.4 3.6-4.2 5.3-.7 1.7-1.3 2.4-1.4 1.5ZM882.7 92.3c-.4-.3-.6-2.7-.6-5.2l.2-4.6.7 5c.8 5.3.7 5.9-.3 4.8ZM784 87c0-1.2.8-1.2 3.5 0 1.8.8 1.7.9-.7.9-1.6.1-2.8-.3-2.8-.9ZM832 87c1.9-1.3 3-1.3 3 0 0 .6-1 1-2.2 1-1.9 0-2-.2-.8-1ZM799.5 85.9c1.7-.7 3.4-1.8 3.8-2.5.4-.8 1.5-1.4 2.3-1.4 2.9 0-2.1 4-5.7 4.5l-3.4.5 3-1.1ZM806 80.3c0-.5.7-3 1.5-5.8l1.5-5-.6 4.5c-.3 2.5-.6 5.1-.7 5.8 0 1.3-1.7 1.8-1.7.5ZM812.6 76.5c-.3-.9-.6-2.6-.5-3.8.1-1.6.4-1.2 1 1.2 1 3.4.6 5.5-.5 2.6ZM811.2 67c0-1.9.2-2.7.5-1.7.2.9.2 2.5 0 3.5-.3.9-.5.1-.5-1.8ZM809.4 55.6c-.6-2-.7-3.6-.2-3.6 1.2 0 2 2.4 1.6 5-.2 1.7-.5 1.4-1.4-1.4Z",fill:"#FFE298"}))),v||(v=Z.createElement("defs",null,Z.createElement("clipPath",{id:"a"},Z.createElement("path",{fill:"#fff",transform:"translate(781 46)",d:"M0 0h160v160H0z"})))))};function M(){const{siteConfig:c}=(0,m.Z)();return Z.createElement(r.Z,{title:"Welcome",description:c.tagline},Z.createElement("header",{className:"hero hero--primary"},Z.createElement("div",{className:"container"},Z.createElement(s,{className:"hero-logo"}),Z.createElement("div",{className:"space-x-3"},Z.createElement(n.Z,{className:"button button--primary button--lg",to:"/docs/installation"},"Getting started"),Z.createElement(n.Z,{className:"button button--secondary button--lg",to:"/methods"},"Review method list")))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[237],{8001:(c,e,t)=>{t.r(e),t.d(e,{default:()=>M});var h,l,a,v,Z=t(9231),r=t(9450),m=t(8607),n=t(6299);function i(){return i=Object.assign?Object.assign.bind():function(c){for(var e=1;e{let{title:e,titleId:t,...r}=c;return Z.createElement("svg",i({width:1041,height:445,viewBox:"0 0 1041 445",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},r),e?Z.createElement("title",{id:t},e):null,h||(h=Z.createElement("rect",{width:1041,height:445,rx:44,fill:"var(--ifm-paper-background, white)"})),l||(l=Z.createElement("path",{d:"M151.589 291.682h15.927v-43.413h.959c2.877 5.22 8.736 14.329 23.651 14.329 19.815 0 34.197-15.874 34.197-42.347 0-26.527-14.595-42.135-34.357-42.135-15.181 0-20.668 9.269-23.491 14.329h-1.332v-13.263h-15.554v112.5Zm15.608-71.591c0-17.099 7.457-28.445 21.36-28.445 14.435 0 21.68 12.198 21.68 28.445 0 16.406-7.458 28.924-21.68 28.924-13.69 0-21.36-11.719-21.36-28.924Zm100.781 42.72c13.53 0 21.147-6.871 24.183-12.997h.639V261h15.554v-54.332c0-23.811-18.75-28.552-31.747-28.552-14.808 0-28.444 5.966-33.771 20.881l14.968 3.409c2.344-5.806 8.31-11.399 19.016-11.399 10.281 0 15.554 5.38 15.554 14.649v.372c0 5.807-5.966 5.7-20.667 7.405-15.501 1.811-31.375 5.859-31.375 24.449 0 16.087 12.092 24.929 27.646 24.929Zm3.462-12.784c-9.002 0-15.5-4.048-15.5-11.932 0-8.523 7.564-11.559 16.779-12.784 5.167-.692 17.418-2.077 19.709-4.368v10.547c0 9.695-7.724 18.537-20.988 18.537Zm96.32-70.845h-16.779V159.58h-15.926v19.602h-11.986v12.784h11.986v48.313c-.054 14.862 11.292 22.053 23.863 21.786 5.061-.053 8.47-1.012 10.334-1.704l-2.876-13.157c-1.066.213-3.037.692-5.594.692-5.166 0-9.801-1.704-9.801-10.919v-45.011h16.779v-12.784ZM385.379 261h15.926v-49.964c0-10.707 8.257-18.431 19.549-18.431 3.303 0 7.032.586 8.31.959V178.33c-1.598-.214-4.741-.373-6.765-.373-9.588 0-17.791 5.433-20.774 14.222h-.852v-12.997h-15.394V261Zm89.102 1.651c23.065 0 38.139-16.885 38.139-42.187 0-25.462-15.074-42.348-38.139-42.348-23.065 0-38.139 16.886-38.139 42.348 0 25.302 15.074 42.187 38.139 42.187Zm.053-13.37c-15.074 0-22.106-13.157-22.106-28.87 0-15.661 7.032-28.978 22.106-28.978 14.968 0 22 13.317 22 28.978 0 15.713-7.032 28.87-22 28.87Zm71.791-36.861c0-13.05 7.99-20.507 19.07-20.507 10.813 0 17.365 7.084 17.365 18.963V261h15.926v-52.042c0-20.241-11.132-30.842-27.858-30.842-12.305 0-20.348 5.7-24.13 14.383h-1.012v-13.317h-15.288V261h15.927v-48.58Zm125.55 14.649c.054 13.903-10.28 20.508-19.229 20.508-9.854 0-16.673-7.138-16.673-18.271v-50.124h-15.926v52.042c0 20.294 11.132 30.841 26.846 30.841 12.305 0 20.668-6.498 24.45-15.234h.852V261h15.66v-81.818h-15.98v47.887ZM709.256 261h15.926v-50.444c0-11.026 7.724-18.697 16.779-18.697 8.843 0 14.969 5.86 14.969 14.755V261h15.873v-52.148c0-9.855 6.019-16.993 16.406-16.993 8.417 0 15.341 4.688 15.341 15.767V261h15.927v-54.865c0-18.697-10.44-28.019-25.248-28.019-11.773 0-20.615 5.647-24.557 14.383h-.852c-3.569-8.949-11.079-14.383-21.999-14.383-10.813 0-18.857 5.38-22.266 14.383h-1.012v-13.317h-15.287V261ZM429.032 287.909h-5.358v-6.011h-3.855v6.011h-3.79v3.267h3.79v15.682c0 4.378 3.528 6.469 6.796 6.469 1.437 0 2.352-.262 2.875-.458l-.785-3.463c-.326.066-.849.196-1.698.196-1.699 0-3.333-.522-3.333-3.79v-14.636h5.358v-3.267Zm10.193 9.997c0-4.378 2.794-6.861 6.6-6.861 3.626 0 5.815 2.287 5.815 6.273V313h3.855v-15.943c0-6.453-3.43-9.475-8.559-9.475-3.954 0-6.208 1.65-7.384 4.248h-.327v-12.285h-3.855V313h3.855v-15.094Zm33.843 15.617c5.096 0 8.821-2.549 9.997-6.338l-3.724-1.046c-.981 2.614-3.251 3.921-6.273 3.921-4.525 0-7.645-2.924-7.825-8.299h18.214v-1.633c0-9.344-5.554-12.546-10.781-12.546-6.796 0-11.304 5.358-11.304 13.069 0 7.71 4.443 12.872 11.696 12.872Zm-7.825-15.094c.262-3.904 3.022-7.384 7.433-7.384 4.182 0 6.861 3.137 6.861 7.384h-14.294Zm47.536 15.094c5.096 0 8.821-2.549 9.997-6.338l-3.725-1.046c-.98 2.614-3.25 3.921-6.272 3.921-4.525 0-7.645-2.924-7.825-8.299h18.214v-1.633c0-9.344-5.554-12.546-10.781-12.546-6.796 0-11.304 5.358-11.304 13.069 0 7.71 4.443 12.872 11.696 12.872Zm-7.825-15.094c.262-3.904 3.022-7.384 7.433-7.384 4.182 0 6.861 3.137 6.861 7.384h-14.294Zm35.252-10.52h-5.62v-2.548c0-2.483 1.046-3.79 3.594-3.79 1.111 0 1.764.261 2.156.392l1.111-3.332c-.588-.262-1.764-.654-3.659-.654-3.594 0-7.057 2.157-7.057 6.469v3.463h-4.051v3.267h4.051V313h3.855v-21.824h5.62v-3.267Zm16.576 0h-5.62v-2.548c0-2.483 1.046-3.79 3.594-3.79 1.111 0 1.764.261 2.156.392l1.111-3.332c-.588-.262-1.764-.654-3.659-.654-3.594 0-7.057 2.157-7.057 6.469v3.463h-4.051v3.267h4.051V313h3.855v-21.824h5.62v-3.267Zm14.889 25.614c5.097 0 8.821-2.549 9.998-6.338l-3.725-1.046c-.98 2.614-3.251 3.921-6.273 3.921-4.525 0-7.645-2.924-7.824-8.299h18.214v-1.633c0-9.344-5.554-12.546-10.782-12.546-6.795 0-11.304 5.358-11.304 13.069 0 7.71 4.444 12.872 11.696 12.872Zm-7.824-15.094c.261-3.904 3.022-7.384 7.432-7.384 4.182 0 6.861 3.137 6.861 7.384h-14.293Zm34.271 15.094c5.554 0 9.213-3.398 9.867-7.841h-3.856c-.718 2.744-3.005 4.378-6.011 4.378-4.574 0-7.514-3.79-7.514-9.605 0-5.685 3.006-9.41 7.514-9.41 3.398 0 5.423 2.091 6.011 4.378h3.856c-.654-4.704-4.64-7.841-9.932-7.841-6.796 0-11.304 5.358-11.304 13.003 0 7.514 4.312 12.938 11.369 12.938Zm26.414-25.614h-5.358v-6.011h-3.855v6.011h-3.79v3.267h3.79v15.682c0 4.378 3.528 6.469 6.796 6.469 1.437 0 2.352-.262 2.875-.458l-.785-3.463c-.326.066-.849.196-1.698.196-1.699 0-3.333-.522-3.333-3.79v-14.636h5.358v-3.267Zm15.723 25.614c6.795 0 11.369-5.162 11.369-12.938 0-7.841-4.574-13.003-11.369-13.003-6.796 0-11.37 5.162-11.37 13.003 0 7.776 4.574 12.938 11.37 12.938Zm0-3.463c-5.162 0-7.514-4.444-7.514-9.475s2.352-9.54 7.514-9.54c5.162 0 7.514 4.509 7.514 9.54 0 5.031-2.352 9.475-7.514 9.475Zm17.254 2.94h3.855v-15.878c0-3.398 2.679-5.881 6.338-5.881 1.029 0 2.091.197 2.352.262v-3.921a37.766 37.766 0 0 0-2.025-.065c-3.006 0-5.62 1.699-6.534 4.182h-.262v-3.79h-3.724V313Zm33.908-33.455h-3.855V313h3.855v-33.455ZM698.478 313h3.855v-25.091h-3.855V313Zm1.96-29.273c1.503 0 2.744-1.176 2.744-2.613 0-1.438-1.241-2.614-2.744-2.614-1.503 0-2.744 1.176-2.744 2.614 0 1.437 1.241 2.613 2.744 2.613ZM709.916 313h3.725v-3.855h.457c.85 1.372 2.483 4.378 7.318 4.378 6.273 0 10.651-5.032 10.651-13.003 0-7.906-4.378-12.938-10.716-12.938-4.901 0-6.403 3.006-7.253 4.313h-.327v-12.35h-3.855V313Zm3.79-12.545c0-5.62 2.483-9.41 7.188-9.41 4.9 0 7.318 4.117 7.318 9.41 0 5.357-2.483 9.605-7.318 9.605-4.64 0-7.188-3.921-7.188-9.605ZM737.964 313h3.855v-15.878c0-3.398 2.679-5.881 6.338-5.881 1.029 0 2.091.197 2.352.262v-3.921a37.732 37.732 0 0 0-2.025-.065c-3.006 0-5.619 1.699-6.534 4.182h-.262v-3.79h-3.724V313Zm24.499.588c4.378 0 6.664-2.352 7.449-3.986h.196V313h3.855v-16.531c0-7.972-6.077-8.887-9.279-8.887-3.789 0-8.102 1.307-10.062 5.881l3.659 1.307c.849-1.83 2.859-3.79 6.534-3.79 3.545 0 5.293 1.879 5.293 5.097v.13c0 1.863-1.895 1.699-6.469 2.287-4.656.605-9.736 1.634-9.736 7.384 0 4.9 3.79 7.71 8.56 7.71Zm.588-3.463c-3.071 0-5.293-1.372-5.293-4.051 0-2.94 2.679-3.855 5.685-4.247 1.633-.196 6.011-.654 6.665-1.438v3.529c0 3.136-2.483 6.207-7.057 6.207ZM780.999 313h3.855v-15.878c0-3.398 2.679-5.881 6.338-5.881 1.029 0 2.091.197 2.353.262v-3.921a37.771 37.771 0 0 0-2.026-.065c-3.006 0-5.619 1.699-6.534 4.182h-.261v-3.79h-3.725V313Zm20.362 9.409c3.479 0 5.93-1.846 7.383-5.75l10.684-28.685-4.215-.065-6.926 19.994h-.261l-6.926-19.994h-4.182l9.278 25.222-.719 1.96c-1.404 3.822-3.136 4.182-5.946 3.463l-.98 3.398c.392.196 1.503.457 2.81.457Z",fill:"var(--ifm-paper-foreground, black)"})),a||(a=Z.createElement("g",{clipPath:"url(#a)"},Z.createElement("path",{d:"M830.5 192.8c-2.3-15.1-3.3-17-10.8-20.8-4.6-2.3-7.4-3-11.9-3-9 0-6.8-1.6 3.1-2.3 10.4-.7 15.7-2.6 17.1-6.1.5-1.4 1.5-7.3 2.2-13.1.8-7.2 1.6-10.5 2.5-10.5.8 0 1.3 1.4 1.3 3.8.1 8 2.8 19.5 5.2 21.9 2.6 2.5 10.4 4.3 19.1 4.3 6.5 0 5.2 1.6-2 2.4-7.4.8-15.9 4.9-17.7 8.5-.8 1.5-2.3 8-3.3 14.4s-2.1 11.7-2.4 11.7c-.4 0-1.4-5.1-2.4-11.2Z",fill:"#FC9538"}),Z.createElement("path",{d:"M879.5 195.3c-3.1-22.1-7.8-47.2-9.6-50.9-5.3-11-21.6-18.9-41.6-20.1-5.7-.3-10.3-.9-10.3-1.4 0-.4 5.3-1 11.8-1.3 26.4-1.3 36.5-4.5 40.8-12.7 1.4-2.9 4.3-19.3 7-39.7.9-7.3 2-13.5 2.4-13.7.4-.3 1.5 5.5 2.4 12.8 2.9 22.8 5.5 36.5 7.6 40.7 2.2 4.2 7.8 8.1 14.5 9.9 2.2.6 11.3 1.6 20.3 2.3 8.9.7 16.2 1.5 16.2 1.9 0 .3-4 1.2-8.9 1.8-21.6 2.7-36.4 10.3-40.9 20.9-2 4.7-9.2 44.2-9.2 50.8 0 5.1-1.8 4.1-2.5-1.3ZM808.6 120.3c-1.9-14.3-3.9-22.5-6.2-25.2-3-3.7-10.3-7.1-15-7.1-6.3 0-3.4-2.4 3.7-3.1 8.1-.7 12.3-2.9 13.8-7.1.6-1.7 1.7-8.3 2.3-14.5.8-6.7 1.6-11.2 2.3-11 .5.2 1.5 4.8 2.1 10.3 2.3 19.2 3.3 20.7 15.9 22.5 7.3 1.1 10.2 2.9 4.8 2.9-3.8 0-13.2 4.9-15.5 8.1-1.3 1.7-2.6 7-4.1 15.7-1.2 7.3-2.4 13.2-2.8 13.2-.3 0-.9-2.1-1.3-4.7Z",fill:"#FC9538"}),Z.createElement("path",{d:"M832.3 198.2c-.3-6.2-2.8-18.4-4.4-21.4-.5-1-1.7-1.8-2.5-1.8s-1.3-.4-1-.9c.6-.8-.9-1.8-2.8-1.9-.5 0-1.2-.4-1.5-.9-1.9-2.5-5.6-3.4-11.7-2.8-4.5.5-6.4.4-6.4-.4 0-.7 2.2-1.1 5.9-1.1 3.3 0 6.7-.3 7.7-.7 1.2-.4 1.5-.3 1 .5-.4.7-.2 1.2.3 1.2.6 0 1.1-.4 1.1-.9 0-.8 4.9-2.4 6.5-2.2 1.5.2 4.6-4.4 5.6-8.5.7-2.5 1.8-4.8 2.6-5.1 1.1-.4 1.2-1.9.7-6.7-.4-3.3-1.2-6.4-1.8-6.8-.7-.5-.4-.8.7-.8 1.3 0 1.7.9 1.7 3.8.1 7.4 2.8 19.4 4.9 21.6 1.2 1.3 1.9 2.4 1.7 2.7-.2.2.5.5 1.7.5 11.4.7 20.5 1.9 20 2.6-.3.6-1.8.8-3.3.5-1.5-.3-3.3-.1-4 .6-1 .9-1.1.9-.6 0 .5-1-.5-1.3-4.1-1.2-4 .1-4.3.2-1.8.8l3 .6-4.1 1.3c-4.4 1.3-10.8 6.7-9.9 8.2.4.6.1 1-.5 1-.7 0-.9.8-.5 1.9.3 1.1.1 2.2-.5 2.6-.7.4-.9 1.8-.6 3.4.5 2 .4 2.3-.4 1.1-.9-1.2-1-.5-.7 2.8.3 2.3.2 4.2-.2 4.2-.5 0-.6 1.8-.4 4 .2 2.2 0 4-.4 4s-.9-2.6-1-5.8ZM879.5 195.9c-.4-2.2-.4-4.3-.1-4.6.3-.4.6.3.6 1.5 0 1.1.5 2.4 1 2.7 1.3.8 1.3 4.5.1 4.5-.5 0-1.2-1.8-1.6-4.1Z",fill:"#FCB43C"}),Z.createElement("path",{d:"M878.6 188.4c-.9-2.4-.6-4.2.4-1.9l.9 2v-2c.1-3.3-1.7-9.7-2.9-10.5-.7-.4-.8-1.8-.4-3.3.3-1.6.2-2.7-.4-2.7-.6 0-.8-1.8-.6-4.1.3-2.7.1-3.8-.7-3.4-.7.5-.8-.7-.4-3.7.4-3.3.3-3.9-.5-2.8-.9 1.2-1.1.8-.8-1.7.3-1.8.1-3-.4-2.7-.5.3-.6-.7-.2-2.2.5-1.8.3-2.5-.3-2.1-1 .6-2.9-3.8-2.4-5.6.1-.5-.3-.6-.8-.3-.8.5-2.3-1.6-2.5-3.6-.1-.3-.5-1-1-1.5s-.6-.2-.1.7c.4.8-.6 0-2.4-1.8-1.8-1.9-3.6-3-4.3-2.6-.7.5-.8.3-.3-.6.6-1 .4-1.2-.9-.7-1.1.5-1.5.3-1-.5s.2-.9-1-.5c-.9.4-1.5.3-1.2-.2.8-1.2-7-4.5-8.9-3.7-1.1.4-1.4.2-.9-.6.5-.7 0-.9-1.4-.6-1.4.4-1.9.2-1.6-.7.4-.9-.8-1.4-3.9-1.6-3.5-.3-4.3-.1-3.9 1 .4 1 .1 1.2-.8.6-.8-.5-4.5-.8-8.2-.7-4.4.2-6.8-.1-6.8-.8 0-.6 1.7-1.1 3.8-1.1 8.3 0 29.8-1.3 31.2-1.9.3-.1 1.6-.1 3 0s2.2-.1 1.8-.5c-.4-.4 1.6-1.9 4.5-3.4 6.3-3.1 9.4-7.6 10.3-14.4.5-3.7.9-4.6 1.4-3.2 1 2.7 2.4-7.5 1.5-10.7-.5-1.9-.4-2 .5-.8s1.1.5.7-3.2c-.2-2.6-.1-4.5.3-4.3.4.3.7-1.4.6-3.8-.2-2.3.2-4.5.8-4.9.7-.5.7-.8-.2-.8-.7 0-1-.5-.7-1 .3-.6.8-3.6 1.1-6.7.3-3.2.9-6.2 1.3-6.6 1-1 2.4 9.3 2.4 17.6.1 2.6.4 4.7.7 4.7.4 0 .5 1.8.3 4.1-.2 2.6.1 3.8.7 3.4.7-.4.8.7.4 3.3-.4 2.3-.2 4.2.4 4.6.6.3.8 1.5.5 2.6-.3 1.1-.1 2 .4 2 .6 0 .8 1.1.5 2.5-.2 1.4 0 2.5.7 2.5.5 0 .8.7.5 1.5-.4.8-.2 1.5.4 1.5.5 0 1.5 1.4 2.2 3.1.7 1.7 2.8 4.1 4.6 5.3 1.9 1.3 3.1 2.6 2.7 3-.4.4.1.4 1.1 0 1.3-.5 1.7-.4 1.3.3-.9 1.5 2.8 2.8 15.6 5.7 3.6.8 3.4 1.9-.8 3.6-1.9.7-3.1 1.8-2.8 2.3.3.6.1.7-.5.3-1.9-1.1-12.4 5.1-15.7 9.3-1.6 2.1-3.3 3.7-3.7 3.4-.4-.2-.5.4-.1 1.3.4 1.1.3 1.5-.5 1-1.3-.8-3.5 6.4-2.6 8.8.3.9.1 1.6-.6 1.6-.6 0-1 .8-.9 1.8.2.9 0 2.6-.4 3.7-1 3.2-3 15.4-3.2 20-.1 1.7-.7 2.9-1.3 2.8-.7-.2-1.2.9-1.2 2.6 0 3.4-1.5 4.9-2.4 2.5Zm2.1-116.6c-.2-1.8-.4-.4-.4 3.2s.2 5 .4 3.3c.2-1.8.2-4.8 0-6.5Zm0-9c-.2-1.3-.4-.5-.4 1.7-.1 2.2.1 3.2.4 2.3.2-1 .2-2.8 0-4ZM810.6 117.3c.8-4.2 1.1-7.9.9-8.2-.3-.2-.5.3-.5 1.1 0 1.9-3 3.3-3.1 1.5 0-.7-.2-2.1-.5-3.2-.2-1.1-.5-3-.6-4.2-.1-1.3-.6-2.3-1.1-2.3-.4 0-.5-.5-.2-1 .7-1.2-1.1-4.4-5-8.5-2.4-2.7-3.9-3.2-12.2-4.2-2.4-.3-4.3-.8-4.3-1.2 0-1.6 1.3-1.9 4-.9 4.1 1.4 15.2-3.8 17.5-8.2.9-1.7 1.3-3.5 1-3.9-.3-.5-.1-2.1.5-3.5.5-1.4 1-6.2 1.1-10.6.2-11.2 2.1-9.9 3.5 2.6 2.3 19.2 3.3 20.7 15.9 22.5 7.1 1.1 10.3 2.9 5.1 2.9-1.3 0-4 .7-6 1.5-2 .9-4.2 1.3-4.8.9-.6-.4-.8-.3-.5.3.4.6-.5 1.8-1.9 2.8-3.5 2.3-4.8 6-7 19.8-1 6.4-2.1 11.7-2.4 11.7-.4 0-.1-3.5.6-7.7ZM934.2 123.9c.6-1.7 6.8-2.5 6.8-.9 0 .6-1 1-2.2.9-1.3-.2-2.9 0-3.7.5-.9.6-1.2.5-.9-.5Z",fill:"#FCB43C"}),Z.createElement("path",{d:"M832.2 190.5c.4-4.3-2.4-12.2-5.6-15.8-1.8-2-3.8-3.7-4.4-3.7-1.6 0-2.2-1.4-1.1-3 .8-1.3 1-1.3 1.8-.1 1.4 2.2 5.9-1.2 8.1-6.2 1.7-4.1 1.8-4.2 2.5-1.6.9 3.7 5.7 8 9.7 8.8l3.3.7-4.1 2.6c-4.3 2.8-8.3 9.3-8.5 13.9 0 1.3-.5 3.3-1 4.4l-.9 2 .2-2ZM880.2 177.9c-.7-1.1-1.9-7.3-2.7-13.9-2.2-19.3-7.8-28.4-21.3-35-4.8-2.3-6.6-4-4.2-4 .6 0 1-.7 1-1.5s1.2-1.7 2.8-2.1c12.2-2.6 17-8.2 19.7-23 .9-4.9 1.9-10 2.3-11.4l.6-2.5.3 2.5c.2 1.4 1.3 3.6 2.4 5 1.7 2.1 1.9 2.2 1.5.5-1-3.8-1.5-10.8-.7-9.9.4.5 1.3 5 2 9.9 1.6 12.2 3.4 17.2 8.2 22.7 3.1 3.6 5.3 5.1 9.5 6.4 4.1 1.4 5.3 2.2 4.9 3.4-.4 1.3.2 1.5 3.2 1.3 3.5-.3 3.2-.1-2.3 2-7 2.7-11.2 5.4-17.2 11.1-5.6 5.4-7.2 10.7-7.8 27.1-.3 7.1-.6 13-.7 13.2-.2.1-.8-.7-1.5-1.8ZM802 168c0-.5 1.6-1 3.6-1 2.1 0 3.3.4 2.9 1-.3.6-1.9 1-3.6 1-1.6 0-2.9-.4-2.9-1ZM852.1 167.8c-4.1-.5-8.2-1.4-9-1.9-1.3-.9-1.3-.9.3-.5 1 .4 5.8.9 10.7 1.3 4.9.3 8.6 1 8.3 1.4-.3.5-1.1.8-1.7.8-.7-.1-4.6-.6-8.6-1.1Z",fill:"#FDE049"}),Z.createElement("path",{d:"M835.8 163.3c-.6-.8-.8-1.6-.4-2 .3-.3.6 0 .6.8 0 1.1.2 1.1.8.1.7-1 1.2-.8 2.5.6 1.5 1.7 1.5 1.8-.4 1.8-1.1 0-2.5-.6-3.1-1.3ZM814 99.9c0-.9.9-2.8 2.1-4.3 1.1-1.4 1.6-2.6 1-2.6-.5 0-1.3.5-1.6 1-.4.6-1.1.8-1.6.5-.5-.4-1.4.5-2.1 1.9-1.3 3.1-2.4 3.3-3.3.7-.8-2.6-6.8-9.1-8.4-9.1-.7 0-.3.9 1 2.1l2.4 2-2.5-1.2c-5.2-2.6-5.2-3.5-.1-6.6 4.1-2.6 5-3.7 5.9-7.6.7-2.5 1.3-6.1 1.3-7.9l.1-3.3.8 3c.6 2.5.8 2.7 1.5 1.2.4-1 .5-3.7.2-5.9-.4-2.8-.2-3.7.4-2.7 1.2 1.9 1.1 8.6-.1 9.4-.5.3-1 2.3-1 4.4 0 2.8.7 4.4 2.6 6.2l2.6 2.4-.7-2.3c-.7-2.3-.7-2.4 1.2-.5 2 1.9 2 4.8-.1 3.6-.6-.3-.3.3.7 1.5 1.1 1.1 1.6 2.6 1.2 3.2-.6.9-.2.9 1.3.1 3.7-2 4.8-1.1 1.7 1.5-2.7 2.3-2.8 2.4-.5 1.4s2.3-.9-.4 1.1c-1.5 1.2-3.4 3.6-4.2 5.3-.7 1.7-1.3 2.4-1.4 1.5ZM784 87.1c0-.6.5-1.3 1-1.6.6-.3 1-.2 1 .4 0 .5.8 1.2 1.8 1.4 1 .3.6.5-1 .6-1.6 0-2.8-.3-2.8-.8Z",fill:"#FDE049"}),Z.createElement("path",{d:"M818 84.9c0-.8 9.1-.1 10 .7.2.3-1.9.4-4.8.3-2.8-.2-5.2-.6-5.2-1ZM811.4 76.8c.3-1.3.6-3.2.7-4.3 0-1.4.3-1.1 1 1 1 3.4.5 5.5-1.2 5.5-.7 0-.9-.9-.5-2.2Z",fill:"#FDE049"}),Z.createElement("path",{d:"M802 168c0-.6 1.5-1 3.4-.8 1.9.1 3.2.6 3 1-.8 1.2-6.4 1-6.4-.2ZM852.5 167.9c-8.1-1.1-11.4-2.2-4.1-1.4 2.7.3 7.1.5 9.8.5 3 0 4.7.4 4.3 1-.3.6-1.2.9-1.8.9-.7-.1-4.3-.6-8.2-1ZM838.4 163.6c-1-.8-1.6-1.7-1.3-2 .3-.3 1.4.3 2.4 1.4 2.1 2.3 1.7 2.6-1.1.6ZM832.8 139.5c-.3-1.4-.1-2.5.3-2.5.5 0 .9 1.1.9 2.5s-.2 2.5-.4 2.5-.6-1.1-.8-2.5ZM809.8 122.5c.2-1.4.6-2.5.8-2.5.2 0 .4 1.1.4 2.5s-.4 2.5-.9 2.5c-.4 0-.6-1.1-.3-2.5ZM818 123c0-.6 1.9-.9 4.4-.8 2.4.2 4.2.6 3.9 1.1-.7 1.1-8.3.8-8.3-.3ZM871.2 113c1.3-2.1 2.4-3.7 2.7-3.5.7.8-2.1 6.4-3.5 6.9-1 .4-.7-.7.8-3.4ZM887.1 112.4c-2.9-3.7-4.8-11.8-4.1-17.4.1-1.1.4-.9.9.5.5 1.1.6 3.5.3 5.4-.4 2.6-.2 3.2.8 2.6.8-.5 1.1-.4.6.3-.3.6-.2 1.3.4 1.7.5.3 1 1.4 1 2.4 0 .9.5 2.2 1.2 2.9 1.1 1.1 2 4.2 1.3 4.2-.2 0-1.3-1.2-2.4-2.6ZM812.2 110.5c0-1.6.4-4.3.8-6 1.1-4.2 1.1-.1.1 5-.7 3.4-.9 3.5-.9 1ZM814 99.9c0-2.1 3.6-6.6 6.3-8 1.4-.6 1.2-.2-.7 1.2-1.5 1.2-3.4 3.6-4.2 5.3-.7 1.7-1.3 2.4-1.4 1.5ZM882.7 92.3c-.4-.3-.6-2.7-.6-5.2l.2-4.6.7 5c.8 5.3.7 5.9-.3 4.8ZM784 87c0-1.2.8-1.2 3.5 0 1.8.8 1.7.9-.7.9-1.6.1-2.8-.3-2.8-.9ZM832 87c1.9-1.3 3-1.3 3 0 0 .6-1 1-2.2 1-1.9 0-2-.2-.8-1ZM799.5 85.9c1.7-.7 3.4-1.8 3.8-2.5.4-.8 1.5-1.4 2.3-1.4 2.9 0-2.1 4-5.7 4.5l-3.4.5 3-1.1ZM806 80.3c0-.5.7-3 1.5-5.8l1.5-5-.6 4.5c-.3 2.5-.6 5.1-.7 5.8 0 1.3-1.7 1.8-1.7.5ZM812.6 76.5c-.3-.9-.6-2.6-.5-3.8.1-1.6.4-1.2 1 1.2 1 3.4.6 5.5-.5 2.6ZM811.2 67c0-1.9.2-2.7.5-1.7.2.9.2 2.5 0 3.5-.3.9-.5.1-.5-1.8ZM809.4 55.6c-.6-2-.7-3.6-.2-3.6 1.2 0 2 2.4 1.6 5-.2 1.7-.5 1.4-1.4-1.4Z",fill:"#FFE298"}))),v||(v=Z.createElement("defs",null,Z.createElement("clipPath",{id:"a"},Z.createElement("path",{fill:"#fff",transform:"translate(781 46)",d:"M0 0h160v160H0z"})))))};function M(){const{siteConfig:c}=(0,m.Z)();return Z.createElement(r.Z,{title:"Welcome",description:c.tagline},Z.createElement("header",{className:"hero hero--primary"},Z.createElement("div",{className:"container"},Z.createElement(s,{className:"hero-logo"}),Z.createElement("div",{className:"space-x-3"},Z.createElement(n.Z,{className:"button button--primary button--lg",to:"/docs/installation"},"Getting started"),Z.createElement(n.Z,{className:"button button--secondary button--lg",to:"/methods"},"Review method list")))))}}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.48bd894a.js b/assets/js/1f391b9e.48bd894a.js new file mode 100644 index 00000000..371b14d3 --- /dev/null +++ b/assets/js/1f391b9e.48bd894a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[85],{6183:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var l=a(9231),n=a(9841),c=a(9211),r=a(7847),m=a(9450),i=a(9996),s=a(7645);const d={mdxPageWrapper:"mdxPageWrapper_d0_V"};function o(e){const{content:t}=e,{metadata:{title:a,description:o,frontMatter:p}}=t,{wrapperClassName:g,hide_table_of_contents:u}=p;return l.createElement(c.FG,{className:(0,n.Z)(g??r.k.wrapper.mdxPages,r.k.page.mdxPage)},l.createElement(c.d,{title:a,description:o}),l.createElement(m.Z,null,l.createElement("main",{className:"container container--fluid margin-vert--lg"},l.createElement("div",{className:(0,n.Z)("row",d.mdxPageWrapper)},l.createElement("div",{className:(0,n.Z)("col",!u&&"col--8")},l.createElement("article",null,l.createElement(i.Z,null,l.createElement(t,null)))),!u&&t.toc.length>0&&l.createElement("div",{className:"col col--2"},l.createElement(s.Z,{toc:t.toc,minHeadingLevel:p.toc_min_heading_level,maxHeadingLevel:p.toc_max_heading_level}))))))}}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.d7a93e55.js b/assets/js/1f391b9e.d7a93e55.js deleted file mode 100644 index 810b38ec..00000000 --- a/assets/js/1f391b9e.d7a93e55.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[85],{8048:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});var l=a(9496),n=a(5924),c=a(5163),r=a(4797),m=a(5886),i=a(2274),s=a(7211);const o="mdxPageWrapper_R1t2";function d(e){const{content:t}=e,{metadata:{title:a,description:d,frontMatter:p}}=t,{wrapperClassName:u,hide_table_of_contents:g}=p;return l.createElement(c.FG,{className:(0,n.Z)(u??r.k.wrapper.mdxPages,r.k.page.mdxPage)},l.createElement(c.d,{title:a,description:d}),l.createElement(m.Z,null,l.createElement("main",{className:"container container--fluid margin-vert--lg"},l.createElement("div",{className:(0,n.Z)("row",o)},l.createElement("div",{className:(0,n.Z)("col",!g&&"col--8")},l.createElement("article",null,l.createElement(i.Z,null,l.createElement(t,null)))),!g&&t.toc.length>0&&l.createElement("div",{className:"col col--2"},l.createElement(s.Z,{toc:t.toc,minHeadingLevel:p.toc_min_heading_level,maxHeadingLevel:p.toc_max_heading_level}))))))}}}]); \ No newline at end of file diff --git a/assets/js/2b95ca9d.9f76bd77.js b/assets/js/2b95ca9d.9f76bd77.js deleted file mode 100644 index 27ec7d38..00000000 --- a/assets/js/2b95ca9d.9f76bd77.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[817],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(9496);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(n),f=o,h=u["".concat(l,".").concat(f)]||u[f]||m[f]||a;return n?r.createElement(h,i(i({ref:t},c),{},{components:n})):r.createElement(h,i({ref:t},c))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:o,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var r=n(2081),o=(n(9496),n(9613));const a={},i="snapshot",s={unversionedId:"snapshot/readme",id:"snapshot/readme",title:"snapshot",description:"patronum 1.7.0",source:"@site/../src/snapshot/readme.md",sourceDirName:"snapshot",slug:"/snapshot/",permalink:"/methods/snapshot/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/snapshot/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"reshape",permalink:"/methods/reshape/"},next:{title:"some",permalink:"/methods/some/"}},l={},p=[{value:"result = snapshot({ source, clock, fn })",id:"result--snapshot-source-clock-fn-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Examples",id:"examples",level:3},{value:"Exact copy of store",id:"exact-copy-of-store",level:4},{value:"Exact copy on trigger",id:"exact-copy-on-trigger",level:4},{value:"Copy on trigger with transformation",id:"copy-on-trigger-with-transformation",level:4}],c={toc:p};function m(e){let{components:t,...n}=e;return(0,o.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"snapshot"},"snapshot"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { snapshot } from 'patronum';\n// or\nimport { snapshot } from 'patronum/snapshot';\n")),(0,o.kt)("h2",{id:"result--snapshot-source-clock-fn-"},(0,o.kt)("inlineCode",{parentName:"h2"},"result = snapshot({ source, clock, fn })")),(0,o.kt)("h3",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"This method allows to copy any store on optional trigger unit.\nIt useful when you want to save previous state of store before some actions."),(0,o.kt)("h3",{id:"formulae"},"Formulae"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"result = snapshot({ source, clock, fn });\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Call ",(0,o.kt)("inlineCode",{parentName:"li"},"fn")," with data from ",(0,o.kt)("inlineCode",{parentName:"li"},"source")," while ",(0,o.kt)("inlineCode",{parentName:"li"},"clock")," triggered, and create store with the value"),(0,o.kt)("li",{parentName:"ul"},"If ",(0,o.kt)("inlineCode",{parentName:"li"},"fn")," returns ",(0,o.kt)("inlineCode",{parentName:"li"},"undefined"),", the update will be skipped.")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"source")," (",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Source store, data from this unit passed to ",(0,o.kt)("inlineCode",{parentName:"li"},"fn")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"clock")," (",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Event"))),", ",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Effect"))),", ",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Trigger unit"),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"fn")," ",(0,o.kt)("inlineCode",{parentName:"li"},"((value: T) => U)")," \u2014 Transformation function")),(0,o.kt)("h3",{id:"returns"},"Returns"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"result")," (",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Copied store")),(0,o.kt)("h3",{id:"examples"},"Examples"),(0,o.kt)("h4",{id:"exact-copy-of-store"},"Exact copy of store"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { snapshot } from 'patronum/snapshot';\n\nconst $original = createStore('Example');\n\nconst $copy = snapshot({ source: $original });\n")),(0,o.kt)("h4",{id:"exact-copy-on-trigger"},"Exact copy on trigger"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { restore, createEvent } from 'effector';\nimport { snapshot } from 'patronum/snapshot';\n\nconst changeText = createEvent();\nconst createSnapshot = createEvent();\n\nconst $original = restore(changeText, 'Example');\n\nconst $snapshot = snapshot({\n source: $original,\n clock: createSnapshot,\n});\n\nchangeText('New text');\n\n// $original -> Store with \"New text\"\n// $snapshot -> Store with \"Example\"\n\ncreateSnapshot();\n\n// $original -> Store with \"New text\"\n// $snapshot -> Store with \"New text\"\n")),(0,o.kt)("h4",{id:"copy-on-trigger-with-transformation"},"Copy on trigger with transformation"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'import { restore, createEvent } from \'effector\';\nimport { snapshot } from \'patronum/snapshot\';\n\nconst changeText = createEvent();\nconst createSnapshot = createEvent();\n\nconst $original = restore(changeText, \'Example\');\n\nconst $lengthSnapshot = snapshot({\n source: $original,\n clock: createSnapshot,\n fn: (text) => text.length,\n});\n\n// $original -> Store with "Example"\n// $lengthSnapshot -> Store with 7 (length of "Example")\n\nchangeText(\'New long text\');\n\n// $original -> Store with "New long text"\n// $lengthSnapshot -> Store with 7 (length of "Example")\n\ncreateSnapshot();\n\n// $original -> Store with "New long text"\n// $lengthSnapshot -> Store with 13 (length of "New long text")\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2b95ca9d.d3b76552.js b/assets/js/2b95ca9d.d3b76552.js new file mode 100644 index 00000000..60f6e167 --- /dev/null +++ b/assets/js/2b95ca9d.d3b76552.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[817],{4852:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(9231);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(n),f=o,h=m["".concat(l,".").concat(f)]||m[f]||u[f]||a;return n?r.createElement(h,i(i({ref:t},c),{},{components:n})):r.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:o,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var r=n(4011),o=(n(9231),n(4852));const a={},i="snapshot",s={unversionedId:"snapshot/readme",id:"snapshot/readme",title:"snapshot",description:"patronum 1.7.0",source:"@site/../src/snapshot/readme.md",sourceDirName:"snapshot",slug:"/snapshot/",permalink:"/methods/snapshot/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/snapshot/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"reshape",permalink:"/methods/reshape/"},next:{title:"some",permalink:"/methods/some/"}},l={},p=[{value:"result = snapshot({ source, clock, fn })",id:"result--snapshot-source-clock-fn-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Examples",id:"examples",level:3},{value:"Exact copy of store",id:"exact-copy-of-store",level:4},{value:"Exact copy on trigger",id:"exact-copy-on-trigger",level:4},{value:"Copy on trigger with transformation",id:"copy-on-trigger-with-transformation",level:4}],c={toc:p},m="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"snapshot"},"snapshot"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { snapshot } from 'patronum';\n// or\nimport { snapshot } from 'patronum/snapshot';\n")),(0,o.kt)("h2",{id:"result--snapshot-source-clock-fn-"},(0,o.kt)("inlineCode",{parentName:"h2"},"result = snapshot({ source, clock, fn })")),(0,o.kt)("h3",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"This method allows to copy any store on optional trigger unit.\nIt useful when you want to save previous state of store before some actions."),(0,o.kt)("h3",{id:"formulae"},"Formulae"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"result = snapshot({ source, clock, fn });\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Call ",(0,o.kt)("inlineCode",{parentName:"li"},"fn")," with data from ",(0,o.kt)("inlineCode",{parentName:"li"},"source")," while ",(0,o.kt)("inlineCode",{parentName:"li"},"clock")," triggered, and create store with the value"),(0,o.kt)("li",{parentName:"ul"},"If ",(0,o.kt)("inlineCode",{parentName:"li"},"fn")," returns ",(0,o.kt)("inlineCode",{parentName:"li"},"undefined"),", the update will be skipped.")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"source")," (",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Source store, data from this unit passed to ",(0,o.kt)("inlineCode",{parentName:"li"},"fn")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"clock")," (",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Event"))),", ",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Effect"))),", ",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Trigger unit"),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"fn")," ",(0,o.kt)("inlineCode",{parentName:"li"},"((value: T) => U)")," \u2014 Transformation function")),(0,o.kt)("h3",{id:"returns"},"Returns"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"result")," (",(0,o.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,o.kt)("em",{parentName:"a"},(0,o.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Copied store")),(0,o.kt)("h3",{id:"examples"},"Examples"),(0,o.kt)("h4",{id:"exact-copy-of-store"},"Exact copy of store"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { snapshot } from 'patronum/snapshot';\n\nconst $original = createStore('Example');\n\nconst $copy = snapshot({ source: $original });\n")),(0,o.kt)("h4",{id:"exact-copy-on-trigger"},"Exact copy on trigger"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { restore, createEvent } from 'effector';\nimport { snapshot } from 'patronum/snapshot';\n\nconst changeText = createEvent();\nconst createSnapshot = createEvent();\n\nconst $original = restore(changeText, 'Example');\n\nconst $snapshot = snapshot({\n source: $original,\n clock: createSnapshot,\n});\n\nchangeText('New text');\n\n// $original -> Store with \"New text\"\n// $snapshot -> Store with \"Example\"\n\ncreateSnapshot();\n\n// $original -> Store with \"New text\"\n// $snapshot -> Store with \"New text\"\n")),(0,o.kt)("h4",{id:"copy-on-trigger-with-transformation"},"Copy on trigger with transformation"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'import { restore, createEvent } from \'effector\';\nimport { snapshot } from \'patronum/snapshot\';\n\nconst changeText = createEvent();\nconst createSnapshot = createEvent();\n\nconst $original = restore(changeText, \'Example\');\n\nconst $lengthSnapshot = snapshot({\n source: $original,\n clock: createSnapshot,\n fn: (text) => text.length,\n});\n\n// $original -> Store with "Example"\n// $lengthSnapshot -> Store with 7 (length of "Example")\n\nchangeText(\'New long text\');\n\n// $original -> Store with "New long text"\n// $lengthSnapshot -> Store with 7 (length of "Example")\n\ncreateSnapshot();\n\n// $original -> Store with "New long text"\n// $lengthSnapshot -> Store with 13 (length of "New long text")\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/308aca62.59e32b7c.js b/assets/js/308aca62.59e32b7c.js deleted file mode 100644 index 039de13f..00000000 --- a/assets/js/308aca62.59e32b7c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[687],{9613:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=u(n),d=a,f=m["".concat(s,".").concat(d)]||m[d]||c[d]||o;return n?r.createElement(f,l(l({ref:t},p),{},{components:n})):r.createElement(f,l({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var r=n(2081),a=(n(9496),n(9613));const o={},l="not",i={unversionedId:"not/readme",id:"not/readme",title:"not",description:"patronum 1.11.0",source:"@site/../src/not/readme.md",sourceDirName:"not",slug:"/not/",permalink:"/methods/not/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/not/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"interval",permalink:"/methods/interval/"},next:{title:"once",permalink:"/methods/once/"}},s={},u=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:3}],p={toc:u};function c(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"not"},"not"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { not } from 'patronum';\n// or\nimport { not } from 'patronum/not';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,'The method allows to apply boolean NOT to a value.\nActually converts any "falsey" value into ',(0,a.kt)("inlineCode",{parentName:"p"},"true")," (null, 0, empty string).\nBut ",(0,a.kt)("inlineCode",{parentName:"p"},"undefined")," is not present, because Store cannot hold it inside."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = not($value);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$value"),' contains any "truthy" value, otherwise there will be ',(0,a.kt)("inlineCode",{parentName:"li"},"true"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$value: Store"),' \u2014 Any value, that required to be "inverted"')),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isFinished = createStore(false);\nconst $stillGoingOn = not($isFinished);\n\nconsole.assert(true === $stillGoingOn.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/qpTZAzXC"},"Try it")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isFinished = createStore(false);\nconst $stillGoingOn = $isFinished.map((isFinished) => !isFinished);\n\nconsole.assert(true === $stillGoingOn.getState());\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/308aca62.b045aa80.js b/assets/js/308aca62.b045aa80.js new file mode 100644 index 00000000..76102ff9 --- /dev/null +++ b/assets/js/308aca62.b045aa80.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[687],{4852:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=u(n),d=a,f=c["".concat(s,".").concat(d)]||c[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},p),{},{components:n})):r.createElement(f,l({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var r=n(4011),a=(n(9231),n(4852));const o={},l="not",i={unversionedId:"not/readme",id:"not/readme",title:"not",description:"patronum 1.11.0",source:"@site/../src/not/readme.md",sourceDirName:"not",slug:"/not/",permalink:"/methods/not/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/not/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"interval",permalink:"/methods/interval/"},next:{title:"once",permalink:"/methods/once/"}},s={},u=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:3}],p={toc:u},c="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"not"},"not"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { not } from 'patronum';\n// or\nimport { not } from 'patronum/not';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,'The method allows to apply boolean NOT to a value.\nActually converts any "falsey" value into ',(0,a.kt)("inlineCode",{parentName:"p"},"true")," (null, 0, empty string).\nBut ",(0,a.kt)("inlineCode",{parentName:"p"},"undefined")," is not present, because Store cannot hold it inside."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = not($value);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$value"),' contains any "truthy" value, otherwise there will be ',(0,a.kt)("inlineCode",{parentName:"li"},"true"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$value: Store"),' \u2014 Any value, that required to be "inverted"')),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isFinished = createStore(false);\nconst $stillGoingOn = not($isFinished);\n\nconsole.assert(true === $stillGoingOn.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/qpTZAzXC"},"Try it")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isFinished = createStore(false);\nconst $stillGoingOn = $isFinished.map((isFinished) => !isFinished);\n\nconsole.assert(true === $stillGoingOn.getState());\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/33c22581.0eb23410.js b/assets/js/33c22581.0eb23410.js deleted file mode 100644 index a16ba144..00000000 --- a/assets/js/33c22581.0eb23410.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[299],{9613:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var n=a(9496);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),m=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=m(a),c=r,k=d["".concat(s,".").concat(c)]||d[c]||u[c]||l;return a?n.createElement(k,i(i({ref:t},p),{},{components:a})):n.createElement(k,i({ref:t},p))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var m=2;m{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>m});var n=a(2081),r=(a(9496),a(9613));const l={},i="some",o={unversionedId:"some/readme",id:"some/readme",title:"some",description:"some({ predicate: Function, stores })",source:"@site/../src/some/readme.md",sourceDirName:"some",slug:"/some/",permalink:"/methods/some/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/some/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"snapshot",permalink:"/methods/snapshot/"},next:{title:"splitMap",permalink:"/methods/split-map/"}},s={},m=[{value:"some({ predicate: Function, stores })",id:"some-predicate-function-stores-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Return",id:"return",level:3},{value:"Example",id:"example",level:3},{value:"some({ predicate: value, stores })",id:"some-predicate-value-stores-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Return",id:"return-1",level:3},{value:"Example",id:"example-1",level:3},{value:"some({ predicate: Store, stores })",id:"some-predicate-store-stores-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Return",id:"return-2",level:3},{value:"Example",id:"example-2",level:3},{value:"Shorthands",id:"shorthands",level:2},{value:"Arguments",id:"arguments-3",level:3}],p={toc:m};function u(e){let{components:t,...a}=e;return(0,r.kt)("wrapper",(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"some"},"some"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { some } from 'patronum';\n// or\nimport { some } from 'patronum/some';\n")),(0,r.kt)("h2",{id:"some-predicate-function-stores-"},(0,r.kt)("inlineCode",{parentName:"h2"},"some({ predicate: Function, stores })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"Method calculates boolean value if at least one state of the store satisfies the condition in ",(0,r.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful to check that user filled at least a single field."),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some({ predicate: (value) => true, stores });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"read it as: has some predicate at at least one store"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if each at least ",(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," on each store value from ",(0,r.kt)("inlineCode",{parentName:"li"},"values")," returns ",(0,r.kt)("inlineCode",{parentName:"li"},"true"),", otherwise it will be ",(0,r.kt)("inlineCode",{parentName:"li"},"false"))),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"((value: T) => boolean)")," \u2014 Function to check store value"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores")),(0,r.kt)("h3",{id:"return"},"Return"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one store corresponds to ",(0,r.kt)("inlineCode",{parentName:"li"},"predicate"))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const $width = createStore(440);\nconst $height = createStore(820);\n\nconst $tooBig = some({\n predicate: (size) => size > 800,\n stores: [$width, $height],\n});\n\nconsole.assert(true === $tooBig.getState());\n")),(0,r.kt)("h2",{id:"some-predicate-value-stores-"},(0,r.kt)("inlineCode",{parentName:"h2"},"some({ predicate: value, stores })")),(0,r.kt)("h3",{id:"motivation-1"},"Motivation"),(0,r.kt)("p",null,"This overload compares each store to specific value in ",(0,r.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,r.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"||")," very often, for example to create an invalid form flag."),(0,r.kt)("h3",{id:"formulae-1"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some({ predicate: value, stores });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one value in ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," equals ",(0,r.kt)("inlineCode",{parentName:"li"},"value"),", otherwise it will be ",(0,r.kt)("inlineCode",{parentName:"li"},"false"))),(0,r.kt)("h3",{id:"arguments-1"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(T)")," \u2014 Data to compare stores values with"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,r.kt)("inlineCode",{parentName:"li"},"value")),(0,r.kt)("li",{parentName:"ol"},"type of ",(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," should should be the same")),(0,r.kt)("h3",{id:"return-1"},"Return"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one store contains ",(0,r.kt)("inlineCode",{parentName:"li"},"value"))),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormFailed = some({\n predicate: false,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(false === $isFormFailed.getState());\n")),(0,r.kt)("h2",{id:"some-predicate-store-stores-"},(0,r.kt)("inlineCode",{parentName:"h2"},"some({ predicate: Store, stores })")),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"patronum 1.8.0")),(0,r.kt)("h3",{id:"motivation-2"},"Motivation"),(0,r.kt)("p",null,"This overload compares each store to specific value in store ",(0,r.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,r.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"||")," very often, for example to create an invalid form flag."),(0,r.kt)("h3",{id:"formulae-2"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some({ predicate: $value, stores });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one value in ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," equals value in ",(0,r.kt)("inlineCode",{parentName:"li"},"$value"),", otherwise it will be ",(0,r.kt)("inlineCode",{parentName:"li"},"false"))),(0,r.kt)("h3",{id:"arguments-2"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 Store contains value to compare values from ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," with"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,r.kt)("inlineCode",{parentName:"li"},"value")),(0,r.kt)("li",{parentName:"ol"},"type of ",(0,r.kt)("inlineCode",{parentName:"li"},"value")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," should be the same")),(0,r.kt)("h3",{id:"return-2"},"Return"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one store contains ",(0,r.kt)("inlineCode",{parentName:"li"},"value"))),(0,r.kt)("h3",{id:"example-2"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const $allowToCompare = createStore(true);\n\nconst $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormFailed = some({\n predicate: $allowToCompare,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(false === $isFormFailed.getState());\n")),(0,r.kt)("h2",{id:"shorthands"},"Shorthands"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some(stores, value);\n$result = some(stores, (value) => false);\n$result = some(stores, $predicate);\n")),(0,r.kt)("p",null,"Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form."),(0,r.kt)("h3",{id:"arguments-3"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with predicate in the second argument"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store | (value: T) => boolean | T)")," \u2014 Predicate to compare with")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/33c22581.de5322e1.js b/assets/js/33c22581.de5322e1.js new file mode 100644 index 00000000..ab0fac01 --- /dev/null +++ b/assets/js/33c22581.de5322e1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[299],{4852:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>k});var n=a(9231);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),m=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=m(a),c=r,k=u["".concat(s,".").concat(c)]||u[c]||d[c]||l;return a?n.createElement(k,i(i({ref:t},p),{},{components:a})):n.createElement(k,i({ref:t},p))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=c;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:r,i[1]=o;for(var m=2;m{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>m});var n=a(4011),r=(a(9231),a(4852));const l={},i="some",o={unversionedId:"some/readme",id:"some/readme",title:"some",description:"some({ predicate: Function, stores })",source:"@site/../src/some/readme.md",sourceDirName:"some",slug:"/some/",permalink:"/methods/some/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/some/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"snapshot",permalink:"/methods/snapshot/"},next:{title:"splitMap",permalink:"/methods/split-map/"}},s={},m=[{value:"some({ predicate: Function, stores })",id:"some-predicate-function-stores-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Return",id:"return",level:3},{value:"Example",id:"example",level:3},{value:"some({ predicate: value, stores })",id:"some-predicate-value-stores-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Return",id:"return-1",level:3},{value:"Example",id:"example-1",level:3},{value:"some({ predicate: Store, stores })",id:"some-predicate-store-stores-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Return",id:"return-2",level:3},{value:"Example",id:"example-2",level:3},{value:"Shorthands",id:"shorthands",level:2},{value:"Arguments",id:"arguments-3",level:3}],p={toc:m},u="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"some"},"some"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { some } from 'patronum';\n// or\nimport { some } from 'patronum/some';\n")),(0,r.kt)("h2",{id:"some-predicate-function-stores-"},(0,r.kt)("inlineCode",{parentName:"h2"},"some({ predicate: Function, stores })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"Method calculates boolean value if at least one state of the store satisfies the condition in ",(0,r.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful to check that user filled at least a single field."),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some({ predicate: (value) => true, stores });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"read it as: has some predicate at at least one store"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if each at least ",(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," on each store value from ",(0,r.kt)("inlineCode",{parentName:"li"},"values")," returns ",(0,r.kt)("inlineCode",{parentName:"li"},"true"),", otherwise it will be ",(0,r.kt)("inlineCode",{parentName:"li"},"false"))),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"((value: T) => boolean)")," \u2014 Function to check store value"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores")),(0,r.kt)("h3",{id:"return"},"Return"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one store corresponds to ",(0,r.kt)("inlineCode",{parentName:"li"},"predicate"))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const $width = createStore(440);\nconst $height = createStore(820);\n\nconst $tooBig = some({\n predicate: (size) => size > 800,\n stores: [$width, $height],\n});\n\nconsole.assert(true === $tooBig.getState());\n")),(0,r.kt)("h2",{id:"some-predicate-value-stores-"},(0,r.kt)("inlineCode",{parentName:"h2"},"some({ predicate: value, stores })")),(0,r.kt)("h3",{id:"motivation-1"},"Motivation"),(0,r.kt)("p",null,"This overload compares each store to specific value in ",(0,r.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,r.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"||")," very often, for example to create an invalid form flag."),(0,r.kt)("h3",{id:"formulae-1"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some({ predicate: value, stores });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one value in ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," equals ",(0,r.kt)("inlineCode",{parentName:"li"},"value"),", otherwise it will be ",(0,r.kt)("inlineCode",{parentName:"li"},"false"))),(0,r.kt)("h3",{id:"arguments-1"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(T)")," \u2014 Data to compare stores values with"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,r.kt)("inlineCode",{parentName:"li"},"value")),(0,r.kt)("li",{parentName:"ol"},"type of ",(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," should should be the same")),(0,r.kt)("h3",{id:"return-1"},"Return"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one store contains ",(0,r.kt)("inlineCode",{parentName:"li"},"value"))),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormFailed = some({\n predicate: false,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(false === $isFormFailed.getState());\n")),(0,r.kt)("h2",{id:"some-predicate-store-stores-"},(0,r.kt)("inlineCode",{parentName:"h2"},"some({ predicate: Store, stores })")),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"patronum 1.8.0")),(0,r.kt)("h3",{id:"motivation-2"},"Motivation"),(0,r.kt)("p",null,"This overload compares each store to specific value in store ",(0,r.kt)("inlineCode",{parentName:"p"},"predicate"),".\nIt is useful when you write ",(0,r.kt)("inlineCode",{parentName:"p"},"combine")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"||")," very often, for example to create an invalid form flag."),(0,r.kt)("h3",{id:"formulae-2"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some({ predicate: $value, stores });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one value in ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," equals value in ",(0,r.kt)("inlineCode",{parentName:"li"},"$value"),", otherwise it will be ",(0,r.kt)("inlineCode",{parentName:"li"},"false"))),(0,r.kt)("h3",{id:"arguments-2"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 Store contains value to compare values from ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," with"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with ",(0,r.kt)("inlineCode",{parentName:"li"},"value")),(0,r.kt)("li",{parentName:"ol"},"type of ",(0,r.kt)("inlineCode",{parentName:"li"},"value")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"stores")," should be the same")),(0,r.kt)("h3",{id:"return-2"},"Return"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$result")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," if at least one store contains ",(0,r.kt)("inlineCode",{parentName:"li"},"value"))),(0,r.kt)("h3",{id:"example-2"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const $allowToCompare = createStore(true);\n\nconst $isPasswordCorrect = createStore(true);\nconst $isEmailCorrect = createStore(true);\n\nconst $isFormFailed = some({\n predicate: $allowToCompare,\n stores: [$isPasswordCorrect, $isEmailCorrect],\n});\n\nconsole.assert(false === $isFormFailed.getState());\n")),(0,r.kt)("h2",{id:"shorthands"},"Shorthands"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$result = some(stores, value);\n$result = some(stores, (value) => false);\n$result = some(stores, $predicate);\n")),(0,r.kt)("p",null,"Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form."),(0,r.kt)("h3",{id:"arguments-3"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"stores")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array>)")," \u2014 List of stores to compare with predicate in the second argument"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"predicate")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store | (value: T) => boolean | T)")," \u2014 Predicate to compare with")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/391.9664fa7c.js b/assets/js/391.9664fa7c.js deleted file mode 100644 index 7ba4c43c..00000000 --- a/assets/js/391.9664fa7c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[391],{7391:(e,t,r)=>{function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t,r){var a,c=t.initialState;return{getState:function(){return c},dispatch:function(a,i){var l=function(e){for(var t=1;tDr});var f=0;var m=function(){};function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var J,$,W,Q=null,Y=(J=-1,$=-1,W=void 0,function(e){var t=++J;return Promise.resolve(e).then((function(e){return W&&t<$?W:($=t,W=e,e)}))});function G(e){var t=e.event,r=e.nextState,n=void 0===r?{}:r,o=e.props,a=e.query,i=e.refresh,l=e.store,u=K(e,U);Q&&o.environment.clearTimeout(Q);var s=u.setCollections,f=u.setIsOpen,m=u.setQuery,p=u.setActiveItemId,d=u.setStatus;if(m(a),p(o.defaultActiveItemId),!a&&!1===o.openOnFocus){var h,v=l.getState().collections.map((function(e){return V(V({},e),{},{items:[]})}));d("idle"),s(v),f(null!==(h=n.isOpen)&&void 0!==h?h:o.shouldPanelOpen({state:l.getState()}));var y=M(Y(v).then((function(){return Promise.resolve()})));return l.pendingRequests.add(y)}d("loading"),Q=o.environment.setTimeout((function(){d("stalled")}),o.stallThreshold);var g=M(Y(o.getSources(V({query:a,refresh:i,state:l.getState()},u)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(V({query:a,refresh:i,state:l.getState()},u))).then((function(t){return R(t,e.sourceId)}))}))).then(q).then((function(t){return _(t,e)})).then((function(e){return function(e){var t=e.collections,r=e.props,n=e.state,o=t.reduce((function(e,t){return j(j({},e),{},E({},t.source.sourceId,j(j({},t.source),{},{getItems:function(){return c(t.items)}})))}),{});return c(r.reshape({sources:Object.values(o),sourcesBySourceId:o,state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:o,state:l.getState()})}))})))).then((function(e){var r;d("idle"),s(e);var c=o.shouldPanelOpen({state:l.getState()});f(null!==(r=n.isOpen)&&void 0!==r?r:o.openOnFocus&&!a&&c||c);var m=F(l.getState());if(null!==l.getState().activeItemId&&m){var p=m.item,h=m.itemInputValue,v=m.itemUrl,y=m.source;y.onActive(V({event:t,item:p,itemInputValue:h,itemUrl:v,refresh:i,source:y,state:l.getState()},u))}})).finally((function(){d("idle"),Q&&o.environment.clearTimeout(Q)}));return l.pendingRequests.add(g)}var X=["event","props","refresh","store"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var ne=/((gt|sm)-|galaxy nexus)|samsung[- ]/i;var oe=["props","refresh","store"],ae=["inputElement","formElement","panelElement"],ce=["inputElement"],ie=["inputElement","maxLength"],le=["item","source"];function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pe(e){var t=e.props,r=e.refresh,n=e.store,o=me(e,oe);return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,a=e.panelElement;function c(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,a].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return se({onTouchStart:c,onMouseDown:c,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},me(e,ae))},getRootProps:function(e){return se({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return se({action:"",noValidate:!0,role:"search",onSubmit:function(a){var c;a.preventDefault(),t.onSubmit(se({event:a,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(c=e.inputElement)||void 0===c||c.blur()},onReset:function(a){var c;a.preventDefault(),t.onReset(se({event:a,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(c=e.inputElement)||void 0===c||c.focus()}},me(e,ce))},getLabelProps:function(e){return se({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},e)},getInputProps:function(e){var a;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&G(se({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var i=e||{},l=(i.inputElement,i.maxLength),u=void 0===l?512:l,s=me(i,ie),f=F(n.getState()),p=function(e){return Boolean(e&&e.match(ne))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),d=null!=f&&f.itemUrl&&!p?"go":"search";return se({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:d,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){G(se({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,a=re(e,X);if("ArrowUp"===t.key||"ArrowDown"===t.key){var c=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},i=function(){var e=F(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,c=e.itemInputValue,i=e.itemUrl,l=e.source;l.onActive(ee({event:t,item:r,itemInputValue:c,itemUrl:i,refresh:n,source:l,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?G(ee({event:t,props:r,query:o.getState().query,refresh:n,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),i(),setTimeout(c,0)})):(o.dispatch(t.key,{}),i(),c())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=F(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(ee({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},a)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(ee({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},a)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(ee({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},a)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});G(ee({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},a)).then((function(){m.onSelect(ee({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},a))}))}}}(se({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:m,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},s)},getPanelProps:function(e){return se({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){return se({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},e)},getItemProps:function(e){var a=e.item,c=e.source,i=me(e,le);return se({id:"".concat(t.id,"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=F(n.getState());if(null!==n.getState().activeItemId&&t){var c=t.item,i=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(se({event:e,item:c,itemInputValue:i,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():G(se({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(se({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},i)}}}var de=[{segment:"autocomplete-core",version:"1.7.1"}];function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t=r?null===n?null:0:o}function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(f++),plugins:o,initialState:b({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(v(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return h(e,r)}))).then((function(e){return c(e)})).then((function(e){return e.map((function(e){return b(b({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:b({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}(e,t),n=a(we,r,(function(e){var t=e.prevState,n=e.state;r.onStateChange(Ie({prevState:t,state:n,refresh:u},o))})),o=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var r=0,n=e.map((function(e){return l(l({},e),{},{items:c(e.items).map((function(e){return l(l({},e),{},{__autocomplete_id:r++})}))})}));t.dispatch("setCollections",n)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:n}),i=pe(Ie({props:r,refresh:u,store:n},o));function u(){return G(Ie({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:r,query:n.getState().query,refresh:u,store:n},o))}return r.plugins.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,Ie(Ie({},o),{},{refresh:u,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})}}))})),function(e){var t,r,n=e.metadata,o=e.environment;if(null===(t=o.navigator)||void 0===t||null===(r=t.userAgent)||void 0===r?void 0:r.includes("Algolia Crawler")){var a=o.document.createElement("meta"),c=o.document.querySelector("head");a.name="algolia:metadata",setTimeout((function(){a.content=JSON.stringify(n),c.appendChild(a)}),0)}}({metadata:ge({plugins:r.plugins,options:e}),environment:r.environment}),Ie(Ie({refresh:u},i),o)}var ke=r(9496);function Ae(e){var t=e.translations,r=(void 0===t?{}:t).searchByText,n=void 0===r?"Search by":r;return ke.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},ke.createElement("span",{className:"DocSearch-Label"},n),ke.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img"},ke.createElement("path",{d:"M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z",fill:"currentColor",fillRule:"evenodd"})))}function xe(e){return ke.createElement("svg",{width:"15",height:"15","aria-label":e.ariaLabel,role:"img"},ke.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function Ne(e){var t=e.translations,r=void 0===t?{}:t,n=r.selectText,o=void 0===n?"to select":n,a=r.selectKeyAriaLabel,c=void 0===a?"Enter key":a,i=r.navigateText,l=void 0===i?"to navigate":i,u=r.navigateUpKeyAriaLabel,s=void 0===u?"Arrow up":u,f=r.navigateDownKeyAriaLabel,m=void 0===f?"Arrow down":f,p=r.closeText,d=void 0===p?"to close":p,h=r.closeKeyAriaLabel,v=void 0===h?"Escape key":h,y=r.searchByText,g=void 0===y?"Search by":y;return ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"DocSearch-Logo"},ke.createElement(Ae,{translations:{searchByText:g}})),ke.createElement("ul",{className:"DocSearch-Commands"},ke.createElement("li",null,ke.createElement("kbd",{className:"DocSearch-Commands-Key"},ke.createElement(xe,{ariaLabel:c},ke.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),ke.createElement("span",{className:"DocSearch-Label"},o)),ke.createElement("li",null,ke.createElement("kbd",{className:"DocSearch-Commands-Key"},ke.createElement(xe,{ariaLabel:m},ke.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),ke.createElement("kbd",{className:"DocSearch-Commands-Key"},ke.createElement(xe,{ariaLabel:s},ke.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),ke.createElement("span",{className:"DocSearch-Label"},l)),ke.createElement("li",null,ke.createElement("kbd",{className:"DocSearch-Commands-Key"},ke.createElement(xe,{ariaLabel:v},ke.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),ke.createElement("span",{className:"DocSearch-Label"},d))))}function Re(e){var t=e.hit,r=e.children;return ke.createElement("a",{href:t.url},r)}function qe(){return ke.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function _e(e){var t=e.translations,r=void 0===t?{}:t,n=r.titleText,o=void 0===n?"Unable to fetch results":n,a=r.helpText,c=void 0===a?"You might want to check your network connection.":a;return ke.createElement("div",{className:"DocSearch-ErrorScreen"},ke.createElement("div",{className:"DocSearch-Screen-Icon"},ke.createElement(qe,null)),ke.createElement("p",{className:"DocSearch-Title"},o),ke.createElement("p",{className:"DocSearch-Help"},c))}function Te(){return ke.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}var Le=["translations"];function Me(e){return function(e){if(Array.isArray(e))return He(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return He(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return He(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ue(e){var t=e.translations,r=void 0===t?{}:t,n=Fe(e,Le),o=r.noResultsText,a=void 0===o?"No results for":o,c=r.suggestedQueryText,i=void 0===c?"Try searching for":c,l=r.reportMissingResultsText,u=void 0===l?"Believe this query should return results?":l,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return ke.createElement("div",{className:"DocSearch-NoResults"},ke.createElement("div",{className:"DocSearch-Screen-Icon"},ke.createElement(Te,null)),ke.createElement("p",{className:"DocSearch-Title"},a,' "',ke.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&ke.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},ke.createElement("p",{className:"DocSearch-Help"},i,":"),ke.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(Me(e),[ke.createElement("li",{key:t},ke.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&ke.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),ke.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var Be=function(){return ke.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},ke.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ve(e){switch(e.type){case"lvl1":return ke.createElement(Be,null);case"content":return ke.createElement(Ke,null);default:return ke.createElement(ze,null)}}function ze(){return ke.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},ke.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Ke(){return ke.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},ke.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Je(){return ke.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},ke.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},ke.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),ke.createElement("path",{d:"M8 17l-6-6 6-6"})))}var $e=["hit","attribute","tagName"];function We(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Xe(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ze(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,a=Ge(e,$e);return(0,ke.createElement)(o,Qe(Qe({},a),{},{dangerouslySetInnerHTML:{__html:Xe(t,"_snippetResult.".concat(r,".value"))||Xe(t,r)}}))}function et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,a=[],c=!0,i=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);c=!0);}catch(l){i=!0,o=l}finally{try{c||null==r.return||r.return()}finally{if(i)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,ct=RegExp(at.source);function it(e){var t,r,n,o,a,c=e;if(!c.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var i=((c.__docsearch_parent?null===(t=c.__docsearch_parent)||void 0===t||null===(r=t._highlightResult)||void 0===r||null===(n=r.hierarchy)||void 0===n?void 0:n.lvl0:null===(o=e._highlightResult)||void 0===o||null===(a=o.hierarchy)||void 0===a?void 0:a.lvl0)||{}).value;return i&&ct.test(i)?i.replace(at,""):i}function lt(){return lt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vt(e){var t=e.translations,r=void 0===t?{}:t,n=ht(e,pt),o=r.recentSearchesTitle,a=void 0===o?"Recent":o,c=r.noRecentSearchesText,i=void 0===c?"No recent searches":c,l=r.saveRecentSearchButtonTitle,u=void 0===l?"Save this search":l,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,d=r.removeFavoriteSearchButtonTitle,h=void 0===d?"Remove this search from favorites":d;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:ke.createElement("div",{className:"DocSearch-StartScreen"},ke.createElement("p",{className:"DocSearch-Help"},i)):!1===n.hasCollections?null:ke.createElement("div",{className:"DocSearch-Dropdown-Container"},ke.createElement(nt,dt({},n,{title:a,collection:n.state.collections[0],renderIcon:function(){return ke.createElement("div",{className:"DocSearch-Hit-icon"},ke.createElement(st,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"DocSearch-Hit-action"},ke.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},ke.createElement(ft,null))),ke.createElement("div",{className:"DocSearch-Hit-action"},ke.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},ke.createElement(mt,null))))}})),ke.createElement(nt,dt({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return ke.createElement("div",{className:"DocSearch-Hit-icon"},ke.createElement(ft,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return ke.createElement("div",{className:"DocSearch-Hit-action"},ke.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},ke.createElement(mt,null)))}})))}var yt=["translations"];function gt(){return gt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ot=ke.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=bt(e,yt);if("error"===n.state.status)return ke.createElement(_e,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?ke.createElement(Ue,gt({},n,{translations:null==r?void 0:r.noResultsScreen})):ke.createElement(ut,n):ke.createElement(vt,gt({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function St(){return ke.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},ke.createElement("g",{fill:"none",fillRule:"evenodd"},ke.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},ke.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),ke.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},ke.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var jt=r(2320),Et=["translations"];function wt(){return wt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function It(e){var t=e.translations,r=void 0===t?{}:t,n=Pt(e,Et),o=r.resetButtonTitle,a=void 0===o?"Clear the query":o,c=r.resetButtonAriaLabel,i=void 0===c?"Clear the query":c,l=r.cancelButtonText,u=void 0===l?"Cancel":l,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=n.getFormProps({inputElement:n.inputRef.current}).onReset;return ke.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),ke.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),ke.createElement(ke.Fragment,null,ke.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:m},ke.createElement("label",wt({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),ke.createElement(jt.W,null)),ke.createElement("div",{className:"DocSearch-LoadingIndicator"},ke.createElement(St,null)),ke.createElement("input",wt({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:64}))),ke.createElement("button",{type:"reset",title:a,className:"DocSearch-Reset","aria-label":i,hidden:!n.state.query},ke.createElement(mt,null))),ke.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},u))}var Dt=["_highlightResult","_snippetResult"];function Ct(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function At(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=kt(t),a=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,Ct(t,Dt)),c=a.findIndex((function(e){return e.objectID===r.objectID}));c>-1&&a.splice(c,1),a.unshift(r),a=a.slice(0,n),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function xt(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}");return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),n=o()[r];return Promise.all([n||t(),void 0!==n])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const a=o();return a[JSON.stringify(e)]=r,n().setItem(t,JSON.stringify(a)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Nt(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Nt({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Nt({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Nt({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Nt({caches:t}).clear()))}}function Rt(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);const c=n(),i=o&&o.miss||(()=>Promise.resolve());return c.then((e=>i(e))).then((()=>c))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function qt(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function _t(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Tt(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Lt="4.14.2",Mt={WithinQueryParameters:0,WithinHeaders:1};function Ht(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ft={Read:1,Write:2,Any:3},Ut=1,Bt=2,Vt=3,zt=12e4;function Kt(e,t=Ut){return{...e,status:t,lastUpdate:Date.now()}}function Jt(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ft.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ft.Any}}const $t="GET",Wt="POST";function Qt(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Kt(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===Ut||Date.now()-e.lastUpdate>zt}(e))),n=e.filter((e=>function(e){return e.status===Vt&&Date.now()-e.lastUpdate<=zt}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>Jt(e))):t}}))}function Yt(e,t,r,n){const o=[],a=function(e,t){if(e.method===$t||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),c=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),i=r.method,l=r.method!==$t?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:er(o)};const p={data:a,headers:c,method:i,url:Xt(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},d=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},h={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=d(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",tr(n)),e.hostsCache.set(m,Kt(m,r.isTimedOut?Vt:Bt))]).then((()=>f(t,l)))},onFail(e){throw d(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,er(o))}};return e.requester.send(p).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e))(e,h)))};return Qt(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Gt(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Xt(e,t,r){const n=Zt(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Zt(e){return Object.keys(e).map((t=>{return Tt("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function er(e){return e.map((e=>tr(e)))}function tr(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const rr=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Mt.WithinHeaders?n:{},queryParameters:()=>e===Mt.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Mt.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,headers:s,queryParameters:u,hosts:l.map((e=>Jt(e))),read(e,t){const r=Ht(t,f.timeouts.read),n=()=>Yt(f,f.hosts.filter((e=>0!=(e.accept&Ft.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>Yt(f,f.hosts.filter((e=>0!=(e.accept&Ft.Write))),e,Ht(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ft.Read},{url:`${t}.algolia.net`,accept:Ft.Write}].concat(qt([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return _t(o,e.methods)},nr=e=>(t,r)=>t.method===$t?e.transporter.read(t,r):e.transporter.write(t,r),or=e=>(t,r={})=>_t({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),ar=e=>(t,r)=>{const n=t.map((e=>({...e,params:Zt(e.params||{})})));return e.transporter.read({method:Wt,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},cr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...a}=t.params;return or(e)(t.indexName,{methods:{searchForFacetValues:ur}}).searchForFacetValues(n,o,{...r,...a})}))),ir=e=>(t,r,n)=>e.transporter.read({method:Wt,path:Tt("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),lr=e=>(t,r)=>e.transporter.read({method:Wt,path:Tt("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),ur=e=>(t,r,n)=>e.transporter.read({method:Wt,path:Tt("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),sr=1,fr=2,mr=3;function pr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let a;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===a&&(clearTimeout(o),a=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(a),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(a),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=mr,{debug:(e,t)=>(sr>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(fr>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Rt(),requestsCache:Rt({serializable:!1}),hostsCache:Nt({caches:[xt({key:`4.14.2-${e}`}),Rt()]}),userAgent:Gt(Lt).add({segment:"Browser",version:"lite"}),authMode:Mt.WithinQueryParameters};var o;return rr({...n,...r,methods:{search:ar,searchForFacetValues:cr,multipleQueries:ar,multipleSearchForFacetValues:cr,customRequest:nr,initIndex:e=>t=>or(e)(t,{methods:{search:lr,searchForFacetValues:ur,findAnswers:ir}})}})}pr.version=Lt;const dr=pr;var hr="3.2.1";function vr(){}function yr(e){return e}function gr(e,t){return e.reduce((function(e,r){var n=t(r);return e.hasOwnProperty(n)||(e[n]=[]),e[n].length<5&&e[n].push(r),e}),{})}var br=["footer","searchBox"];function Or(){return Or=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Dr(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,a=void 0===o?"Search docs":o,c=e.searchParameters,i=e.onClose,l=void 0===i?vr:i,u=e.transformItems,s=void 0===u?yr:u,f=e.hitComponent,m=void 0===f?Re:f,p=e.resultsFooterComponent,d=void 0===p?function(){return null}:p,h=e.navigator,v=e.initialScrollY,y=void 0===v?0:v,g=e.transformSearchClient,b=void 0===g?yr:g,O=e.disableUserPersonalization,S=void 0!==O&&O,j=e.initialQuery,E=void 0===j?"":j,w=e.translations,P=void 0===w?{}:w,I=e.getMissingResultsUrl,D=P.footer,C=P.searchBox,k=Ir(P,br),A=wr(ke.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),x=A[0],N=A[1],R=ke.useRef(null),q=ke.useRef(null),_=ke.useRef(null),T=ke.useRef(null),L=ke.useRef(null),M=ke.useRef(10),H=ke.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,F=ke.useRef(E||H).current,U=function(e,t,r){return ke.useMemo((function(){var n=dr(e,t);return n.addAlgoliaAgent("docsearch",hr),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",hr),r(n)}),[e,t,r])}(t,r,b),B=ke.useRef(At({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,V=ke.useRef(At({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===B.getAll().length?7:4})).current,z=ke.useCallback((function(e){if(!S){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===B.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&V.add(t)}}),[B,V,S]),K=ke.useMemo((function(){return Ce({id:"docsearch",defaultActiveItemId:0,placeholder:a,openOnFocus:!0,initialState:{query:F,context:{searchSuggestions:[]}},navigator:h,onStateChange:function(e){N(e.state)},getSources:function(e){var t=e.query,r=e.state,o=e.setContext,a=e.setStatus;return t?U.search([{query:t,indexName:n,params:jr({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(M.current),"hierarchy.lvl2:".concat(M.current),"hierarchy.lvl3:".concat(M.current),"hierarchy.lvl4:".concat(M.current),"hierarchy.lvl5:".concat(M.current),"hierarchy.lvl6:".concat(M.current),"content:".concat(M.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20},c)}]).catch((function(e){throw"RetryError"===e.name&&a("error"),e})).then((function(e){var t=e.results[0],n=t.hits,a=t.nbHits,c=gr(n,(function(e){return it(e)}));return r.context.searchSuggestions.length0&&(W(),L.current&&L.current.focus())}),[F,W]),ke.useEffect((function(){function e(){if(q.current){var e=.01*window.innerHeight;q.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),ke.createElement("div",Or({ref:R},$({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===x.status&&"DocSearch-Container--Stalled","error"===x.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&l()}}),ke.createElement("div",{className:"DocSearch-Modal",ref:q},ke.createElement("header",{className:"DocSearch-SearchBar",ref:_},ke.createElement(It,Or({},K,{state:x,autoFocus:0===F.length,inputRef:L,isFromSelection:Boolean(F)&&F===H,translations:C,onClose:l}))),ke.createElement("div",{className:"DocSearch-Dropdown",ref:T},ke.createElement(Ot,Or({},K,{indexName:n,state:x,hitComponent:m,resultsFooterComponent:d,disableUserPersonalization:S,recentSearches:V,favoriteSearches:B,inputRef:L,translations:k,getMissingResultsUrl:I,onItemClick:function(e){z(e),l()}}))),ke.createElement("footer",{className:"DocSearch-Footer"},ke.createElement(Ne,{translations:D}))))}}}]); \ No newline at end of file diff --git a/assets/js/4af54caf.0b1ea9c3.js b/assets/js/4af54caf.0b1ea9c3.js new file mode 100644 index 00000000..83bc3d47 --- /dev/null +++ b/assets/js/4af54caf.0b1ea9c3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[774],{4852:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),d=a,f=p["".concat(l,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var r=n(4011),a=(n(9231),n(4852));const o={},i="and",s={unversionedId:"and/readme",id:"and/readme",title:"and",description:"patronum 1.11.0",source:"@site/../src/and/readme.md",sourceDirName:"and",slug:"/and/",permalink:"/methods/and/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/and/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"Methods",permalink:"/methods/"},next:{title:"combineEvents",permalink:"/methods/combine-events/"}},l={},c=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Composition",id:"composition",level:3},{value:"Alternative",id:"alternative",level:3}],u={toc:c},p="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"and"},"and"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { and } from 'patronum';\n// or\nimport { and } from 'patronum/and';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to check each passed store for thruthy values.\nIt can be compared with ",(0,a.kt)("inlineCode",{parentName:"p"},"if (a && b && c && d)"),"."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = and(...stores);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),' if each passed store contains "truthy" values.')),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("p",null,"The method receives any amount of arguments."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"...stores: Array>")," \u2014 Each argument must be store with a value of any kind.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store")," \u2014 The store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false")," if at least one passed store in ",(0,a.kt)("inlineCode",{parentName:"li"},"stores"),' contains "falsey" value')),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isAuthorized = createStore(true);\nconst $isAdmin = createStore(false);\nconst $orderFinished = createStore(true);\n\nconst $showCancelButton = and($isAuthorized, $isAdmin, $orderFinished);\nconsole.assert(false === $showCancelButton.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/YbahaYCO"},"Try it")),(0,a.kt)("h3",{id:"composition"},"Composition"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $showRegisterLink = and(\n not($isAuthorized),\n or($isRegisterInProcess, $isEmailRecovering),\n);\n")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $showRegisterLink = combine(\n $isAuthorized,\n $isRegisterInProcess,\n $isEmailRecovering,\n (isAuthorized, isRegisterInProcess, isEmailRecovering) => {\n return !isAuthorized && (isRegisterInProcess || isEmailRecovering);\n }\n);\nconsole.assert(false === $showRegisterLink.getState());\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4af54caf.ceab87e8.js b/assets/js/4af54caf.ceab87e8.js deleted file mode 100644 index 22467eee..00000000 --- a/assets/js/4af54caf.ceab87e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[774],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(l,".").concat(d)]||m[d]||p[d]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var r=n(2081),a=(n(9496),n(9613));const o={},i="and",s={unversionedId:"and/readme",id:"and/readme",title:"and",description:"patronum 1.11.0",source:"@site/../src/and/readme.md",sourceDirName:"and",slug:"/and/",permalink:"/methods/and/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/and/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"Methods",permalink:"/methods/"},next:{title:"combineEvents",permalink:"/methods/combine-events/"}},l={},c=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Composition",id:"composition",level:3},{value:"Alternative",id:"alternative",level:3}],u={toc:c};function p(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"and"},"and"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { and } from 'patronum';\n// or\nimport { and } from 'patronum/and';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to check each passed store for thruthy values.\nIt can be compared with ",(0,a.kt)("inlineCode",{parentName:"p"},"if (a && b && c && d)"),"."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = and(...stores);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),' if each passed store contains "truthy" values.')),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("p",null,"The method receives any amount of arguments."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"...stores: Array>")," \u2014 Each argument must be store with a value of any kind.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store")," \u2014 The store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false")," if at least one passed store in ",(0,a.kt)("inlineCode",{parentName:"li"},"stores"),' contains "falsey" value')),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $isAuthorized = createStore(true);\nconst $isAdmin = createStore(false);\nconst $orderFinished = createStore(true);\n\nconst $showCancelButton = and($isAuthorized, $isAdmin, $orderFinished);\nconsole.assert(false === $showCancelButton.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/YbahaYCO"},"Try it")),(0,a.kt)("h3",{id:"composition"},"Composition"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $showRegisterLink = and(\n not($isAuthorized),\n or($isRegisterInProcess, $isEmailRecovering),\n);\n")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $showRegisterLink = combine(\n $isAuthorized,\n $isRegisterInProcess,\n $isEmailRecovering,\n (isAuthorized, isRegisterInProcess, isEmailRecovering) => {\n return !isAuthorized && (isRegisterInProcess || isEmailRecovering);\n }\n);\nconsole.assert(false === $showRegisterLink.getState());\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4d9d995f.4ead4532.js b/assets/js/4d9d995f.4ead4532.js deleted file mode 100644 index 32ffdefa..00000000 --- a/assets/js/4d9d995f.4ead4532.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[876],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>d});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),p=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),m=p(r),d=a,h=m["".concat(i,".").concat(d)]||m[d]||c[d]||o;return r?n.createElement(h,s(s({ref:t},u),{},{components:r})):n.createElement(h,s({ref:t},u))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=m;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:a,s[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(2081),a=(r(9496),r(9613));const o={},s="reshape",l={unversionedId:"reshape/readme",id:"reshape/readme",title:"reshape",description:"result = reshape({ source, shape })",source:"@site/../src/reshape/readme.md",sourceDirName:"reshape",slug:"/reshape/",permalink:"/methods/reshape/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/reshape/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"reset",permalink:"/methods/reset/"},next:{title:"snapshot",permalink:"/methods/snapshot/"}},i={},p=[{value:"result = reshape({ source, shape })",id:"result--reshape-source-shape-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Examples",id:"examples",level:3},{value:"Creates much stores from single string",id:"creates-much-stores-from-single-string",level:4},{value:"Destructure object",id:"destructure-object",level:4}],u={toc:p};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"reshape"},"reshape"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { reshape } from 'patronum';\n// or\nimport { reshape } from 'patronum/reshape';\n")),(0,a.kt)("h2",{id:"result--reshape-source-shape-"},(0,a.kt)("inlineCode",{parentName:"h2"},"result = reshape({ source, shape })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"This method allows to create many stores from single store at once.\nIt useful when you want to read many properties from object to different stores."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = reshape({ source, shape });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Call each function in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")," object with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", and create store with the same name as key in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")),(0,a.kt)("li",{parentName:"ul"},"If function in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")," returns ",(0,a.kt)("inlineCode",{parentName:"li"},"undefined"),", the same store will contain ",(0,a.kt)("inlineCode",{parentName:"li"},"null"),", because store cannot contain ",(0,a.kt)("inlineCode",{parentName:"li"},"undefined"),".")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Source store, data from this unit passed to each function in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"shape")," (",(0,a.kt)("inlineCode",{parentName:"li"},"{ [key: string]: (payload: T) => any }"),") \u2014 Object of functions. Function receives payload of ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," as single argument, should return any value.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," (",(0,a.kt)("inlineCode",{parentName:"li"},"{ [key: string]: Store }"),") \u2014 Object of stores, that created with the same structure as ",(0,a.kt)("inlineCode",{parentName:"li"},"shape"),", with data from passed functions")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("h4",{id:"creates-much-stores-from-single-string"},"Creates much stores from single string"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { reshape } from 'patronum/reshape';\n\nconst $original = createStore('Example');\n\nconst result = reshape({\n source: $original,\n shape: {\n length: (string) => string.length,\n lowercase: (string) => string.toLowerCase(),\n uppercase: (string) => string.toUpperCase(),\n },\n});\n\n// result.length: Store;\n// result.lowercase: Store;\n// result.uppercase: Store;\n\nresult.length.watch((length) => console.log('String length:', length));\nresult.lowercase.watch((lowercase) => console.log('lowercase:', lowercase));\n")),(0,a.kt)("h4",{id:"destructure-object"},"Destructure object"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { reshape } from 'patronum/reshape';\n\nconst $user = createStore({\n name: 'Sergey',\n lastname: 'Sova',\n age: 26,\n});\n\nconst { name, lastname, age } = reshape({\n source: $user,\n shape: {\n name: (user) => user.name,\n lastname: (user) => user.lastname,\n age: ({ age }) => age,\n },\n});\n\nname.watch((name) => console.info('name updated', name));\nlastname.watch((lastname) => console.info('lastname updated', lastname));\nage.watch((age) => console.info('age updated', age));\n\n// => name updated Sergey\n// => lastname updated Sova\n// => age updated 26\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4d9d995f.aa00eebb.js b/assets/js/4d9d995f.aa00eebb.js new file mode 100644 index 00000000..fa4f9d28 --- /dev/null +++ b/assets/js/4d9d995f.aa00eebb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[876],{4852:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var n=r(9231);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),p=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(r),d=a,h=c["".concat(i,".").concat(d)]||c[d]||m[d]||o;return r?n.createElement(h,s(s({ref:t},u),{},{components:r})):n.createElement(h,s({ref:t},u))}));function h(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[c]="string"==typeof e?e:a,s[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(4011),a=(r(9231),r(4852));const o={},s="reshape",l={unversionedId:"reshape/readme",id:"reshape/readme",title:"reshape",description:"result = reshape({ source, shape })",source:"@site/../src/reshape/readme.md",sourceDirName:"reshape",slug:"/reshape/",permalink:"/methods/reshape/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/reshape/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"reset",permalink:"/methods/reset/"},next:{title:"snapshot",permalink:"/methods/snapshot/"}},i={},p=[{value:"result = reshape({ source, shape })",id:"result--reshape-source-shape-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Examples",id:"examples",level:3},{value:"Creates much stores from single string",id:"creates-much-stores-from-single-string",level:4},{value:"Destructure object",id:"destructure-object",level:4}],u={toc:p},c="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"reshape"},"reshape"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { reshape } from 'patronum';\n// or\nimport { reshape } from 'patronum/reshape';\n")),(0,a.kt)("h2",{id:"result--reshape-source-shape-"},(0,a.kt)("inlineCode",{parentName:"h2"},"result = reshape({ source, shape })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"This method allows to create many stores from single store at once.\nIt useful when you want to read many properties from object to different stores."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = reshape({ source, shape });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Call each function in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")," object with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", and create store with the same name as key in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")),(0,a.kt)("li",{parentName:"ul"},"If function in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")," returns ",(0,a.kt)("inlineCode",{parentName:"li"},"undefined"),", the same store will contain ",(0,a.kt)("inlineCode",{parentName:"li"},"null"),", because store cannot contain ",(0,a.kt)("inlineCode",{parentName:"li"},"undefined"),".")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," (",(0,a.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,a.kt)("em",{parentName:"a"},(0,a.kt)("inlineCode",{parentName:"em"},"Store"))),") \u2014 Source store, data from this unit passed to each function in ",(0,a.kt)("inlineCode",{parentName:"li"},"shape")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"shape")," (",(0,a.kt)("inlineCode",{parentName:"li"},"{ [key: string]: (payload: T) => any }"),") \u2014 Object of functions. Function receives payload of ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," as single argument, should return any value.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," (",(0,a.kt)("inlineCode",{parentName:"li"},"{ [key: string]: Store }"),") \u2014 Object of stores, that created with the same structure as ",(0,a.kt)("inlineCode",{parentName:"li"},"shape"),", with data from passed functions")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("h4",{id:"creates-much-stores-from-single-string"},"Creates much stores from single string"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { reshape } from 'patronum/reshape';\n\nconst $original = createStore('Example');\n\nconst result = reshape({\n source: $original,\n shape: {\n length: (string) => string.length,\n lowercase: (string) => string.toLowerCase(),\n uppercase: (string) => string.toUpperCase(),\n },\n});\n\n// result.length: Store;\n// result.lowercase: Store;\n// result.uppercase: Store;\n\nresult.length.watch((length) => console.log('String length:', length));\nresult.lowercase.watch((lowercase) => console.log('lowercase:', lowercase));\n")),(0,a.kt)("h4",{id:"destructure-object"},"Destructure object"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { reshape } from 'patronum/reshape';\n\nconst $user = createStore({\n name: 'Sergey',\n lastname: 'Sova',\n age: 26,\n});\n\nconst { name, lastname, age } = reshape({\n source: $user,\n shape: {\n name: (user) => user.name,\n lastname: (user) => user.lastname,\n age: ({ age }) => age,\n },\n});\n\nname.watch((name) => console.info('name updated', name));\nlastname.watch((lastname) => console.info('lastname updated', lastname));\nage.watch((age) => console.info('age updated', age));\n\n// => name updated Sergey\n// => lastname updated Sova\n// => age updated 26\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/530.f5cc4ef9.js b/assets/js/530.f5cc4ef9.js new file mode 100644 index 00000000..205059e8 --- /dev/null +++ b/assets/js/530.f5cc4ef9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[530],{9530:(e,t,r)=>{function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ipn});var a=function(){};function c(e){var t=e.item,r=e.items;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(s){u=!0,o=s}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==_(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var l=e||{},u=(l.inputElement,l.maxLength),s=void 0===u?512:u,f=Ze(l,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,_e);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ge(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=Ze(e,Je);return We({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t=r?null===n?null:0:o}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,l=r.reportMissingResultsText,u=void 0===l?"Believe this query should return results?":l,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(_t,null);default:return yt.createElement(Nt,null)}}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&Wt.test(o)?o.replace(zt,""):o}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,l=r.saveRecentSearchButtonTitle,u=void 0===l?"Save this search":l,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var lr=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function ur(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(687),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,l=r.cancelButtonText,u=void 0===l?"Cancel":l,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:m},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(ur,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},u))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get:(t,r,n={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Or({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Or({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Or({caches:t}).clear()))}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.22.0",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function Nr(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const _r={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>Nr(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===_r.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==_r.Get?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,l)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ir.WithinHeaders?n:{},queryParameters:()=>e===Ir.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>Nr(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===_r.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:_r.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:_r.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:_r.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:_r.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};function Gr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=Zr.Error,{debug:(e,t)=>(Zr.Debug>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Zr.Info>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}})}})}Gr.version=Pr;const Xr=Gr;var Yr="3.5.2";function en(){}function tn(e){return e}function rn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function nn(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var on=["footer","searchBox"];function an(){return an=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,l=e.onClose,u=void 0===l?en:l,s=e.transformItems,f=void 0===s?tn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?tn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,N=mn(I,on),_=sn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=_[0],q=_[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Xr(e,t);return n.addAlgoliaAgent("docsearch",Yr),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",Yr),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,l=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:ln({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,p=nn(a,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",an({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,an({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:u}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(lr,an({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:N,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),rn(t)||u()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file diff --git a/assets/js/5b0e0e08.975d4ae9.js b/assets/js/5b0e0e08.975d4ae9.js new file mode 100644 index 00000000..65751658 --- /dev/null +++ b/assets/js/5b0e0e08.975d4ae9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[34],{4852:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>k});var i=t(9231);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var d=i.createContext({}),s=function(e){var n=i.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=s(e.components);return i.createElement(d.Provider,{value:n},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},m=i.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,d=e.parentName,c=r(e,["components","mdxType","originalType","parentName"]),u=s(t),m=a,k=u["".concat(d,".").concat(m)]||u[m]||p[m]||l;return t?i.createElement(k,o(o({ref:n},c),{},{components:t})):i.createElement(k,o({ref:n},c))}));function k(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,o=new Array(l);o[0]=m;var r={};for(var d in n)hasOwnProperty.call(n,d)&&(r[d]=n[d]);r.originalType=e,r[u]="string"==typeof e?e:a,o[1]=r;for(var s=2;s{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>s});var i=t(4011),a=(t(9231),t(4852));const l={},o="condition",r={unversionedId:"condition/readme",id:"condition/readme",title:"condition",description:"Motivation",source:"@site/../src/condition/readme.md",sourceDirName:"condition",slug:"/condition/",permalink:"/methods/condition/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/condition/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"combineEvents",permalink:"/methods/combine-events/"},next:{title:"debounce",permalink:"/methods/debounce/"}},d={},s=[{value:"Motivation",id:"motivation",level:2},{value:"condition({ source: Unit, if: Store, then?: Unit, else?: Unit })",id:"condition-source-unit-if-store-then-unit-else-unit-",level:2},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"condition({ source: Unit<T>, if: T, then?: Unit, else?: Unit })",id:"condition-source-unitt-if-t-then-unit-else-unit-",level:2},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"condition({ source: Unit<T>, if: Function, then?: Unit, else?: Unit })",id:"condition-source-unitt-if-function-then-unit-else-unit-",level:2},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Example",id:"example-2",level:3},{value:"Examples",id:"examples",level:2},{value:"Source is event",id:"source-is-event",level:3},{value:"Condition can be nested",id:"condition-can-be-nested",level:3}],c={toc:s},u="wrapper";function p(e){let{components:n,...t}=e;return(0,a.kt)(u,(0,i.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"condition"},"condition"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { condition } from 'patronum';\n// or\nimport { condition } from 'patronum/condition';\n")),(0,a.kt)("h2",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Condition is very similar to ",(0,a.kt)("a",{parentName:"p",href:"https://effector.dev/docs/api/effector/sample"},(0,a.kt)("inlineCode",{parentName:"a"},"sample")),", but allows you to have ",(0,a.kt)("inlineCode",{parentName:"p"},"else")," branch along with simple ",(0,a.kt)("inlineCode",{parentName:"p"},"if")," matcher."),(0,a.kt)("h2",{id:"condition-source-unit-if-store-then-unit-else-unit-"},(0,a.kt)("inlineCode",{parentName:"h2"},"condition({ source: Unit, if: Store, then?: Unit, else?: Unit })")),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = condition({\n source,\n if: $checker,\n then,\n else,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, check value of ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker"),", if it equals ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),", trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", otherwise trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," is the same unit as ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," allows to nest ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," to another ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"sample"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 Data from this unit will be passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"if")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 Updates of this store will not trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," is not provided"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"else")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," is not provided")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 The same unit type that passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const change = createEvent();\nconst $source = createStore('data').on(change, (_, payload) => payload);\n\nconst toggle = createEvent();\nconst $isEnabled = createStore(false).on(toggle, (is) => !is);\n\nconst enabled = createEvent();\nconst disabled = createEvent();\n\ncondition({\n source: $source,\n if: $isEnabled,\n then: enabled,\n else: disabled,\n});\nenabled.watch((payload) => console.log('enabled -', payload));\ndisabled.watch((payload) => console.log('disabled -', payload));\n\nchange('newdata');\n// => disabled - newdata\n\ntoggle();\nchange('data');\n// => enabled - data\n")),(0,a.kt)("h2",{id:"condition-source-unitt-if-t-then-unit-else-unit-"},(0,a.kt)("inlineCode",{parentName:"h2"},"condition({ source: Unit, if: T, then?: Unit, else?: Unit })")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = condition({\n source,\n if: value,\n then,\n else,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, compare ",(0,a.kt)("inlineCode",{parentName:"li"},"value")," literal with ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload, if it equals trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", otherwise trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," is the same unit as ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," allows to nest ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," to another ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"sample"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 Data from this unit will be passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"if")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(T)")," \u2014 Just value to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload. ",(0,a.kt)("em",{parentName:"li"},"Note: objects will be compared by reference")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," is not provided"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"else")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," is not provided")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 The same unit type that passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const increment = createEvent();\nconst $source = createStore(0).on(increment, (state) => state + 1);\n\nconst log = createEvent();\nconst run = createEffect().use((data) => {\n console.info('FAKE RUN EFFECT', data);\n});\n\ncondition({\n source: $source,\n if: 4,\n then: run,\n else: log,\n});\n\nlog.watch((payload) => console.log('LOG ABOUT IT', payload));\n\nincrement(); // => LOG ABOUT IT 1\nincrement(); // => LOG ABOUT IT 2\nincrement(); // => LOG ABOUT IT 3\nincrement(); // => FAKE RUN EFFECT 4\nincrement(); // => LOG ABOUT IT 5\n")),(0,a.kt)("h2",{id:"condition-source-unitt-if-function-then-unit-else-unit-"},(0,a.kt)("inlineCode",{parentName:"h2"},"condition({ source: Unit, if: Function, then?: Unit, else?: Unit })")),(0,a.kt)("h3",{id:"formulae-2"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = condition({\n source,\n if: (payload) => boolean,\n then,\n else,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, call ",(0,a.kt)("inlineCode",{parentName:"li"},"if")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload, if it returns ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", otherwise trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," is the same unit as ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," allows to nest ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," to another ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"sample"))),(0,a.kt)("h3",{id:"arguments-2"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 Data from this unit will be passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"if")," ",(0,a.kt)("inlineCode",{parentName:"li"},"((payload: T) => boolean)")," \u2014 Function comparator. It should return boolean"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," is not provided"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"else")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," is not provided")),(0,a.kt)("h3",{id:"returns-2"},"Returns"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 The same unit type that passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"example-2"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const change = createEvent();\nconst $source = createStore('data').on(change, (_, payload) => payload);\nconst target = createEvent();\nconst another = createEvent();\n\ncondition({\n source: $source,\n if: (source) => source.length > 3,\n then: target,\n else: another,\n});\ntarget.watch((payload) => console.log('triggered', payload));\nanother.watch((payload) => console.log('condition else:', payload));\n\nchange('newdata');\n// => triggered newdata\n\nchange('old');\n// => condition else: old\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"source-is-event"},"Source is event"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const inputChanged = createEvent();\nconst $value = createStore('');\nconst $error = createStore(false);\n\nconst setError = createEvent();\nconst setValue = createEvent();\n\n$value.on(setValue, (_, value) => value);\n$error.on(setError, () => true).on(setValue, () => false);\n\ncondition({\n source: inputChanged,\n if: isValid,\n then: setValue,\n else: setError,\n});\n\nfunction isValid(value) {\n return value.trim().length > 0;\n}\n")),(0,a.kt)("h3",{id:"condition-can-be-nested"},"Condition can be nested"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $value = createStore('hello@world');\nconst updateEmail = createEvent();\n\ncondition({\n source: $value,\n if: (length) => length > 0,\n then: condition({\n if: (string) => string.includes('@'),\n then: updateEmail,\n }),\n});\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5b0e0e08.ffc5f899.js b/assets/js/5b0e0e08.ffc5f899.js deleted file mode 100644 index 6f7b13f6..00000000 --- a/assets/js/5b0e0e08.ffc5f899.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[34],{9613:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>m});var i=t(9496);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var d=i.createContext({}),s=function(e){var n=i.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=s(e.components);return i.createElement(d.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},p=i.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,d=e.parentName,c=r(e,["components","mdxType","originalType","parentName"]),p=s(t),m=a,k=p["".concat(d,".").concat(m)]||p[m]||u[m]||l;return t?i.createElement(k,o(o({ref:n},c),{},{components:t})):i.createElement(k,o({ref:n},c))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,o=new Array(l);o[0]=p;var r={};for(var d in n)hasOwnProperty.call(n,d)&&(r[d]=n[d]);r.originalType=e,r.mdxType="string"==typeof e?e:a,o[1]=r;for(var s=2;s{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>s});var i=t(2081),a=(t(9496),t(9613));const l={},o="condition",r={unversionedId:"condition/readme",id:"condition/readme",title:"condition",description:"Motivation",source:"@site/../src/condition/readme.md",sourceDirName:"condition",slug:"/condition/",permalink:"/methods/condition/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/condition/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"combineEvents",permalink:"/methods/combine-events/"},next:{title:"debounce",permalink:"/methods/debounce/"}},d={},s=[{value:"Motivation",id:"motivation",level:2},{value:"condition({ source: Unit, if: Store, then?: Unit, else?: Unit })",id:"condition-source-unit-if-store-then-unit-else-unit-",level:2},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"condition({ source: Unit<T>, if: T, then?: Unit, else?: Unit })",id:"condition-source-unitt-if-t-then-unit-else-unit-",level:2},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"condition({ source: Unit<T>, if: Function, then?: Unit, else?: Unit })",id:"condition-source-unitt-if-function-then-unit-else-unit-",level:2},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Example",id:"example-2",level:3},{value:"Examples",id:"examples",level:2},{value:"Source is event",id:"source-is-event",level:3},{value:"Condition can be nested",id:"condition-can-be-nested",level:3}],c={toc:s};function u(e){let{components:n,...t}=e;return(0,a.kt)("wrapper",(0,i.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"condition"},"condition"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { condition } from 'patronum';\n// or\nimport { condition } from 'patronum/condition';\n")),(0,a.kt)("h2",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Condition is very similar to ",(0,a.kt)("a",{parentName:"p",href:"https://effector.dev/docs/api/effector/guard"},(0,a.kt)("inlineCode",{parentName:"a"},"guard")),", but allows you to have ",(0,a.kt)("inlineCode",{parentName:"p"},"else")," branch along with simple ",(0,a.kt)("inlineCode",{parentName:"p"},"if")," matcher."),(0,a.kt)("h2",{id:"condition-source-unit-if-store-then-unit-else-unit-"},(0,a.kt)("inlineCode",{parentName:"h2"},"condition({ source: Unit, if: Store, then?: Unit, else?: Unit })")),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = condition({\n source,\n if: $checker,\n then,\n else,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, check value of ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker"),", if it equals ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),", trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", otherwise trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," is the same unit as ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," allows to nest ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," to another ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"sample"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 Data from this unit will be passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"if")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Store)")," \u2014 Updates of this store will not trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," is not provided"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"else")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," is not provided")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 The same unit type that passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const change = createEvent();\nconst $source = createStore('data').on(change, (_, payload) => payload);\n\nconst toggle = createEvent();\nconst $isEnabled = createStore(false).on(toggle, (is) => !is);\n\nconst enabled = createEvent();\nconst disabled = createEvent();\n\ncondition({\n source: $source,\n if: $isEnabled,\n then: enabled,\n else: disabled,\n});\nenabled.watch((payload) => console.log('enabled -', payload));\ndisabled.watch((payload) => console.log('disabled -', payload));\n\nchange('newdata');\n// => disabled - newdata\n\ntoggle();\nchange('data');\n// => enabled - data\n")),(0,a.kt)("h2",{id:"condition-source-unitt-if-t-then-unit-else-unit-"},(0,a.kt)("inlineCode",{parentName:"h2"},"condition({ source: Unit, if: T, then?: Unit, else?: Unit })")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = condition({\n source,\n if: value,\n then,\n else,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, compare ",(0,a.kt)("inlineCode",{parentName:"li"},"value")," literal with ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload, if it equals trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", otherwise trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," is the same unit as ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," allows to nest ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," to another ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"sample"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 Data from this unit will be passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"if")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(T)")," \u2014 Just value to compare with ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload. ",(0,a.kt)("em",{parentName:"li"},"Note: objects will be compared by reference")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," is not provided"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"else")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," is not provided")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 The same unit type that passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const increment = createEvent();\nconst $source = createStore(0).on(increment, (state) => state + 1);\n\nconst log = createEvent();\nconst run = createEffect().use((data) => {\n console.info('FAKE RUN EFFECT', data);\n});\n\ncondition({\n source: $source,\n if: 4,\n then: run,\n else: log,\n});\n\nlog.watch((payload) => console.log('LOG ABOUT IT', payload));\n\nincrement(); // => LOG ABOUT IT 1\nincrement(); // => LOG ABOUT IT 2\nincrement(); // => LOG ABOUT IT 3\nincrement(); // => FAKE RUN EFFECT 4\nincrement(); // => LOG ABOUT IT 5\n")),(0,a.kt)("h2",{id:"condition-source-unitt-if-function-then-unit-else-unit-"},(0,a.kt)("inlineCode",{parentName:"h2"},"condition({ source: Unit, if: Function, then?: Unit, else?: Unit })")),(0,a.kt)("h3",{id:"formulae-2"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"result = condition({\n source,\n if: (payload) => boolean,\n then,\n else,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, call ",(0,a.kt)("inlineCode",{parentName:"li"},"if")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," payload, if it returns ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", otherwise trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," with value from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"result")," is the same unit as ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," allows to nest ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," to another ",(0,a.kt)("inlineCode",{parentName:"li"},"condition")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"sample"))),(0,a.kt)("h3",{id:"arguments-2"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 Data from this unit will be passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," or ",(0,a.kt)("inlineCode",{parentName:"li"},"else")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"if")," ",(0,a.kt)("inlineCode",{parentName:"li"},"((payload: T) => boolean)")," \u2014 Function comparator. It should return boolean"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"else")," is not provided"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"else")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 This unit will be triggered with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$checker")," contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"),". Required if ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," is not provided")),(0,a.kt)("h3",{id:"returns-2"},"Returns"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"(Unit)")," \u2014 The same unit type that passed to ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"example-2"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const change = createEvent();\nconst $source = createStore('data').on(change, (_, payload) => payload);\nconst target = createEvent();\nconst another = createEvent();\n\ncondition({\n source: $source,\n if: (source) => source.length > 3,\n then: target,\n else: another,\n});\ntarget.watch((payload) => console.log('triggered', payload));\nanother.watch((payload) => console.log('condition else:', payload));\n\nchange('newdata');\n// => triggered newdata\n\nchange('old');\n// => condition else: old\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"source-is-event"},"Source is event"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const inputChanged = createEvent();\nconst $value = createStore('');\nconst $error = createStore(false);\n\nconst setError = createEvent();\nconst setValue = createEvent();\n\n$value.on(setValue, (_, value) => value);\n$error.on(setError, () => true).on(setValue, () => false);\n\ncondition({\n source: inputChanged,\n if: isValid,\n then: setValue,\n else: setError,\n});\n\nfunction isValid(value) {\n return value.trim().length > 0;\n}\n")),(0,a.kt)("h3",{id:"condition-can-be-nested"},"Condition can be nested"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $value = createStore('hello@world');\nconst updateEmail = createEvent();\n\ncondition({\n source: $value,\n if: (length) => length > 0,\n then: condition({\n if: (string) => string.includes('@'),\n then: updateEmail,\n }),\n});\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6256d5c3.49478c67.js b/assets/js/6256d5c3.49478c67.js new file mode 100644 index 00000000..ab852b7f --- /dev/null +++ b/assets/js/6256d5c3.49478c67.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[151],{4852:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>k});var r=n(9231);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=r.createContext({}),m=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=m(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),u=m(n),c=i,k=u["".concat(p,".").concat(c)]||u[c]||d[c]||a;return n?r.createElement(k,l(l({ref:t},s),{},{components:n})):r.createElement(k,l({ref:t},s))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,l=new Array(a);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var m=2;m{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>m});var r=n(4011),i=(n(9231),n(4852));const a={},l="interval",o={unversionedId:"interval/readme",id:"interval/readme",title:"interval",description:"patronum 1.7.0",source:"@site/../src/interval/readme.md",sourceDirName:"interval",slug:"/interval/",permalink:"/methods/interval/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/interval/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"inFlight",permalink:"/methods/in-flight/"},next:{title:"not",permalink:"/methods/not/"}},p={},m=[{value:"interval({ timeout, start, stop })",id:"interval-timeout-start-stop-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"@@trigger protocol",id:"trigger-protocol",level:3}],s={toc:m},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"interval"},"interval"),(0,i.kt)("admonition",{title:"since",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { interval } from 'patronum';\n// or\nimport { interval } from 'patronum/interval';\n")),(0,i.kt)("h2",{id:"interval-timeout-start-stop-"},(0,i.kt)("inlineCode",{parentName:"h2"},"interval({ timeout, start, stop })")),(0,i.kt)("h3",{id:"motivation"},"Motivation"),(0,i.kt)("p",null,"Creates a dynamic interval with events to start, stop interval, and handle tick."),(0,i.kt)("h3",{id:"formulae"},"Formulae"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const { tick, isRunning } = interval({\n timeout,\n start,\n stop,\n leading,\n trailing,\n});\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"When ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is triggered, ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," will be ",(0,i.kt)("inlineCode",{parentName:"li"},"triggered")," each ",(0,i.kt)("inlineCode",{parentName:"li"},"timeout")," ms"),(0,i.kt)("li",{parentName:"ul"},"Till ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is triggered, until ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," is triggered, ",(0,i.kt)("inlineCode",{parentName:"li"},"isRunning")," will\nbe ",(0,i.kt)("inlineCode",{parentName:"li"},"true")),(0,i.kt)("li",{parentName:"ul"},"After ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," is triggered ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," won't be triggered, until ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is run\nagain")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(number | Store)")," - timeout for each ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," run"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"start")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Event)")," - start triggering ",(0,i.kt)("inlineCode",{parentName:"li"},"tick"),". Double trigger\nwithout ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," call, do nothing."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"stop")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Event)")," - stop triggering ",(0,i.kt)("inlineCode",{parentName:"li"},"tick"),". Double trigger\nwithout ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," call between them, do nothing."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"leading")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(boolean)")," - Allows running ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," when ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is triggered."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"trailing")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(boolean)")," - Allows running ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," when ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," is triggered, it\nwill be final call of ",(0,i.kt)("inlineCode",{parentName:"li"},"tick"),".")),(0,i.kt)("h3",{id:"returns"},"Returns"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"An ",(0,i.kt)("em",{parentName:"li"},"object")," of event ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," and store ",(0,i.kt)("inlineCode",{parentName:"li"},"isRunning"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"tick")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Event)")," - the store contains ",(0,i.kt)("inlineCode",{parentName:"li"},"false")," until ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is\ntriggered, next until ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," triggered the store will be ",(0,i.kt)("inlineCode",{parentName:"li"},"true"),".")))),(0,i.kt)("h3",{id:"example"},"Example"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent } from 'effector';\nimport { interval } from 'patronum';\n\nconst startCounter = createEvent();\nconst stopCounter = createEvent();\nconst $counter = createStore(0);\n\nconst { tick } = interval({\n timeout: 500,\n start: startCounter,\n stop: stopCounter,\n});\n\n$counter.on(tick, (number) => number + 1);\n$counter.watch((value) => console.log('COUNTER', value));\n\nstartCounter();\n\nsetTimeout(() => stopCounter(), 5000);\n")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://share.effector.dev/EOVzc3df"},"Try it")),(0,i.kt)("h3",{id:"trigger-protocol"},(0,i.kt)("inlineCode",{parentName:"h3"},"@@trigger")," protocol"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"interval")," supports ",(0,i.kt)("a",{parentName:"p",href:"https://withease.pages.dev/protocols/trigger.html"},(0,i.kt)("inlineCode",{parentName:"a"},"@@trigger")," protocol"),". It means that you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," whatever you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"trigger")," with, just do not pass ",(0,i.kt)("inlineCode",{parentName:"p"},"start")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"stop")," options."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { interval } from 'patronum';\n\nsomethingThatRequiresTrigger({\n trigger: interval({ timeout: 1000 }),\n});\n")),(0,i.kt)("p",null,"For example, you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," to refresh data in the Query from the library ",(0,i.kt)("a",{parentName:"p",href:"https://farfetched.pages.dev/tutorial/trigger_api.html#external-triggers"},"Farfetched")," using ",(0,i.kt)("inlineCode",{parentName:"p"},"@@trigger")," protocol."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { keepFresh } from '@farfetched/core';\nimport { interval } from 'patronum';\n\nkeepFresh(someQuery, {\n // \ud83d\udc47 Query will be refreshed each 1000 ms\n triggers: [interval({ timeout: 1000 })],\n});\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6256d5c3.8607788e.js b/assets/js/6256d5c3.8607788e.js deleted file mode 100644 index be2f69ad..00000000 --- a/assets/js/6256d5c3.8607788e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[151],{9613:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>c});var r=n(9496);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=r.createContext({}),m=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=m(e.components);return r.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),d=m(n),c=i,k=d["".concat(p,".").concat(c)]||d[c]||u[c]||a;return n?r.createElement(k,l(l({ref:t},s),{},{components:n})):r.createElement(k,l({ref:t},s))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,l=new Array(a);l[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:i,l[1]=o;for(var m=2;m{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>m});var r=n(2081),i=(n(9496),n(9613));const a={},l="interval",o={unversionedId:"interval/readme",id:"interval/readme",title:"interval",description:"patronum 1.7.0",source:"@site/../src/interval/readme.md",sourceDirName:"interval",slug:"/interval/",permalink:"/methods/interval/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/interval/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"inFlight",permalink:"/methods/in-flight/"},next:{title:"not",permalink:"/methods/not/"}},p={},m=[{value:"interval({ timeout, start, stop })",id:"interval-timeout-start-stop-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"@@trigger protocol",id:"trigger-protocol",level:3}],s={toc:m};function u(e){let{components:t,...n}=e;return(0,i.kt)("wrapper",(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"interval"},"interval"),(0,i.kt)("admonition",{title:"since",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { interval } from 'patronum';\n// or\nimport { interval } from 'patronum/interval';\n")),(0,i.kt)("h2",{id:"interval-timeout-start-stop-"},(0,i.kt)("inlineCode",{parentName:"h2"},"interval({ timeout, start, stop })")),(0,i.kt)("h3",{id:"motivation"},"Motivation"),(0,i.kt)("p",null,"Creates a dynamic interval with events to start, stop interval, and handle tick."),(0,i.kt)("h3",{id:"formulae"},"Formulae"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"const { tick, isRunning } = interval({\n timeout,\n start,\n stop,\n leading,\n trailing,\n});\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"When ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is triggered, ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," will be ",(0,i.kt)("inlineCode",{parentName:"li"},"triggered")," each ",(0,i.kt)("inlineCode",{parentName:"li"},"timeout")," ms"),(0,i.kt)("li",{parentName:"ul"},"Till ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is triggered, until ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," is triggered, ",(0,i.kt)("inlineCode",{parentName:"li"},"isRunning")," will\nbe ",(0,i.kt)("inlineCode",{parentName:"li"},"true")),(0,i.kt)("li",{parentName:"ul"},"After ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," is triggered ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," won't be triggered, until ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is run\nagain")),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(number | Store)")," - timeout for each ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," run"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"start")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Event)")," - start triggering ",(0,i.kt)("inlineCode",{parentName:"li"},"tick"),". Double trigger\nwithout ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," call, do nothing."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"stop")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Event)")," - stop triggering ",(0,i.kt)("inlineCode",{parentName:"li"},"tick"),". Double trigger\nwithout ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," call between them, do nothing."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"leading")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(boolean)")," - Allows running ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," when ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is triggered."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"trailing")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(boolean)")," - Allows running ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," when ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," is triggered, it\nwill be final call of ",(0,i.kt)("inlineCode",{parentName:"li"},"tick"),".")),(0,i.kt)("h3",{id:"returns"},"Returns"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"An ",(0,i.kt)("em",{parentName:"li"},"object")," of event ",(0,i.kt)("inlineCode",{parentName:"li"},"tick")," and store ",(0,i.kt)("inlineCode",{parentName:"li"},"isRunning"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"tick")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Event)")," - the store contains ",(0,i.kt)("inlineCode",{parentName:"li"},"false")," until ",(0,i.kt)("inlineCode",{parentName:"li"},"start")," is\ntriggered, next until ",(0,i.kt)("inlineCode",{parentName:"li"},"stop")," triggered the store will be ",(0,i.kt)("inlineCode",{parentName:"li"},"true"),".")))),(0,i.kt)("h3",{id:"example"},"Example"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent } from 'effector';\nimport { interval } from 'patronum';\n\nconst startCounter = createEvent();\nconst stopCounter = createEvent();\nconst $counter = createStore(0);\n\nconst { tick } = interval({\n timeout: 500,\n start: startCounter,\n stop: stopCounter,\n});\n\n$counter.on(tick, (number) => number + 1);\n$counter.watch((value) => console.log('COUNTER', value));\n\nstartCounter();\n\nsetTimeout(() => stopCounter(), 5000);\n")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://share.effector.dev/EOVzc3df"},"Try it")),(0,i.kt)("h3",{id:"trigger-protocol"},(0,i.kt)("inlineCode",{parentName:"h3"},"@@trigger")," protocol"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"interval")," supports ",(0,i.kt)("a",{parentName:"p",href:"https://withease.pages.dev/protocols/trigger.html"},(0,i.kt)("inlineCode",{parentName:"a"},"@@trigger")," protocol"),". It means that you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," whatever you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"trigger")," with, just do not pass ",(0,i.kt)("inlineCode",{parentName:"p"},"start")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"stop")," options."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { interval } from 'patronum';\n\nsomethingThatRequiresTrigger({\n trigger: interval({ timeout: 1000 }),\n});\n")),(0,i.kt)("p",null,"For example, you can use ",(0,i.kt)("inlineCode",{parentName:"p"},"interval")," to refresh data in the Query from the library ",(0,i.kt)("a",{parentName:"p",href:"https://farfetched.pages.dev/tutorial/trigger_api.html#external-triggers"},"Farfetched")," using ",(0,i.kt)("inlineCode",{parentName:"p"},"@@trigger")," protocol."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { keepFresh } from '@farfetched/core';\nimport { interval } from 'patronum';\n\nkeepFresh(someQuery, {\n // \ud83d\udc47 Query will be refreshed each 1000 ms\n triggers: [interval({ timeout: 1000 })],\n});\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/638.b54116d7.js b/assets/js/638.b54116d7.js new file mode 100644 index 00000000..83df77bb --- /dev/null +++ b/assets/js/638.b54116d7.js @@ -0,0 +1 @@ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[638],{4852:(e,t,n)=>{"use strict";n.d(t,{Zo:()=>u,kt:()=>f});var o=n(9231);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=o.createContext({}),s=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(i.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),m=s(n),p=r,f=m["".concat(i,".").concat(p)]||m[p]||d[p]||a;return n?o.createElement(f,c(c({ref:t},u),{},{components:n})):o.createElement(f,c({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=p;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[m]="string"==typeof e?e:r,c[1]=l;for(var s=2;s{"use strict";n.d(t,{Z:()=>u});var o=n(4011),r=n(9231),a=n(9841),c=n(4428),l=n(4176),i=n(6299);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_Gdrn",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_NKWY"};function u(e){let{as:t,id:n,...u}=e;const{navbar:{hideOnScroll:m}}=(0,l.L)();if("h1"===t||!n)return r.createElement(t,(0,o.Z)({},u,{id:void 0}));const d=(0,c.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return r.createElement(t,(0,o.Z)({},u,{className:(0,a.Z)("anchor",m?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,u.className),id:n}),u.children,r.createElement(i.Z,{className:"hash-link",to:`#${n}`,"aria-label":d,title:d},"\u200b"))}},9996:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ye});var o=n(9231),r=n(4852),a=n(4011),c=n(5070);var l=n(6852),i=n(9841),s=n(9405),u=n(4176);function m(){const{prism:e}=(0,u.L)(),{colorMode:t}=(0,s.I)(),n=e.theme,o=e.darkTheme||n;return"dark"===t?o:n}var d=n(7847),p=n(6494),f=n.n(p);const h=/title=(?["'])(?.*?)\1/,g=/\{(?<range>[\d,-]+)\}/,y={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function v(e,t){const n=e.map((e=>{const{start:n,end:o}=y[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${o})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function b(e,t){let n=e.replace(/\n$/,"");const{language:o,magicComments:r,metastring:a}=t;if(a&&g.test(a)){const e=a.match(g).groups.range;if(0===r.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=r[0].className,o=f()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(o),code:n}}if(void 0===o)return{lineClassNames:{},code:n};const c=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return v(["js","jsBlock"],t);case"jsx":case"tsx":return v(["js","jsBlock","jsx"],t);case"html":return v(["js","jsBlock","html"],t);case"python":case"py":case"bash":return v(["bash"],t);case"markdown":case"md":return v(["html","jsx","bash"],t);default:return v(Object.keys(y),t)}}(o,r),l=n.split("\n"),i=Object.fromEntries(r.map((e=>[e.className,{start:0,range:""}]))),s=Object.fromEntries(r.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),u=Object.fromEntries(r.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),m=Object.fromEntries(r.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let p=0;p<l.length;){const e=l[p].match(c);if(!e){p+=1;continue}const t=e.slice(1).find((e=>void 0!==e));s[t]?i[s[t]].range+=`${p},`:u[t]?i[u[t]].start=p:m[t]&&(i[m[t]].range+=`${i[m[t]].start}-${p-1},`),l.splice(p,1)}n=l.join("\n");const d={};return Object.entries(i).forEach((e=>{let[t,{range:n}]=e;f()(n).forEach((e=>{d[e]??=[],d[e].push(t)}))})),{lineClassNames:d,code:n}}const E={codeBlockContainer:"codeBlockContainer_N84M"};function k(e){let{as:t,...n}=e;const r=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[o,r]=e;const a=t[o];a&&"string"==typeof r&&(n[a]=r)})),n}(m());return o.createElement(t,(0,a.Z)({},n,{style:r,className:(0,i.Z)(n.className,E.codeBlockContainer,d.k.common.codeBlock)}))}const N={codeBlockContent:"codeBlockContent_nxR4",codeBlockTitle:"codeBlockTitle_qqJV",codeBlock:"codeBlock_pCfA",codeBlockStandalone:"codeBlockStandalone_d_GO",codeBlockLines:"codeBlockLines_C3nw",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_g2nt",buttonGroup:"buttonGroup_mXgh"};function C(e){let{children:t,className:n}=e;return o.createElement(k,{as:"pre",tabIndex:0,className:(0,i.Z)(N.codeBlockStandalone,"thin-scrollbar",n)},o.createElement("code",{className:N.codeBlockLines},t))}var L=n(6291);const w={attributes:!0,characterData:!0,childList:!0,subtree:!0};function B(e,t){const[n,r]=(0,o.useState)(),a=(0,o.useCallback)((()=>{r(e.current?.closest("[role=tabpanel][hidden]"))}),[e,r]);(0,o.useEffect)((()=>{a()}),[a]),function(e,t,n){void 0===n&&(n=w);const r=(0,L.zX)(t),a=(0,L.Ql)(n);(0,o.useEffect)((()=>{const t=new MutationObserver(r);return e&&t.observe(e,a),()=>t.disconnect()}),[e,r,a])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const x={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var T={Prism:n(5036).Z,theme:x};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Z.apply(this,arguments)}var j=/\r\n|\r|\n/,H=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},_=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)};function S(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}var A=function(e){function t(){for(var t=this,n=[],o=arguments.length;o--;)n[o]=arguments[o];e.apply(this,n),O(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,o=Object.create(null),r=e.styles.reduce((function(e,n){var o=n.languages,r=n.style;return o&&!o.includes(t)||n.types.forEach((function(t){var n=Z({},e[t],r);e[t]=n})),e}),o);return r.root=n,r.plain=Z({},n,{backgroundColor:null}),r}(e.theme,e.language):void 0;return t.themeDict=n})),O(this,"getLineProps",(function(e){var n=e.key,o=e.className,r=e.style,a=Z({},S(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(a.style=c.plain),void 0!==r&&(a.style=void 0!==a.style?Z({},a.style,r):r),void 0!==n&&(a.key=n),o&&(a.className+=" "+o),a})),O(this,"getStyleForToken",(function(e){var n=e.types,o=e.empty,r=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===r&&"plain"===n[0])return o?{display:"inline-block"}:void 0;if(1===r&&!o)return a[n[0]];var c=o?{display:"inline-block"}:{},l=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[c].concat(l))}})),O(this,"getTokenProps",(function(e){var n=e.key,o=e.className,r=e.style,a=e.token,c=Z({},S(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==r&&(c.style=void 0!==c.style?Z({},c.style,r):r),void 0!==n&&(c.key=n),o&&(c.className+=" "+o),c})),O(this,"tokenize",(function(e,t,n,o){var r={code:t,grammar:n,language:o,tokens:[]};e.hooks.run("before-tokenize",r);var a=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,o=e.code,r=e.children,a=this.getThemeDict(this.props),c=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],o=[0],r=[e.length],a=0,c=0,l=[],i=[l];c>-1;){for(;(a=o[c]++)<r[c];){var s=void 0,u=t[c],m=n[c][a];if("string"==typeof m?(u=c>0?u:["plain"],s=m):(u=_(u,m.type),m.alias&&(u=_(u,m.alias)),s=m.content),"string"==typeof s){var d=s.split(j),p=d.length;l.push({types:u,content:d[0]});for(var f=1;f<p;f++)H(l),i.push(l=[]),l.push({types:u,content:d[f]})}else c++,t.push(u),n.push(s),o.push(0),r.push(s.length)}c--,t.pop(),n.pop(),o.pop(),r.pop()}return H(l),i}(void 0!==c?this.tokenize(t,o,c,n):[o]),className:"prism-code language-"+n,style:void 0!==a?a.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(o.Component);const I=A,z={codeLine:"codeLine_a7vS",codeLineNumber:"codeLineNumber_Vaj9",codeLineContent:"codeLineContent_p_Up"};function P(e){let{line:t,classNames:n,showLineNumbers:r,getLineProps:c,getTokenProps:l}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const s=c({line:t,className:(0,i.Z)(n,r&&z.codeLine)}),u=t.map(((e,t)=>o.createElement("span",(0,a.Z)({key:t},l({token:e,key:t})))));return o.createElement("span",s,r?o.createElement(o.Fragment,null,o.createElement("span",{className:z.codeLineNumber}),o.createElement("span",{className:z.codeLineContent},u)):u,o.createElement("br",null))}var M=n(4428);function D(e){return o.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),o.createElement("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}function R(e){return o.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),o.createElement("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}const W={copyButtonCopied:"copyButtonCopied_EpAB",copyButtonIcons:"copyButtonIcons_XaES",copyButtonIcon:"copyButtonIcon_BCoP",copyButtonSuccessIcon:"copyButtonSuccessIcon_PRrX"};function $(e){let{code:t,className:n}=e;const[r,a]=(0,o.useState)(!1),c=(0,o.useRef)(void 0),l=(0,o.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const o=document.createElement("textarea"),r=document.activeElement;o.value=e,o.setAttribute("readonly",""),o.style.contain="strict",o.style.position="absolute",o.style.left="-9999px",o.style.fontSize="12pt";const a=document.getSelection(),c=a.rangeCount>0&&a.getRangeAt(0);n.append(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}o.remove(),c&&(a.removeAllRanges(),a.addRange(c)),r&&r.focus()}(t),a(!0),c.current=window.setTimeout((()=>{a(!1)}),1e3)}),[t]);return(0,o.useEffect)((()=>()=>window.clearTimeout(c.current)),[]),o.createElement("button",{type:"button","aria-label":r?(0,M.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,M.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,M.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.Z)("clean-btn",n,W.copyButton,r&&W.copyButtonCopied),onClick:l},o.createElement("span",{className:W.copyButtonIcons,"aria-hidden":"true"},o.createElement(D,{className:W.copyButtonIcon}),o.createElement(R,{className:W.copyButtonSuccessIcon})))}function V(e){return o.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),o.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const q={wordWrapButtonIcon:"wordWrapButtonIcon_GNhC",wordWrapButtonEnabled:"wordWrapButtonEnabled_TmB7"};function F(e){let{className:t,onClick:n,isEnabled:r}=e;const a=(0,M.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return o.createElement("button",{type:"button",onClick:n,className:(0,i.Z)("clean-btn",t,r&&q.wordWrapButtonEnabled),"aria-label":a,title:a},o.createElement(V,{className:q.wordWrapButtonIcon,"aria-hidden":"true"}))}function G(e){let{children:t,className:n="",metastring:r,title:c,showLineNumbers:l,language:s}=e;const{prism:{defaultLanguage:d,magicComments:p}}=(0,u.L)(),f=s??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??d,g=m(),y=function(){const[e,t]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1),a=(0,o.useRef)(null),c=(0,o.useCallback)((()=>{const n=a.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[a,e]),l=(0,o.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=a.current,n=e>t||a.current.querySelector("code").hasAttribute("style");r(n)}),[a]);return B(a,l),(0,o.useEffect)((()=>{l()}),[e,l]),(0,o.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:a,isEnabled:e,isCodeScrollable:n,toggle:c}}(),v=function(e){return e?.match(h)?.groups.title??""}(r)||c,{lineClassNames:E,code:C}=b(t,{metastring:r,language:f,magicComments:p}),L=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(r);return o.createElement(k,{as:"div",className:(0,i.Z)(n,f&&!n.includes(`language-${f}`)&&`language-${f}`)},v&&o.createElement("div",{className:N.codeBlockTitle},v),o.createElement("div",{className:N.codeBlockContent},o.createElement(I,(0,a.Z)({},T,{theme:g,code:C,language:f??"text"}),(e=>{let{className:t,tokens:n,getLineProps:r,getTokenProps:a}=e;return o.createElement("pre",{tabIndex:0,ref:y.codeBlockRef,className:(0,i.Z)(t,N.codeBlock,"thin-scrollbar")},o.createElement("code",{className:(0,i.Z)(N.codeBlockLines,L&&N.codeBlockLinesWithNumbering)},n.map(((e,t)=>o.createElement(P,{key:t,line:e,getLineProps:r,getTokenProps:a,classNames:E[t],showLineNumbers:L})))))})),o.createElement("div",{className:N.buttonGroup},(y.isEnabled||y.isCodeScrollable)&&o.createElement(F,{className:N.codeButton,onClick:()=>y.toggle(),isEnabled:y.isEnabled}),o.createElement($,{className:N.codeButton,code:C}))))}function U(e){let{children:t,...n}=e;const r=(0,l.Z)(),c=function(e){return o.Children.toArray(e).some((e=>(0,o.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof c?G:C;return o.createElement(i,(0,a.Z)({key:String(r)},n),c)}var X=n(6299);var J=n(3071);const K={details:"details_J6f6",isBrowser:"isBrowser_iidN",collapsibleContent:"collapsibleContent_x598"};function Y(e){return!!e&&("SUMMARY"===e.tagName||Y(e.parentElement))}function Q(e,t){return!!e&&(e===t||Q(e.parentElement,t))}function ee(e){let{summary:t,children:n,...r}=e;const c=(0,l.Z)(),s=(0,o.useRef)(null),{collapsed:u,setCollapsed:m}=(0,J.u)({initialState:!r.open}),[d,p]=(0,o.useState)(r.open),f=o.isValidElement(t)?t:o.createElement("summary",null,t??"Details");return o.createElement("details",(0,a.Z)({},r,{ref:s,open:d,"data-collapsed":u,className:(0,i.Z)(K.details,c&&K.isBrowser,r.className),onMouseDown:e=>{Y(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Y(t)&&Q(t,s.current)&&(e.preventDefault(),u?(m(!1),p(!0)):m(!0))}}),f,o.createElement(J.z,{lazy:!1,collapsed:u,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{m(e),p(!e)}},o.createElement("div",{className:K.collapsibleContent},n)))}const te={details:"details_HIJU"},ne="alert alert--info";function oe(e){let{...t}=e;return o.createElement(ee,(0,a.Z)({},t,{className:(0,i.Z)(ne,te.details,t.className)}))}var re=n(9687);function ae(e){return o.createElement(re.Z,e)}const ce={containsTaskList:"containsTaskList_vkt6"};function le(e){if(void 0!==e)return(0,i.Z)(e,e?.includes("contains-task-list")&&ce.containsTaskList)}const ie={img:"img_zDip"};const se="admonition_q2U6",ue="admonitionHeading_gRWy",me="admonitionIcon_mc_3",de="admonitionContent_Jrgk";const pe={note:{infimaClassName:"secondary",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 14 16"},o.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:o.createElement(M.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 12 16"},o.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:o.createElement(M.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 12 16"},o.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:o.createElement(M.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 14 16"},o.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:o.createElement(M.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 16 16"},o.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:o.createElement(M.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},fe={secondary:"note",important:"info",success:"tip",warning:"danger"};function he(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=o.Children.toArray(e),n=t.find((e=>o.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),r=o.createElement(o.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:r}}(e.children);return{...e,title:e.title??t,children:n}}const ge={head:function(e){const t=o.Children.map(e.children,(e=>o.isValidElement(e)?function(e){if(e.props?.mdxType&&e.props.originalType){const{mdxType:t,originalType:n,...r}=e.props;return o.createElement(e.props.originalType,r)}return e}(e):e));return o.createElement(c.Z,e,t)},code:function(e){const t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return o.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")||(0,o.isValidElement)(e)&&t.includes(e.props?.mdxType)))?o.createElement("code",e):o.createElement(U,e)},a:function(e){return o.createElement(X.Z,e)},pre:function(e){return o.createElement(U,(0,o.isValidElement)(e.children)&&"code"===e.children.props?.originalType?e.children.props:{...e})},details:function(e){const t=o.Children.toArray(e.children),n=t.find((e=>o.isValidElement(e)&&"summary"===e.props?.mdxType)),r=o.createElement(o.Fragment,null,t.filter((e=>e!==n)));return o.createElement(oe,(0,a.Z)({},e,{summary:n}),r)},ul:function(e){return o.createElement("ul",(0,a.Z)({},e,{className:le(e.className)}))},img:function(e){return o.createElement("img",(0,a.Z)({loading:"lazy"},e,{className:(t=e.className,(0,i.Z)(t,ie.img))}));var t},h1:e=>o.createElement(ae,(0,a.Z)({as:"h1"},e)),h2:e=>o.createElement(ae,(0,a.Z)({as:"h2"},e)),h3:e=>o.createElement(ae,(0,a.Z)({as:"h3"},e)),h4:e=>o.createElement(ae,(0,a.Z)({as:"h4"},e)),h5:e=>o.createElement(ae,(0,a.Z)({as:"h5"},e)),h6:e=>o.createElement(ae,(0,a.Z)({as:"h6"},e)),admonition:function(e){const{children:t,type:n,title:r,icon:a}=he(e),c=function(e){const t=fe[e]??e,n=pe[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),pe.info)}(n),l=r??c.label,{iconComponent:s}=c,u=a??o.createElement(s,null);return o.createElement("div",{className:(0,i.Z)(d.k.common.admonition,d.k.common.admonitionType(e.type),"alert",`alert--${c.infimaClassName}`,se)},o.createElement("div",{className:ue},o.createElement("span",{className:me},u),l),o.createElement("div",{className:de},t))},mermaid:()=>null};function ye(e){let{children:t}=e;return o.createElement(r.Zo,{components:ge},t)}},7645:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(4011),r=n(9231),a=n(9841),c=n(3707);const l={tableOfContents:"tableOfContents_TE6K",docItemContainer:"docItemContainer_DDqM"},i="table-of-contents__link toc-highlight",s="table-of-contents__link--active";function u(e){let{className:t,...n}=e;return r.createElement("div",{className:(0,a.Z)(l.tableOfContents,"thin-scrollbar",t)},r.createElement(c.Z,(0,o.Z)({},n,{linkClassName:i,linkActiveClassName:s})))}},3707:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var o=n(4011),r=n(9231),a=n(4176);function c(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const o=n.slice(2,e.level);e.parentIndex=Math.max(...o),n[e.level]=t}));const o=[];return t.forEach((e=>{const{parentIndex:n,...r}=e;n>=0?t[n].children.push(r):o.push(r)})),o}function l(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return t.flatMap((e=>{const t=l({toc:e.children,minHeadingLevel:n,maxHeadingLevel:o});return function(e){return e.level>=n&&e.level<=o}(e)?[{...e,children:t}]:t}))}function i(e){const t=e.getBoundingClientRect();return t.top===t.bottom?i(e.parentNode):t}function s(e,t){let{anchorTopOffset:n}=t;const o=e.find((e=>i(e).top>=n));if(o){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(i(o))?o:e[e.indexOf(o)-1]??null}return e[e.length-1]??null}function u(){const e=(0,r.useRef)(0),{navbar:{hideOnScroll:t}}=(0,a.L)();return(0,r.useEffect)((()=>{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function m(e){const t=(0,r.useRef)(void 0),n=u();(0,r.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:o,linkActiveClassName:r,minHeadingLevel:a,maxHeadingLevel:c}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(o),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const o=[];for(let r=t;r<=n;r+=1)o.push(`h${r}.anchor`);return Array.from(document.querySelectorAll(o.join()))}({minHeadingLevel:a,maxHeadingLevel:c}),i=s(l,{anchorTopOffset:n.current}),u=e.find((e=>i&&i.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(r),e.classList.add(r),t.current=e):e.classList.remove(r)}(e,e===u)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])}function d(e){let{toc:t,className:n,linkClassName:o,isChild:a}=e;return t.length?r.createElement("ul",{className:a?void 0:n},t.map((e=>r.createElement("li",{key:e.id},r.createElement("a",{href:`#${e.id}`,className:o??void 0,dangerouslySetInnerHTML:{__html:e.value}}),r.createElement(d,{isChild:!0,toc:e.children,className:n,linkClassName:o}))))):null}const p=r.memo(d);function f(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:i="table-of-contents__link",linkActiveClassName:s,minHeadingLevel:u,maxHeadingLevel:d,...f}=e;const h=(0,a.L)(),g=u??h.tableOfContents.minHeadingLevel,y=d??h.tableOfContents.maxHeadingLevel,v=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return(0,r.useMemo)((()=>l({toc:c(t),minHeadingLevel:n,maxHeadingLevel:o})),[t,n,o])}({toc:t,minHeadingLevel:g,maxHeadingLevel:y});return m((0,r.useMemo)((()=>{if(i&&s)return{linkClassName:i,linkActiveClassName:s,minHeadingLevel:g,maxHeadingLevel:y}}),[i,s,g,y])),r.createElement(p,(0,o.Z)({toc:v,className:n,linkClassName:i},f))}},6494:(e,t)=>{function n(e){let t,n=[];for(let o of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(o))n.push(parseInt(o,10));else if(t=o.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,o,r,a]=t;if(o&&a){o=parseInt(o),a=parseInt(a);const e=o<a?1:-1;"-"!==r&&".."!==r&&"\u2025"!==r||(a+=e);for(let t=o;t!==a;t+=e)n.push(t)}}return n}t.default=n,e.exports=n}}]); \ No newline at end of file diff --git a/assets/js/183.fbf1cbae.js b/assets/js/654.d636b64d.js similarity index 59% rename from assets/js/183.fbf1cbae.js rename to assets/js/654.d636b64d.js index 0b97521f..830d2eca 100644 --- a/assets/js/183.fbf1cbae.js +++ b/assets/js/654.d636b64d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[183],{9183:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[654],{6654:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file diff --git a/assets/js/67c026b6.3a469de0.js b/assets/js/67c026b6.3a469de0.js deleted file mode 100644 index 1731799b..00000000 --- a/assets/js/67c026b6.3a469de0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[873],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var a=n(9496);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=o,f=d["".concat(s,".").concat(m)]||d[m]||u[m]||r;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var p=2;p<r;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},691:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var a=n(2081),o=(n(9496),n(9613));const r={},i="debug",l={unversionedId:"debug/readme",id:"debug/readme",title:"debug",description:"It is helpful to debug your application's logic.",source:"@site/../src/debug/readme.md",sourceDirName:"debug",slug:"/debug/",permalink:"/methods/debug/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/debug/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"debounce",permalink:"/methods/debounce/"},next:{title:"delay",permalink:"/methods/delay/"}},s={},p=[{value:"Motivation",id:"motivation",level:2},{value:"Example",id:"example",level:2},{value:"Traces",id:"traces",level:2},{value:"Custom names",id:"custom-names",level:2},{value:"Fork API and Scope",id:"fork-api-and-scope",level:2},{value:"Scope registration",id:"scope-registration",level:3},{value:"Initial store state",id:"initial-store-state",level:3},{value:"Customization",id:"customization",level:2},{value:"Custom handler",id:"custom-handler",level:3}],c={toc:p};function u(e){let{components:t,...n}=e;return(0,o.kt)("wrapper",(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"debug"},"debug"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { debug } from 'patronum';\n// or\nimport { debug } from 'patronum/debug';\n")),(0,o.kt)("p",null,"It is helpful to debug your application's logic."),(0,o.kt)("p",null,"Just pass any effector's unit to ",(0,o.kt)("inlineCode",{parentName:"p"},"debug"),"."),(0,o.kt)("h2",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"Sometimes during development, it is necessary to display the value of the stores and payload of events, each time you write ",(0,o.kt)("inlineCode",{parentName:"p"},"console.log")," inside ",(0,o.kt)("inlineCode",{parentName:"p"},".watch")," and copy/paste it is unpleasant. ",(0,o.kt)("inlineCode",{parentName:"p"},"debug")," allows you to speed up this process a lot by passing all the necessary units for a debugging into a method arguments."),(0,o.kt)("h2",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent, createEffect } from 'effector';\nimport { debug } from 'patronum/debug';\n\nconst event = createEvent();\nconst effect = createEffect().use((payload) => Promise.resolve('result' + payload));\nconst $store = createStore(0)\n .on(event, (state, value) => state + value)\n .on(effect.done, (state) => state * 10);\n\ndebug($store, event, effect);\n\nevent(5);\neffect('demo');\n\n// => [store] $store 1\n// => [event] event 5\n// => [store] $store 6\n// => [effect] effect demo\n// => [effect] effect.done {\"params\":\"demo\", \"result\": \"resultdemo\"}\n// => [store] $store 60\n")),(0,o.kt)("h2",{id:"traces"},"Traces"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 1.9.0")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"patronum/debug")," supports computation traces logging, if ",(0,o.kt)("inlineCode",{parentName:"p"},"{ trace: true }")," is set.\nIt is recommended to use this feature along with ",(0,o.kt)("inlineCode",{parentName:"p"},"effector/babel-plugin"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'const inputChanged = createEvent();\nconst $form = createStore(0).on(inputChanged, (s) => s + 1);\n\ndebug({ trace: true }, $form, submitFx);\n\ninputChanged();\n\n// "[store] $form 0",\n// "[store] $form 1",\n// "[store] $form trace",\n// "<- [store] $form 1",\n// "<- [$form.on] $form.on(inputChanged) 1",\n// "<- [event] inputChanged ",\n')),(0,o.kt)("h2",{id:"custom-names"},"Custom names"),(0,o.kt)("p",null,"Sometimes unit name in specific context may be different from the one it was initially created with.\ne.g., an unit may be exported under an alias for explicitness:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export const $productsListVisible = productsPageModel.$open;\nconst productAdded = createEvent();\n\ndebug($productsListVisible, productAdded);\n// or\ndebug({ trace: true }, $productsListVisible, productAdded);\n")),(0,o.kt)("p",null,"In this case, because of ",(0,o.kt)("inlineCode",{parentName:"p"},"effector/babel-plugin")," which provided ",(0,o.kt)("inlineCode",{parentName:"p"},"productsPageModel.$open")," store its name at the moment of its creation, public name in the ",(0,o.kt)("inlineCode",{parentName:"p"},"debug")," logs will be ",(0,o.kt)("inlineCode",{parentName:"p"},"$open")," instead of ",(0,o.kt)("inlineCode",{parentName:"p"},"$productsListVisible"),"."),(0,o.kt)("p",null,"It can be fixed with custom name, which can be provided by using ",(0,o.kt)("inlineCode",{parentName:"p"},"Record<string, Unit>")," instead of a list of units:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export const $productsListVisible = productsPageModel.$open;\nconst productAdded = createEvent();\n\ndebug({ $productsListVisible, customEventName: productAdded });\n// or\ndebug({ trace: true }, { $productsListVisible, customEventName: productAdded });\n")),(0,o.kt)("p",null,"This way ",(0,o.kt)("inlineCode",{parentName:"p"},"$productsListVisible")," name in the logs will be the same, as the one which was provided to ",(0,o.kt)("inlineCode",{parentName:"p"},"debug"),". The ",(0,o.kt)("inlineCode",{parentName:"p"},"productAdded")," event will be named ",(0,o.kt)("inlineCode",{parentName:"p"},"customEventName"),"."),(0,o.kt)("h2",{id:"fork-api-and-scope"},"Fork API and Scope"),(0,o.kt)("p",null,'Effector can run multiple "instances" of the app simultaniosly via Fork API - it is useful for tests and SSR. Usually you would also use scope on the client in the case of SSR. ',(0,o.kt)("inlineCode",{parentName:"p"},"debug"),' will log "scoped" updates in such case:'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'const up = createEvent();\nconst $count = createStore(0).on(up, (s) => s + 1);\nconst fx = createEffect(() => {});\nsample({\n clock: $count,\n target: fx,\n});\n\ndebug(fx);\n\nconst scopeA = fork();\n\nawait allSettled(up, { scope: scopeA });\n\n// "[effect] (scope: unknown_scope_3) fx 1",\n// "[effect] (scope: unknown_scope_3) fx.done {\\\\"params\\\\":1}",\n')),(0,o.kt)("p",null,"By default detected scope will be given default name."),(0,o.kt)("h3",{id:"scope-registration"},"Scope registration"),(0,o.kt)("p",null,"It is possible to explicitly register scope with given name to have a more explicit logs."),(0,o.kt)("p",null,"It can work like this:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const scope = fork({ values: window.__SSR_VALUES__ });\n\n// this way we can commit this to our repo and be sure,\n// that bundler will cut this out of production bundle\nif (process.env.NODE_ENV === 'development') {\n debug.registerScope(scope, { name: 'my_client_scope' });\n}\n")),(0,o.kt)("p",null,"This way scope will be given explicit name in the logs."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'// "[effect] (scope: my_client_scope) fx 1",\n// "[effect] (scope: my_client_scope) fx.done {\\\\"params\\\\":1}",\n')),(0,o.kt)("p",null,"It is also possible to unregister scope to prevent memory leak, if scope is no longer needed:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const unregister = debug.registerScope(scope, { name: `my_scope` });\n\nunregister();\n")),(0,o.kt)("p",null,"Or unregister all scopes at once:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"debug.unregisterAllScopes();\n")),(0,o.kt)("h3",{id:"initial-store-state"},"Initial store state"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"debug($store)")," always immediatly prints current state of the store, but this state can be different in different scopes.\nIt is recommened to register scopes explicitly, since ",(0,o.kt)("inlineCode",{parentName:"p"},"debug")," will print current state of the store in every known scope:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'const $count = createStore(0);\n\nconst scopeA = fork({\n values: [[$count, 42]],\n});\nconst scopeB = fork({\n values: [[$count, 1337]],\n});\n\ndebug.registerScope(scopeA, { name: \'scope_42\' });\ndebug.registerScope(scopeB, { name: \'scope_1337\' });\n\ndebug($count);\n\n// "[store] $count 0",\n// "[store] (scope: scope_42) $count 42",\n// "[store] (scope: scope_1337) $count 1337",\n')),(0,o.kt)("h2",{id:"customization"},"Customization"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"patronum/debug")," package extracts quite a lot of low-level effector data in a universal format that may be useful for other dev tools or monitoring tools, so there is a special API to add your own way of handling this data."),(0,o.kt)("h3",{id:"custom-handler"},"Custom handler"),(0,o.kt)("p",null,"You can provide custom log handler in the config. It can be useful, if ",(0,o.kt)("inlineCode",{parentName:"p"},"console.info")," somehow doesn't fit your use-case: e.g. you want advanced info from ",(0,o.kt)("inlineCode",{parentName:"p"},"patronum/debug")," to built your own dev-tools, debug especially hard case, etc."),(0,o.kt)("p",null,"Handler is called for each update with context object like this:"),(0,o.kt)("p",null,"Common fields:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"logType")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"initial | update")," - log type for convenience. All provided stores current values are logged with ",(0,o.kt)("inlineCode",{parentName:"li"},"initial")," for all known scopes right away. Same after new scope was registered. All other updates are of ",(0,o.kt)("inlineCode",{parentName:"li"},"update")," type."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"scope")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"Scope | null")," - effector's ",(0,o.kt)("inlineCode",{parentName:"li"},"Scope")," context object, which owns this particular update"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"scopeName")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"string | null")," - name of the ",(0,o.kt)("inlineCode",{parentName:"li"},"Scope"),", if registered and ",(0,o.kt)("inlineCode",{parentName:"li"},"null")," otherwise."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"node")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"Node")," - effector's internal node, which update is being logged."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"name")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"string | null")," - node's name for convenience. ",(0,o.kt)("inlineCode",{parentName:"li"},"null")," - if node doesn't have own name (like ",(0,o.kt)("inlineCode",{parentName:"li"},"sample")," calls)."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"kind")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"string")," - node's kind for convenience. It can be unit's kind (e.g. ",(0,o.kt)("inlineCode",{parentName:"li"},"store")," or ",(0,o.kt)("inlineCode",{parentName:"li"},"event"),") or operation kind (e.g. ",(0,o.kt)("inlineCode",{parentName:"li"},"sample"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"split"),", etc)."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"value")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"unknown")," - value of the update."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"loc")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"{ file?: string; line: number; column: number; }")," - location in the source code, if known"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"stackMeta")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"{ Record<string, unknown> }")," - effector's internal stack metadata, available if provided. For example, effect calls provide an ",(0,o.kt)("inlineCode",{parentName:"li"},"fxID")," that is stable between ",(0,o.kt)("inlineCode",{parentName:"li"},"fx")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"fx.finally")," updates - this allows you to associate a ",(0,o.kt)("inlineCode",{parentName:"li"},"fx.finally")," update with a particular ",(0,o.kt)("inlineCode",{parentName:"li"},"fx")," call (available since ",(0,o.kt)("strong",{parentName:"li"},(0,o.kt)("a",{parentName:"strong",href:"mailto:effector@22.5.0"},"effector@22.5.0")),")")),(0,o.kt)("p",null,"Special field if ",(0,o.kt)("inlineCode",{parentName:"p"},"trace: true")," provided:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"trace")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"Array<{ node: Node; name: string | null; kind: string; value: unknown; loc?: Loc; stackMeta?: Record<string, unknown> }>")," - trace of updates.")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"trace")," array is always empty (i.e. trace is not collected), if ",(0,o.kt)("inlineCode",{parentName:"p"},"debug"),"'s config does not have ",(0,o.kt)("inlineCode",{parentName:"p"},"trace: true"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"debug(\n {\n trace: true,\n // custom log handler\n handler: ({ trace, scope, scopeName, node, value, name, kind }) => {\n // your own way to log updates\n doStuff(node, value);\n\n if (trace) {\n // log trace part\n trace.forEach(({ name, kind, node, value }) => doStuff(node, value));\n }\n },\n },\n { $a, $b, c },\n);\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/67c026b6.8e6669d1.js b/assets/js/67c026b6.8e6669d1.js new file mode 100644 index 00000000..9181792e --- /dev/null +++ b/assets/js/67c026b6.8e6669d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[873],{4852:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(9231);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),m=o,f=u["".concat(s,".").concat(m)]||u[m]||d[m]||r;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var p=2;p<r;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},3408:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var a=n(4011),o=(n(9231),n(4852));const r={},i="debug",l={unversionedId:"debug/readme",id:"debug/readme",title:"debug",description:"It is helpful to debug your application's logic.",source:"@site/../src/debug/readme.md",sourceDirName:"debug",slug:"/debug/",permalink:"/methods/debug/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/debug/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"debounce",permalink:"/methods/debounce/"},next:{title:"delay",permalink:"/methods/delay/"}},s={},p=[{value:"Motivation",id:"motivation",level:2},{value:"Example",id:"example",level:2},{value:"Traces",id:"traces",level:2},{value:"Custom names",id:"custom-names",level:2},{value:"Fork API and Scope",id:"fork-api-and-scope",level:2},{value:"Scope registration",id:"scope-registration",level:3},{value:"Initial store state",id:"initial-store-state",level:3},{value:"Customization",id:"customization",level:2},{value:"Custom handler",id:"custom-handler",level:3}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"debug"},"debug"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { debug } from 'patronum';\n// or\nimport { debug } from 'patronum/debug';\n")),(0,o.kt)("p",null,"It is helpful to debug your application's logic."),(0,o.kt)("p",null,"Just pass any effector's unit to ",(0,o.kt)("inlineCode",{parentName:"p"},"debug"),"."),(0,o.kt)("h2",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"Sometimes during development, it is necessary to display the value of the stores and payload of events, each time you write ",(0,o.kt)("inlineCode",{parentName:"p"},"console.log")," inside ",(0,o.kt)("inlineCode",{parentName:"p"},".watch")," and copy/paste it is unpleasant. ",(0,o.kt)("inlineCode",{parentName:"p"},"debug")," allows you to speed up this process a lot by passing all the necessary units for a debugging into a method arguments."),(0,o.kt)("h2",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent, createEffect } from 'effector';\nimport { debug } from 'patronum/debug';\n\nconst event = createEvent();\nconst effect = createEffect().use((payload) => Promise.resolve('result' + payload));\nconst $store = createStore(0)\n .on(event, (state, value) => state + value)\n .on(effect.done, (state) => state * 10);\n\ndebug($store, event, effect);\n\nevent(5);\neffect('demo');\n\n// => [store] $store 1\n// => [event] event 5\n// => [store] $store 6\n// => [effect] effect demo\n// => [effect] effect.done {\"params\":\"demo\", \"result\": \"resultdemo\"}\n// => [store] $store 60\n")),(0,o.kt)("h2",{id:"traces"},"Traces"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 1.9.0")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"patronum/debug")," supports computation traces logging, if ",(0,o.kt)("inlineCode",{parentName:"p"},"{ trace: true }")," is set.\nIt is recommended to use this feature along with ",(0,o.kt)("inlineCode",{parentName:"p"},"effector/babel-plugin"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'const inputChanged = createEvent();\nconst $form = createStore(0).on(inputChanged, (s) => s + 1);\n\ndebug({ trace: true }, $form, submitFx);\n\ninputChanged();\n\n// "[store] $form 0",\n// "[store] $form 1",\n// "[store] $form trace",\n// "<- [store] $form 1",\n// "<- [$form.on] $form.on(inputChanged) 1",\n// "<- [event] inputChanged ",\n')),(0,o.kt)("h2",{id:"custom-names"},"Custom names"),(0,o.kt)("p",null,"Sometimes unit name in specific context may be different from the one it was initially created with.\ne.g., an unit may be exported under an alias for explicitness:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export const $productsListVisible = productsPageModel.$open;\nconst productAdded = createEvent();\n\ndebug($productsListVisible, productAdded);\n// or\ndebug({ trace: true }, $productsListVisible, productAdded);\n")),(0,o.kt)("p",null,"In this case, because of ",(0,o.kt)("inlineCode",{parentName:"p"},"effector/babel-plugin")," which provided ",(0,o.kt)("inlineCode",{parentName:"p"},"productsPageModel.$open")," store its name at the moment of its creation, public name in the ",(0,o.kt)("inlineCode",{parentName:"p"},"debug")," logs will be ",(0,o.kt)("inlineCode",{parentName:"p"},"$open")," instead of ",(0,o.kt)("inlineCode",{parentName:"p"},"$productsListVisible"),"."),(0,o.kt)("p",null,"It can be fixed with custom name, which can be provided by using ",(0,o.kt)("inlineCode",{parentName:"p"},"Record<string, Unit>")," instead of a list of units:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"export const $productsListVisible = productsPageModel.$open;\nconst productAdded = createEvent();\n\ndebug({ $productsListVisible, customEventName: productAdded });\n// or\ndebug({ trace: true }, { $productsListVisible, customEventName: productAdded });\n")),(0,o.kt)("p",null,"This way ",(0,o.kt)("inlineCode",{parentName:"p"},"$productsListVisible")," name in the logs will be the same, as the one which was provided to ",(0,o.kt)("inlineCode",{parentName:"p"},"debug"),". The ",(0,o.kt)("inlineCode",{parentName:"p"},"productAdded")," event will be named ",(0,o.kt)("inlineCode",{parentName:"p"},"customEventName"),"."),(0,o.kt)("h2",{id:"fork-api-and-scope"},"Fork API and Scope"),(0,o.kt)("p",null,'Effector can run multiple "instances" of the app simultaniosly via Fork API - it is useful for tests and SSR. Usually you would also use scope on the client in the case of SSR. ',(0,o.kt)("inlineCode",{parentName:"p"},"debug"),' will log "scoped" updates in such case:'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'const up = createEvent();\nconst $count = createStore(0).on(up, (s) => s + 1);\nconst fx = createEffect(() => {});\nsample({\n clock: $count,\n target: fx,\n});\n\ndebug(fx);\n\nconst scopeA = fork();\n\nawait allSettled(up, { scope: scopeA });\n\n// "[effect] (scope: unknown_scope_3) fx 1",\n// "[effect] (scope: unknown_scope_3) fx.done {\\\\"params\\\\":1}",\n')),(0,o.kt)("p",null,"By default detected scope will be given default name."),(0,o.kt)("h3",{id:"scope-registration"},"Scope registration"),(0,o.kt)("p",null,"It is possible to explicitly register scope with given name to have a more explicit logs."),(0,o.kt)("p",null,"It can work like this:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const scope = fork({ values: window.__SSR_VALUES__ });\n\n// this way we can commit this to our repo and be sure,\n// that bundler will cut this out of production bundle\nif (process.env.NODE_ENV === 'development') {\n debug.registerScope(scope, { name: 'my_client_scope' });\n}\n")),(0,o.kt)("p",null,"This way scope will be given explicit name in the logs."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'// "[effect] (scope: my_client_scope) fx 1",\n// "[effect] (scope: my_client_scope) fx.done {\\\\"params\\\\":1}",\n')),(0,o.kt)("p",null,"It is also possible to unregister scope to prevent memory leak, if scope is no longer needed:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const unregister = debug.registerScope(scope, { name: `my_scope` });\n\nunregister();\n")),(0,o.kt)("p",null,"Or unregister all scopes at once:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"debug.unregisterAllScopes();\n")),(0,o.kt)("h3",{id:"initial-store-state"},"Initial store state"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"debug($store)")," always immediatly prints current state of the store, but this state can be different in different scopes.\nIt is recommened to register scopes explicitly, since ",(0,o.kt)("inlineCode",{parentName:"p"},"debug")," will print current state of the store in every known scope:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},'const $count = createStore(0);\n\nconst scopeA = fork({\n values: [[$count, 42]],\n});\nconst scopeB = fork({\n values: [[$count, 1337]],\n});\n\ndebug.registerScope(scopeA, { name: \'scope_42\' });\ndebug.registerScope(scopeB, { name: \'scope_1337\' });\n\ndebug($count);\n\n// "[store] $count 0",\n// "[store] (scope: scope_42) $count 42",\n// "[store] (scope: scope_1337) $count 1337",\n')),(0,o.kt)("h2",{id:"customization"},"Customization"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"patronum/debug")," package extracts quite a lot of low-level effector data in a universal format that may be useful for other dev tools or monitoring tools, so there is a special API to add your own way of handling this data."),(0,o.kt)("h3",{id:"custom-handler"},"Custom handler"),(0,o.kt)("p",null,"You can provide custom log handler in the config. It can be useful, if ",(0,o.kt)("inlineCode",{parentName:"p"},"console.info")," somehow doesn't fit your use-case: e.g. you want advanced info from ",(0,o.kt)("inlineCode",{parentName:"p"},"patronum/debug")," to built your own dev-tools, debug especially hard case, etc."),(0,o.kt)("p",null,"Handler is called for each update with context object like this:"),(0,o.kt)("p",null,"Common fields:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"logType")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"initial | update")," - log type for convenience. All provided stores current values are logged with ",(0,o.kt)("inlineCode",{parentName:"li"},"initial")," for all known scopes right away. Same after new scope was registered. All other updates are of ",(0,o.kt)("inlineCode",{parentName:"li"},"update")," type."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"scope")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"Scope | null")," - effector's ",(0,o.kt)("inlineCode",{parentName:"li"},"Scope")," context object, which owns this particular update"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"scopeName")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"string | null")," - name of the ",(0,o.kt)("inlineCode",{parentName:"li"},"Scope"),", if registered and ",(0,o.kt)("inlineCode",{parentName:"li"},"null")," otherwise."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"node")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"Node")," - effector's internal node, which update is being logged."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"name")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"string | null")," - node's name for convenience. ",(0,o.kt)("inlineCode",{parentName:"li"},"null")," - if node doesn't have own name (like ",(0,o.kt)("inlineCode",{parentName:"li"},"sample")," calls)."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"kind")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"string")," - node's kind for convenience. It can be unit's kind (e.g. ",(0,o.kt)("inlineCode",{parentName:"li"},"store")," or ",(0,o.kt)("inlineCode",{parentName:"li"},"event"),") or operation kind (e.g. ",(0,o.kt)("inlineCode",{parentName:"li"},"sample"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"split"),", etc)."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"value")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"unknown")," - value of the update."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"loc")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"{ file?: string; line: number; column: number; }")," - location in the source code, if known"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"stackMeta")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"{ Record<string, unknown> }")," - effector's internal stack metadata, available if provided. For example, effect calls provide an ",(0,o.kt)("inlineCode",{parentName:"li"},"fxID")," that is stable between ",(0,o.kt)("inlineCode",{parentName:"li"},"fx")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"fx.finally")," updates - this allows you to associate a ",(0,o.kt)("inlineCode",{parentName:"li"},"fx.finally")," update with a particular ",(0,o.kt)("inlineCode",{parentName:"li"},"fx")," call (available since ",(0,o.kt)("strong",{parentName:"li"},(0,o.kt)("a",{parentName:"strong",href:"mailto:effector@22.5.0"},"effector@22.5.0")),")")),(0,o.kt)("p",null,"Special field if ",(0,o.kt)("inlineCode",{parentName:"p"},"trace: true")," provided:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"trace")," - ",(0,o.kt)("inlineCode",{parentName:"li"},"Array<{ node: Node; name: string | null; kind: string; value: unknown; loc?: Loc; stackMeta?: Record<string, unknown> }>")," - trace of updates.")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"trace")," array is always empty (i.e. trace is not collected), if ",(0,o.kt)("inlineCode",{parentName:"p"},"debug"),"'s config does not have ",(0,o.kt)("inlineCode",{parentName:"p"},"trace: true"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"debug(\n {\n trace: true,\n // custom log handler\n handler: ({ trace, scope, scopeName, node, value, name, kind }) => {\n // your own way to log updates\n doStuff(node, value);\n\n if (trace) {\n // log trace part\n trace.forEach(({ name, kind, node, value }) => doStuff(node, value));\n }\n },\n },\n { $a, $b, c },\n);\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7921cf10.f96dc439.js b/assets/js/7921cf10.f96dc439.js new file mode 100644 index 00000000..fd1ae1e6 --- /dev/null +++ b/assets/js/7921cf10.f96dc439.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[662],{4852:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(9231);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,u=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(r),d=o,f=c["".concat(u,".").concat(d)]||c[d]||m[d]||a;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[c]="string"==typeof e?e:o,i[1]=l;for(var s=2;s<a;s++)i[s]=r[s];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},6347:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(4011),o=(r(9231),r(4852));const a={},i="previous",l={unversionedId:"previous/readme",id:"previous/readme",title:"previous",description:"patronum 2.1.0",source:"@site/../src/previous/readme.md",sourceDirName:"previous",slug:"/previous/",permalink:"/methods/previous/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/previous/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"pending",permalink:"/methods/pending/"},next:{title:"reset",permalink:"/methods/reset/"}},u={},s=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3}],p={toc:s},c="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"previous"},"previous"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 2.1.0")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { previous } from 'patronum';\n// or\nimport { previous } from 'patronum/previous-value';\n")),(0,o.kt)("h3",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"The method allows to get previous value of given store. Usually need for analytics"),(0,o.kt)("h3",{id:"formulae"},"Formulae"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"$target = previous($source);\n$target = previous($source, 'initial value');\n")),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"$source")," (","[",(0,o.kt)("em",{parentName:"li"},(0,o.kt)("inlineCode",{parentName:"em"},"Store")),"]",") - source store"),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"defaultValue")," (",(0,o.kt)("em",{parentName:"li"},"optional"),") - default value for ",(0,o.kt)("inlineCode",{parentName:"li"},"$target")," store, if not passed, ",(0,o.kt)("inlineCode",{parentName:"li"},"null")," will be used")),(0,o.kt)("h3",{id:"returns"},"Returns"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"$target")," (","[",(0,o.kt)("em",{parentName:"li"},(0,o.kt)("inlineCode",{parentName:"em"},"Store")),"]",") - new store that contain previous value of ",(0,o.kt)("inlineCode",{parentName:"li"},"$source")," after first update and null or default value (if passed) before that")),(0,o.kt)("h3",{id:"example"},"Example"),(0,o.kt)("p",null,"Push analytics with route transition:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEvent, createEffect, sample } from 'effector';\nimport { previous } from 'patronum';\n\nconst openNewRoute = createEvent<string>();\nconst $currentRoute = createStore('main_page');\nconst $previousRoute = previous($currentRoute);\n\nconst sendRouteTransitionFx = createEffect(async ({ prevRoute, nextRoute }) => {\n console.log(prevRoute, '->', newRoute)\n await fetch(...)\n});\n\nsample({clock: openNewRoute, target: $currentRoute});\n\nsample({\n clock: openNewRoute,\n source: {\n prevRoute: $previousRoute,\n nextRoute: $currentRoute,\n },\n target: sendRouteTransitionFx,\n});\n\nopenNewRoute('messages');\n// main_page -> messages\nopenNewRoute('chats');\n// messages -> chats\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/84071e39.321abdbd.js b/assets/js/84071e39.321abdbd.js new file mode 100644 index 00000000..4bca8bb8 --- /dev/null +++ b/assets/js/84071e39.321abdbd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[231],{4852:(e,n,t)=>{t.d(n,{Zo:()=>d,kt:()=>u});var a=t(9231);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,a,i=function(e,n){if(null==e)return{};var t,a,i={},o=Object.keys(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):r(r({},n),e)),t},d=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},f=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(t),f=i,u=c["".concat(s,".").concat(f)]||c[f]||m[f]||o;return t?a.createElement(u,r(r({ref:n},d),{},{components:t})):a.createElement(u,r({ref:n},d))}));function u(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,r=new Array(o);r[0]=f;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:i,r[1]=l;for(var p=2;p<o;p++)r[p]=t[p];return a.createElement.apply(null,r)}return a.createElement.apply(null,t)}f.displayName="MDXCreateElement"},5504:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var a=t(4011),i=(t(9231),t(4852));const o={},r="pending",l={unversionedId:"pending/readme",id:"pending/readme",title:"pending",description:"pendings(effects)",source:"@site/../src/pending/readme.md",sourceDirName:"pending",slug:"/pending/",permalink:"/methods/pending/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/pending/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"or",permalink:"/methods/or/"},next:{title:"previous",permalink:"/methods/previous/"}},s={},p=[{value:"<code>pendings(effects)</code>",id:"pendingseffects",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>pending({ effects: [] })</code>",id:"pending-effects--",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example: show processing only when all effects are pending",id:"example-show-processing-only-when-all-effects-are-pending",level:3},{value:"<code>pending({ domain })</code>",id:"pending-domain-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Example",id:"example-1",level:3},{value:"Strategy",id:"strategy",level:2},{value:"Example",id:"example-2",level:3}],d={toc:p},c="wrapper";function m(e){let{components:n,...t}=e;return(0,i.kt)(c,(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"pending"},"pending"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { pending } from 'patronum';\n// or\nimport { pending } from 'patronum/pending';\n")),(0,i.kt)("h2",{id:"pendingseffects"},(0,i.kt)("inlineCode",{parentName:"h2"},"pendings(effects)")),(0,i.kt)("admonition",{title:"since",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,i.kt)("inlineCode",{parentName:"p"},"pending({ effects: [] })")," with with patronum < 2.1.0")),(0,i.kt)("h3",{id:"motivation"},"Motivation"),(0,i.kt)("p",null,"This overload allows to read pending state of passed effects. It is usef when\nyou want to show loading state of the whole application."),(0,i.kt)("h3",{id:"formulae"},"Formulae"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"$inProcess = pending([fx1, fx2]);\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"When some of ",(0,i.kt)("inlineCode",{parentName:"li"},"effects")," are in pending state, result will be ",(0,i.kt)("inlineCode",{parentName:"li"},"true"))),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"effects")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Array<Effect<any, any, any>>)")," - array of any effects")),(0,i.kt)("h3",{id:"returns"},"Returns"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"$inProcess")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Store<boolean>)")," - Store with boolean state")),(0,i.kt)("h3",{id:"example"},"Example"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst loadFirstFx = createEffect(() => Promise.resolve(null));\nconst loadSecondFx = createEffect(() => Promise.resolve(2));\nconst $processing = pending([loadFirstFx, loadSecondFx]);\n\n$processing.watch((processing) => console.info(`processing: ${processing}`));\n// => processing: false\n\nloadFirstFx();\nloadSecondFx();\n// => processing: true\n")),(0,i.kt)("h2",{id:"pending-effects--"},(0,i.kt)("inlineCode",{parentName:"h2"},"pending({ effects: [] })")),(0,i.kt)("h3",{id:"motivation-1"},"Motivation"),(0,i.kt)("p",null,"This overload recieves ",(0,i.kt)("inlineCode",{parentName:"p"},"effects")," and optional ",(0,i.kt)("inlineCode",{parentName:"p"},"of")," strategy as an object. Useful when need to change strategy"),(0,i.kt)("h3",{id:"formulae-1"},"Formulae"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"$inProcess = pending({ effects: [fx1, fx2], of: Strategy });\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"When ",(0,i.kt)("inlineCode",{parentName:"li"},"effects")," pending state, result will be ",(0,i.kt)("inlineCode",{parentName:"li"},"true")),(0,i.kt)("li",{parentName:"ul"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"of")," parameter selects strategy")),(0,i.kt)("h3",{id:"arguments-1"},"Arguments"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"effects")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Array<Effect<any, any, any>>)")," - array of any effects"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"of")," ",(0,i.kt)("inlineCode",{parentName:"li"},'("some" | "every")')," \u2014 Optional. Select strategy of combining pendings\nof differents effects. Default ",(0,i.kt)("inlineCode",{parentName:"li"},'"some"'))),(0,i.kt)("admonition",{title:"since",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"The ",(0,i.kt)("inlineCode",{parentName:"p"},"of")," argument was added since patronum 1.1.0")),(0,i.kt)("h3",{id:"returns-1"},"Returns"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"$inProcess")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Store<boolean>)")," - Store with boolean state")),(0,i.kt)("h3",{id:"example-show-processing-only-when-all-effects-are-pending"},"Example: show processing only when all effects are pending"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst loadFirstFx = createEffect(() => Promise.resolve(null));\nconst loadSecondFx = createEffect(() => Promise.resolve(2));\nconst $processing = pending({\n effects: [loadFirstFx, loadSecondFx],\n of: 'every',\n});\n\n$processing.watch((processing) => console.info(`processing: ${processing}`));\n// => processing: false\n\nloadFirstFx();\n// => processing is still false\nloadSecondFx();\n// => processing: true\n")),(0,i.kt)("h2",{id:"pending-domain-"},(0,i.kt)("inlineCode",{parentName:"h2"},"pending({ domain })")),(0,i.kt)("admonition",{title:"since",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"patronum 1.1.0")),(0,i.kt)("h3",{id:"motivation-2"},"Motivation"),(0,i.kt)("p",null,"This overload allows to read pending state of created effects in the domain. It\nis usef when you want to show loading state of the whole application."),(0,i.kt)("h3",{id:"formulae-2"},"Formulae"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"$inProcess = pending({ domain, of: Strategy });\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"When an effect created in the ",(0,i.kt)("inlineCode",{parentName:"li"},"domain")," in pending state, result will be ",(0,i.kt)("inlineCode",{parentName:"li"},"true")),(0,i.kt)("li",{parentName:"ul"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"of")," parameter selects strategy")),(0,i.kt)("h3",{id:"arguments-2"},"Arguments"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"domain")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Domain)")," - Effector domain with at least one effect"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"of")," ",(0,i.kt)("inlineCode",{parentName:"li"},'("some" | "every")')," \u2014 Optional. Select strategy of combining pendings\nof differents effects. Default ",(0,i.kt)("inlineCode",{parentName:"li"},'"some"'))),(0,i.kt)("h3",{id:"returns-2"},"Returns"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"$inProcess")," ",(0,i.kt)("inlineCode",{parentName:"li"},"(Store<boolean>)")," - Store with boolean state")),(0,i.kt)("h3",{id:"example-1"},"Example"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { createDomain } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst app = createDomain();\nconst loadFirstFx = app.createEffect(() => Promise.resolve(null));\nconst loadSecondFx = app.createEffect(() => Promise.resolve(2));\nconst $processing = pending({ domain: app });\n\n$processing.watch((processing) => console.info(`processing: ${processing}`));\n// => processing: false\n\nloadFirstFx();\nloadSecondFx();\n// => processing: true\n")),(0,i.kt)("h2",{id:"strategy"},"Strategy"),(0,i.kt)("p",null,"There available two options:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"some")," \u2014 default strategy when ",(0,i.kt)("inlineCode",{parentName:"li"},"of")," parameter is not provided. At least one\neffect must be in pending state."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"every")," \u2014 each effect must be in pending state.")),(0,i.kt)("h3",{id:"example-2"},"Example"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst loadFirstFx = createEffect(() => Promise.resolve(null));\nconst loadSecondFx = createEffect(() => Promise.resolve(2));\n\nconst $pending = pending({ effects: [loadFirstFx, loadSecondFx], of: 'every' });\n\n// When no effects is loading, $pending will be true\n\n// If only one is loading, also will be false\nloadFirstFx();\n\n// But after running the second effect, $pending will be true\nloadSecondFx();\n\n$pending.watch(console.log); // true\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/84071e39.c7a34779.js b/assets/js/84071e39.c7a34779.js deleted file mode 100644 index 150e6325..00000000 --- a/assets/js/84071e39.c7a34779.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[231],{9613:(e,n,t)=>{t.d(n,{Zo:()=>d,kt:()=>f});var a=t(9496);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},d=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),m=p(t),f=r,u=m["".concat(s,".").concat(f)]||m[f]||c[f]||o;return t?a.createElement(u,i(i({ref:n},d),{},{components:t})):a.createElement(u,i({ref:n},d))}));function f(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=m;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var p=2;p<o;p++)i[p]=t[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,t)}m.displayName="MDXCreateElement"},8806:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var a=t(2081),r=(t(9496),t(9613));const o={},i="pending",l={unversionedId:"pending/readme",id:"pending/readme",title:"pending",description:"pending({ effects: [] })",source:"@site/../src/pending/readme.md",sourceDirName:"pending",slug:"/pending/",permalink:"/methods/pending/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/pending/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"or",permalink:"/methods/or/"},next:{title:"reset",permalink:"/methods/reset/"}},s={},p=[{value:"<code>pending({ effects: [] })</code>",id:"pending-effects--",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>pending({ domain })</code>",id:"pending-domain-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"Strategy",id:"strategy",level:2},{value:"Example",id:"example-2",level:3}],d={toc:p};function c(e){let{components:n,...t}=e;return(0,r.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"pending"},"pending"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { pending } from 'patronum';\n// or\nimport { pending } from 'patronum/pending';\n")),(0,r.kt)("h2",{id:"pending-effects--"},(0,r.kt)("inlineCode",{parentName:"h2"},"pending({ effects: [] })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"This overload allows to read pending state of passed effects. It is usef when\nyou want to show loading state of the whole application."),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$inProcess = pending({ effects: [fx1, fx2], of: Strategy });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effects")," pending state, result will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")),(0,r.kt)("li",{parentName:"ul"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"of")," parameter selects strategy")),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"effects")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array<Effect<any, any, any>>)")," - array of any effects"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"of")," ",(0,r.kt)("inlineCode",{parentName:"li"},'("some" | "every")')," \u2014 Optional. Select strategy of combining pendings\nof differents effects. Default ",(0,r.kt)("inlineCode",{parentName:"li"},'"some"'))),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"The ",(0,r.kt)("inlineCode",{parentName:"p"},"of")," argument was added since patronum 1.1.0")),(0,r.kt)("h3",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$inProcess")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<boolean>)")," - Store with boolean state")),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst loadFirst = createEffect(() => Promise.resolve(null));\nconst loadSecond = createEffect(() => Promise.resolve(2));\nconst $processing = pending({ effects: [loadFirst, loadSecond] });\n\n$processing.watch((processing) => console.info(`processing: ${processing}`));\n// => processing: false\n\nloadFirst();\nloadSecond();\n// => processing: true\n")),(0,r.kt)("h2",{id:"pending-domain-"},(0,r.kt)("inlineCode",{parentName:"h2"},"pending({ domain })")),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"patronum 1.1.0")),(0,r.kt)("h3",{id:"motivation-1"},"Motivation"),(0,r.kt)("p",null,"This overload allows to read pending state of created effects in the domain. It\nis usef when you want to show loading state of the whole application."),(0,r.kt)("h3",{id:"formulae-1"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$inProcess = pending({ domain, of: Strategy });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When an effect created in the ",(0,r.kt)("inlineCode",{parentName:"li"},"domain")," in pending state, result will be ",(0,r.kt)("inlineCode",{parentName:"li"},"true")),(0,r.kt)("li",{parentName:"ul"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"of")," parameter selects strategy")),(0,r.kt)("h3",{id:"arguments-1"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"domain")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Domain)")," - Effector domain with at least one effect"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"of")," ",(0,r.kt)("inlineCode",{parentName:"li"},'("some" | "every")')," \u2014 Optional. Select strategy of combining pendings\nof differents effects. Default ",(0,r.kt)("inlineCode",{parentName:"li"},'"some"'))),(0,r.kt)("h3",{id:"returns-1"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$inProcess")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<boolean>)")," - Store with boolean state")),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createDomain } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst app = createDomain();\nconst loadFirst = app.createEffect(() => Promise.resolve(null));\nconst loadSecond = app.createEffect(() => Promise.resolve(2));\nconst $processing = pending({ domain: app });\n\n$processing.watch((processing) => console.info(`processing: ${processing}`));\n// => processing: false\n\nloadFirst();\nloadSecond();\n// => processing: true\n")),(0,r.kt)("h2",{id:"strategy"},"Strategy"),(0,r.kt)("p",null,"There available two options:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"some")," \u2014 default strategy when ",(0,r.kt)("inlineCode",{parentName:"li"},"of")," parameter is not provided. At least one\neffect must be in pending state."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"every")," \u2014 each effect must be in pending state.")),(0,r.kt)("h3",{id:"example-2"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { pending } from 'patronum/pending';\n\nconst loadFirst = createEffect(() => Promise.resolve(null));\nconst loadSecond = createEffect(() => Promise.resolve(2));\n\nconst $pending = pending({ effects: [loadFirst, loadSecond], of: 'every' });\n\n// When no effects is loading, $pending will be true\n\n// If only one is loading, also will be false\nloadFirst();\n\n// But after running the second effect, $pending will be true\nloadSecond();\n\n$pending.watch(console.log); // true\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8d76850e.662cf357.js b/assets/js/8d76850e.662cf357.js new file mode 100644 index 00000000..882319fb --- /dev/null +++ b/assets/js/8d76850e.662cf357.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[609],{4852:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=s(n),d=a,g=m["".concat(c,".").concat(d)]||m[d]||p[d]||i;return n?r.createElement(g,l(l({ref:t},u),{},{components:n})):r.createElement(g,l({ref:t},u))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[m]="string"==typeof e?e:a,l[1]=o;for(var s=2;s<i;s++)l[s]=n[s];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},2072:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(4011),a=(n(9231),n(4852));const i={},l="once",o={unversionedId:"once/readme",id:"once/readme",title:"once",description:"target = once(source)",source:"@site/../src/once/readme.md",sourceDirName:"once",slug:"/once/",permalink:"/methods/once/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/once/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"not",permalink:"/methods/not/"},next:{title:"or",permalink:"/methods/or/"}},c={},s=[{value:"<code>target = once(source)</code>",id:"target--oncesource",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:4},{value:"<code>target = once({ source, reset })</code>",id:"target--once-source-reset-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3}],u={toc:s},m="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"once"},"once"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { once } from 'patronum';\n// or\nimport { once } from 'patronum/once';\n")),(0,a.kt)("h2",{id:"target--oncesource"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = once(source)")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to do something only on the first ever trigger of ",(0,a.kt)("inlineCode",{parentName:"p"},"source"),".\nIt is useful to trigger effects or other logic only once per application's lifetime."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = once(source);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, launch ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", but only once.")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>)")," \u2014 Source unit, data from this unit is used by ",(0,a.kt)("inlineCode",{parentName:"li"},"target"),".")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"Event<T>")," \u2014 The event that will be triggered exactly once after ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered.")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const messageReceived = createEvent<string>();\nconst firstMessageReceived = once(messageReceived);\n\nfirstMessageReceived.watch((message) =>\n console.log('First message received:', message),\n);\n\nmessageReceived('Hello'); // First message received: Hello\nmessageReceived('World');\n")),(0,a.kt)("h4",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createGate } from 'effector-react';\n\nconst PageGate = createGate();\n\nsample({\n source: once(PageGate.open),\n target: fetchDataFx,\n});\n")),(0,a.kt)("h2",{id:"target--once-source-reset-"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = once({ source, reset })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload may receive ",(0,a.kt)("inlineCode",{parentName:"p"},"reset")," in addition to ",(0,a.kt)("inlineCode",{parentName:"p"},"source"),". If ",(0,a.kt)("inlineCode",{parentName:"p"},"reset")," is fired,\n",(0,a.kt)("inlineCode",{parentName:"p"},"target")," will be allowed to trigger one more time, when ",(0,a.kt)("inlineCode",{parentName:"p"},"source")," is called."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = once({ source, reset });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, launch ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", but only once."),(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"reset")," is triggered, let ",(0,a.kt)("inlineCode",{parentName:"li"},"once")," be reset to the initial state and allow ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to be triggered again upon ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," being called.")),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>)")," \u2014 Source unit, data from this unit is used by ",(0,a.kt)("inlineCode",{parentName:"li"},"target"),"."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"reset")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store)")," \u2014 A unit that resets ",(0,a.kt)("inlineCode",{parentName:"li"},"once")," to the initial state, allowing ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to be triggered again.")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"Event<T>")," \u2014 The event that will be triggered once after ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, until ",(0,a.kt)("inlineCode",{parentName:"li"},"once")," is reset by calling ",(0,a.kt)("inlineCode",{parentName:"li"},"reset"),".")),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createGate } from 'effector-react';\n\nconst PageGate = createGate();\n\nsample({\n source: once({\n source: PageGate.open,\n reset: fetchDataFx.fail,\n }),\n target: fetchDataFx,\n});\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8d76850e.ac0fc698.js b/assets/js/8d76850e.ac0fc698.js deleted file mode 100644 index 1d200be6..00000000 --- a/assets/js/8d76850e.ac0fc698.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[609],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=s(n),d=a,g=p["".concat(c,".").concat(d)]||p[d]||m[d]||i;return n?r.createElement(g,l(l({ref:t},u),{},{components:n})):r.createElement(g,l({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var s=2;s<i;s++)l[s]=n[s];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}p.displayName="MDXCreateElement"},2874:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(2081),a=(n(9496),n(9613));const i={},l="once",o={unversionedId:"once/readme",id:"once/readme",title:"once",description:"target = once(source)",source:"@site/../src/once/readme.md",sourceDirName:"once",slug:"/once/",permalink:"/methods/once/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/once/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"not",permalink:"/methods/not/"},next:{title:"or",permalink:"/methods/or/"}},c={},s=[{value:"<code>target = once(source)</code>",id:"target--oncesource",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:4},{value:"<code>target = once({ source, reset })</code>",id:"target--once-source-reset-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3}],u={toc:s};function m(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"once"},"once"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { once } from 'patronum';\n// or\nimport { once } from 'patronum/once';\n")),(0,a.kt)("h2",{id:"target--oncesource"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = once(source)")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to do something only on the first ever trigger of ",(0,a.kt)("inlineCode",{parentName:"p"},"source"),".\nIt is useful to trigger effects or other logic only once per application's lifetime."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = once(source);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, launch ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", but only once.")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>)")," \u2014 Source unit, data from this unit is used by ",(0,a.kt)("inlineCode",{parentName:"li"},"target"),".")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"Event<T>")," \u2014 The event that will be triggered exactly once after ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered.")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const messageReceived = createEvent<string>();\nconst firstMessageReceived = once(messageReceived);\n\nfirstMessageReceived.watch((message) =>\n console.log('First message received:', message),\n);\n\nmessageReceived('Hello'); // First message received: Hello\nmessageReceived('World');\n")),(0,a.kt)("h4",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createGate } from 'effector-react';\n\nconst PageGate = createGate();\n\nsample({\n source: once(PageGate.open),\n target: fetchDataFx,\n});\n")),(0,a.kt)("h2",{id:"target--once-source-reset-"},(0,a.kt)("inlineCode",{parentName:"h2"},"target = once({ source, reset })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload may receive ",(0,a.kt)("inlineCode",{parentName:"p"},"reset")," in addition to ",(0,a.kt)("inlineCode",{parentName:"p"},"source"),". If ",(0,a.kt)("inlineCode",{parentName:"p"},"reset")," is fired,\n",(0,a.kt)("inlineCode",{parentName:"p"},"target")," will be allowed to trigger one more time, when ",(0,a.kt)("inlineCode",{parentName:"p"},"source")," is called."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"target = once({ source, reset });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, launch ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from ",(0,a.kt)("inlineCode",{parentName:"li"},"source"),", but only once."),(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"reset")," is triggered, let ",(0,a.kt)("inlineCode",{parentName:"li"},"once")," be reset to the initial state and allow ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to be triggered again upon ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," being called.")),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>)")," \u2014 Source unit, data from this unit is used by ",(0,a.kt)("inlineCode",{parentName:"li"},"target"),"."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"reset")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store)")," \u2014 A unit that resets ",(0,a.kt)("inlineCode",{parentName:"li"},"once")," to the initial state, allowing ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to be triggered again.")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"Event<T>")," \u2014 The event that will be triggered once after ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," is triggered, until ",(0,a.kt)("inlineCode",{parentName:"li"},"once")," is reset by calling ",(0,a.kt)("inlineCode",{parentName:"li"},"reset"),".")),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createGate } from 'effector-react';\n\nconst PageGate = createGate();\n\nsample({\n source: once({\n source: PageGate.open,\n reset: fetchDataFx.fail,\n }),\n target: fetchDataFx,\n});\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/803.7f7c270e.js b/assets/js/901.5fd7132c.js similarity index 59% rename from assets/js/803.7f7c270e.js rename to assets/js/901.5fd7132c.js index 1c0627dc..b436ecd9 100644 --- a/assets/js/803.7f7c270e.js +++ b/assets/js/901.5fd7132c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[803],{4803:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[901],{8901:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file diff --git a/assets/js/93.a2b79ba7.js b/assets/js/93.a2b79ba7.js deleted file mode 100644 index 7d9805f8..00000000 --- a/assets/js/93.a2b79ba7.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[93],{9613:(e,t,n)=>{"use strict";n.d(t,{Zo:()=>u,kt:()=>p});var o=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=o.createContext({}),s=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(i.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=s(n),p=r,f=d["".concat(i,".").concat(p)]||d[p]||m[p]||a;return n?o.createElement(f,l(l({ref:t},u),{},{components:n})):o.createElement(f,l({ref:t},u))}));function p(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,l=new Array(a);l[0]=d;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c.mdxType="string"==typeof e?e:r,l[1]=c;for(var s=2;s<a;s++)l[s]=n[s];return o.createElement.apply(null,l)}return o.createElement.apply(null,n)}d.displayName="MDXCreateElement"},3328:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var o=n(2081),r=n(9496),a=n(5924),l=n(464),c=n(1773);const i="anchorWithStickyNavbar_Ucjl",s="anchorWithHideOnScrollNavbar_ijol";function u(e){let{as:t,id:n,...u}=e;const{navbar:{hideOnScroll:m}}=(0,c.L)();return"h1"!==t&&n?r.createElement(t,(0,o.Z)({},u,{className:(0,a.Z)("anchor",m?s:i),id:n}),u.children,r.createElement("a",{className:"hash-link",href:`#${n}`,title:(0,l.I)({id:"theme.common.headingLinkTitle",message:"Direct link to heading",description:"Title for link to heading"})},"\u200b")):r.createElement(t,(0,o.Z)({},u,{id:void 0}))}},2274:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ve});var o=n(9496),r=n(9613),a=n(2081),l=n(6904);var c=n(3887),i=n(5924),s=n(7888),u=n(1773);function m(){const{prism:e}=(0,u.L)(),{colorMode:t}=(0,s.I)(),n=e.theme,o=e.darkTheme||n;return"dark"===t?o:n}var d=n(4797),p=n(7226),f=n.n(p);const h=/title=(?<quote>["'])(?<title>.*?)\1/,g=/\{(?<range>[\d,-]+)\}/,v={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function y(e,t){const n=e.map((e=>{const{start:n,end:o}=v[e];return`(?:${n}\\s*(${t.flatMap((e=>{var t,n;return[e.line,null==(t=e.block)?void 0:t.start,null==(n=e.block)?void 0:n.end].filter(Boolean)})).join("|")})\\s*${o})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function b(e,t){let n=e.replace(/\n$/,"");const{language:o,magicComments:r,metastring:a}=t;if(a&&g.test(a)){const e=a.match(g).groups.range;if(0===r.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${a}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=r[0].className,o=f()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(o),code:n}}if(void 0===o)return{lineClassNames:{},code:n};const l=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return y(["js","jsBlock"],t);case"jsx":case"tsx":return y(["js","jsBlock","jsx"],t);case"html":return y(["js","jsBlock","html"],t);case"python":case"py":case"bash":return y(["bash"],t);case"markdown":case"md":return y(["html","jsx","bash"],t);default:return y(Object.keys(v),t)}}(o,r),c=n.split("\n"),i=Object.fromEntries(r.map((e=>[e.className,{start:0,range:""}]))),s=Object.fromEntries(r.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),u=Object.fromEntries(r.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),m=Object.fromEntries(r.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let p=0;p<c.length;){const e=c[p].match(l);if(!e){p+=1;continue}const t=e.slice(1).find((e=>void 0!==e));s[t]?i[s[t]].range+=`${p},`:u[t]?i[u[t]].start=p:m[t]&&(i[m[t]].range+=`${i[m[t]].start}-${p-1},`),c.splice(p,1)}n=c.join("\n");const d={};return Object.entries(i).forEach((e=>{let[t,{range:n}]=e;f()(n).forEach((e=>{d[e]??=[],d[e].push(t)}))})),{lineClassNames:d,code:n}}const E="codeBlockContainer_E88J";function k(e){let{as:t,...n}=e;const r=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[o,r]=e;const a=t[o];a&&"string"==typeof r&&(n[a]=r)})),n}(m());return o.createElement(t,(0,a.Z)({},n,{style:r,className:(0,i.Z)(n.className,E,d.k.common.codeBlock)}))}const N={codeBlockContent:"codeBlockContent_jIuT",codeBlockTitle:"codeBlockTitle_JuD6",codeBlock:"codeBlock_jcrH",codeBlockStandalone:"codeBlockStandalone_FLaY",codeBlockLines:"codeBlockLines_IV0G",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_DH6K",buttonGroup:"buttonGroup_uJ_n"};function C(e){let{children:t,className:n}=e;return o.createElement(k,{as:"pre",tabIndex:0,className:(0,i.Z)(N.codeBlockStandalone,"thin-scrollbar",n)},o.createElement("code",{className:N.codeBlockLines},t))}var L=n(5651);const w={attributes:!0,characterData:!0,childList:!0,subtree:!0};function B(e,t){const[n,r]=(0,o.useState)(),a=(0,o.useCallback)((()=>{var t;r(null==(t=e.current)?void 0:t.closest("[role=tabpanel][hidden]"))}),[e,r]);(0,o.useEffect)((()=>{a()}),[a]),function(e,t,n){void 0===n&&(n=w);const r=(0,L.zX)(t),a=(0,L.Ql)(n);(0,o.useEffect)((()=>{const t=new MutationObserver(r);return e&&t.observe(e,a),()=>t.disconnect()}),[e,r,a])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const T={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var x={Prism:n(999).Z,theme:T};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},j.apply(this,arguments)}var Z=/\r\n|\r|\n/,H=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},_=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},S=function(e,t){var n=e.plain,o=Object.create(null),r=e.styles.reduce((function(e,n){var o=n.languages,r=n.style;return o&&!o.includes(t)||n.types.forEach((function(t){var n=j({},e[t],r);e[t]=n})),e}),o);return r.root=n,r.plain=j({},n,{backgroundColor:null}),r};function A(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&-1===t.indexOf(o)&&(n[o]=e[o]);return n}const I=function(e){function t(){for(var t=this,n=[],o=arguments.length;o--;)n[o]=arguments[o];e.apply(this,n),O(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?S(e.theme,e.language):void 0;return t.themeDict=n})),O(this,"getLineProps",(function(e){var n=e.key,o=e.className,r=e.style,a=j({},A(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(a.style=l.plain),void 0!==r&&(a.style=void 0!==a.style?j({},a.style,r):r),void 0!==n&&(a.key=n),o&&(a.className+=" "+o),a})),O(this,"getStyleForToken",(function(e){var n=e.types,o=e.empty,r=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===r&&"plain"===n[0])return o?{display:"inline-block"}:void 0;if(1===r&&!o)return a[n[0]];var l=o?{display:"inline-block"}:{},c=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[l].concat(c))}})),O(this,"getTokenProps",(function(e){var n=e.key,o=e.className,r=e.style,a=e.token,l=j({},A(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==r&&(l.style=void 0!==l.style?j({},l.style,r):r),void 0!==n&&(l.key=n),o&&(l.className+=" "+o),l})),O(this,"tokenize",(function(e,t,n,o){var r={code:t,grammar:n,language:o,tokens:[]};e.hooks.run("before-tokenize",r);var a=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,o=e.code,r=e.children,a=this.getThemeDict(this.props),l=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],o=[0],r=[e.length],a=0,l=0,c=[],i=[c];l>-1;){for(;(a=o[l]++)<r[l];){var s=void 0,u=t[l],m=n[l][a];if("string"==typeof m?(u=l>0?u:["plain"],s=m):(u=_(u,m.type),m.alias&&(u=_(u,m.alias)),s=m.content),"string"==typeof s){var d=s.split(Z),p=d.length;c.push({types:u,content:d[0]});for(var f=1;f<p;f++)H(c),i.push(c=[]),c.push({types:u,content:d[f]})}else l++,t.push(u),n.push(s),o.push(0),r.push(s.length)}l--,t.pop(),n.pop(),o.pop(),r.pop()}return H(c),i}(void 0!==l?this.tokenize(t,o,l,n):[o]),className:"prism-code language-"+n,style:void 0!==a?a.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(o.Component),z="codeLine_OVZT",P="codeLineNumber_ta_H",M="codeLineContent_UnBW";function D(e){let{line:t,classNames:n,showLineNumbers:r,getLineProps:l,getTokenProps:c}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const s=l({line:t,className:(0,i.Z)(n,r&&z)}),u=t.map(((e,t)=>o.createElement("span",(0,a.Z)({key:t},c({token:e,key:t})))));return o.createElement("span",s,r?o.createElement(o.Fragment,null,o.createElement("span",{className:P}),o.createElement("span",{className:M},u)):o.createElement(o.Fragment,null,u,o.createElement("br",null)))}var R=n(464);const $={copyButtonCopied:"copyButtonCopied_SiMD",copyButtonIcons:"copyButtonIcons_Cx0t",copyButtonIcon:"copyButtonIcon_Ay8k",copyButtonSuccessIcon:"copyButtonSuccessIcon_zkyL"};function V(e){let{code:t,className:n}=e;const[r,a]=(0,o.useState)(!1),l=(0,o.useRef)(void 0),c=(0,o.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;const o=document.createElement("textarea"),r=document.activeElement;o.value=e,o.setAttribute("readonly",""),o.style.contain="strict",o.style.position="absolute",o.style.left="-9999px",o.style.fontSize="12pt";const a=document.getSelection();let l=!1;a.rangeCount>0&&(l=a.getRangeAt(0)),n.append(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch{}o.remove(),l&&(a.removeAllRanges(),a.addRange(l)),r&&r.focus()}(t),a(!0),l.current=window.setTimeout((()=>{a(!1)}),1e3)}),[t]);return(0,o.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),o.createElement("button",{type:"button","aria-label":r?(0,R.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,R.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,R.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.Z)("clean-btn",n,$.copyButton,r&&$.copyButtonCopied),onClick:c},o.createElement("span",{className:$.copyButtonIcons,"aria-hidden":"true"},o.createElement("svg",{className:$.copyButtonIcon,viewBox:"0 0 24 24"},o.createElement("path",{d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})),o.createElement("svg",{className:$.copyButtonSuccessIcon,viewBox:"0 0 24 24"},o.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))))}const W="wordWrapButtonIcon_n3i3",F="wordWrapButtonEnabled_n_SG";function q(e){let{className:t,onClick:n,isEnabled:r}=e;const a=(0,R.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return o.createElement("button",{type:"button",onClick:n,className:(0,i.Z)("clean-btn",t,r&&F),"aria-label":a,title:a},o.createElement("svg",{className:W,viewBox:"0 0 24 24","aria-hidden":"true"},o.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})))}function U(e){let{children:t,className:n="",metastring:r,title:l,showLineNumbers:c,language:s}=e;const{prism:{defaultLanguage:d,magicComments:p}}=(0,u.L)(),f=s??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return null==t?void 0:t.replace(/language-/,"")}(n)??d,g=m(),v=function(){const[e,t]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1),a=(0,o.useRef)(null),l=(0,o.useCallback)((()=>{const n=a.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[a,e]),c=(0,o.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=a.current,n=e>t||a.current.querySelector("code").hasAttribute("style");r(n)}),[a]);return B(a,c),(0,o.useEffect)((()=>{c()}),[e,c]),(0,o.useEffect)((()=>(window.addEventListener("resize",c,{passive:!0}),()=>{window.removeEventListener("resize",c)})),[c]),{codeBlockRef:a,isEnabled:e,isCodeScrollable:n,toggle:l}}(),y=function(e){var t;return(null==e||null==(t=e.match(h))?void 0:t.groups.title)??""}(r)||l,{lineClassNames:E,code:C}=b(t,{metastring:r,language:f,magicComments:p}),L=c??function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(r);return o.createElement(k,{as:"div",className:(0,i.Z)(n,f&&!n.includes(`language-${f}`)&&`language-${f}`)},y&&o.createElement("div",{className:N.codeBlockTitle},y),o.createElement("div",{className:N.codeBlockContent},o.createElement(I,(0,a.Z)({},x,{theme:g,code:C,language:f??"text"}),(e=>{let{className:t,tokens:n,getLineProps:r,getTokenProps:a}=e;return o.createElement("pre",{tabIndex:0,ref:v.codeBlockRef,className:(0,i.Z)(t,N.codeBlock,"thin-scrollbar")},o.createElement("code",{className:(0,i.Z)(N.codeBlockLines,L&&N.codeBlockLinesWithNumbering)},n.map(((e,t)=>o.createElement(D,{key:t,line:e,getLineProps:r,getTokenProps:a,classNames:E[t],showLineNumbers:L})))))})),o.createElement("div",{className:N.buttonGroup},(v.isEnabled||v.isCodeScrollable)&&o.createElement(q,{className:N.codeButton,onClick:()=>v.toggle(),isEnabled:v.isEnabled}),o.createElement(V,{className:N.codeButton,code:C}))))}function G(e){let{children:t,...n}=e;const r=(0,c.Z)(),l=function(e){return o.Children.toArray(e).some((e=>(0,o.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof l?U:C;return o.createElement(i,(0,a.Z)({key:String(r)},n),l)}var J=n(3054);var X=n(2414);const Y="details_fNUO",K="isBrowser_m527",Q="collapsibleContent_nsBE";function ee(e){return!!e&&("SUMMARY"===e.tagName||ee(e.parentElement))}function te(e,t){return!!e&&(e===t||te(e.parentElement,t))}function ne(e){let{summary:t,children:n,...r}=e;const l=(0,c.Z)(),s=(0,o.useRef)(null),{collapsed:u,setCollapsed:m}=(0,X.u)({initialState:!r.open}),[d,p]=(0,o.useState)(r.open);return o.createElement("details",(0,a.Z)({},r,{ref:s,open:d,"data-collapsed":u,className:(0,i.Z)(Y,l&&K,r.className),onMouseDown:e=>{ee(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;ee(t)&&te(t,s.current)&&(e.preventDefault(),u?(m(!1),p(!0)):m(!0))}}),t??o.createElement("summary",null,"Details"),o.createElement(X.z,{lazy:!1,collapsed:u,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{m(e),p(!e)}},o.createElement("div",{className:Q},n)))}const oe="details_FtqB";function re(e){let{...t}=e;return o.createElement(ne,(0,a.Z)({},t,{className:(0,i.Z)("alert alert--info",oe,t.className)}))}var ae=n(3328);function le(e){return o.createElement(ae.Z,e)}const ce="containsTaskList_IdXS";const ie="img_ictY";const se="admonition_jq0h",ue="admonitionHeading_xONs",me="admonitionIcon_eUWp",de="admonitionContent_ZETI";const pe={note:{infimaClassName:"secondary",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 14 16"},o.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:o.createElement(R.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 12 16"},o.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:o.createElement(R.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 12 16"},o.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:o.createElement(R.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 14 16"},o.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:o.createElement(R.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return o.createElement("svg",{viewBox:"0 0 16 16"},o.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:o.createElement(R.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},fe={secondary:"note",important:"info",success:"tip",warning:"danger"};function he(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=o.Children.toArray(e),n=t.find((e=>{var t;return o.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),r=o.createElement(o.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:r}}(e.children);return{...e,title:e.title??t,children:n}}const ge={head:function(e){const t=o.Children.map(e.children,(e=>o.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){const{mdxType:t,originalType:n,...r}=e.props;return o.createElement(e.props.originalType,r)}return e}(e):e));return o.createElement(l.Z,e,t)},code:function(e){const t=["a","b","big","i","span","em","strong","sup","sub","small"];return o.Children.toArray(e.children).every((e=>{var n;return"string"==typeof e&&!e.includes("\n")||(0,o.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?o.createElement("code",e):o.createElement(G,e)},a:function(e){return o.createElement(J.Z,e)},pre:function(e){var t;return o.createElement(G,(0,o.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:{...e})},details:function(e){const t=o.Children.toArray(e.children),n=t.find((e=>{var t;return o.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),r=o.createElement(o.Fragment,null,t.filter((e=>e!==n)));return o.createElement(re,(0,a.Z)({},e,{summary:n}),r)},ul:function(e){return o.createElement("ul",(0,a.Z)({},e,{className:(t=e.className,(0,i.Z)(t,(null==t?void 0:t.includes("contains-task-list"))&&ce))}));var t},img:function(e){return o.createElement("img",(0,a.Z)({loading:"lazy"},e,{className:(t=e.className,(0,i.Z)(t,ie))}));var t},h1:e=>o.createElement(le,(0,a.Z)({as:"h1"},e)),h2:e=>o.createElement(le,(0,a.Z)({as:"h2"},e)),h3:e=>o.createElement(le,(0,a.Z)({as:"h3"},e)),h4:e=>o.createElement(le,(0,a.Z)({as:"h4"},e)),h5:e=>o.createElement(le,(0,a.Z)({as:"h5"},e)),h6:e=>o.createElement(le,(0,a.Z)({as:"h6"},e)),admonition:function(e){const{children:t,type:n,title:r,icon:a}=he(e),l=function(e){const t=fe[e]??e;return pe[t]||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),pe.info)}(n),c=r??l.label,{iconComponent:s}=l,u=a??o.createElement(s,null);return o.createElement("div",{className:(0,i.Z)(d.k.common.admonition,d.k.common.admonitionType(e.type),"alert",`alert--${l.infimaClassName}`,se)},o.createElement("div",{className:ue},o.createElement("span",{className:me},u),c),o.createElement("div",{className:de},t))}};function ve(e){let{children:t}=e;return o.createElement(r.Zo,{components:ge},t)}},7211:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var o=n(2081),r=n(9496),a=n(5924),l=n(1698);const c="tableOfContents_w9Ty";function i(e){let{className:t,...n}=e;return r.createElement("div",{className:(0,a.Z)(c,"thin-scrollbar",t)},r.createElement(l.Z,(0,o.Z)({},n,{linkClassName:"table-of-contents__link toc-highlight",linkActiveClassName:"table-of-contents__link--active"})))}},1698:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var o=n(2081),r=n(9496),a=n(1773);function l(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const o=n.slice(2,e.level);e.parentIndex=Math.max(...o),n[e.level]=t}));const o=[];return t.forEach((e=>{const{parentIndex:n,...r}=e;n>=0?t[n].children.push(r):o.push(r)})),o}function c(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return t.flatMap((e=>{const t=c({toc:e.children,minHeadingLevel:n,maxHeadingLevel:o});return function(e){return e.level>=n&&e.level<=o}(e)?[{...e,children:t}]:t}))}function i(e){const t=e.getBoundingClientRect();return t.top===t.bottom?i(e.parentNode):t}function s(e,t){let{anchorTopOffset:n}=t;const o=e.find((e=>i(e).top>=n));if(o){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(i(o))?o:e[e.indexOf(o)-1]??null}return e[e.length-1]??null}function u(){const e=(0,r.useRef)(0),{navbar:{hideOnScroll:t}}=(0,a.L)();return(0,r.useEffect)((()=>{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function m(e){const t=(0,r.useRef)(void 0),n=u();(0,r.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:o,linkActiveClassName:r,minHeadingLevel:a,maxHeadingLevel:l}=e;function c(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(o),c=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const o=[];for(let r=t;r<=n;r+=1)o.push(`h${r}.anchor`);return Array.from(document.querySelectorAll(o.join()))}({minHeadingLevel:a,maxHeadingLevel:l}),i=s(c,{anchorTopOffset:n.current}),u=e.find((e=>i&&i.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(r),e.classList.add(r),t.current=e):e.classList.remove(r)}(e,e===u)}))}return document.addEventListener("scroll",c),document.addEventListener("resize",c),c(),()=>{document.removeEventListener("scroll",c),document.removeEventListener("resize",c)}}),[e,n])}function d(e){let{toc:t,className:n,linkClassName:o,isChild:a}=e;return t.length?r.createElement("ul",{className:a?void 0:n},t.map((e=>r.createElement("li",{key:e.id},r.createElement("a",{href:`#${e.id}`,className:o??void 0,dangerouslySetInnerHTML:{__html:e.value}}),r.createElement(d,{isChild:!0,toc:e.children,className:n,linkClassName:o}))))):null}const p=r.memo(d);function f(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:i="table-of-contents__link",linkActiveClassName:s,minHeadingLevel:u,maxHeadingLevel:d,...f}=e;const h=(0,a.L)(),g=u??h.tableOfContents.minHeadingLevel,v=d??h.tableOfContents.maxHeadingLevel,y=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return(0,r.useMemo)((()=>c({toc:l(t),minHeadingLevel:n,maxHeadingLevel:o})),[t,n,o])}({toc:t,minHeadingLevel:g,maxHeadingLevel:v});return m((0,r.useMemo)((()=>{if(i&&s)return{linkClassName:i,linkActiveClassName:s,minHeadingLevel:g,maxHeadingLevel:v}}),[i,s,g,v])),r.createElement(p,(0,o.Z)({toc:y,className:n,linkClassName:i},f))}},7226:(e,t)=>{function n(e){let t,n=[];for(let o of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(o))n.push(parseInt(o,10));else if(t=o.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,o,r,a]=t;if(o&&a){o=parseInt(o),a=parseInt(a);const e=o<a?1:-1;"-"!==r&&".."!==r&&"\u2025"!==r||(a+=e);for(let t=o;t!==a;t+=e)n.push(t)}}return n}t.default=n,e.exports=n}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.95e49b9c.js b/assets/js/935f2afb.95e49b9c.js new file mode 100644 index 00000000..648feec6 --- /dev/null +++ b/assets/js/935f2afb.95e49b9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"methodsSidebar":[{"type":"category","label":"Methods","items":[{"type":"link","label":"and","href":"/methods/and/","docId":"and/readme"},{"type":"link","label":"combineEvents","href":"/methods/combine-events/","docId":"combine-events/readme"},{"type":"link","label":"condition","href":"/methods/condition/","docId":"condition/readme"},{"type":"link","label":"debounce","href":"/methods/debounce/","docId":"debounce/readme"},{"type":"link","label":"debug","href":"/methods/debug/","docId":"debug/readme"},{"type":"link","label":"delay","href":"/methods/delay/","docId":"delay/readme"},{"type":"link","label":"either","href":"/methods/either/","docId":"either/readme"},{"type":"link","label":"empty (experimental)","href":"/methods/empty/","docId":"empty/readme"},{"type":"link","label":"equals","href":"/methods/equals/","docId":"equals/readme"},{"type":"link","label":"every","href":"/methods/every/","docId":"every/readme"},{"type":"link","label":"format","href":"/methods/format/","docId":"format/readme"},{"type":"link","label":"inFlight","href":"/methods/in-flight/","docId":"in-flight/readme"},{"type":"link","label":"interval","href":"/methods/interval/","docId":"interval/readme"},{"type":"link","label":"not","href":"/methods/not/","docId":"not/readme"},{"type":"link","label":"once","href":"/methods/once/","docId":"once/readme"},{"type":"link","label":"or","href":"/methods/or/","docId":"or/readme"},{"type":"link","label":"pending","href":"/methods/pending/","docId":"pending/readme"},{"type":"link","label":"previous","href":"/methods/previous/","docId":"previous/readme"},{"type":"link","label":"reset","href":"/methods/reset/","docId":"reset/readme"},{"type":"link","label":"reshape","href":"/methods/reshape/","docId":"reshape/readme"},{"type":"link","label":"snapshot","href":"/methods/snapshot/","docId":"snapshot/readme"},{"type":"link","label":"some","href":"/methods/some/","docId":"some/readme"},{"type":"link","label":"splitMap","href":"/methods/split-map/","docId":"split-map/readme"},{"type":"link","label":"spread","href":"/methods/spread/","docId":"spread/readme"},{"type":"link","label":"status","href":"/methods/status/","docId":"status/readme"},{"type":"link","label":"throttle","href":"/methods/throttle/","docId":"throttle/readme"},{"type":"link","label":"time","href":"/methods/time/","docId":"time/readme"}],"collapsed":true,"collapsible":true,"href":"/methods/"}]},"docs":{"and/readme":{"id":"and/readme","title":"and","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"combine-events/readme":{"id":"combine-events/readme","title":"combineEvents","description":"combineEvents(events)","sidebar":"methodsSidebar"},"condition/readme":{"id":"condition/readme","title":"condition","description":"Motivation","sidebar":"methodsSidebar"},"debounce/readme":{"id":"debounce/readme","title":"debounce","description":"debounce(source, timeout)","sidebar":"methodsSidebar"},"debug/readme":{"id":"debug/readme","title":"debug","description":"It is helpful to debug your application\'s logic.","sidebar":"methodsSidebar"},"delay/readme":{"id":"delay/readme","title":"delay","description":"Method for delaying triggering given unit for some amount of time. Can accept number, Store or (sourceValue) => number (function for calculating timeout based on source payload) as timeout. Exists in two form: shorthand delay(source, timeout) and object form delay({source, timeout, target}), the first one needs to create new unit for this specific purpose, last one needs when target unit is already exists and the goal is just to call it after delay","sidebar":"methodsSidebar"},"either/readme":{"id":"either/readme","title":"either","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"empty/readme":{"id":"empty/readme","title":"empty (experimental)","description":"patronum 1.10.0","sidebar":"methodsSidebar"},"equals/readme":{"id":"equals/readme","title":"equals","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"every/readme":{"id":"every/readme","title":"every","description":"every({ predicate: Function, stores })","sidebar":"methodsSidebar"},"format/readme":{"id":"format/readme","title":"format","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"in-flight/readme":{"id":"in-flight/readme","title":"inFlight","description":"inFlight(effects)","sidebar":"methodsSidebar"},"interval/readme":{"id":"interval/readme","title":"interval","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"methods":{"id":"methods","title":"Methods","description":"All methods split into categories.","sidebar":"methodsSidebar"},"not/readme":{"id":"not/readme","title":"not","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"once/readme":{"id":"once/readme","title":"once","description":"target = once(source)","sidebar":"methodsSidebar"},"or/readme":{"id":"or/readme","title":"or","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"pending/readme":{"id":"pending/readme","title":"pending","description":"pendings(effects)","sidebar":"methodsSidebar"},"previous/readme":{"id":"previous/readme","title":"previous","description":"patronum 2.1.0","sidebar":"methodsSidebar"},"reset/readme":{"id":"reset/readme","title":"reset","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"reshape/readme":{"id":"reshape/readme","title":"reshape","description":"result = reshape({ source, shape })","sidebar":"methodsSidebar"},"snapshot/readme":{"id":"snapshot/readme","title":"snapshot","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"some/readme":{"id":"some/readme","title":"some","description":"some({ predicate: Function, stores })","sidebar":"methodsSidebar"},"split-map/readme":{"id":"split-map/readme","title":"splitMap","description":"shape = splitMap({ source, cases })","sidebar":"methodsSidebar"},"spread/readme":{"id":"spread/readme","title":"spread","description":"source = spread(targets)","sidebar":"methodsSidebar"},"status/readme":{"id":"status/readme","title":"status","description":"Motivation","sidebar":"methodsSidebar"},"throttle/readme":{"id":"throttle/readme","title":"throttle","description":"target = throttle(source, timeout)","sidebar":"methodsSidebar"},"time/readme":{"id":"time/readme","title":"time","description":"time(clock)","sidebar":"methodsSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.bcb89381.js b/assets/js/935f2afb.bcb89381.js deleted file mode 100644 index 2671b7ad..00000000 --- a/assets/js/935f2afb.bcb89381.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"methodsSidebar":[{"type":"category","label":"Methods","items":[{"type":"link","label":"and","href":"/methods/and/","docId":"and/readme"},{"type":"link","label":"combineEvents","href":"/methods/combine-events/","docId":"combine-events/readme"},{"type":"link","label":"condition","href":"/methods/condition/","docId":"condition/readme"},{"type":"link","label":"debounce","href":"/methods/debounce/","docId":"debounce/readme"},{"type":"link","label":"debug","href":"/methods/debug/","docId":"debug/readme"},{"type":"link","label":"delay","href":"/methods/delay/","docId":"delay/readme"},{"type":"link","label":"either","href":"/methods/either/","docId":"either/readme"},{"type":"link","label":"empty (experimental)","href":"/methods/empty/","docId":"empty/readme"},{"type":"link","label":"equals","href":"/methods/equals/","docId":"equals/readme"},{"type":"link","label":"every","href":"/methods/every/","docId":"every/readme"},{"type":"link","label":"format","href":"/methods/format/","docId":"format/readme"},{"type":"link","label":"inFlight","href":"/methods/in-flight/","docId":"in-flight/readme"},{"type":"link","label":"interval","href":"/methods/interval/","docId":"interval/readme"},{"type":"link","label":"not","href":"/methods/not/","docId":"not/readme"},{"type":"link","label":"once","href":"/methods/once/","docId":"once/readme"},{"type":"link","label":"or","href":"/methods/or/","docId":"or/readme"},{"type":"link","label":"pending","href":"/methods/pending/","docId":"pending/readme"},{"type":"link","label":"reset","href":"/methods/reset/","docId":"reset/readme"},{"type":"link","label":"reshape","href":"/methods/reshape/","docId":"reshape/readme"},{"type":"link","label":"snapshot","href":"/methods/snapshot/","docId":"snapshot/readme"},{"type":"link","label":"some","href":"/methods/some/","docId":"some/readme"},{"type":"link","label":"splitMap","href":"/methods/split-map/","docId":"split-map/readme"},{"type":"link","label":"spread","href":"/methods/spread/","docId":"spread/readme"},{"type":"link","label":"status","href":"/methods/status/","docId":"status/readme"},{"type":"link","label":"throttle","href":"/methods/throttle/","docId":"throttle/readme"},{"type":"link","label":"time","href":"/methods/time/","docId":"time/readme"}],"collapsed":true,"collapsible":true,"href":"/methods/"}]},"docs":{"and/readme":{"id":"and/readme","title":"and","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"combine-events/readme":{"id":"combine-events/readme","title":"combineEvents","description":"combineEvents({ events Unit })","sidebar":"methodsSidebar"},"condition/readme":{"id":"condition/readme","title":"condition","description":"Motivation","sidebar":"methodsSidebar"},"debounce/readme":{"id":"debounce/readme","title":"debounce","description":"debounce({ source, timeout })","sidebar":"methodsSidebar"},"debug/readme":{"id":"debug/readme","title":"debug","description":"It is helpful to debug your application\'s logic.","sidebar":"methodsSidebar"},"delay/readme":{"id":"delay/readme","title":"delay","description":"delay({ source, timeout: number, target })","sidebar":"methodsSidebar"},"either/readme":{"id":"either/readme","title":"either","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"empty/readme":{"id":"empty/readme","title":"empty (experimental)","description":"patronum 1.10.0","sidebar":"methodsSidebar"},"equals/readme":{"id":"equals/readme","title":"equals","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"every/readme":{"id":"every/readme","title":"every","description":"every({ predicate: Function, stores })","sidebar":"methodsSidebar"},"format/readme":{"id":"format/readme","title":"format","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"in-flight/readme":{"id":"in-flight/readme","title":"inFlight","description":"inFlight({ effects: [] })","sidebar":"methodsSidebar"},"interval/readme":{"id":"interval/readme","title":"interval","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"methods":{"id":"methods","title":"Methods","description":"All methods split into categories.","sidebar":"methodsSidebar"},"not/readme":{"id":"not/readme","title":"not","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"once/readme":{"id":"once/readme","title":"once","description":"target = once(source)","sidebar":"methodsSidebar"},"or/readme":{"id":"or/readme","title":"or","description":"patronum 1.11.0","sidebar":"methodsSidebar"},"pending/readme":{"id":"pending/readme","title":"pending","description":"pending({ effects: [] })","sidebar":"methodsSidebar"},"reset/readme":{"id":"reset/readme","title":"reset","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"reshape/readme":{"id":"reshape/readme","title":"reshape","description":"result = reshape({ source, shape })","sidebar":"methodsSidebar"},"snapshot/readme":{"id":"snapshot/readme","title":"snapshot","description":"patronum 1.7.0","sidebar":"methodsSidebar"},"some/readme":{"id":"some/readme","title":"some","description":"some({ predicate: Function, stores })","sidebar":"methodsSidebar"},"split-map/readme":{"id":"split-map/readme","title":"splitMap","description":"shape = splitMap({ source, cases })","sidebar":"methodsSidebar"},"spread/readme":{"id":"spread/readme","title":"spread","description":"spread({ source, targets })","sidebar":"methodsSidebar"},"status/readme":{"id":"status/readme","title":"status","description":"Motivation","sidebar":"methodsSidebar"},"throttle/readme":{"id":"throttle/readme","title":"throttle","description":"target = throttle({ source, timeout })","sidebar":"methodsSidebar"},"time/readme":{"id":"time/readme","title":"time","description":"patronum 1.7.0","sidebar":"methodsSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/874.519a8f23.js b/assets/js/967.d43ac743.js similarity index 88% rename from assets/js/874.519a8f23.js rename to assets/js/967.d43ac743.js index 6bfb18e6..aee9b474 100644 --- a/assets/js/874.519a8f23.js +++ b/assets/js/967.d43ac743.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[874],{7874:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(9496),l=n(464),o=n(5163),r=n(5886);function i(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[967],{967:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(9231),l=n(4428),o=n(9211),r=n(9450);function i(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/978828ab.e1fb4f64.js b/assets/js/978828ab.1ad8f25b.js similarity index 63% rename from assets/js/978828ab.e1fb4f64.js rename to assets/js/978828ab.1ad8f25b.js index 2ea78ca5..7ebffaf0 100644 --- a/assets/js/978828ab.e1fb4f64.js +++ b/assets/js/978828ab.1ad8f25b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[172],{7085:e=>{e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[172],{1572:e=>{e.exports=JSON.parse('{"name":"docusaurus-theme-search-algolia","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/97ffe59f.983e3cb0.js b/assets/js/97ffe59f.983e3cb0.js new file mode 100644 index 00000000..e26f486b --- /dev/null +++ b/assets/js/97ffe59f.983e3cb0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[153],{4852:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>h});var a=r(9231);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),m=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=m(r),c=n,h=u["".concat(s,".").concat(c)]||u[c]||d[c]||o;return r?a.createElement(h,i(i({ref:t},p),{},{components:r})):a.createElement(h,i({ref:t},p))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:n,i[1]=l;for(var m=2;m<o;m++)i[m]=r[m];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}c.displayName="MDXCreateElement"},9524:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var a=r(4011),n=(r(9231),r(4852));const o={id:"methods"},i="Methods",l={unversionedId:"methods",id:"methods",title:"Methods",description:"All methods split into categories.",source:"@site/../src/index.md",sourceDirName:".",slug:"/",permalink:"/methods/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/index.md",tags:[],version:"current",frontMatter:{id:"methods"},sidebar:"methodsSidebar",next:{title:"and",permalink:"/methods/and/"}},s={},m=[{value:"Predicate",id:"predicate",level:3},{value:"Effect",id:"effect",level:3},{value:"Timeouts",id:"timeouts",level:3},{value:"Combination/Decomposition",id:"combinationdecomposition",level:3},{value:"Debug",id:"debug",level:3}],p={toc:m},u="wrapper";function d(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"methods"},"Methods"),(0,n.kt)("p",null,"All methods split into categories."),(0,n.kt)("h3",{id:"predicate"},"Predicate"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/and/"},"and")," \u2014 Checks all stores by truthy value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/condition/"},"condition")," \u2014 Trigger then or else by condition."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/either/"},"either")," \u2014 Selects just one value based on condition."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/empty/"},"empty")," \u2014 Checks the store for ",(0,n.kt)("inlineCode",{parentName:"li"},"null"),"."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/equals/"},"equals")," \u2014 Checks the store for some value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/every/"},"every")," \u2014 Checks that state in each store passes the predicate test."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/not/"},"not")," \u2014 Inverts store boolean-value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/or/"},"or")," \u2014 Checks at least one store for truthy value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/once/"},"once")," \u2014 Runs only once."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/reset/"},"reset")," \u2014 Reset all passed stores by clock."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/some/"},"some")," \u2014 Checks that state in at least one store passes the predicate test.")),(0,n.kt)("h3",{id:"effect"},"Effect"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/in-flight/"},"inFlight")," \u2014 Counts all pending effects"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/pending/"},"pending")," \u2014 Checks that has effects in pending state."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/status/"},"status")," \u2014 Return text representation of effect state.")),(0,n.kt)("h3",{id:"timeouts"},"Timeouts"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/debounce/"},"debounce")," \u2014 Creates event which waits until time passes after previous trigger."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/delay/"},"delay")," \u2014 Delays the call of the event by defined timeout."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/interval/"},"interval")," \u2014 Creates a dynamic interval with any timeout."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/throttle/"},"throttle")," \u2014 Creates event which triggers at most once per timeout."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/time/"},"time")," \u2014 Allows reading current timestamp by triggering clock.")),(0,n.kt)("h3",{id:"combinationdecomposition"},"Combination/Decomposition"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/combine-events/"},"combineEvents")," \u2014 Wait for all passed events is triggered."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/format/"},"format")," \u2014 Combine stores to a string literal."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/reshape/"},"reshape")," \u2014 Destructure one store to different stores"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/snapshot/"},"snapshot")," \u2014 Create store value snapshot."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/split-map/"},"splitMap")," \u2014 Split event to different events and map data."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/spread/"},"spread")," \u2014 Send fields from object to same targets."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/previous/"},"previous")," - Get previous value of store.")),(0,n.kt)("h3",{id:"debug"},"Debug"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/debug/"},"debug")," \u2014 Log triggers of passed units.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/97ffe59f.e6e36e03.js b/assets/js/97ffe59f.e6e36e03.js deleted file mode 100644 index 84f6dac6..00000000 --- a/assets/js/97ffe59f.e6e36e03.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[153],{9613:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>c});var a=r(9496);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),m=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=m(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=m(r),c=n,h=d["".concat(s,".").concat(c)]||d[c]||u[c]||i;return r?a.createElement(h,o(o({ref:t},p),{},{components:r})):a.createElement(h,o({ref:t},p))}));function c(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:n,o[1]=l;for(var m=2;m<i;m++)o[m]=r[m];return a.createElement.apply(null,o)}return a.createElement.apply(null,r)}d.displayName="MDXCreateElement"},4566:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>m});var a=r(2081),n=(r(9496),r(9613));const i={id:"methods"},o="Methods",l={unversionedId:"methods",id:"methods",title:"Methods",description:"All methods split into categories.",source:"@site/../src/index.md",sourceDirName:".",slug:"/",permalink:"/methods/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/index.md",tags:[],version:"current",frontMatter:{id:"methods"},sidebar:"methodsSidebar",next:{title:"and",permalink:"/methods/and/"}},s={},m=[{value:"Predicate",id:"predicate",level:3},{value:"Effect",id:"effect",level:3},{value:"Timeouts",id:"timeouts",level:3},{value:"Combination/Decomposition",id:"combinationdecomposition",level:3},{value:"Debug",id:"debug",level:3}],p={toc:m};function u(e){let{components:t,...r}=e;return(0,n.kt)("wrapper",(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"methods"},"Methods"),(0,n.kt)("p",null,"All methods split into categories."),(0,n.kt)("h3",{id:"predicate"},"Predicate"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/and/"},"and")," \u2014 Checks all stores by truthy value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/condition/"},"condition")," \u2014 Trigger then or else by condition."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/either/"},"either")," \u2014 Selects just one value based on condition."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/empty/"},"empty")," \u2014 Checks the store for ",(0,n.kt)("inlineCode",{parentName:"li"},"null"),"."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/equals/"},"equals")," \u2014 Checks the store for some value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/every/"},"every")," \u2014 Checks that state in each store passes the predicate test."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/not/"},"not")," \u2014 Inverts store boolean-value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/or/"},"or")," \u2014 Checks at least one store for truthy value."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/once/"},"once")," \u2014 Runs only once."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/reset/"},"reset")," \u2014 Reset all passed stores by clock."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/some/"},"some")," \u2014 Checks that state in at least one store passes the predicate test.")),(0,n.kt)("h3",{id:"effect"},"Effect"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/in-flight/"},"inFlight")," \u2014 Counts all pending effects"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/pending/"},"pending")," \u2014 Checks that has effects in pending state."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/status/"},"status")," \u2014 Return text representation of effect state.")),(0,n.kt)("h3",{id:"timeouts"},"Timeouts"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/debounce/"},"debounce")," \u2014 Creates event which waits until time passes after previous trigger."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/delay/"},"delay")," \u2014 Delays the call of the event by defined timeout."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/interval/"},"interval")," \u2014 Creates a dynamic interval with any timeout."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/throttle/"},"throttle")," \u2014 Creates event which triggers at most once per timeout."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/time/"},"time")," \u2014 Allows reading current timestamp by triggering clock.")),(0,n.kt)("h3",{id:"combinationdecomposition"},"Combination/Decomposition"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/combine-events/"},"combineEvents")," \u2014 Wait for all passed events is triggered."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/format/"},"format")," \u2014 Combine stores to a string literal."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/reshape/"},"reshape")," \u2014 Destructure one store to different stores"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/snapshot/"},"snapshot")," \u2014 Create store value snapshot."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/split-map/"},"splitMap")," \u2014 Split event to different events and map data."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/spread/"},"spread")," \u2014 Send fields from object to same targets.")),(0,n.kt)("h3",{id:"debug"},"Debug"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/methods/debug/"},"debug")," \u2014 Log triggers of passed units.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9dc53199.034d793b.js b/assets/js/9dc53199.034d793b.js deleted file mode 100644 index ce428548..00000000 --- a/assets/js/9dc53199.034d793b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[84],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>u});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),d=s(n),u=r,f=d["".concat(l,".").concat(u)]||d[u]||m[u]||o;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var s=2;s<o;s++)i[s]=n[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},6604:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>p,toc:()=>s});var a=n(2081),r=(n(9496),n(9613));const o={},i="splitMap",p={unversionedId:"split-map/readme",id:"split-map/readme",title:"splitMap",description:"shape = splitMap({ source, cases })",source:"@site/../src/split-map/readme.md",sourceDirName:"split-map",slug:"/split-map/",permalink:"/methods/split-map/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/split-map/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"some",permalink:"/methods/some/"},next:{title:"spread",permalink:"/methods/spread/"}},l={},s=[{value:"<code>shape = splitMap({ source, cases })</code>",id:"shape--splitmap-source-cases-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Examples",id:"examples",level:3},{value:"Extract passed fields from optional object",id:"extract-passed-fields-from-optional-object",level:4},{value:"Split WebSocket events to effector events",id:"split-websocket-events-to-effector-events",level:4}],c={toc:s};function m(e){let{components:t,...n}=e;return(0,r.kt)("wrapper",(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"splitmap"},"splitMap"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { splitMap } from 'patronum';\n// or\nimport { splitMap } from 'patronum/split-map';\n")),(0,r.kt)("h2",{id:"shape--splitmap-source-cases-"},(0,r.kt)("inlineCode",{parentName:"h2"},"shape = splitMap({ source, cases })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"The method is a combination of ",(0,r.kt)("a",{parentName:"p",href:"https://effector.dev/docs/api/effector/split"},(0,r.kt)("inlineCode",{parentName:"a"},"split"))," and ",(0,r.kt)("a",{parentName:"p",href:"https://effector.dev/docs/api/effector/event#mapfn"},(0,r.kt)("inlineCode",{parentName:"a"},"map")),".\nIt is useful when you want add some kind of pattern matching."),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"shape = splitMap({ source, cases });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"On each ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," trigger, call each function in ",(0,r.kt)("inlineCode",{parentName:"li"},"cases")," object one after another until function returns non undefined, and call event in ",(0,r.kt)("inlineCode",{parentName:"li"},"shape")," with the same name as function in ",(0,r.kt)("inlineCode",{parentName:"li"},"cases")," object."),(0,r.kt)("li",{parentName:"ul"},"If no function returned value event ",(0,r.kt)("inlineCode",{parentName:"li"},"__")," in ",(0,r.kt)("inlineCode",{parentName:"li"},"shape")," should be triggered")),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," (",(0,r.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,r.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,r.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit passed to each function in ",(0,r.kt)("inlineCode",{parentName:"li"},"cases")," object and ",(0,r.kt)("inlineCode",{parentName:"li"},"__")," event in ",(0,r.kt)("inlineCode",{parentName:"li"},"shape")," as is"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"cases")," (",(0,r.kt)("inlineCode",{parentName:"li"},"{ [key: string]: (payload: T) => any | void }"),") \u2014 Object of functions. Function receives one argument is a payload from ",(0,r.kt)("inlineCode",{parentName:"li"},"source"),", should return any value or ",(0,r.kt)("inlineCode",{parentName:"li"},"undefined"))),(0,r.kt)("h3",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"shape")," (",(0,r.kt)("inlineCode",{parentName:"li"},"{ [key: string]: Event<any>; __: Event<T> }"),") \u2014 Object of events, with the same structure as ",(0,r.kt)("inlineCode",{parentName:"li"},"cases"),", but with the ",(0,r.kt)("em",{parentName:"li"},"default")," event ",(0,r.kt)("inlineCode",{parentName:"li"},"__"),", that triggered when each other function returns ",(0,r.kt)("inlineCode",{parentName:"li"},"undefined"))),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("h4",{id:"extract-passed-fields-from-optional-object"},"Extract passed fields from optional object"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { splitMap } from 'patronum/split-map';\n\nconst event = createEvent<object>();\n\nconst shape = splitMap({\n source: event,\n cases: {\n getType: (input) => input.type,\n getDemo: (input) => input.demo,\n },\n});\n\nshape.getType.watch((type) => console.log('TYPE', type));\nshape.getDemo.watch((demo) => console.log('DEMO', demo));\nshape.__.watch((other) => console.log('OTHER', other));\n\nevent({ type: 'demo' });\n// => TYPE demo\n\nevent({ demo: 5 });\n// => DEMO 5\n\nevent({});\n// => OTHER {}\n")),(0,r.kt)("h4",{id:"split-websocket-events-to-effector-events"},"Split WebSocket events to effector events"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { splitMap } from 'patronum/split-map';\n\ntype WSEvent =\n | { type: 'init'; key: string }\n | { type: 'increment'; count: number; name: string }\n | { type: 'reset'; name: string };\n\nexport const websocketEventReceived = createEvent<WSEvent>();\n\nconst { init, increment, reset, __ } = splitMap({\n source: websocketEventReceived,\n cases: {\n init: (event) => {\n if (event.type === 'init') return event.key;\n },\n increment: ({ type, ...payload }) => {\n if (type === 'increment') return payload;\n },\n reset: ({ type, name }) => {\n if (type === 'reset') return name;\n },\n },\n});\n\n__.watch((payload) => {\n console.warn('Unknown type:', payload.type);\n});\n\nincrement.watch((payload) => {\n console.info('should be incremented', payload.count, payload.name);\n});\n\nwebsocketEventReceived({ type: 'increment', name: 'demo', count: 5 });\n// => should be incremented 5 'demo'\n\nwebsocketEventReceived({ type: 'bang', random: 'unknown' });\n// => Unknown type: 'bang'\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9dc53199.13b40e3c.js b/assets/js/9dc53199.13b40e3c.js new file mode 100644 index 00000000..39978920 --- /dev/null +++ b/assets/js/9dc53199.13b40e3c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[84],{4852:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(9231);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=s(n),u=r,f=m["".concat(l,".").concat(u)]||m[u]||d[u]||o;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=u;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[m]="string"==typeof e?e:r,i[1]=p;for(var s=2;s<o;s++)i[s]=n[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}u.displayName="MDXCreateElement"},731:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>p,toc:()=>s});var a=n(4011),r=(n(9231),n(4852));const o={},i="splitMap",p={unversionedId:"split-map/readme",id:"split-map/readme",title:"splitMap",description:"shape = splitMap({ source, cases })",source:"@site/../src/split-map/readme.md",sourceDirName:"split-map",slug:"/split-map/",permalink:"/methods/split-map/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/split-map/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"some",permalink:"/methods/some/"},next:{title:"spread",permalink:"/methods/spread/"}},l={},s=[{value:"<code>shape = splitMap({ source, cases })</code>",id:"shape--splitmap-source-cases-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Examples",id:"examples",level:3},{value:"Extract passed fields from optional object",id:"extract-passed-fields-from-optional-object",level:4},{value:"Split WebSocket events to effector events",id:"split-websocket-events-to-effector-events",level:4}],c={toc:s},m="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"splitmap"},"splitMap"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { splitMap } from 'patronum';\n// or\nimport { splitMap } from 'patronum/split-map';\n")),(0,r.kt)("h2",{id:"shape--splitmap-source-cases-"},(0,r.kt)("inlineCode",{parentName:"h2"},"shape = splitMap({ source, cases })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"The method is a combination of ",(0,r.kt)("a",{parentName:"p",href:"https://effector.dev/docs/api/effector/split"},(0,r.kt)("inlineCode",{parentName:"a"},"split"))," and ",(0,r.kt)("a",{parentName:"p",href:"https://effector.dev/docs/api/effector/event#mapfn"},(0,r.kt)("inlineCode",{parentName:"a"},"map")),".\nIt is useful when you want add some kind of pattern matching."),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"shape = splitMap({ source, cases });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"On each ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," trigger, call each function in ",(0,r.kt)("inlineCode",{parentName:"li"},"cases")," object one after another until function returns non undefined, and call event in ",(0,r.kt)("inlineCode",{parentName:"li"},"shape")," with the same name as function in ",(0,r.kt)("inlineCode",{parentName:"li"},"cases")," object."),(0,r.kt)("li",{parentName:"ul"},"If no function returned value event ",(0,r.kt)("inlineCode",{parentName:"li"},"__")," in ",(0,r.kt)("inlineCode",{parentName:"li"},"shape")," should be triggered")),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," (",(0,r.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/event"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("inlineCode",{parentName:"em"},"Event")))," | ",(0,r.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/store"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("inlineCode",{parentName:"em"},"Store")))," | ",(0,r.kt)("a",{parentName:"li",href:"https://effector.dev/docs/api/effector/effect"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("inlineCode",{parentName:"em"},"Effect"))),") \u2014 Source unit, data from this unit passed to each function in ",(0,r.kt)("inlineCode",{parentName:"li"},"cases")," object and ",(0,r.kt)("inlineCode",{parentName:"li"},"__")," event in ",(0,r.kt)("inlineCode",{parentName:"li"},"shape")," as is"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"cases")," (",(0,r.kt)("inlineCode",{parentName:"li"},"{ [key: string]: (payload: T) => any | void }"),") \u2014 Object of functions. Function receives one argument is a payload from ",(0,r.kt)("inlineCode",{parentName:"li"},"source"),", should return any value or ",(0,r.kt)("inlineCode",{parentName:"li"},"undefined"))),(0,r.kt)("h3",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"shape")," (",(0,r.kt)("inlineCode",{parentName:"li"},"{ [key: string]: Event<any>; __: Event<T> }"),") \u2014 Object of events, with the same structure as ",(0,r.kt)("inlineCode",{parentName:"li"},"cases"),", but with the ",(0,r.kt)("em",{parentName:"li"},"default")," event ",(0,r.kt)("inlineCode",{parentName:"li"},"__"),", that triggered when each other function returns ",(0,r.kt)("inlineCode",{parentName:"li"},"undefined"))),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("h4",{id:"extract-passed-fields-from-optional-object"},"Extract passed fields from optional object"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { splitMap } from 'patronum/split-map';\n\nconst event = createEvent<object>();\n\nconst shape = splitMap({\n source: event,\n cases: {\n getType: (input) => input.type,\n getDemo: (input) => input.demo,\n },\n});\n\nshape.getType.watch((type) => console.log('TYPE', type));\nshape.getDemo.watch((demo) => console.log('DEMO', demo));\nshape.__.watch((other) => console.log('OTHER', other));\n\nevent({ type: 'demo' });\n// => TYPE demo\n\nevent({ demo: 5 });\n// => DEMO 5\n\nevent({});\n// => OTHER {}\n")),(0,r.kt)("h4",{id:"split-websocket-events-to-effector-events"},"Split WebSocket events to effector events"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { splitMap } from 'patronum/split-map';\n\ntype WSEvent =\n | { type: 'init'; key: string }\n | { type: 'increment'; count: number; name: string }\n | { type: 'reset'; name: string };\n\nexport const websocketEventReceived = createEvent<WSEvent>();\n\nconst { init, increment, reset, __ } = splitMap({\n source: websocketEventReceived,\n cases: {\n init: (event) => {\n if (event.type === 'init') return event.key;\n },\n increment: ({ type, ...payload }) => {\n if (type === 'increment') return payload;\n },\n reset: ({ type, name }) => {\n if (type === 'reset') return name;\n },\n },\n});\n\n__.watch((payload) => {\n console.warn('Unknown type:', payload.type);\n});\n\nincrement.watch((payload) => {\n console.info('should be incremented', payload.count, payload.name);\n});\n\nwebsocketEventReceived({ type: 'increment', name: 'demo', count: 5 });\n// => should be incremented 5 'demo'\n\nwebsocketEventReceived({ type: 'bang', random: 'unknown' });\n// => Unknown type: 'bang'\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a765e1a2.4454540d.js b/assets/js/a765e1a2.4454540d.js deleted file mode 100644 index bd7c573d..00000000 --- a/assets/js/a765e1a2.4454540d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[825],{9613:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>v});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=u(n),v=a,d=c["".concat(s,".").concat(v)]||c[v]||m[v]||l;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function v(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=c;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,o[1]=i;for(var u=2;u<l;u++)o[u]=n[u];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}c.displayName="MDXCreateElement"},3806:(e,t,n)=>{n.r(t),n.d(t,{contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>i,toc:()=>s});var r=n(2081),a=(n(9496),n(9613));const l={},o="Migration guide",i={type:"mdx",permalink:"/docs/migration-guide",source:"@site/src/pages/docs/migration-guide.md",title:"Migration guide",description:"v1.0.0",frontMatter:{}},s=[{value:"v1.0.0",id:"v100",level:3},{value:"v0.110",id:"v0110",level:3},{value:"v0.100",id:"v0100",level:3},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-1",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-1",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-2",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-2",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-3",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-3",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-4",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-4",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-5",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-5",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-6",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-6",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-7",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-7",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-8",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-8",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-9",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-9",level:4}],u={toc:s};function p(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"migration-guide"},"Migration guide"),(0,a.kt)("h3",{id:"v100"},"v1.0.0"),(0,a.kt)("p",null,"Removed support of effector v21. Now the minimum supported version is ",(0,a.kt)("inlineCode",{parentName:"p"},"v22.1.2"),".\nNo breaking changes in code."),(0,a.kt)("h3",{id:"v0110"},"v0.110"),(0,a.kt)("p",null,"From ",(0,a.kt)("inlineCode",{parentName:"p"},"v0.110.0")," patronum removed support of effector v20. Now minimum supported version is ",(0,a.kt)("inlineCode",{parentName:"p"},"v21.4"),"."),(0,a.kt)("p",null,"Please, before upgrade review release notes of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/effector/effector/releases/tag/effector%4021.0.0"},(0,a.kt)("inlineCode",{parentName:"a"},"effector v21")),"."),(0,a.kt)("h3",{id:"v0100"},"v0.100"),(0,a.kt)("p",null,"From ",(0,a.kt)("inlineCode",{parentName:"p"},"v0.100.0")," patronum introduced object arguments form with ",(0,a.kt)("strong",{parentName:"p"},"BREAKING CHANGES"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-shell"},"npm install patronum@0.14.3\n# or\nyarn add patronum@0.14.3\n")),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"throttle"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum/throttle';\n")),(0,a.kt)("h4",{id:"previous-version-v014x"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const throttled = throttle(source, timeout);\n")),(0,a.kt)("h4",{id:"current-version-v0102x"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const throttled = throttle({ source, timeout });\n\n// Also you can set target\nconst throttled2 = createEvent(); // or any unit\nthrottle({ source, timeout, target: throttled2 });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wrap ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," arguments to object"),(0,a.kt)("li",{parentName:"ul"},"Optionally add ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," parameter")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/31"},"https://github.com/sergeysova/patronum/pull/31"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"debounce"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { debounce } from 'patronum/debounce';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-1"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const debounced = debounce(source, timeout);\n")),(0,a.kt)("h4",{id:"current-version-v0102x-1"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const debounced = debounce({ source, timeout });\n\n// Also you can set target\nconst debounced = createEvent(); // or any unit\ndebounce({ source, timeout, target: debounced });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wrap ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," arguments to object"),(0,a.kt)("li",{parentName:"ul"},"Optionally add ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," parameter")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/38"},"https://github.com/sergeysova/patronum/pull/38"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"splitMap"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { splitMap } from 'patronum/split-map';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-2"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const received = splitMap(nameReceived, {\n firstName: (string) => string.split(' ')[0], // string | undefined\n lastName: (string) => string.split(' ')[1], // string | undefined\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-2"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const received = splitMap({\n source: nameReceived,\n cases: {\n firstName: (string) => string.split(' ')[0], // string | undefined\n lastName: (string) => string.split(' ')[1], // string | undefined\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"cases"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/41"},"https://github.com/sergeysova/patronum/pull/41"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"some"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { some } from 'patronum/some';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-3"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $tooBig = some((size) => size > 800, [$width, $height]);\n")),(0,a.kt)("h4",{id:"current-version-v0102x-3"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $tooBig = some({\n predicate: (size) => size > 800,\n stores: [$width, $height],\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"stores"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/43"},"https://github.com/sergeysova/patronum/pull/43"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"every"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { every } from 'patronum/every';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-4"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $result = every(true, [$a, $b, $c]);\nconst $result = every(() => true, [$a, $b, $c]);\n")),(0,a.kt)("h4",{id:"current-version-v0102x-4"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $result = every({ predicate: true, stores: [$a, $b, $c] });\nconst $result = every({ predicate: () => true, stores: [$a, $b, $c] });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"stores"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/50"},"https://github.com/sergeysova/patronum/pull/50"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"delay"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { delay } from 'patronum/delay';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-5"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const delayed = delay(unit, 100);\nconst logDelayed = delay(unit, { time: (payload) => 100 });\n")),(0,a.kt)("h4",{id:"current-version-v0102x-5"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const delayed = delay({\n source: unit,\n timeout: 100,\n});\n\nconst delayed = delay({\n source: unit,\n timeout: (payload) => 100,\n});\n\nconst delayed = delay({\n source: unit,\n timeout: $timeout,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"time")," property from second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," can be ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<number>"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/51"},"https://github.com/sergeysova/patronum/pull/51"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"status"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { status } from 'patronum/status';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-6"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $status = status(effect, 'initial');\n")),(0,a.kt)("h4",{id:"current-version-v0102x-6"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $status = status({ effect, defaultValue: 'initial' });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"effect")," in object"),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"defaultValue")," and can be optional")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/55"},"https://github.com/sergeysova/patronum/pull/55"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"reshape"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { reshape } from 'patronum/reshape';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-7"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const parts = reshape($original, {\n length: (string) => string.length,\n first: (string) => string.split(' ')[0] || '',\n second: (string) => string.split(' ')[1] || '',\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-7"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const parts = reshape({\n source: $original,\n shape: {\n length: (string) => string.length,\n first: (string) => string.split(' ')[0] || '',\n second: (string) => string.split(' ')[1] || '',\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"shape"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/57"},"https://github.com/sergeysova/patronum/pull/57"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"combineEvents"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { combineEvents } from 'patronum/combine-events';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-8"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents([first, second, third]);\nconst target = combineEvents({\n key1: event1,\n key2: event2,\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-8"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({ events: [first, second, third] });\nconst target = combineEvents({\n events: {\n key1: event1,\n key2: event2,\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Assign first argument to property ",(0,a.kt)("inlineCode",{parentName:"li"},"events")," in object")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/58"},"https://github.com/sergeysova/patronum/pull/58"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"spread"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { spread } from 'patronum/spread';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-9"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"spread(formReceived, {\n first: $first,\n last: $last,\n});\n\nconst source = spread({\n first: $first,\n last: $last,\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-9"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"spread({\n source: formReceived,\n targets: {\n first: $first,\n last: $last,\n },\n});\n\nconst source = spread({\n targets: {\n first: $first,\n last: $last,\n },\n});\n")),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"If you have two arguments:")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," in object"),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"targets"))),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"If only one argument:")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wrap it to object and assign to ",(0,a.kt)("inlineCode",{parentName:"li"},"targets"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/61"},"https://github.com/sergeysova/patronum/pull/61"))))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a765e1a2.b6852205.js b/assets/js/a765e1a2.b6852205.js new file mode 100644 index 00000000..3c989632 --- /dev/null +++ b/assets/js/a765e1a2.b6852205.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[825],{4852:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},v=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=u(n),v=a,d=m["".concat(s,".").concat(v)]||m[v]||c[v]||l;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=v;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:a,o[1]=i;for(var u=2;u<l;u++)o[u]=n[u];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}v.displayName="MDXCreateElement"},2349:(e,t,n)=>{n.r(t),n.d(t,{contentTitle:()=>o,default:()=>m,frontMatter:()=>l,metadata:()=>i,toc:()=>s});var r=n(4011),a=(n(9231),n(4852));const l={},o="Migration guide",i={type:"mdx",permalink:"/docs/migration-guide",source:"@site/src/pages/docs/migration-guide.md",title:"Migration guide",description:"v1.0.0",frontMatter:{}},s=[{value:"v1.0.0",id:"v100",level:3},{value:"v0.110",id:"v0110",level:3},{value:"v0.100",id:"v0100",level:3},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-1",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-1",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-2",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-2",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-3",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-3",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-4",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-4",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-5",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-5",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-6",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-6",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-7",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-7",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-8",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-8",level:4},{value:"Previous version <code>v0.14.x</code>",id:"previous-version-v014x-9",level:4},{value:"Current version <code>v0.102.x</code>",id:"current-version-v0102x-9",level:4}],u={toc:s},p="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"migration-guide"},"Migration guide"),(0,a.kt)("h3",{id:"v100"},"v1.0.0"),(0,a.kt)("p",null,"Removed support of effector v21. Now the minimum supported version is ",(0,a.kt)("inlineCode",{parentName:"p"},"v22.1.2"),".\nNo breaking changes in code."),(0,a.kt)("h3",{id:"v0110"},"v0.110"),(0,a.kt)("p",null,"From ",(0,a.kt)("inlineCode",{parentName:"p"},"v0.110.0")," patronum removed support of effector v20. Now minimum supported version is ",(0,a.kt)("inlineCode",{parentName:"p"},"v21.4"),"."),(0,a.kt)("p",null,"Please, before upgrade review release notes of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/effector/effector/releases/tag/effector%4021.0.0"},(0,a.kt)("inlineCode",{parentName:"a"},"effector v21")),"."),(0,a.kt)("h3",{id:"v0100"},"v0.100"),(0,a.kt)("p",null,"From ",(0,a.kt)("inlineCode",{parentName:"p"},"v0.100.0")," patronum introduced object arguments form with ",(0,a.kt)("strong",{parentName:"p"},"BREAKING CHANGES"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-shell"},"npm install patronum@0.14.3\n# or\nyarn add patronum@0.14.3\n")),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"throttle"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { throttle } from 'patronum/throttle';\n")),(0,a.kt)("h4",{id:"previous-version-v014x"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const throttled = throttle(source, timeout);\n")),(0,a.kt)("h4",{id:"current-version-v0102x"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const throttled = throttle({ source, timeout });\n\n// Also you can set target\nconst throttled2 = createEvent(); // or any unit\nthrottle({ source, timeout, target: throttled2 });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wrap ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," arguments to object"),(0,a.kt)("li",{parentName:"ul"},"Optionally add ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," parameter")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/31"},"https://github.com/sergeysova/patronum/pull/31"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"debounce"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { debounce } from 'patronum/debounce';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-1"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const debounced = debounce(source, timeout);\n")),(0,a.kt)("h4",{id:"current-version-v0102x-1"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const debounced = debounce({ source, timeout });\n\n// Also you can set target\nconst debounced = createEvent(); // or any unit\ndebounce({ source, timeout, target: debounced });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wrap ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," arguments to object"),(0,a.kt)("li",{parentName:"ul"},"Optionally add ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," parameter")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/38"},"https://github.com/sergeysova/patronum/pull/38"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"splitMap"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { splitMap } from 'patronum/split-map';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-2"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const received = splitMap(nameReceived, {\n firstName: (string) => string.split(' ')[0], // string | undefined\n lastName: (string) => string.split(' ')[1], // string | undefined\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-2"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const received = splitMap({\n source: nameReceived,\n cases: {\n firstName: (string) => string.split(' ')[0], // string | undefined\n lastName: (string) => string.split(' ')[1], // string | undefined\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"cases"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/41"},"https://github.com/sergeysova/patronum/pull/41"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"some"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { some } from 'patronum/some';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-3"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $tooBig = some((size) => size > 800, [$width, $height]);\n")),(0,a.kt)("h4",{id:"current-version-v0102x-3"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $tooBig = some({\n predicate: (size) => size > 800,\n stores: [$width, $height],\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"stores"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/43"},"https://github.com/sergeysova/patronum/pull/43"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"every"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { every } from 'patronum/every';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-4"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $result = every(true, [$a, $b, $c]);\nconst $result = every(() => true, [$a, $b, $c]);\n")),(0,a.kt)("h4",{id:"current-version-v0102x-4"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $result = every({ predicate: true, stores: [$a, $b, $c] });\nconst $result = every({ predicate: () => true, stores: [$a, $b, $c] });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"predicate")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"stores"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/50"},"https://github.com/sergeysova/patronum/pull/50"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"delay"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { delay } from 'patronum/delay';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-5"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const delayed = delay(unit, 100);\nconst logDelayed = delay(unit, { time: (payload) => 100 });\n")),(0,a.kt)("h4",{id:"current-version-v0102x-5"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const delayed = delay({\n source: unit,\n timeout: 100,\n});\n\nconst delayed = delay({\n source: unit,\n timeout: (payload) => 100,\n});\n\nconst delayed = delay({\n source: unit,\n timeout: $timeout,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"time")," property from second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," can be ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<number>"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/51"},"https://github.com/sergeysova/patronum/pull/51"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"status"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { status } from 'patronum/status';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-6"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $status = status(effect, 'initial');\n")),(0,a.kt)("h4",{id:"current-version-v0102x-6"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $status = status({ effect, defaultValue: 'initial' });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"effect")," in object"),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"defaultValue")," and can be optional")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/55"},"https://github.com/sergeysova/patronum/pull/55"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"reshape"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { reshape } from 'patronum/reshape';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-7"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const parts = reshape($original, {\n length: (string) => string.length,\n first: (string) => string.split(' ')[0] || '',\n second: (string) => string.split(' ')[1] || '',\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-7"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const parts = reshape({\n source: $original,\n shape: {\n length: (string) => string.length,\n first: (string) => string.split(' ')[0] || '',\n second: (string) => string.split(' ')[1] || '',\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"shape"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/57"},"https://github.com/sergeysova/patronum/pull/57"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"combineEvents"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { combineEvents } from 'patronum/combine-events';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-8"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents([first, second, third]);\nconst target = combineEvents({\n key1: event1,\n key2: event2,\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-8"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({ events: [first, second, third] });\nconst target = combineEvents({\n events: {\n key1: event1,\n key2: event2,\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Assign first argument to property ",(0,a.kt)("inlineCode",{parentName:"li"},"events")," in object")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/58"},"https://github.com/sergeysova/patronum/pull/58"))),(0,a.kt)("details",null,(0,a.kt)("summary",null,(0,a.kt)("strong",null,(0,a.kt)("code",null,"spread"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { spread } from 'patronum/spread';\n")),(0,a.kt)("h4",{id:"previous-version-v014x-9"},"Previous version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.14.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"spread(formReceived, {\n first: $first,\n last: $last,\n});\n\nconst source = spread({\n first: $first,\n last: $last,\n});\n")),(0,a.kt)("h4",{id:"current-version-v0102x-9"},"Current version ",(0,a.kt)("inlineCode",{parentName:"h4"},"v0.102.x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"spread({\n source: formReceived,\n targets: {\n first: $first,\n last: $last,\n },\n});\n\nconst source = spread({\n targets: {\n first: $first,\n last: $last,\n },\n});\n")),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"If you have two arguments:")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"First argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," in object"),(0,a.kt)("li",{parentName:"ul"},"Second argument should be ",(0,a.kt)("inlineCode",{parentName:"li"},"targets"))),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"If only one argument:")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wrap it to object and assign to ",(0,a.kt)("inlineCode",{parentName:"li"},"targets"))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/sergeysova/patronum/pull/61"},"https://github.com/sergeysova/patronum/pull/61"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a7fdbc71.624c5cce.js b/assets/js/a7fdbc71.624c5cce.js deleted file mode 100644 index e4e9780e..00000000 --- a/assets/js/a7fdbc71.624c5cce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[732],{9613:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(9496);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var m=r.createContext({}),p=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=p(e.components);return r.createElement(m.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,m=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),d=i,f=u["".concat(m,".").concat(d)]||u[d]||c[d]||a;return n?r.createElement(f,o(o({ref:t},s),{},{components:n})):r.createElement(f,o({ref:t},s))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=u;var l={};for(var m in t)hasOwnProperty.call(t,m)&&(l[m]=t[m]);l.originalType=e,l.mdxType="string"==typeof e?e:i,o[1]=l;for(var p=2;p<a;p++)o[p]=n[p];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},9930:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(2081),i=(n(9496),n(9613));const a={},o="time",l={unversionedId:"time/readme",id:"time/readme",title:"time",description:"patronum 1.7.0",source:"@site/../src/time/readme.md",sourceDirName:"time",slug:"/time/",permalink:"/methods/time/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/time/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"throttle",permalink:"/methods/throttle/"}},m={},p=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3}],s={toc:p};function c(e){let{components:t,...n}=e;return(0,i.kt)("wrapper",(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"time"},"time"),(0,i.kt)("admonition",{title:"since",type:"note"},(0,i.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { time } from 'patronum';\n// or\nimport { time } from 'patronum/time';\n")),(0,i.kt)("h3",{id:"motivation"},"Motivation"),(0,i.kt)("p",null,"The method allow to read current time just as an effector method."),(0,i.kt)("h3",{id:"formulae"},"Formulae"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"$time = time({ clock, getNow, initial });\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Initialize ",(0,i.kt)("inlineCode",{parentName:"li"},"$time")," with ",(0,i.kt)("inlineCode",{parentName:"li"},"initial"),", if not present call ",(0,i.kt)("inlineCode",{parentName:"li"},"getNow"),", if not present call ",(0,i.kt)("inlineCode",{parentName:"li"},"Date.now()")),(0,i.kt)("li",{parentName:"ul"},"When ",(0,i.kt)("inlineCode",{parentName:"li"},"clock")," is triggered, call ",(0,i.kt)("inlineCode",{parentName:"li"},"getNow")," to update ",(0,i.kt)("inlineCode",{parentName:"li"},"$time")," with results, if not present use ",(0,i.kt)("inlineCode",{parentName:"li"},"Date.now()"))),(0,i.kt)("h3",{id:"arguments"},"Arguments"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"clock: Event<any> | Effect<any, any, any> | Store<any>")," \u2014 The unit triggers time reading and updates ",(0,i.kt)("inlineCode",{parentName:"li"},"$time")," store"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"getNow?: () => Time")," \u2014 A custom function to read time when ",(0,i.kt)("inlineCode",{parentName:"li"},"clock")," triggers. ",(0,i.kt)("strong",{parentName:"li"},"Must be synchronous"),"."),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"initial?: Time")," \u2014 Initial state for ",(0,i.kt)("inlineCode",{parentName:"li"},"$time")," store. If not passed ",(0,i.kt)("inlineCode",{parentName:"li"},"getNow")," is called.")),(0,i.kt)("p",null,"\u2014 ",(0,i.kt)("inlineCode",{parentName:"p"},"Time")," is a generic type argument used for overriding time reader function. By default, is is ",(0,i.kt)("inlineCode",{parentName:"p"},"number")),(0,i.kt)("h3",{id:"returns"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"$time: Store<Time>")," \u2014 Store contains unix timestamp snapshot, updates when ",(0,i.kt)("inlineCode",{parentName:"p"},"clock")," triggers.\nIf ",(0,i.kt)("inlineCode",{parentName:"p"},"getNow")," is overrided, contains value this function returns.\nBy default, it is ",(0,i.kt)("inlineCode",{parentName:"p"},"number"),".\nInitialized with ",(0,i.kt)("inlineCode",{parentName:"p"},"initial"),", by default, it is ",(0,i.kt)("inlineCode",{parentName:"p"},"Date.now()")),(0,i.kt)("h3",{id:"example"},"Example"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { time } from 'patronum';\n\nconst tick = createEvent();\nconst $time = time({ clock: tick });\n\n$time.watch((time) => console.log('time', time));\n// => time 1660293358847\n\ntick();\n// => time 1660293358848\nawait new Promise((res) => setTimeout(res, 100));\ntick();\n// => 1660293358952\n")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://share.effector.dev/VuhhzWKE"},"Try it")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a7fdbc71.8c5cb0f4.js b/assets/js/a7fdbc71.8c5cb0f4.js new file mode 100644 index 00000000..293d3e6b --- /dev/null +++ b/assets/js/a7fdbc71.8c5cb0f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[732],{4852:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var i=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,i,a=function(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var m=i.createContext({}),p=function(e){var t=i.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return i.createElement(m.Provider,{value:t},e.children)},u="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},d=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,m=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),d=a,k=u["".concat(m,".").concat(d)]||u[d]||s[d]||r;return n?i.createElement(k,l(l({ref:t},c),{},{components:n})):i.createElement(k,l({ref:t},c))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,l=new Array(r);l[0]=d;var o={};for(var m in t)hasOwnProperty.call(t,m)&&(o[m]=t[m]);o.originalType=e,o[u]="string"==typeof e?e:a,l[1]=o;for(var p=2;p<r;p++)l[p]=n[p];return i.createElement.apply(null,l)}return i.createElement.apply(null,n)}d.displayName="MDXCreateElement"},9540:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>l,default:()=>s,frontMatter:()=>r,metadata:()=>o,toc:()=>p});var i=n(4011),a=(n(9231),n(4852));const r={},l="time",o={unversionedId:"time/readme",id:"time/readme",title:"time",description:"time(clock)",source:"@site/../src/time/readme.md",sourceDirName:"time",slug:"/time/",permalink:"/methods/time/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/time/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"throttle",permalink:"/methods/throttle/"}},m={},p=[{value:"<code>time(clock)</code>",id:"timeclock",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>time({clock, getNow, initial})</code>",id:"timeclock-getnow-initial",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3}],c={toc:p},u="wrapper";function s(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,i.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"time"},"time"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { time } from 'patronum';\n// or\nimport { time } from 'patronum/time';\n")),(0,a.kt)("h2",{id:"timeclock"},(0,a.kt)("inlineCode",{parentName:"h2"},"time(clock)")),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,a.kt)("inlineCode",{parentName:"p"},"time({ clock })")," with patronum < 2.1.0")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allow to read current time and write it to store"),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$time = time(clock);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Initialize ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"Date.now()")),(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," is triggered, call ",(0,a.kt)("inlineCode",{parentName:"li"},"Date.now()")," to update ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," with results")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"clock: Event<any> | Effect<any, any, any> | Store<any>")," \u2014 The unit triggers time reading and updates ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," store")),(0,a.kt)("p",null,"\u2014 ",(0,a.kt)("inlineCode",{parentName:"p"},"Time")," is a generic type argument used for overriding time reader function. By default, is is ",(0,a.kt)("inlineCode",{parentName:"p"},"number")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"$time: Store<Time>")," \u2014 Store contains unix timestamp snapshot, updates when ",(0,a.kt)("inlineCode",{parentName:"p"},"clock")," triggers.\nInitialized with ",(0,a.kt)("inlineCode",{parentName:"p"},"Date.now()")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { time } from 'patronum';\n\nconst tick = createEvent();\nconst $time = time(tick);\n\n$time.watch((time) => console.log('time', time));\n// => time 1660293358847\n\ntick();\n// => time 1660293358848\nawait new Promise((res) => setTimeout(res, 100));\ntick();\n// => 1660293358952\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/ZKcm1ebv"},"Try it")),(0,a.kt)("h2",{id:"timeclock-getnow-initial"},(0,a.kt)("inlineCode",{parentName:"h2"},"time({clock, getNow, initial})")),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"The method allow to read current time and write it to store. Object form allows to use additional parameters: ",(0,a.kt)("inlineCode",{parentName:"p"},"getNow")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"initial")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$time = time({ clock, getNow, initial });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Initialize ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"initial"),", if not present call ",(0,a.kt)("inlineCode",{parentName:"li"},"getNow"),", if not present call ",(0,a.kt)("inlineCode",{parentName:"li"},"Date.now()")),(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," is triggered, call ",(0,a.kt)("inlineCode",{parentName:"li"},"getNow")," to update ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," with results, if not present use ",(0,a.kt)("inlineCode",{parentName:"li"},"Date.now()"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"clock: Event<any> | Effect<any, any, any> | Store<any>")," \u2014 The unit triggers time reading and updates ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," store"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"getNow: () => Time")," \u2014 Optional. A custom function to read time when ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," triggers. ",(0,a.kt)("strong",{parentName:"li"},"Must be synchronous"),"."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"initial: Time")," \u2014 Optional. Initial state for ",(0,a.kt)("inlineCode",{parentName:"li"},"$time")," store. If not passed ",(0,a.kt)("inlineCode",{parentName:"li"},"getNow")," is called.")),(0,a.kt)("p",null,"\u2014 ",(0,a.kt)("inlineCode",{parentName:"p"},"Time")," is a generic type argument used for overriding time reader function. By default, is is ",(0,a.kt)("inlineCode",{parentName:"p"},"number")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"$time: Store<Time>")," \u2014 Store contains unix timestamp snapshot, updates when ",(0,a.kt)("inlineCode",{parentName:"p"},"clock")," triggers.\nIf ",(0,a.kt)("inlineCode",{parentName:"p"},"getNow")," is overrided, contains value this function returns.\nBy default, it is ",(0,a.kt)("inlineCode",{parentName:"p"},"number"),".\nInitialized with ",(0,a.kt)("inlineCode",{parentName:"p"},"initial"),", by default, it is ",(0,a.kt)("inlineCode",{parentName:"p"},"Date.now()")),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { time } from 'patronum';\n\nconst tick = createEvent();\nconst $time = time({ clock: tick });\n\n$time.watch((time) => console.log('time', time));\n// => time 1660293358847\n\ntick();\n// => time 1660293358848\nawait new Promise((res) => setTimeout(res, 100));\ntick();\n// => 1660293358952\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/VuhhzWKE"},"Try it")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a9298e25.a535df35.js b/assets/js/a9298e25.a535df35.js new file mode 100644 index 00000000..c130cc42 --- /dev/null +++ b/assets/js/a9298e25.a535df35.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[585],{4852:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(9231);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=i(r),d=a,f=c["".concat(s,".").concat(d)]||c[d]||m[d]||o;return r?n.createElement(f,l(l({ref:t},u),{},{components:r})):n.createElement(f,l({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=d;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[c]="string"==typeof e?e:a,l[1]=p;for(var i=2;i<o;i++)l[i]=r[i];return n.createElement.apply(null,l)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},4175:(e,t,r)=>{r.r(t),r.d(t,{contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>p,toc:()=>s});var n=r(4011),a=(r(9231),r(4852));const o={},l="Installation",p={type:"mdx",permalink:"/docs/installation",source:"@site/src/pages/docs/installation.md",title:"Installation",description:"Usage",frontMatter:{}},s=[{value:"Usage",id:"usage",level:2},{value:"Tests and SSR support",id:"tests-and-ssr-support",level:2},{value:"Logger and CRA support with macros",id:"logger-and-cra-support-with-macros",level:2}],i={toc:s},u="wrapper";function c(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},i,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"installation"},"Installation"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-shell"},"yarn add patronum\n# or\nnpm add patronum\n# or\npnpm add patronum\n")),(0,a.kt)("h2",{id:"usage"},"Usage"),(0,a.kt)("p",null,"Just import method from the root module:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import { throttle, splitMap } from 'patronum';\n")),(0,a.kt)("p",null,"Or from the personal module:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import { throttle } from 'patronum/throttle';\nimport { splitMap } from 'patronum/split-map';\n")),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Except ",(0,a.kt)("inlineCode",{parentName:"p"},"patronum/debug"),". It is only available by personal module import.")),(0,a.kt)("p",null,"Be careful in the module naming:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Method export always exports as named export in camelCase"),(0,a.kt)("li",{parentName:"ul"},"Module with the operator always named in param-case")),(0,a.kt)("h2",{id:"tests-and-ssr-support"},"Tests and SSR support"),(0,a.kt)("p",null,"At the moment patronum supports only Babel."),(0,a.kt)("p",null,"Just add ",(0,a.kt)("inlineCode",{parentName:"p"},"patronum/babel-preset")," to your ",(0,a.kt)("inlineCode",{parentName:"p"},".babelrc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"babel.config.js")," at the ",(0,a.kt)("inlineCode",{parentName:"p"},'"presets"')," section:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "presets": ["patronum/babel-preset"]\n}\n')),(0,a.kt)("h2",{id:"logger-and-cra-support-with-macros"},"Logger and CRA support with ",(0,a.kt)("a",{parentName:"h2",href:"https://github.com/kentcdodds/babel-plugin-macros"},"macros")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/kentcdodds/babel-plugin-macros"},(0,a.kt)("inlineCode",{parentName:"a"},"babel-plugin-macros"))," is bundled into CRA, so we can use it due CRA don't support adding babel plugins into ",(0,a.kt)("inlineCode",{parentName:"p"},".babelrc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"babel.config.js"),"."),(0,a.kt)("p",null,"Just import from ",(0,a.kt)("inlineCode",{parentName:"p"},"patronum/macro")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"effector-logger/macro"),", and use as early:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEffect, sample } from 'effector-logger/macro';\nimport { status, splitMap, combineEvents } from 'patronum/macro';\n")),(0,a.kt)("blockquote",null,(0,a.kt)("ul",{parentName:"blockquote"},(0,a.kt)("li",{parentName:"ul"},"Warning: babel-plugin-macros do not support ",(0,a.kt)("inlineCode",{parentName:"li"},"import * as name"),"!"),(0,a.kt)("li",{parentName:"ul"},"Note: Since release of patronum v2.0.0 it is required to use babel-plugin-macros v3.0.0 or higher."),(0,a.kt)("li",{parentName:"ul"},"Please note, that react-scripts v4.0.3 and older ",(0,a.kt)("strong",{parentName:"li"},"uses outdated version")," of this plugin - you can either use ",(0,a.kt)("a",{parentName:"li",href:"https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/"},"yarn resolutions")," or use react-scripts v5.0.0 or higher."))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a9298e25.d4bdbfaa.js b/assets/js/a9298e25.d4bdbfaa.js deleted file mode 100644 index 8aab0003..00000000 --- a/assets/js/a9298e25.d4bdbfaa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[585],{9613:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>d});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=i(r),d=a,f=m["".concat(s,".").concat(d)]||m[d]||c[d]||o;return r?n.createElement(f,l(l({ref:t},u),{},{components:r})):n.createElement(f,l({ref:t},u))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=m;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p.mdxType="string"==typeof e?e:a,l[1]=p;for(var i=2;i<o;i++)l[i]=r[i];return n.createElement.apply(null,l)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},8603:(e,t,r)=>{r.r(t),r.d(t,{contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>p,toc:()=>s});var n=r(2081),a=(r(9496),r(9613));const o={},l="Installation",p={type:"mdx",permalink:"/docs/installation",source:"@site/src/pages/docs/installation.md",title:"Installation",description:"Usage",frontMatter:{}},s=[{value:"Usage",id:"usage",level:2},{value:"Tests and SSR support",id:"tests-and-ssr-support",level:2},{value:"Logger and CRA support with macros",id:"logger-and-cra-support-with-macros",level:2}],i={toc:s};function u(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},i,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"installation"},"Installation"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-shell"},"yarn add patronum\n# or\nnpm add patronum\n# or\npnpm add patronum\n")),(0,a.kt)("h2",{id:"usage"},"Usage"),(0,a.kt)("p",null,"Just import method from the root module:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import { throttle, splitMap } from 'patronum';\n")),(0,a.kt)("p",null,"Or from the personal module:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import { throttle } from 'patronum/throttle';\nimport { splitMap } from 'patronum/split-map';\n")),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Except ",(0,a.kt)("inlineCode",{parentName:"p"},"patronum/debug"),". It is only available by personal module import.")),(0,a.kt)("p",null,"Be careful in the module naming:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Method export always exports as named export in camelCase"),(0,a.kt)("li",{parentName:"ul"},"Module with the operator always named in param-case")),(0,a.kt)("h2",{id:"tests-and-ssr-support"},"Tests and SSR support"),(0,a.kt)("p",null,"At the moment patronum supports only Babel."),(0,a.kt)("p",null,"Just add ",(0,a.kt)("inlineCode",{parentName:"p"},"patronum/babel-preset")," to your ",(0,a.kt)("inlineCode",{parentName:"p"},".babelrc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"babel.config.js")," at the ",(0,a.kt)("inlineCode",{parentName:"p"},'"presets"')," section:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "presets": ["patronum/babel-preset"]\n}\n')),(0,a.kt)("h2",{id:"logger-and-cra-support-with-macros"},"Logger and CRA support with ",(0,a.kt)("a",{parentName:"h2",href:"https://github.com/kentcdodds/babel-plugin-macros"},"macros")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/kentcdodds/babel-plugin-macros"},(0,a.kt)("inlineCode",{parentName:"a"},"babel-plugin-macros"))," is bundled into CRA, so we can use it due CRA don't support adding babel plugins into ",(0,a.kt)("inlineCode",{parentName:"p"},".babelrc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"babel.config.js"),"."),(0,a.kt)("p",null,"Just import from ",(0,a.kt)("inlineCode",{parentName:"p"},"patronum/macro")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"effector-logger/macro"),", and use as early:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, createEffect, sample } from 'effector-logger/macro';\nimport { status, splitMap, combineEvents } from 'patronum/macro';\n")),(0,a.kt)("blockquote",null,(0,a.kt)("ul",{parentName:"blockquote"},(0,a.kt)("li",{parentName:"ul"},"Warning: babel-plugin-macros do not support ",(0,a.kt)("inlineCode",{parentName:"li"},"import * as name"),"!"),(0,a.kt)("li",{parentName:"ul"},"Note: Since release of patronum v2.0.0 it is required to use babel-plugin-macros v3.0.0 or higher."),(0,a.kt)("li",{parentName:"ul"},"Please note, that react-scripts v4.0.3 and older ",(0,a.kt)("strong",{parentName:"li"},"uses outdated version")," of this plugin - you can either use ",(0,a.kt)("a",{parentName:"li",href:"https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/"},"yarn resolutions")," or use react-scripts v5.0.0 or higher."))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ad512b16.2de7ded0.js b/assets/js/ad512b16.2de7ded0.js new file mode 100644 index 00000000..0737ba2b --- /dev/null +++ b/assets/js/ad512b16.2de7ded0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[485],{4852:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var a=n(9231);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),m=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=m(e.components);return a.createElement(u.Provider,{value:t},e.children)},p="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=m(n),c=r,k=p["".concat(u,".").concat(c)]||p[c]||s[c]||l;return n?a.createElement(k,i(i({ref:t},d),{},{components:n})):a.createElement(k,i({ref:t},d))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=c;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var m=2;m<l;m++)i[m]=n[m];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}c.displayName="MDXCreateElement"},9783:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>s,frontMatter:()=>l,metadata:()=>o,toc:()=>m});var a=n(4011),r=(n(9231),n(4852));const l={},i="delay",o={unversionedId:"delay/readme",id:"delay/readme",title:"delay",description:"Method for delaying triggering given unit for some amount of time. Can accept number, Store or (sourceValue) => number (function for calculating timeout based on source payload) as timeout. Exists in two form: shorthand delay(source, timeout) and object form delay({source, timeout, target}), the first one needs to create new unit for this specific purpose, last one needs when target unit is already exists and the goal is just to call it after delay",source:"@site/../src/delay/readme.md",sourceDirName:"delay",slug:"/delay/",permalink:"/methods/delay/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/delay/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"debug",permalink:"/methods/debug/"},next:{title:"either",permalink:"/methods/either/"}},u={},m=[{value:"<code>delay(source, timeout: number)</code>",id:"delaysource-timeout-number",level:2},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>delay({ source, timeout: number, target })</code>",id:"delay-source-timeout-number-target-",level:2},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"<code>delay(source, timeout: Function)</code>",id:"delaysource-timeout-function",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Example",id:"example-2",level:3},{value:"<code>delay({ source, timeout: Function, target })</code>",id:"delay-source-timeout-function-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-3",level:3},{value:"Arguments",id:"arguments-3",level:3},{value:"Returns",id:"returns-3",level:3},{value:"Example",id:"example-3",level:3},{value:"<code>delay(source, timeout: Store<T>)</code>",id:"delaysource-timeout-storet",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-4",level:3},{value:"Arguments",id:"arguments-4",level:3},{value:"Returns",id:"returns-4",level:3},{value:"Example",id:"example-4",level:3},{value:"<code>delay({ source, timeout: Store<T>, target })</code>",id:"delay-source-timeout-storet-target-",level:2},{value:"Motivation",id:"motivation-3",level:3},{value:"Formulae",id:"formulae-5",level:3},{value:"Arguments",id:"arguments-5",level:3},{value:"Returns",id:"returns-5",level:3},{value:"Example",id:"example-5",level:3}],d={toc:m},p="wrapper";function s(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"delay"},"delay"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { delay } from 'patronum';\n// or\nimport { delay } from 'patronum/delay';\n")),(0,r.kt)("p",null,"Method for delaying triggering given unit for some amount of time. Can accept ",(0,r.kt)("inlineCode",{parentName:"p"},"number"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Store<number>")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"(sourceValue) => number")," (function for calculating timeout based on ",(0,r.kt)("inlineCode",{parentName:"p"},"source")," payload) as timeout. Exists in two form: shorthand ",(0,r.kt)("inlineCode",{parentName:"p"},"delay(source, timeout)")," and object form ",(0,r.kt)("inlineCode",{parentName:"p"},"delay({source, timeout, target})"),", the first one needs to create new unit for this specific purpose, last one needs when ",(0,r.kt)("inlineCode",{parentName:"p"},"target")," unit is already exists and the goal is just to call it after delay"),(0,r.kt)("h2",{id:"delaysource-timeout-number"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay(source, timeout: number)")),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,r.kt)("inlineCode",{parentName:"p"},"delay({ source, timeout })")," with patronum < 2.1.0")),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay(source, timeout);\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, wait for ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout"),", then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(number)")," \u2014 time to wait before trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"event"))),(0,r.kt)("h3",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>)")," \u2014 New event which will receive ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," payload after ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," delay")),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst trigger = createEvent<string>(); // createStore or createEffect\nconst delayed = delay(trigger, 300);\n\ndelayed.watch((payload) => console.info('triggered', payload));\n\ntrigger('hello');\n// after 300ms\n// => triggered hello\n")),(0,r.kt)("h2",{id:"delay-source-timeout-number-target-"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay({ source, timeout: number, target })")),(0,r.kt)("h3",{id:"formulae-1"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay({ source, timeout: number, target });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, wait for ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout"),", then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-1"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(number)")," \u2014 time to wait before trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"event")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Optional. Target unit or array of units that will be called after delay.")),(0,r.kt)("h3",{id:"returns-1"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Target unit or units that were passed to ",(0,r.kt)("inlineCode",{parentName:"li"},"delay"))),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst trigger = createEvent<string>(); // createStore or createEffect\nconst delayed = createEvent<string>();\ndelay({\n source: trigger,\n timeout: 300,\n target: delayed,\n});\n\ndelayed.watch((payload) => console.info('triggered', payload));\n\ntrigger('hello');\n// after 300ms\n// => triggered hello\n")),(0,r.kt)("h2",{id:"delaysource-timeout-function"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay(source, timeout: Function)")),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,r.kt)("inlineCode",{parentName:"p"},"delay({ source, timeout })")," with patronum < 2.1.0")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"This overload allows to calculate timeout from payload of ",(0,r.kt)("inlineCode",{parentName:"p"},"source"),".\nIt is useful when you know that calculations requires more time if you have more data for payload."),(0,r.kt)("h3",{id:"formulae-2"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay(source, timeout);\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, call ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," with payload to get the timeout for delay, then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-2"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"((payload: T) => number)")," \u2014 Calculate delay for each ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," call. Receives the payload of ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," as argument. Should return ",(0,r.kt)("inlineCode",{parentName:"li"},"number")," \u2014 delay in milliseconds.")),(0,r.kt)("h3",{id:"returns-2"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>)")," \u2014 New event which will receive ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," payload after ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," delay")),(0,r.kt)("h3",{id:"example-2"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst update = createEvent<string>();\nconst $data = createStore('');\nconst logDelayed = delay($data, (string) => string.length * 100);\n\nlogDelayed.watch((data) => console.log('log', data));\n\nupdate('Hello');\n// after 500ms\n// => log Hello\n\nupdate('!');\n// after 100ms\n// => log !\n")),(0,r.kt)("h2",{id:"delay-source-timeout-function-target-"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay({ source, timeout: Function, target })")),(0,r.kt)("h3",{id:"motivation-1"},"Motivation"),(0,r.kt)("p",null,"This overload allows to calculate timeout from payload of ",(0,r.kt)("inlineCode",{parentName:"p"},"source"),".\nIt is useful when you know that calculations requires more time if you have more data for payload."),(0,r.kt)("h3",{id:"formulae-3"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay({ source, timeout: Function, target });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, call ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," with payload to get the timeout for delay, then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-3"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"((payload: T) => number)")," \u2014 Calculate delay for each ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," call. Receives the payload of ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," as argument. Should return ",(0,r.kt)("inlineCode",{parentName:"li"},"number")," \u2014 delay in milliseconds."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Optional. Target unit or array of units that will be called after delay.")),(0,r.kt)("h3",{id:"returns-3"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Target unit or units that were passed to ",(0,r.kt)("inlineCode",{parentName:"li"},"delay"))),(0,r.kt)("h3",{id:"example-3"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst update = createEvent<string>();\nconst logDelayed = createEvent<string>();\nconst $data = createStore('');\n\ndelay({\n source: $data,\n timeout: (string) => string.length * 100,\n target: logDelayed,\n});\n\nlogDelayed.watch((data) => console.log('log', data));\n\nupdate('Hello');\n// after 500ms\n// => log Hello\n\nupdate('!');\n// after 100ms\n// => log !\n")),(0,r.kt)("h2",{id:"delaysource-timeout-storet"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay(source, timeout: Store<T>)")),(0,r.kt)("admonition",{title:"since",type:"note"},(0,r.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,r.kt)("inlineCode",{parentName:"p"},"delay({ source, timeout })")," with patronum < 2.1.0")),(0,r.kt)("h3",{id:"motivation-2"},"Motivation"),(0,r.kt)("p",null,"This overload allows you to read timeout from another store.\nIt is useful when you writing music editor and need dynamic delay for your events."),(0,r.kt)("h3",{id:"formulae-4"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay(source, timeout);\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, read timeout from ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," store, then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-4"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," \u2014 Store with number \u2014 delay in milliseconds.")),(0,r.kt)("h3",{id:"returns-4"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>)")," \u2014 New event which will receive ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," payload after ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," delay")),(0,r.kt)("h3",{id:"example-4"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst update = createEvent<string>();\nconst $timeout = createStore(500);\n\nconst logDelayed = delay(update, $timeout);\n\nlogDelayed.watch((data) => console.log('log', data));\n\nupdate('Hello');\n// after 500ms\n// => log Hello\n")),(0,r.kt)("h2",{id:"delay-source-timeout-storet-target-"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay({ source, timeout: Store<T>, target })")),(0,r.kt)("h3",{id:"motivation-3"},"Motivation"),(0,r.kt)("p",null,"This overload allows you to read timeout from another store.\nIt is useful when you writing music editor and need dynamic delay for your events."),(0,r.kt)("h3",{id:"formulae-5"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay({ source, timeout: $store, target });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, read timeout from ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," store, then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-5"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," \u2014 Store with number \u2014 delay in milliseconds."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Optional. Target unit or array of units that will be called after delay.")),(0,r.kt)("h3",{id:"returns-5"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Target unit or units that were passed to ",(0,r.kt)("inlineCode",{parentName:"li"},"delay"))),(0,r.kt)("h3",{id:"example-5"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst update = createEvent<string>();\nconst $timeout = createStore(500);\n\ndelay({\n source: update,\n timeout: $timeout,\n target: logDelayed,\n});\n\nlogDelayed.watch((data) => console.log('log', data));\n\nupdate('Hello');\n// after 500ms\n// => log Hello\n")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ad512b16.823efa27.js b/assets/js/ad512b16.823efa27.js deleted file mode 100644 index b7fa4e0d..00000000 --- a/assets/js/ad512b16.823efa27.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[485],{9613:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>c});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),d=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},s=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),s=d(n),c=r,g=s["".concat(u,".").concat(c)]||s[c]||p[c]||l;return n?a.createElement(g,i(i({ref:t},m),{},{components:n})):a.createElement(g,i({ref:t},m))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=s;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var d=2;d<l;d++)i[d]=n[d];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}s.displayName="MDXCreateElement"},4447:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>o,toc:()=>d});var a=n(2081),r=(n(9496),n(9613));const l={},i="delay",o={unversionedId:"delay/readme",id:"delay/readme",title:"delay",description:"delay({ source, timeout: number, target })",source:"@site/../src/delay/readme.md",sourceDirName:"delay",slug:"/delay/",permalink:"/methods/delay/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/delay/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"debug",permalink:"/methods/debug/"},next:{title:"either",permalink:"/methods/either/"}},u={},d=[{value:"<code>delay({ source, timeout: number, target })</code>",id:"delay-source-timeout-number-target-",level:2},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>delay({ source, timeout: Function, target })</code>",id:"delay-source-timeout-function-target-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"<code>delay({ source, timeout: Store<T>, target })</code>",id:"delay-source-timeout-storet-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Example",id:"example-2",level:3}],m={toc:d};function p(e){let{components:t,...n}=e;return(0,r.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"delay"},"delay"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { delay } from 'patronum';\n// or\nimport { delay } from 'patronum/delay';\n")),(0,r.kt)("h2",{id:"delay-source-timeout-number-target-"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay({ source, timeout: number, target })")),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay({ source, timeout: number, target });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, wait for ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout"),", then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(number)")," \u2014 time to wait before trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"event")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Optional. Target unit or array of units that will be called after delay.")),(0,r.kt)("h3",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Target unit or units that were passed to ",(0,r.kt)("inlineCode",{parentName:"li"},"delay"))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst trigger = createEvent<string>(); // createStore or createEffect\nconst delayed = delay({ source: trigger, timeout: 300 });\n\ndelayed.watch((payload) => console.info('triggered', payload));\n\ntrigger('hello');\n// after 300ms\n// => triggered hello\n")),(0,r.kt)("h2",{id:"delay-source-timeout-function-target-"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay({ source, timeout: Function, target })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"This overload allows to calculate timeout from payload of ",(0,r.kt)("inlineCode",{parentName:"p"},"source"),".\nIt is useful when you know that calculations requires more time if you have more data for payload."),(0,r.kt)("h3",{id:"formulae-1"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay({ source, timeout: Function, target });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, call ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," with payload to get the timeout for delay, then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-1"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"((payload: T) => number)")," \u2014 Calculate delay for each ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," call. Receives the payload of ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," as argument. Should return ",(0,r.kt)("inlineCode",{parentName:"li"},"number")," \u2014 delay in milliseconds."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Optional. Target unit or array of units that will be called after delay.")),(0,r.kt)("h3",{id:"returns-1"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Target unit or units that were passed to ",(0,r.kt)("inlineCode",{parentName:"li"},"delay"))),(0,r.kt)("h3",{id:"example-1"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst update = createEvent<string>();\nconst logDelayed = createEvent<string>();\nconst $data = createStore('');\n\ndelay({\n source: $data,\n timeout: (string) => string.length * 100,\n target: logDelayed,\n});\n\nlogDelayed.watch((data) => console.log('log', data));\n\nupdate('Hello');\n// after 500ms\n// => log Hello\n\nupdate('!');\n// after 100ms\n// => log !\n")),(0,r.kt)("h2",{id:"delay-source-timeout-storet-target-"},(0,r.kt)("inlineCode",{parentName:"h2"},"delay({ source, timeout: Store<T>, target })")),(0,r.kt)("h3",{id:"motivation-1"},"Motivation"),(0,r.kt)("p",null,"This overload allows you to read timeout from another store.\nIt is useful when you writing music editor and need dynamic delay for your events."),(0,r.kt)("h3",{id:"formulae-2"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"target = delay({ source, timeout: $store, target });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"source")," is triggered, read timeout from ",(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," store, then trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,r.kt)("inlineCode",{parentName:"li"},"source"))),(0,r.kt)("h3",{id:"arguments-2"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"source")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,r.kt)("inlineCode",{parentName:"li"},"target")," with."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," \u2014 Store with number \u2014 delay in milliseconds."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Optional. Target unit or array of units that will be called after delay.")),(0,r.kt)("h3",{id:"returns-2"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"target")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Unit<T>")," | ",(0,r.kt)("inlineCode",{parentName:"li"},"Array<Unit<T>>)")," \u2014 Target unit or units that were passed to ",(0,r.kt)("inlineCode",{parentName:"li"},"delay"))),(0,r.kt)("h3",{id:"example-2"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { delay } from 'patronum/delay';\n\nconst update = createEvent<string>();\nconst $timeout = createStore(500);\n\nconst logDelayed = delay({\n source: update,\n timeout: $timeout,\n});\n\nlogDelayed.watch((data) => console.log('log', data));\n\nupdate('Hello');\n// after 500ms\n// => log Hello\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b41febc4.c1f4a408.js b/assets/js/b41febc4.c1f4a408.js deleted file mode 100644 index cd16f8e5..00000000 --- a/assets/js/b41febc4.c1f4a408.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[35],{9613:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),c=p(n),d=a,f=c["".concat(u,".").concat(d)]||c[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=c;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var p=2;p<o;p++)l[p]=n[p];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}c.displayName="MDXCreateElement"},4653:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(2081),a=(n(9496),n(9613));const o={},l="empty (experimental)",i={unversionedId:"empty/readme",id:"empty/readme",title:"empty (experimental)",description:"patronum 1.10.0",source:"@site/../src/empty/readme.md",sourceDirName:"empty",slug:"/empty/",permalink:"/methods/empty/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/empty/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"either",permalink:"/methods/either/"},next:{title:"equals",permalink:"/methods/equals/"}},u={},p=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:3}],s={toc:p};function m(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"empty-experimental"},"empty (experimental)"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.10.0")),(0,a.kt)("admonition",{title:"experimental",type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"Operator is going to be renamed. Please review ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/effector/patronum/discussions/224"},"the discussion"),".")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { empty } from 'patronum';\n// or\nimport { empty } from 'patronum/empty';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to check passed value for ",(0,a.kt)("inlineCode",{parentName:"p"},"null"),".\nSometimes you need just to check for nullability, and go on."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = empty($value);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$value")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"null"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$value: Store<T | null>")," \u2014 The store contains any kind of value.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store<boolean>")," \u2014 The store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false")," if passed ",(0,a.kt)("inlineCode",{parentName:"li"},"$value")," store contains any kind of value other from ",(0,a.kt)("inlineCode",{parentName:"li"},"null"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $account = createStore<Account | null>(null);\nconst $anonymous = empty($account);\nconst $authorized = not($anonymous);\n\nconsole.assert(true === $anonymous.getState());\nconsole.assert(false === $authorized.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/aY8yRLP9"},"Try it")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nconst $account = createStore<Account | null>(null);\nconst $anonymous = $account.map((account) => account === null);\nconst $authorized = $anonymous.map((anonymous) => !anonymous);\n\nconsole.assert(true === $anonymous.getState());\nconsole.assert(false === $authorized.getState());\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b41febc4.fb3c65a7.js b/assets/js/b41febc4.fb3c65a7.js new file mode 100644 index 00000000..e08e1da7 --- /dev/null +++ b/assets/js/b41febc4.fb3c65a7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[35],{4852:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,f=m["".concat(u,".").concat(d)]||m[d]||c[d]||o;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[m]="string"==typeof e?e:a,l[1]=i;for(var p=2;p<o;p++)l[p]=n[p];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},8142:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(4011),a=(n(9231),n(4852));const o={},l="empty (experimental)",i={unversionedId:"empty/readme",id:"empty/readme",title:"empty (experimental)",description:"patronum 1.10.0",source:"@site/../src/empty/readme.md",sourceDirName:"empty",slug:"/empty/",permalink:"/methods/empty/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/empty/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"either",permalink:"/methods/either/"},next:{title:"equals",permalink:"/methods/equals/"}},u={},p=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:3}],s={toc:p},m="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"empty-experimental"},"empty (experimental)"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.10.0")),(0,a.kt)("admonition",{title:"experimental",type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"Operator is going to be renamed. Please review ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/effector/patronum/discussions/224"},"the discussion"),".")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { empty } from 'patronum';\n// or\nimport { empty } from 'patronum/empty';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allows to check passed value for ",(0,a.kt)("inlineCode",{parentName:"p"},"null"),".\nSometimes you need just to check for nullability, and go on."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = empty($value);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$value")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"null"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$value: Store<T | null>")," \u2014 The store contains any kind of value.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store<boolean>")," \u2014 The store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false")," if passed ",(0,a.kt)("inlineCode",{parentName:"li"},"$value")," store contains any kind of value other from ",(0,a.kt)("inlineCode",{parentName:"li"},"null"))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $account = createStore<Account | null>(null);\nconst $anonymous = empty($account);\nconst $authorized = not($anonymous);\n\nconsole.assert(true === $anonymous.getState());\nconsole.assert(false === $authorized.getState());\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/aY8yRLP9"},"Try it")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nconst $account = createStore<Account | null>(null);\nconst $anonymous = $account.map((account) => account === null);\nconst $authorized = $anonymous.map((anonymous) => !anonymous);\n\nconsole.assert(true === $anonymous.getState());\nconsole.assert(false === $authorized.getState());\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c7a80478.c92878af.js b/assets/js/c7a80478.c92878af.js deleted file mode 100644 index f48e97a5..00000000 --- a/assets/js/c7a80478.c92878af.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[169],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),m=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=m(e.components);return r.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=m(n),d=a,f=u["".concat(i,".").concat(d)]||u[d]||p[d]||o;return n?r.createElement(f,s(s({ref:t},c),{},{components:n})):r.createElement(f,s({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=u;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:a,s[1]=l;for(var m=2;m<o;m++)s[m]=n[m];return r.createElement.apply(null,s)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},6960:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var r=n(2081),a=(n(9496),n(9613));const o={},s="reset",l={unversionedId:"reset/readme",id:"reset/readme",title:"reset",description:"patronum 1.7.0",source:"@site/../src/reset/readme.md",sourceDirName:"reset",slug:"/reset/",permalink:"/methods/reset/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/reset/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"pending",permalink:"/methods/pending/"},next:{title:"reshape",permalink:"/methods/reshape/"}},i={},m=[{value:"<code>reset({ clock, target })</code>",id:"reset-clock-target-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:3},{value:"<code>reset({ target })</code>",id:"reset-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example-1",level:3},{value:"Alternative",id:"alternative-1",level:3}],c={toc:m};function p(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"reset"},"reset"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { reset } from 'patronum';\n// or\nimport { reset } from 'patronum/reset';\n")),(0,a.kt)("h2",{id:"reset-clock-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"reset({ clock, target })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allow to reset many stores by a single line"),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"reset({ clock, target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," is triggered, reset store/stores in ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to the initial value.")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"clock: Unit<any> | Array<Unit<any>>")," \u2014 Any kind of units is accepted (Store, Event, Effect)."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target: Store<any> | Array<Store<any>>")," \u2014 Each of these stores will be reset to the initial values when ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," is happened.")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst pageUnmounted = createEvent();\nconst userSessionFinished = createEvent();\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nreset({\n clock: [pageUnmounted, userSessionFinished],\n target: [$post, $comments, $draftComment],\n});\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nconst resetEvent = reset({ target: [$post, $comments, $draftComment] });\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/06hpVftG"},"Try it")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("p",null,"First variant is writing each reset by yourself:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$post.reset([pageUnmounted, userSessionFinished]);\n$comments.reset([pageUnmounted, userSessionFinished]);\n$draftComment.reset([pageUnmounted, userSessionFinished]);\n")),(0,a.kt)("p",null,"There has another way \u2014 use domain:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createDomain, createStore } from 'effector';\nconst resetOnSomeCases = createDomain();\n\nconst $post = resetOnSomeCases.createStore(null);\nconst $comments = resetOnSomeCases.createStore([]);\nconst $draftComment = resetOnSomeCases.createStore('');\n\nresetOnSomeCases.onCreateStore((store) => {\n store.reset([pageUnmounted, userSessionFinished]);\n});\n")),(0,a.kt)("h2",{id:"reset-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"reset({ target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"The method allow to reset many stores by a single line with no ",(0,a.kt)("inlineCode",{parentName:"p"},"clock")," passing"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"The ",(0,a.kt)("inlineCode",{parentName:"p"},"clock")," argument became optional since patronum 1.15.0")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const resetEvent = reset({ target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"resetEvent")," is triggered, reset store/stores in ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to the initial value.")),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target: Store<any> | Array<Store<any>>")," \u2014 Each of these stores will be reset to the initial values when ",(0,a.kt)("inlineCode",{parentName:"li"},"resetEvent")," is triggered.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"resetEvent")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<void>)")," \u2014 New event that reset store/stores in ",(0,a.kt)("inlineCode",{parentName:"li"},"target"),".")),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nconst resetEvent = reset({ target: [$post, $comments, $draftComment] });\n")),(0,a.kt)("h3",{id:"alternative-1"},"Alternative"),(0,a.kt)("p",null,"Write reset event by yourself:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nconst resetEvent = createEvent();\n\nreset({\n clock: resetEvent,\n target: [$post, $comments, $draftComment],\n});\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c7a80478.e20ccc9f.js b/assets/js/c7a80478.e20ccc9f.js new file mode 100644 index 00000000..d1cf8101 --- /dev/null +++ b/assets/js/c7a80478.e20ccc9f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[169],{4852:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(9231);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),m=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},c=function(e){var t=m(e.components);return n.createElement(i.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=m(r),d=a,f=p["".concat(i,".").concat(d)]||p[d]||u[d]||o;return r?n.createElement(f,s(s({ref:t},c),{},{components:r})):n.createElement(f,s({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[p]="string"==typeof e?e:a,s[1]=l;for(var m=2;m<o;m++)s[m]=r[m];return n.createElement.apply(null,s)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},2921:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(4011),a=(r(9231),r(4852));const o={},s="reset",l={unversionedId:"reset/readme",id:"reset/readme",title:"reset",description:"patronum 1.7.0",source:"@site/../src/reset/readme.md",sourceDirName:"reset",slug:"/reset/",permalink:"/methods/reset/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/reset/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"previous",permalink:"/methods/previous/"},next:{title:"reshape",permalink:"/methods/reshape/"}},i={},m=[{value:"<code>reset({ clock, target })</code>",id:"reset-clock-target-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:3},{value:"<code>reset({ target })</code>",id:"reset-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example-1",level:3},{value:"Alternative",id:"alternative-1",level:3}],c={toc:m},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"reset"},"reset"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { reset } from 'patronum';\n// or\nimport { reset } from 'patronum/reset';\n")),(0,a.kt)("h2",{id:"reset-clock-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"reset({ clock, target })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method allow to reset many stores by a single line"),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"reset({ clock, target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," is triggered, reset store/stores in ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to the initial value.")),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"clock: Unit<any> | Array<Unit<any>>")," \u2014 Any kind of units is accepted (Store, Event, Effect)."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target: Store<any> | Array<Store<any>>")," \u2014 Each of these stores will be reset to the initial values when ",(0,a.kt)("inlineCode",{parentName:"li"},"clock")," is happened.")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst pageUnmounted = createEvent();\nconst userSessionFinished = createEvent();\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nreset({\n clock: [pageUnmounted, userSessionFinished],\n target: [$post, $comments, $draftComment],\n});\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nconst resetEvent = reset({ target: [$post, $comments, $draftComment] });\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/06hpVftG"},"Try it")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("p",null,"First variant is writing each reset by yourself:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$post.reset([pageUnmounted, userSessionFinished]);\n$comments.reset([pageUnmounted, userSessionFinished]);\n$draftComment.reset([pageUnmounted, userSessionFinished]);\n")),(0,a.kt)("p",null,"There has another way \u2014 use domain:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createDomain, createStore } from 'effector';\nconst resetOnSomeCases = createDomain();\n\nconst $post = resetOnSomeCases.createStore(null);\nconst $comments = resetOnSomeCases.createStore([]);\nconst $draftComment = resetOnSomeCases.createStore('');\n\nresetOnSomeCases.onCreateStore((store) => {\n store.reset([pageUnmounted, userSessionFinished]);\n});\n")),(0,a.kt)("h2",{id:"reset-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"reset({ target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"The method allow to reset many stores by a single line with no ",(0,a.kt)("inlineCode",{parentName:"p"},"clock")," passing"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"The ",(0,a.kt)("inlineCode",{parentName:"p"},"clock")," argument became optional since patronum 1.15.0")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const resetEvent = reset({ target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When ",(0,a.kt)("inlineCode",{parentName:"li"},"resetEvent")," is triggered, reset store/stores in ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," to the initial value.")),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target: Store<any> | Array<Store<any>>")," \u2014 Each of these stores will be reset to the initial values when ",(0,a.kt)("inlineCode",{parentName:"li"},"resetEvent")," is triggered.")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"resetEvent")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<void>)")," \u2014 New event that reset store/stores in ",(0,a.kt)("inlineCode",{parentName:"li"},"target"),".")),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nconst resetEvent = reset({ target: [$post, $comments, $draftComment] });\n")),(0,a.kt)("h3",{id:"alternative-1"},"Alternative"),(0,a.kt)("p",null,"Write reset event by yourself:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { reset } from 'patronum/reset';\n\nconst $post = createStore(null);\nconst $comments = createStore([]);\nconst $draftComment = createStore('');\n\nconst resetEvent = createEvent();\n\nreset({\n clock: resetEvent,\n target: [$post, $comments, $draftComment],\n});\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c9ae8b2d.e7ae4f05.js b/assets/js/c9ae8b2d.e7ae4f05.js deleted file mode 100644 index f14d57dc..00000000 --- a/assets/js/c9ae8b2d.e7ae4f05.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[945],{9613:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(9496);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=m(r),f=a,d=u["".concat(s,".").concat(f)]||u[f]||c[f]||o;return r?n.createElement(d,i(i({ref:t},p),{},{components:r})):n.createElement(d,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var m=2;m<o;m++)i[m]=r[m];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}u.displayName="MDXCreateElement"},7273:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(2081),a=(r(9496),r(9613));const o={},i="format",l={unversionedId:"format/readme",id:"format/readme",title:"format",description:"patronum 1.7.0",source:"@site/../src/format/readme.md",sourceDirName:"format",slug:"/format/",permalink:"/methods/format/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/format/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"every",permalink:"/methods/every/"},next:{title:"inFlight",permalink:"/methods/in-flight/"}},s={},m=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example with stores with strings",id:"example-with-stores-with-strings",level:3},{value:"Example with stores with arrays",id:"example-with-stores-with-arrays",level:3}],p={toc:m};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"format"},"format"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { format } from 'patronum';\n// or\nimport { format } from 'patronum/format';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Sometimes you need to combine several stores into one string, but without ",(0,a.kt)("inlineCode",{parentName:"p"},"format")," you need to write boring ",(0,a.kt)("inlineCode",{parentName:"p"},"combine")," with combinator-function."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$string = format`parts${$store}`;\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"on each ",(0,a.kt)("inlineCode",{parentName:"li"},"$store")," change recalculate template and update ",(0,a.kt)("inlineCode",{parentName:"li"},"$string"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"format")," should be called as ",(0,a.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates"},"tagged template literal function")),(0,a.kt)("p",null,"Each part of template literal will be converted to string by ",(0,a.kt)("inlineCode",{parentName:"p"},"String(argument)"),",\nthat's why format supports ",(0,a.kt)("inlineCode",{parentName:"p"},"Store<boolean | string | number>"),", but also you can pass list of values, and raw values."),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("p",null,"Method always returns ",(0,a.kt)("inlineCode",{parentName:"p"},"Store<string>")),(0,a.kt)("h3",{id:"example-with-stores-with-strings"},"Example with stores with strings"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { format } from 'patronum';\n\nconst $firstName = createStore('John');\nconst $lastName = createStore('Doe');\n\nconst $fullName = format`${$firstName} ${$lastName}`;\n$fullName.watch(console.log);\n// => John Doe\n")),(0,a.kt)("h3",{id:"example-with-stores-with-arrays"},"Example with stores with arrays"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { format } from 'patronum';\n\nconst $list = createStore(['First', 'Second', 'Third']);\n\nconst $string = format`We have: \"${list}\"`;\n$string.watch(console.log);\n// => We have: \"First, Second, Third\"\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c9ae8b2d.e7e15d92.js b/assets/js/c9ae8b2d.e7e15d92.js new file mode 100644 index 00000000..2ddb59d7 --- /dev/null +++ b/assets/js/c9ae8b2d.e7e15d92.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[945],{4852:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(9231);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),f=a,d=c["".concat(s,".").concat(f)]||c[f]||u[f]||o;return r?n.createElement(d,i(i({ref:t},p),{},{components:r})):n.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m<o;m++)i[m]=r[m];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}f.displayName="MDXCreateElement"},4544:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(4011),a=(r(9231),r(4852));const o={},i="format",l={unversionedId:"format/readme",id:"format/readme",title:"format",description:"patronum 1.7.0",source:"@site/../src/format/readme.md",sourceDirName:"format",slug:"/format/",permalink:"/methods/format/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/format/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"every",permalink:"/methods/every/"},next:{title:"inFlight",permalink:"/methods/in-flight/"}},s={},m=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example with stores with strings",id:"example-with-stores-with-strings",level:3},{value:"Example with stores with arrays",id:"example-with-stores-with-arrays",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"format"},"format"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.7.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { format } from 'patronum';\n// or\nimport { format } from 'patronum/format';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Sometimes you need to combine several stores into one string, but without ",(0,a.kt)("inlineCode",{parentName:"p"},"format")," you need to write boring ",(0,a.kt)("inlineCode",{parentName:"p"},"combine")," with combinator-function."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$string = format`parts${$store}`;\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"on each ",(0,a.kt)("inlineCode",{parentName:"li"},"$store")," change recalculate template and update ",(0,a.kt)("inlineCode",{parentName:"li"},"$string"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"format")," should be called as ",(0,a.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates"},"tagged template literal function")),(0,a.kt)("p",null,"Each part of template literal will be converted to string by ",(0,a.kt)("inlineCode",{parentName:"p"},"String(argument)"),",\nthat's why format supports ",(0,a.kt)("inlineCode",{parentName:"p"},"Store<boolean | string | number>"),", but also you can pass list of values, and raw values."),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("p",null,"Method always returns ",(0,a.kt)("inlineCode",{parentName:"p"},"Store<string>")),(0,a.kt)("h3",{id:"example-with-stores-with-strings"},"Example with stores with strings"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { format } from 'patronum';\n\nconst $firstName = createStore('John');\nconst $lastName = createStore('Doe');\n\nconst $fullName = format`${$firstName} ${$lastName}`;\n$fullName.watch(console.log);\n// => John Doe\n")),(0,a.kt)("h3",{id:"example-with-stores-with-arrays"},"Example with stores with arrays"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { format } from 'patronum';\n\nconst $list = createStore(['First', 'Second', 'Third']);\n\nconst $string = format`We have: \"${list}\"`;\n$string.watch(console.log);\n// => We have: \"First, Second, Third\"\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/deda2cf3.6f2a713d.js b/assets/js/deda2cf3.6f2a713d.js new file mode 100644 index 00000000..b2a3f88f --- /dev/null +++ b/assets/js/deda2cf3.6f2a713d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[493],{4852:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var o=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=o.createContext({}),m=function(e){var t=o.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=m(e.components);return o.createElement(u.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},s=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,u=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=m(n),s=a,k=p["".concat(u,".").concat(s)]||p[s]||c[s]||r;return n?o.createElement(k,i(i({ref:t},d),{},{components:n})):o.createElement(k,i({ref:t},d))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=s;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var m=2;m<r;m++)i[m]=n[m];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}s.displayName="MDXCreateElement"},185:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>c,frontMatter:()=>r,metadata:()=>l,toc:()=>m});var o=n(4011),a=(n(9231),n(4852));const r={},i="debounce",l={unversionedId:"debounce/readme",id:"debounce/readme",title:"debounce",description:"debounce(source, timeout)",source:"@site/../src/debounce/readme.md",sourceDirName:"debounce",slug:"/debounce/",permalink:"/methods/debounce/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/debounce/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"condition",permalink:"/methods/condition/"},next:{title:"debug",permalink:"/methods/debug/"}},u={},m=[{value:"<code>debounce(source, timeout)</code>",id:"debouncesource-timeout",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Example with timeout as store",id:"example-with-timeout-as-store",level:3},{value:"<code>debounce({ source, timeout, target })</code>",id:"debounce-source-timeout-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"<code>debounce({ source, timeout })</code>",id:"debounce-source-timeout-",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:3},{value:"Example",id:"example-2",level:3}],d={toc:m},p="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,o.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"debounce"},"debounce"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { debounce } from 'patronum';\n// or\nimport { debounce } from 'patronum/debounce';\n")),(0,a.kt)("h2",{id:"debouncesource-timeout"},(0,a.kt)("inlineCode",{parentName:"h2"},"debounce(source, timeout)")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Method creates a new event, that will be triggered after some time. It is useful for handling user events such as scrolling, mouse movement, or keypressing.\nIt is useful when you want to pass created event immediately to another method as argument."),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,a.kt)("inlineCode",{parentName:"p"},"debounce({ source, timeout })")," with patronum < 2.1.0")),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"event = debounce(source, timeout);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wait for ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after the last time ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered, then trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event")," with payload of the ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"event")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(number | Store<number>)")," \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event"))),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"event")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>)")," \u2014 New event, that triggered after delay")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { debounce } from 'patronum/debounce';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst someHappened = createEvent<number>();\nconst debounced = debounce(someHappened, DEBOUNCE_TIMEOUT_IN_MS);\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// someHappened now 4\n")),(0,a.kt)("h3",{id:"example-with-timeout-as-store"},"Example with timeout as store"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { debounce } from 'patronum';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst changeTimeout = createEvent<number>();\nconst $timeout = createStore(DEBOUNCE_TIMEOUT_IN_MS).on(\n changeTimeout,\n (_, value) => value,\n);\nconst someHappened = createEvent<number>();\nconst debounced = debounce(someHappened, $timeout);\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nchangeTimeout(400); // will be applied after next source trigger\nsomeHappened(2);\n\nsetTimeout(() => {\n // console clear\n}, 200);\n\nsetTimeout(() => {\n // someHappened now 2\n}, 400);\n")),(0,a.kt)("h2",{id:"debounce-source-timeout-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"debounce({ source, timeout, target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload receives target as argument, that will be triggered after timeout.\nIt is useful when you already have an unit that you need to trigger."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"event = debounce({ source, timeout, target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wait for ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after the last time ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered and call ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from the ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(number | Store<number>)")," \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Target unit, data from the ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," will be passed to this unit")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Target unit that was passed to input argument ",(0,a.kt)("inlineCode",{parentName:"li"},"target"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { debounce } from 'patronum/debounce';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst someHappened = createEvent<number>();\nconst target = createStore<number>(0);\nconst debounced = debounce({\n source: someHappened,\n timeout: DEBOUNCE_TIMEOUT_IN_MS,\n target,\n});\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\ntarget.watch((payload) => {\n console.info('got data', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// someHappened now 4\n// got data 4\n")),(0,a.kt)("h2",{id:"debounce-source-timeout-"},(0,a.kt)("inlineCode",{parentName:"h2"},"debounce({ source, timeout })")),(0,a.kt)("h3",{id:"motivation-2"},"Motivation"),(0,a.kt)("p",null,"This overload recieves ",(0,a.kt)("inlineCode",{parentName:"p"},"source")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"timeout")," as an object. May be useful for additional clarity, but it's longer to write"),(0,a.kt)("h3",{id:"formulae-2"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"event = debounce({ source, timeout });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wait for ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after the last time ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered, then trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event")," with payload of the ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments-2"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"event")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(number | Store<number>)")," \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event"))),(0,a.kt)("h3",{id:"returns-2"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"event")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>)")," \u2014 New event, that triggered after delay")),(0,a.kt)("h3",{id:"example-2"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { debounce } from 'patronum/debounce';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst someHappened = createEvent<number>();\nconst debounced = debounce({\n source: someHappened,\n timeout: DEBOUNCE_TIMEOUT_IN_MS,\n});\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// someHappened now 4\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/deda2cf3.7cf3a9b3.js b/assets/js/deda2cf3.7cf3a9b3.js deleted file mode 100644 index 625da811..00000000 --- a/assets/js/deda2cf3.7cf3a9b3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[493],{9613:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>s});var o=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=o.createContext({}),m=function(e){var t=o.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=m(e.components);return o.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},c=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,u=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=m(n),s=a,f=c["".concat(u,".").concat(s)]||c[s]||p[s]||r;return n?o.createElement(f,i(i({ref:t},d),{},{components:n})):o.createElement(f,i({ref:t},d))}));function s(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=c;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var m=2;m<r;m++)i[m]=n[m];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}c.displayName="MDXCreateElement"},3419:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>m});var o=n(2081),a=(n(9496),n(9613));const r={},i="debounce",l={unversionedId:"debounce/readme",id:"debounce/readme",title:"debounce",description:"debounce({ source, timeout })",source:"@site/../src/debounce/readme.md",sourceDirName:"debounce",slug:"/debounce/",permalink:"/methods/debounce/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/debounce/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"condition",permalink:"/methods/condition/"},next:{title:"debug",permalink:"/methods/debug/"}},u={},m=[{value:"<code>debounce({ source, timeout })</code>",id:"debounce-source-timeout-",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>debounce({ source, timeout, target })</code>",id:"debounce-source-timeout-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example-1",level:3},{value:"Example with timeout as store",id:"example-with-timeout-as-store",level:3}],d={toc:m};function p(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,o.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"debounce"},"debounce"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { debounce } from 'patronum';\n// or\nimport { debounce } from 'patronum/debounce';\n")),(0,a.kt)("h2",{id:"debounce-source-timeout-"},(0,a.kt)("inlineCode",{parentName:"h2"},"debounce({ source, timeout })")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Method creates a new event, that will be triggered after some time. It is useful for handling user events such as scrolling, mouse movement, or keypressing.\nIt is useful when you want to pass created event immediately to another method as argument."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"event = debounce({ source, timeout });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wait for ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after the last time ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered, then trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event")," with payload of the ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used by the ",(0,a.kt)("inlineCode",{parentName:"li"},"event")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(number | Store<number>)")," \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event"))),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"event")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>)")," \u2014 New event, that triggered after delay")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent } from 'effector';\nimport { debounce } from 'patronum/debounce';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst someHappened = createEvent<number>();\nconst debounced = debounce({\n source: someHappened,\n timeout: DEBOUNCE_TIMEOUT_IN_MS,\n});\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// someHappened now 4\n")),(0,a.kt)("h2",{id:"debounce-source-timeout-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"debounce({ source, timeout, target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"This overload receives target as argument, that will be triggered after timeout.\nIt is useful when you already have an unit that you need to trigger."),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"event = debounce({ source, timeout, target });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Wait for ",(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," after the last time ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," was triggered and call ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from the ",(0,a.kt)("inlineCode",{parentName:"li"},"source"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"source")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Source unit, data from this unit used to trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with payload of the ",(0,a.kt)("inlineCode",{parentName:"li"},"source")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"timeout")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(number | Store<number>)")," \u2014 time to wait before trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"event")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Target unit, data from the ",(0,a.kt)("inlineCode",{parentName:"li"},"source")," will be passed to this unit")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Event<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Store<T>")," | ",(0,a.kt)("inlineCode",{parentName:"li"},"Effect<T>)")," \u2014 Target unit that was passed to input argument ",(0,a.kt)("inlineCode",{parentName:"li"},"target"))),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createStore } from 'effector';\nimport { debounce } from 'patronum/debounce';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst someHappened = createEvent<number>();\nconst target = createStore<number>(0);\nconst debounced = debounce({\n source: someHappened,\n timeout: DEBOUNCE_TIMEOUT_IN_MS,\n target,\n});\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\ntarget.watch((payload) => {\n console.info('got data', payload);\n});\n\nsomeHappened(1);\nsomeHappened(2);\nsomeHappened(3);\nsomeHappened(4);\n\n// someHappened now 4\n// got data 4\n")),(0,a.kt)("h3",{id:"example-with-timeout-as-store"},"Example with timeout as store"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore } from 'effector';\nimport { debounce } from 'patronum';\n\nconst DEBOUNCE_TIMEOUT_IN_MS = 200;\n\nconst changeTimeout = createEvent<number>();\nconst $timeout = createStore(DEBOUNCE_TIMEOUT_IN_MS).on(\n changeTimeout,\n (_, value) => value,\n);\nconst someHappened = createEvent<number>();\nconst debounced = debounce({\n source: someHappened,\n timeout: $timeout,\n});\n\ndebounced.watch((payload) => {\n console.info('someHappened now', payload);\n});\n\nsomeHappened(1);\nchangeTimeout(400); // will be applied after next source trigger\nsomeHappened(2);\n\nsetTimeout(() => {\n // console clear\n}, 200);\n\nsetTimeout(() => {\n // someHappened now 2\n}, 400);\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e09d216d.1cad6e0f.js b/assets/js/e09d216d.1cad6e0f.js deleted file mode 100644 index b2da34a5..00000000 --- a/assets/js/e09d216d.1cad6e0f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[236],{9613:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>p});var o=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=o.createContext({}),u=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return o.createElement(c.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),m=u(n),p=r,d=m["".concat(c,".").concat(p)]||m[p]||f[p]||l;return n?o.createElement(d,i(i({ref:t},s),{},{components:n})):o.createElement(d,i({ref:t},s))}));function p(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a.mdxType="string"==typeof e?e:r,i[1]=a;for(var u=2;u<l;u++)i[u]=n[u];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}m.displayName="MDXCreateElement"},7788:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>f,frontMatter:()=>l,metadata:()=>a,toc:()=>u});var o=n(2081),r=(n(9496),n(9613));const l={},i="inFlight",a={unversionedId:"in-flight/readme",id:"in-flight/readme",title:"inFlight",description:"inFlight({ effects: [] })",source:"@site/../src/in-flight/readme.md",sourceDirName:"in-flight",slug:"/in-flight/",permalink:"/methods/in-flight/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/in-flight/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"format",permalink:"/methods/format/"},next:{title:"interval",permalink:"/methods/interval/"}},c={},u=[{value:"<code>inFlight({ effects: [] })</code>",id:"inflight-effects--",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:2},{value:"Example",id:"example",level:2},{value:"<code>inFlight({ domain })</code>",id:"inflight-domain-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:2},{value:"Example",id:"example-1",level:2}],s={toc:u};function f(e){let{components:t,...n}=e;return(0,r.kt)("wrapper",(0,o.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"inflight"},"inFlight"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { inFlight } from 'patronum';\n// or\nimport { inFlight } from 'patronum/in-flight';\n")),(0,r.kt)("h2",{id:"inflight-effects--"},(0,r.kt)("inlineCode",{parentName:"h2"},"inFlight({ effects: [] })")),(0,r.kt)("h3",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"Method allows to calculate total current in flight states of each passed effect.\nIt is useful when you want to show pending state of complex process."),(0,r.kt)("h3",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$count = inFlight({ effects: [fx1, fx2] });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Count all pending runs of effects in one store")),(0,r.kt)("h3",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"effects")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Array<Effect<any, any, any>>)")," - array of any effects")),(0,r.kt)("h2",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$count")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," - Store with count of run effects in pending state")),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { inFlight } from 'patronum/in-flight';\n\nconst loadFirst = createEffect().use(() => Promise.resolve(null));\nconst loadSecond = createEffect().use(() => Promise.resolve(2));\nconst $count = inFlight({ effects: [loadFirst, loadSecond] });\n\n$count.watch((count) => console.info(`count: ${count}`));\n// => count: 0\n\nloadFirst();\nloadSecond();\n// => count: 2\n\nloadSecond();\nloadSecond();\n// => count: 4\n\n// Wait to resolve all effects\n// => count: 0\n")),(0,r.kt)("h2",{id:"inflight-domain-"},(0,r.kt)("inlineCode",{parentName:"h2"},"inFlight({ domain })")),(0,r.kt)("h3",{id:"motivation-1"},"Motivation"),(0,r.kt)("p",null,"This overload allows to count effects in flight of the whole domain.\nIt is usef when you want to show loading state of the whole application."),(0,r.kt)("h3",{id:"formulae-1"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$count = inFlight({ domain });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Count all pending runs of effects in passed domain in one store")),(0,r.kt)("h3",{id:"arguments-1"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"domain")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Domain)")," - domain to count effects from")),(0,r.kt)("h2",{id:"returns-1"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$count")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," - Store with count of run effects in pending state")),(0,r.kt)("h2",{id:"example-1"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createDomain } from 'effector';\nimport { inFlight } from 'patronum/in-flight';\n\nconst app = createDomain();\nconst loadFirst = app.createEffect().use(() => Promise.resolve(null));\nconst loadSecond = app.createEffect().use(() => Promise.resolve(2));\nconst $count = inFlight({ domain: app });\n\n$count.watch((count) => console.info(`count: ${count}`));\n// => count: 0\n\nloadFirst();\nloadSecond();\n// => count: 2\n\nloadSecond();\nloadSecond();\n// => count: 4\n\n// Wait to resolve all effects\n// => count: 0\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e09d216d.5c109b9d.js b/assets/js/e09d216d.5c109b9d.js new file mode 100644 index 00000000..eb7986eb --- /dev/null +++ b/assets/js/e09d216d.5c109b9d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[236],{4852:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>p});var o=n(9231);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e,t){if(null==e)return{};var n,o,l=function(e,t){if(null==e)return{};var n,o,l={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var c=o.createContext({}),u=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return o.createElement(c.Provider,{value:t},e.children)},f="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,l=e.mdxType,a=e.originalType,c=e.parentName,s=r(e,["components","mdxType","originalType","parentName"]),f=u(n),d=l,p=f["".concat(c,".").concat(d)]||f[d]||m[d]||a;return n?o.createElement(p,i(i({ref:t},s),{},{components:n})):o.createElement(p,i({ref:t},s))}));function p(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=n.length,i=new Array(a);i[0]=d;var r={};for(var c in t)hasOwnProperty.call(t,c)&&(r[c]=t[c]);r.originalType=e,r[f]="string"==typeof e?e:l,i[1]=r;for(var u=2;u<a;u++)i[u]=n[u];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}d.displayName="MDXCreateElement"},1284:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>r,toc:()=>u});var o=n(4011),l=(n(9231),n(4852));const a={},i="inFlight",r={unversionedId:"in-flight/readme",id:"in-flight/readme",title:"inFlight",description:"inFlight(effects)",source:"@site/../src/in-flight/readme.md",sourceDirName:"in-flight",slug:"/in-flight/",permalink:"/methods/in-flight/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/in-flight/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"format",permalink:"/methods/format/"},next:{title:"interval",permalink:"/methods/interval/"}},c={},u=[{value:"<code>inFlight(effects)</code>",id:"inflighteffects",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:2},{value:"Example",id:"example",level:2},{value:"<code>inFlight({ domain })</code>",id:"inflight-domain-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:2},{value:"Example",id:"example-1",level:2},{value:"<code>inFlight({ effects: [] })</code>",id:"inflight-effects--",level:2},{value:"Motivation",id:"motivation-2",level:3},{value:"Formulae",id:"formulae-2",level:3},{value:"Arguments",id:"arguments-2",level:3},{value:"Returns",id:"returns-2",level:2},{value:"Example",id:"example-2",level:2}],s={toc:u},f="wrapper";function m(e){let{components:t,...n}=e;return(0,l.kt)(f,(0,o.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"inflight"},"inFlight"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { inFlight } from 'patronum';\n// or\nimport { inFlight } from 'patronum/in-flight';\n")),(0,l.kt)("h2",{id:"inflighteffects"},(0,l.kt)("inlineCode",{parentName:"h2"},"inFlight(effects)")),(0,l.kt)("admonition",{title:"since",type:"note"},(0,l.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,l.kt)("inlineCode",{parentName:"p"},"inFlight({ effects })")," with patronum < 2.1.0")),(0,l.kt)("h3",{id:"motivation"},"Motivation"),(0,l.kt)("p",null,"Method allows to calculate total current in flight states of each passed effect.\nIt is useful when you want to show pending state of complex process."),(0,l.kt)("h3",{id:"formulae"},"Formulae"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"$count = inFlight([fx1, fx2]);\n")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Count all pending runs of effects in one store")),(0,l.kt)("h3",{id:"arguments"},"Arguments"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"effects")," ",(0,l.kt)("inlineCode",{parentName:"li"},"(Array<Effect<any, any, any>>)")," - array of any effects")),(0,l.kt)("h2",{id:"returns"},"Returns"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"$count")," ",(0,l.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," - Store with count of run effects in pending state")),(0,l.kt)("h2",{id:"example"},"Example"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { inFlight } from 'patronum/in-flight';\n\nconst loadFirst = createEffect().use(() => Promise.resolve(null));\nconst loadSecond = createEffect().use(() => Promise.resolve(2));\nconst $count = inFlight([loadFirst, loadSecond]);\n\n$count.watch((count) => console.info(`count: ${count}`));\n// => count: 0\n\nloadFirst();\nloadSecond();\n// => count: 2\n\nloadSecond();\nloadSecond();\n// => count: 4\n\n// Wait to resolve all effects\n// => count: 0\n")),(0,l.kt)("h2",{id:"inflight-domain-"},(0,l.kt)("inlineCode",{parentName:"h2"},"inFlight({ domain })")),(0,l.kt)("h3",{id:"motivation-1"},"Motivation"),(0,l.kt)("p",null,"This overload allows to count effects in flight of the whole domain.\nIt is usef when you want to show loading state of the whole application."),(0,l.kt)("h3",{id:"formulae-1"},"Formulae"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"$count = inFlight({ domain });\n")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Count all pending runs of effects in passed domain in one store")),(0,l.kt)("h3",{id:"arguments-1"},"Arguments"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"domain")," ",(0,l.kt)("inlineCode",{parentName:"li"},"(Domain)")," - domain to count effects from")),(0,l.kt)("h2",{id:"returns-1"},"Returns"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"$count")," ",(0,l.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," - Store with count of run effects in pending state")),(0,l.kt)("h2",{id:"example-1"},"Example"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { createDomain } from 'effector';\nimport { inFlight } from 'patronum/in-flight';\n\nconst app = createDomain();\nconst loadFirst = app.createEffect().use(() => Promise.resolve(null));\nconst loadSecond = app.createEffect().use(() => Promise.resolve(2));\nconst $count = inFlight({ domain: app });\n\n$count.watch((count) => console.info(`count: ${count}`));\n// => count: 0\n\nloadFirst();\nloadSecond();\n// => count: 2\n\nloadSecond();\nloadSecond();\n// => count: 4\n\n// Wait to resolve all effects\n// => count: 0\n")),(0,l.kt)("h2",{id:"inflight-effects--"},(0,l.kt)("inlineCode",{parentName:"h2"},"inFlight({ effects: [] })")),(0,l.kt)("h3",{id:"motivation-2"},"Motivation"),(0,l.kt)("p",null,"This overload recieves ",(0,l.kt)("inlineCode",{parentName:"p"},"effects")," as an object. May be useful for additional clarity, but it's longer to write"),(0,l.kt)("h3",{id:"formulae-2"},"Formulae"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"$count = inFlight({ effects: [fx1, fx2] });\n")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Count all pending runs of effects in one store")),(0,l.kt)("h3",{id:"arguments-2"},"Arguments"),(0,l.kt)("ol",null,(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("inlineCode",{parentName:"li"},"effects")," ",(0,l.kt)("inlineCode",{parentName:"li"},"(Array<Effect<any, any, any>>)")," - array of any effects")),(0,l.kt)("h2",{id:"returns-2"},"Returns"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"$count")," ",(0,l.kt)("inlineCode",{parentName:"li"},"(Store<number>)")," - Store with count of run effects in pending state")),(0,l.kt)("h2",{id:"example-2"},"Example"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEffect } from 'effector';\nimport { inFlight } from 'patronum/in-flight';\n\nconst loadFirst = createEffect().use(() => Promise.resolve(null));\nconst loadSecond = createEffect().use(() => Promise.resolve(2));\nconst $count = inFlight({ effects: [loadFirst, loadSecond] });\n\n$count.watch((count) => console.info(`count: ${count}`));\n// => count: 0\n\nloadFirst();\nloadSecond();\n// => count: 2\n\nloadSecond();\nloadSecond();\n// => count: 4\n\n// Wait to resolve all effects\n// => count: 0\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e55f1e0e.0eeec080.js b/assets/js/e55f1e0e.0eeec080.js deleted file mode 100644 index 4b4354ac..00000000 --- a/assets/js/e55f1e0e.0eeec080.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[778],{9613:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>d});var n=r(9496);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),d=o,f=p["".concat(s,".").concat(d)]||p[d]||u[d]||a;return r?n.createElement(f,i(i({ref:t},m),{},{components:r})):n.createElement(f,i({ref:t},m))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var c=2;c<a;c++)i[c]=r[c];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}p.displayName="MDXCreateElement"},4995:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var n=r(2081),o=(r(9496),r(9613));const a={},i="or",l={unversionedId:"or/readme",id:"or/readme",title:"or",description:"patronum 1.11.0",source:"@site/../src/or/readme.md",sourceDirName:"or",slug:"/or/",permalink:"/methods/or/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/or/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"once",permalink:"/methods/once/"},next:{title:"pending",permalink:"/methods/pending/"}},s={},c=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:4}],m={toc:c};function u(e){let{components:t,...r}=e;return(0,o.kt)("wrapper",(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"or"},"or"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { or } from 'patronum';\n// or\nimport { or } from 'patronum/or';\n")),(0,o.kt)("h3",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"The method allows to check each passed store for truthy values.\nIt can be compared with ",(0,o.kt)("inlineCode",{parentName:"p"},"if (a || b || c || d)"),"."),(0,o.kt)("h3",{id:"formulae"},"Formulae"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"$result = or(...stores);\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,o.kt)("inlineCode",{parentName:"li"},"true"),' if at least one of passed store contains "truthy" value.')),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("p",null,"The method receives any amount of arguments."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"...stores: Array<Store<T>>")," \u2014 Each argument must be store with a value of any kind.")),(0,o.kt)("h3",{id:"returns"},"Returns"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"$result: Store<boolean>")," \u2014 The store contains ",(0,o.kt)("inlineCode",{parentName:"li"},"false")," if each passed store in ",(0,o.kt)("inlineCode",{parentName:"li"},"stores"),' contains "falsey" value')),(0,o.kt)("h3",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const $isAuthorized = createStore(true);\nconst $immediateOrder = createStore(false);\nconst $mocksForDemo = createStore(false);\n\nconst $allowedToShow = or($isAuthorized, $immediateOrder, $mocksForDemo);\nconsole.assert(true === $allowedToShow.getState());\n")),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://share.effector.dev/H9cDYEp5"},"Try it")),(0,o.kt)("h4",{id:"alternative"},"Alternative"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { combine, createSTore } from 'effector';\n\nconst $isAuthorized = createStore(true);\nconst $immediateOrder = createStore(false);\nconst $mocksForDemo = createStore(false);\n\nconst $allowedToShow = combine(\n $isAuthorized,\n $immediateOrder,\n $mocksForDemo,\n (isAuthorized, immediateOrder, mocksForDemo) =>\n isAuthorized || immediateOrder || mocksForDemo,\n);\nconsole.assert(true === $allowedToShow.getState());\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e55f1e0e.1e3aaf8e.js b/assets/js/e55f1e0e.1e3aaf8e.js new file mode 100644 index 00000000..67b0a415 --- /dev/null +++ b/assets/js/e55f1e0e.1e3aaf8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[778],{4852:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var n=r(9231);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),u=c(r),d=o,f=u["".concat(s,".").concat(d)]||u[d]||p[d]||a;return r?n.createElement(f,i(i({ref:t},m),{},{components:r})):n.createElement(f,i({ref:t},m))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var c=2;c<a;c++)i[c]=r[c];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},8724:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var n=r(4011),o=(r(9231),r(4852));const a={},i="or",l={unversionedId:"or/readme",id:"or/readme",title:"or",description:"patronum 1.11.0",source:"@site/../src/or/readme.md",sourceDirName:"or",slug:"/or/",permalink:"/methods/or/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/or/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"once",permalink:"/methods/once/"},next:{title:"pending",permalink:"/methods/pending/"}},s={},c=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"Alternative",id:"alternative",level:4}],m={toc:c},u="wrapper";function p(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"or"},"or"),(0,o.kt)("admonition",{title:"since",type:"note"},(0,o.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { or } from 'patronum';\n// or\nimport { or } from 'patronum/or';\n")),(0,o.kt)("h3",{id:"motivation"},"Motivation"),(0,o.kt)("p",null,"The method allows to check each passed store for truthy values.\nIt can be compared with ",(0,o.kt)("inlineCode",{parentName:"p"},"if (a || b || c || d)"),"."),(0,o.kt)("h3",{id:"formulae"},"Formulae"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"$result = or(...stores);\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"$result")," store contains ",(0,o.kt)("inlineCode",{parentName:"li"},"true"),' if at least one of passed store contains "truthy" value.')),(0,o.kt)("h3",{id:"arguments"},"Arguments"),(0,o.kt)("p",null,"The method receives any amount of arguments."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"...stores: Array<Store<T>>")," \u2014 Each argument must be store with a value of any kind.")),(0,o.kt)("h3",{id:"returns"},"Returns"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"$result: Store<boolean>")," \u2014 The store contains ",(0,o.kt)("inlineCode",{parentName:"li"},"false")," if each passed store in ",(0,o.kt)("inlineCode",{parentName:"li"},"stores"),' contains "falsey" value')),(0,o.kt)("h3",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"const $isAuthorized = createStore(true);\nconst $immediateOrder = createStore(false);\nconst $mocksForDemo = createStore(false);\n\nconst $allowedToShow = or($isAuthorized, $immediateOrder, $mocksForDemo);\nconsole.assert(true === $allowedToShow.getState());\n")),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://share.effector.dev/H9cDYEp5"},"Try it")),(0,o.kt)("h4",{id:"alternative"},"Alternative"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-ts"},"import { combine, createSTore } from 'effector';\n\nconst $isAuthorized = createStore(true);\nconst $immediateOrder = createStore(false);\nconst $mocksForDemo = createStore(false);\n\nconst $allowedToShow = combine(\n $isAuthorized,\n $immediateOrder,\n $mocksForDemo,\n (isAuthorized, immediateOrder, mocksForDemo) =>\n isAuthorized || immediateOrder || mocksForDemo,\n);\nconsole.assert(true === $allowedToShow.getState());\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e9221267.5d0d64ec.js b/assets/js/e9221267.5d0d64ec.js deleted file mode 100644 index 18090f3c..00000000 --- a/assets/js/e9221267.5d0d64ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[916],{9613:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>p});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},v=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),v=c(n),p=a,u=v["".concat(s,".").concat(p)]||v[p]||d[p]||o;return n?r.createElement(u,i(i({ref:t},m),{},{components:n})):r.createElement(u,i({ref:t},m))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=v;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c<o;c++)i[c]=n[c];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}v.displayName="MDXCreateElement"},6035:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=n(2081),a=(n(9496),n(9613));const o={},i="combineEvents",l={unversionedId:"combine-events/readme",id:"combine-events/readme",title:"combineEvents",description:"combineEvents({ events Unit })",source:"@site/../src/combine-events/readme.md",sourceDirName:"combine-events",slug:"/combine-events/",permalink:"/methods/combine-events/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/combine-events/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"and",permalink:"/methods/and/"},next:{title:"condition",permalink:"/methods/condition/"}},s={},c=[{value:"<code>combineEvents({ events: Record<key, Event<T>>, reset?: Unit<any> })</code>",id:"combineevents-events-recordkey-eventt-reset-unitany-",level:2},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3},{value:"<code>combineEvents({ events: Array<Event<T>> })</code>",id:"combineevents-events-arrayeventt-",level:2},{value:"Formulae",id:"formulae-1",level:3},{value:"Example",id:"example-1",level:3}],m={toc:c};function d(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"combineevents"},"combineEvents"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { combineEvents } from 'patronum';\n// or\nimport { combineEvents } from 'patronum/combine-events';\n")),(0,a.kt)("h2",{id:"combineevents-events-recordkey-eventt-reset-unitany-"},(0,a.kt)("inlineCode",{parentName:"h2"},"combineEvents({ events: Record<key, Event<T>>, reset?: Unit<any> })")),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({\n events: {\n key1: event1,\n key2: event2,\n },\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When all events (",(0,a.kt)("inlineCode",{parentName:"li"},"event1")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"event2")," from example) is triggered, trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with data from events mapped to ",(0,a.kt)("inlineCode",{parentName:"li"},"key1")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"key2"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"events")," \u2014 Object of events")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," \u2014 Event with the same shape as ",(0,a.kt)("inlineCode",{parentName:"li"},"events"),", that triggered after all ",(0,a.kt)("inlineCode",{parentName:"li"},"events")," triggered")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const first = createEvent<number>();\nconst second = createEvent<string>();\nconst third = createEvent<boolean>();\n\nconst target = combineEvents({\n events: {\n a: first,\n second,\n another: third,\n },\n});\n\ntarget.watch((object) => {\n console.log('first event data', object.a);\n console.log('second event data', object.second);\n console.log('third event data', object.another);\n});\n\nfirst(15); // nothing\nsecond('wow'); // nothing\nthird(false); // target triggered with object\n")),(0,a.kt)("h2",{id:"combineevents-events-arrayeventt-"},(0,a.kt)("inlineCode",{parentName:"h2"},"combineEvents({ events: Array<Event<T>> })")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({ events: [event1, event2] });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When all events (",(0,a.kt)("inlineCode",{parentName:"li"},"event1")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"event2")," from example) is triggered, trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with array from events with the same order as events")),(0,a.kt)("h3",{id:"example-1"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const first = createEvent<number>();\nconst second = createEvent<string>();\nconst third = createEvent<boolean>();\n\nconst target = combineEvents({ events: [first, second, third] });\n\ntarget.watch((list) => {\n console.log('first event data', list[0]);\n console.log('second event data', list[1]);\n console.log('third event data', list[2]);\n});\n\nfirst(15); // nothing\nsecond('wow'); // nothing\nthird(false); // target triggered with array\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e9221267.8faa3552.js b/assets/js/e9221267.8faa3552.js new file mode 100644 index 00000000..031ce8f2 --- /dev/null +++ b/assets/js/e9221267.8faa3552.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[916],{4852:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>v});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),m=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=m(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=m(n),u=a,v=d["".concat(s,".").concat(u)]||d[u]||p[u]||i;return n?r.createElement(v,o(o({ref:t},c),{},{components:n})):r.createElement(v,o({ref:t},c))}));function v(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var m=2;m<i;m++)o[m]=n[m];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},5500:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>m});var r=n(4011),a=(n(9231),n(4852));const i={},o="combineEvents",l={unversionedId:"combine-events/readme",id:"combine-events/readme",title:"combineEvents",description:"combineEvents(events)",source:"@site/../src/combine-events/readme.md",sourceDirName:"combine-events",slug:"/combine-events/",permalink:"/methods/combine-events/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/combine-events/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"and",permalink:"/methods/and/"},next:{title:"condition",permalink:"/methods/condition/"}},s={},m=[{value:"<code>combineEvents(events)</code>",id:"combineeventsevents",level:2},{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"<code>combineEvents({ events, reset, target })</code>",id:"combineevents-events-reset-target-",level:2},{value:"Motivation",id:"motivation-1",level:3},{value:"Formulae",id:"formulae-1",level:3},{value:"Arguments",id:"arguments-1",level:3},{value:"Returns",id:"returns-1",level:3},{value:"Example",id:"example",level:3}],c={toc:m},d="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"combineevents"},"combineEvents"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { combineEvents } from 'patronum';\n// or\nimport { combineEvents } from 'patronum/combine-events';\n")),(0,a.kt)("h2",{id:"combineeventsevents"},(0,a.kt)("inlineCode",{parentName:"h2"},"combineEvents(events)")),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 2.1.0\nUse ",(0,a.kt)("inlineCode",{parentName:"p"},"combineEvents({ events })")," with patronum < 2.1.0")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"Method allows to trigger event when all of given events are triggered, with payloads ov given events"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Consider using stores with combine in case of lazy-loaded modules, as they could miss some updates happened before module loaded")),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({ key1: event1, key2: event2 });\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When all events are triggered, trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"{key1: firstPayload, key2: secondPayload}"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents([event1, event2]);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When all events are triggered, trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"[firstPayload, secondPayload]"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"events")," \u2014 Object or array with events")),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," \u2014 Event with the same shape as ",(0,a.kt)("inlineCode",{parentName:"li"},"events"),", that triggered after all ",(0,a.kt)("inlineCode",{parentName:"li"},"events")," triggered")),(0,a.kt)("h2",{id:"combineevents-events-reset-target-"},(0,a.kt)("inlineCode",{parentName:"h2"},"combineEvents({ events, reset, target })")),(0,a.kt)("h3",{id:"motivation-1"},"Motivation"),(0,a.kt)("p",null,"Object form which allow to pass ",(0,a.kt)("inlineCode",{parentName:"p"},"reset")," unit or ",(0,a.kt)("inlineCode",{parentName:"p"},"target")),(0,a.kt)("h3",{id:"formulae-1"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({\n events: {\n key1: event1,\n key2: event2,\n },\n reset: resetUnit,\n target: targetUnit,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When all events are triggered, trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"{key1: firstPayload, key2: secondPayload}"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const target = combineEvents({\n events: [event1, event2],\n reset: resetUnit,\n target: targetUnit,\n});\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"When all events are triggered, trigger ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," with ",(0,a.kt)("inlineCode",{parentName:"li"},"[firstPayload, secondPayload]"))),(0,a.kt)("h3",{id:"arguments-1"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"events")," \u2014 Object or array with events"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"reset")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit<any>)")," - Optional. Any unit which will reset state of ",(0,a.kt)("inlineCode",{parentName:"li"},"combineEvents")," and collecting of payloads will start from scratch"),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," ",(0,a.kt)("inlineCode",{parentName:"li"},"(Unit<Shape>)")," - Optional. Any unit with type matching ",(0,a.kt)("inlineCode",{parentName:"li"},"events")," shape")),(0,a.kt)("h3",{id:"returns-1"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"target")," \u2014 When ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," option is not defined, will return new event with the same shape as ",(0,a.kt)("inlineCode",{parentName:"li"},"events"),", otherwise ",(0,a.kt)("inlineCode",{parentName:"li"},"target")," unit will returns")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const first = createEvent<number>();\nconst second = createEvent<string>();\nconst third = createEvent<boolean>();\nconst target = createEvent<{ a: number; b: string; c: boolean }>();\nconst reset = createEvent();\n\ncombineEvents({\n events: {\n a: first,\n b: second,\n c: third,\n },\n reset,\n target,\n});\n\ntarget.watch((object) => {\n console.log('first event data', object.a);\n console.log('second event data', object.b);\n console.log('third event data', object.c);\n});\n\nfirst(15); // nothing\nsecond('wow'); // nothing\nthird(false); // target triggered with {a: 15, b: 'wow', c: false}\n\nfirst(10);\nsecond('-');\n\nreset(); // combineEvents state is erased\n\nthird(true); // nothing, as it's a first saved payload\nfirst(0);\nsecond('ok'); // target triggered with {a: 0, b: 'ok', c: true}\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f304a758.6729241d.js b/assets/js/f304a758.6729241d.js deleted file mode 100644 index eee37ee4..00000000 --- a/assets/js/f304a758.6729241d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[549],{9613:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(9496);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),m=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=m(e.components);return r.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=m(n),d=a,h=c["".concat(s,".").concat(d)]||c[d]||p[d]||o;return n?r.createElement(h,l(l({ref:t},u),{},{components:n})):r.createElement(h,l({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=c;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var m=2;m<o;m++)l[m]=n[m];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}c.displayName="MDXCreateElement"},5724:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>m});var r=n(2081),a=(n(9496),n(9613));const o={},l="either",i={unversionedId:"either/readme",id:"either/readme",title:"either",description:"patronum 1.11.0",source:"@site/../src/either/readme.md",sourceDirName:"either",slug:"/either/",permalink:"/methods/either/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/either/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"delay",permalink:"/methods/delay/"},next:{title:"empty (experimental)",permalink:"/methods/empty/"}},s={},m=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Object form arguments",id:"object-form-arguments",level:3},{value:"Example",id:"example",level:3},{value:"Select just one argument",id:"select-just-one-argument",level:3},{value:"Alternative",id:"alternative",level:3}],u={toc:m};function p(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"either"},"either"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { either } from 'patronum';\n// or\nimport { either } from 'patronum/either';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method select one or other value based on condition.\nYou can think about it as a ternary operator ",(0,a.kt)("inlineCode",{parentName:"p"},"a ? b : c"),"."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = either($filter, then, other);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains value of ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains value of ",(0,a.kt)("inlineCode",{parentName:"li"},"other")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"$filter: Store<boolean>")," \u2014 The store contains condition how to select between ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"other")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then: Store<Then> | Then")," \u2014 First value can be a Store, and returned when ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," is ",(0,a.kt)("inlineCode",{parentName:"li"},"true")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"other: Store<Other> | Other")," \u2014 Second value can be a Store too, returned only when ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Then")," \u2014 Generic type argument. Required only to distinguish this type from ",(0,a.kt)("inlineCode",{parentName:"li"},"Other")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Other")," \u2014 Generic type argument used for the alternative value when ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," is ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store<Then | Other>")," \u2014 Store contains one of the value depends on ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," value")),(0,a.kt)("h3",{id:"object-form-arguments"},"Object form arguments"),(0,a.kt)("p",null,"For some cases it is useful to add names for each argument."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = either({\n filter,\n then,\n other,\n});\n")),(0,a.kt)("p",null,"Types, descriptions, and usage the same as for positional arguments."),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $showLatest = createStore(false);\nconst $latestTweets = createStore<Tweet[]>([]);\nconst $recommendedTweets = createStore<Tweet[]>([]);\n\nexport const $tweets = either($showLatest, $latestTweets, $recommendedTweets);\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/NGmPTxSG"},"Try it")),(0,a.kt)("h3",{id:"select-just-one-argument"},"Select just one argument"),(0,a.kt)("p",null,"Sometimes we want to write an inverted expression, like this imperative code:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"if (!active) {\n return another;\n}\nreturn null;\n")),(0,a.kt)("p",null,"We can write exactly ",(0,a.kt)("inlineCode",{parentName:"p"},"null")," as is:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $result = either($active, null, $another); // Store<null | Another>\n")),(0,a.kt)("p",null,"We may want to use ",(0,a.kt)("inlineCode",{parentName:"p"},"not")," for condition:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { either, not } from 'patronum';\n\nconst $result = either(not($active), $another, null);\n")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, combine } from 'effector';\nconst $showLatest = createStore(false);\nconst $latestTweets = createStore<Tweet[]>([]);\nconst $recommendedTweets = createStore<Tweet[]>([]);\n\nexport const $tweets = combine(\n $showLatest,\n $latestTweets,\n $recommendedTweets,\n (showLatest, latestTweets, recommendedTweets) =>\n showLatest ? latestTweets : recommendedTweets,\n);\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f304a758.756c8e8b.js b/assets/js/f304a758.756c8e8b.js new file mode 100644 index 00000000..7f1506e8 --- /dev/null +++ b/assets/js/f304a758.756c8e8b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[549],{4852:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(9231);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),m=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=m(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=m(n),d=a,h=p["".concat(s,".").concat(d)]||p[d]||c[d]||o;return n?r.createElement(h,l(l({ref:t},u),{},{components:n})):r.createElement(h,l({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var m=2;m<o;m++)l[m]=n[m];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},366:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>m});var r=n(4011),a=(n(9231),n(4852));const o={},l="either",i={unversionedId:"either/readme",id:"either/readme",title:"either",description:"patronum 1.11.0",source:"@site/../src/either/readme.md",sourceDirName:"either",slug:"/either/",permalink:"/methods/either/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/either/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"delay",permalink:"/methods/delay/"},next:{title:"empty (experimental)",permalink:"/methods/empty/"}},s={},m=[{value:"Motivation",id:"motivation",level:3},{value:"Formulae",id:"formulae",level:3},{value:"Arguments",id:"arguments",level:3},{value:"Returns",id:"returns",level:3},{value:"Object form arguments",id:"object-form-arguments",level:3},{value:"Example",id:"example",level:3},{value:"Select just one argument",id:"select-just-one-argument",level:3},{value:"Alternative",id:"alternative",level:3}],u={toc:m},p="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"either"},"either"),(0,a.kt)("admonition",{title:"since",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"patronum 1.11.0")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { either } from 'patronum';\n// or\nimport { either } from 'patronum/either';\n")),(0,a.kt)("h3",{id:"motivation"},"Motivation"),(0,a.kt)("p",null,"The method select one or other value based on condition.\nYou can think about it as a ternary operator ",(0,a.kt)("inlineCode",{parentName:"p"},"a ? b : c"),"."),(0,a.kt)("h3",{id:"formulae"},"Formulae"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = either($filter, then, other);\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains value of ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"true")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result")," store contains value of ",(0,a.kt)("inlineCode",{parentName:"li"},"other")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," store contains ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"arguments"},"Arguments"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"$filter: Store<boolean>")," \u2014 The store contains condition how to select between ",(0,a.kt)("inlineCode",{parentName:"li"},"then")," and ",(0,a.kt)("inlineCode",{parentName:"li"},"other")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"then: Store<Then> | Then")," \u2014 First value can be a Store, and returned when ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," is ",(0,a.kt)("inlineCode",{parentName:"li"},"true")),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("inlineCode",{parentName:"li"},"other: Store<Other> | Other")," \u2014 Second value can be a Store too, returned only when ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," if ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Then")," \u2014 Generic type argument. Required only to distinguish this type from ",(0,a.kt)("inlineCode",{parentName:"li"},"Other")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Other")," \u2014 Generic type argument used for the alternative value when ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," is ",(0,a.kt)("inlineCode",{parentName:"li"},"false"))),(0,a.kt)("h3",{id:"returns"},"Returns"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"$result: Store<Then | Other>")," \u2014 Store contains one of the value depends on ",(0,a.kt)("inlineCode",{parentName:"li"},"$filter")," value")),(0,a.kt)("h3",{id:"object-form-arguments"},"Object form arguments"),(0,a.kt)("p",null,"For some cases it is useful to add names for each argument."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"$result = either({\n filter,\n then,\n other,\n});\n")),(0,a.kt)("p",null,"Types, descriptions, and usage the same as for positional arguments."),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $showLatest = createStore(false);\nconst $latestTweets = createStore<Tweet[]>([]);\nconst $recommendedTweets = createStore<Tweet[]>([]);\n\nexport const $tweets = either($showLatest, $latestTweets, $recommendedTweets);\n")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://share.effector.dev/NGmPTxSG"},"Try it")),(0,a.kt)("h3",{id:"select-just-one-argument"},"Select just one argument"),(0,a.kt)("p",null,"Sometimes we want to write an inverted expression, like this imperative code:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"if (!active) {\n return another;\n}\nreturn null;\n")),(0,a.kt)("p",null,"We can write exactly ",(0,a.kt)("inlineCode",{parentName:"p"},"null")," as is:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"const $result = either($active, null, $another); // Store<null | Another>\n")),(0,a.kt)("p",null,"We may want to use ",(0,a.kt)("inlineCode",{parentName:"p"},"not")," for condition:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { either, not } from 'patronum';\n\nconst $result = either(not($active), $another, null);\n")),(0,a.kt)("h3",{id:"alternative"},"Alternative"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { createStore, combine } from 'effector';\nconst $showLatest = createStore(false);\nconst $latestTweets = createStore<Tweet[]>([]);\nconst $recommendedTweets = createStore<Tweet[]>([]);\n\nexport const $tweets = combine(\n $showLatest,\n $latestTweets,\n $recommendedTweets,\n (showLatest, latestTweets, recommendedTweets) =>\n showLatest ? latestTweets : recommendedTweets,\n);\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f6536843.20f6a121.js b/assets/js/f6536843.20f6a121.js new file mode 100644 index 00000000..ab241cdc --- /dev/null +++ b/assets/js/f6536843.20f6a121.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[613],{4852:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});var a=n(9231);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},s=Object.keys(e);for(a=0;a<s.length;a++)n=s[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)n=s[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),u=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(o.Provider,{value:t},e.children)},f="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),f=u(n),m=r,d=f["".concat(o,".").concat(m)]||f[m]||p[m]||s;return n?a.createElement(d,l(l({ref:t},c),{},{components:n})):a.createElement(d,l({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,l=new Array(s);l[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[f]="string"==typeof e?e:r,l[1]=i;for(var u=2;u<s;u++)l[u]=n[u];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},4019:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>u});var a=n(4011),r=(n(9231),n(4852));const s={},l="status",i={unversionedId:"status/readme",id:"status/readme",title:"status",description:"Motivation",source:"@site/../src/status/readme.md",sourceDirName:"status",slug:"/status/",permalink:"/methods/status/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/status/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"spread",permalink:"/methods/spread/"},next:{title:"throttle",permalink:"/methods/throttle/"}},o={},u=[{value:"Motivation",id:"motivation",level:2},{value:"Formulae",id:"formulae",level:2},{value:"Arguments",id:"arguments",level:2},{value:"Returns",id:"returns",level:2},{value:"Example",id:"example",level:2},{value:"Successful effect call changing status to "done"",id:"successful-effect-call-changing-status-to-done",level:3},{value:"Initial status",id:"initial-status",level:3},{value:"Clear (reset) status",id:"clear-reset-status",level:3}],c={toc:u},f="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(f,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"status"},"status"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { status } from 'patronum';\n// or\nimport { status } from 'patronum/status';\n")),(0,r.kt)("h2",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"This method returns current status of effect as store with string enumeration.\nIt is useful to show correct state of process in UI."),(0,r.kt)("h2",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$status = status(effect);\n$status = status({ effect, defaultValue });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"status")," is run, set ",(0,r.kt)("inlineCode",{parentName:"li"},"defaultValue")," value to ",(0,r.kt)("inlineCode",{parentName:"li"},"$status")),(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effect")," is called, set ",(0,r.kt)("inlineCode",{parentName:"li"},"pending")," status."),(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effect")," is succeeded, set ",(0,r.kt)("inlineCode",{parentName:"li"},"done")," status."),(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effect")," is failed, set ",(0,r.kt)("inlineCode",{parentName:"li"},"fail")," status.")),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Shorthand ",(0,r.kt)("inlineCode",{parentName:"p"},"status(effect)")," is available since patronum 2.1.0\nUse ",(0,r.kt)("inlineCode",{parentName:"p"},"status({ effect })")," with patronum < 2.1.0")),(0,r.kt)("h2",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"effect")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Effect<P, R>)")," \u2014 any effect, that you need to watch status"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"defaultValue")," ",(0,r.kt)("inlineCode",{parentName:"li"},"('initial' | 'pending' | 'done' | 'fail')")," ",(0,r.kt)("em",{parentName:"li"},"optional")," \u2014 when ",(0,r.kt)("inlineCode",{parentName:"li"},"$status")," initializes, set initial value for it. By default value is ",(0,r.kt)("inlineCode",{parentName:"li"},'"initial"'))),(0,r.kt)("h2",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$status")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<'initial' | 'pending' | 'done' | 'fail'>)")," \u2014 Store that saves current state of the effects")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Note: use can manually reset status, just use ",(0,r.kt)("inlineCode",{parentName:"p"},"$status.reset(event)"))),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"successful-effect-call-changing-status-to-done"},'Successful effect call changing status to "done"'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},'import { createEvent, createEffect } from \'effector\';\nimport { status } from \'patronum/status\';\n\nconst effect = createEffect(() => Promise.resolve(null));\nconst $status = status({ effect });\n\n$status.watch((value) => console.log(`status: ${value}`));\n// => status: "initial"\n\neffect();\n// => status: "pending"\n// => status: "done"\n')),(0,r.kt)("h3",{id:"initial-status"},"Initial status"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createEffect } from 'effector';\nimport { status } from 'patronum/status';\n\nconst effect = createEffect(() => Promise.resolve(null));\nconst $status = status({ effect, defaultValue: 'pending' });\n\n$status.watch((value) => console.log(`status: ${value}`));\n// => status: \"pending\"\n\neffect();\n// Nothing, because $status is already pending\n// => status: \"done\"\n")),(0,r.kt)("h3",{id:"clear-reset-status"},"Clear (reset) status"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},'import { createEvent, createEffect } from \'effector\';\nimport { status } from \'patronum/status\';\n\nconst reset = createEvent();\nconst effect = createEffect(() => new Promise((resolve) => setTimeout(resolve, 100)));\n\nconst $status = status({ effect });\n$status.reset(reset);\n\n$status.watch((value) => console.log(`status: ${value}`));\n// => status: "initial"\n\neffect();\n// => status: "pending"\n// => status: "done"\n\nreset();\n// => status: "initial"\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f6536843.7e6a94bf.js b/assets/js/f6536843.7e6a94bf.js deleted file mode 100644 index aee1b461..00000000 --- a/assets/js/f6536843.7e6a94bf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[613],{9613:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var a=n(9496);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},s=Object.keys(e);for(a=0;a<s.length;a++)n=s[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)n=s[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),u=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(o.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=r,d=p["".concat(o,".").concat(m)]||p[m]||f[m]||s;return n?a.createElement(d,l(l({ref:t},c),{},{components:n})):a.createElement(d,l({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,l=new Array(s);l[0]=p;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeof e?e:r,l[1]=i;for(var u=2;u<s;u++)l[u]=n[u];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}p.displayName="MDXCreateElement"},3928:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>f,frontMatter:()=>s,metadata:()=>i,toc:()=>u});var a=n(2081),r=(n(9496),n(9613));const s={},l="status",i={unversionedId:"status/readme",id:"status/readme",title:"status",description:"Motivation",source:"@site/../src/status/readme.md",sourceDirName:"status",slug:"/status/",permalink:"/methods/status/",draft:!1,editUrl:"https://github.com/effector/patronum/tree/main/src/../src/status/readme.md",tags:[],version:"current",frontMatter:{},sidebar:"methodsSidebar",previous:{title:"spread",permalink:"/methods/spread/"},next:{title:"throttle",permalink:"/methods/throttle/"}},o={},u=[{value:"Motivation",id:"motivation",level:2},{value:"Formulae",id:"formulae",level:2},{value:"Arguments",id:"arguments",level:2},{value:"Returns",id:"returns",level:2},{value:"Example",id:"example",level:2},{value:"Successful effect call changing status to "done"",id:"successful-effect-call-changing-status-to-done",level:3},{value:"Initial status",id:"initial-status",level:3},{value:"Clear (reset) status",id:"clear-reset-status",level:3}],c={toc:u};function f(e){let{components:t,...n}=e;return(0,r.kt)("wrapper",(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"status"},"status"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { status } from 'patronum';\n// or\nimport { status } from 'patronum/status';\n")),(0,r.kt)("h2",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"This method returns current status of effect as store with string enumeration.\nIt is useful to show correct state of process in UI."),(0,r.kt)("h2",{id:"formulae"},"Formulae"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"$status = status({ effect, defaultValue });\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"status")," is run, set ",(0,r.kt)("inlineCode",{parentName:"li"},"defaultValue")," value to ",(0,r.kt)("inlineCode",{parentName:"li"},"$status")),(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effect")," is called, set ",(0,r.kt)("inlineCode",{parentName:"li"},"pending")," status."),(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effect")," is succeeded, set ",(0,r.kt)("inlineCode",{parentName:"li"},"done")," status."),(0,r.kt)("li",{parentName:"ul"},"When ",(0,r.kt)("inlineCode",{parentName:"li"},"effect")," is failed, set ",(0,r.kt)("inlineCode",{parentName:"li"},"fail")," status.")),(0,r.kt)("h2",{id:"arguments"},"Arguments"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"effect")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Effect<P, R>)")," \u2014 any effect, that you need to watch status"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"defaultValue")," ",(0,r.kt)("inlineCode",{parentName:"li"},"('initial' | 'pending' | 'done' | 'fail')")," ",(0,r.kt)("em",{parentName:"li"},"optional")," \u2014 when ",(0,r.kt)("inlineCode",{parentName:"li"},"$status")," initializes, set initial value for it. By default value is ",(0,r.kt)("inlineCode",{parentName:"li"},'"initial"'))),(0,r.kt)("h2",{id:"returns"},"Returns"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"$status")," ",(0,r.kt)("inlineCode",{parentName:"li"},"(Store<'initial' | 'pending' | 'done' | 'fail'>)")," \u2014 Store that saves current state of the effects")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Note: use can manually reset status, just use ",(0,r.kt)("inlineCode",{parentName:"p"},"$status.reset(event)"))),(0,r.kt)("h2",{id:"example"},"Example"),(0,r.kt)("h3",{id:"successful-effect-call-changing-status-to-done"},'Successful effect call changing status to "done"'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},'import { createEvent, createEffect } from \'effector\';\nimport { status } from \'patronum/status\';\n\nconst effect = createEffect(() => Promise.resolve(null));\nconst $status = status({ effect });\n\n$status.watch((value) => console.log(`status: ${value}`));\n// => status: "initial"\n\neffect();\n// => status: "pending"\n// => status: "done"\n')),(0,r.kt)("h3",{id:"initial-status"},"Initial status"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createEvent, createEffect } from 'effector';\nimport { status } from 'patronum/status';\n\nconst effect = createEffect(() => Promise.resolve(null));\nconst $status = status({ effect, defaultValue: 'pending' });\n\n$status.watch((value) => console.log(`status: ${value}`));\n// => status: \"pending\"\n\neffect();\n// Nothing, because $status is already pending\n// => status: \"done\"\n")),(0,r.kt)("h3",{id:"clear-reset-status"},"Clear (reset) status"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},'import { createEvent, createEffect } from \'effector\';\nimport { status } from \'patronum/status\';\n\nconst reset = createEvent();\nconst effect = createEffect(\n () => new Promise((resolve) => setTimeout(resolve, 100)),\n);\n\nconst $status = status({ effect });\n$status.reset(reset);\n\n$status.watch((value) => console.log(`status: ${value}`));\n// => status: "initial"\n\neffect();\n// => status: "pending"\n// => status: "done"\n\nreset();\n// => status: "initial"\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.535b577d.js b/assets/js/main.535b577d.js deleted file mode 100644 index 64f213c9..00000000 --- a/assets/js/main.535b577d.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.535b577d.js.LICENSE.txt */ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[179],{2320:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var r=n(9496);function a(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},784:(e,t,n)=>{var r={"./":1884};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=784},3481:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(9496),a=n(2081),o=n(314),i=n.n(o),l=n(6887);const s={"08154ee9":[()=>n.e(896).then(n.bind(n,905)),"@site/../src/throttle/readme.md",905],"08f30e7d":[()=>n.e(222).then(n.bind(n,1052)),"@site/../src/every/readme.md",1052],"1178bc06":[()=>n.e(502).then(n.bind(n,6070)),"@site/../src/spread/readme.md",6070],17896441:[()=>Promise.all([n.e(532),n.e(93),n.e(918)]).then(n.bind(n,8275)),"@theme/DocItem",8275],"1a4e3797":[()=>Promise.all([n.e(532),n.e(920)]).then(n.bind(n,3699)),"@theme/SearchPage",3699],"1ae5d93b":[()=>n.e(900).then(n.bind(n,4183)),"@site/../src/equals/readme.md",4183],"1be78505":[()=>Promise.all([n.e(532),n.e(514)]).then(n.bind(n,5454)),"@theme/DocPage",5454],"1df93b7f":[()=>n.e(237).then(n.bind(n,5751)),"@site/src/pages/index.tsx",5751],"1f391b9e":[()=>Promise.all([n.e(532),n.e(93),n.e(85)]).then(n.bind(n,8048)),"@theme/MDXPage",8048],"2b95ca9d":[()=>n.e(817).then(n.bind(n,1097)),"@site/../src/snapshot/readme.md",1097],"308aca62":[()=>n.e(687).then(n.bind(n,4302)),"@site/../src/not/readme.md",4302],"33c22581":[()=>n.e(299).then(n.bind(n,7934)),"@site/../src/some/readme.md",7934],"48e94e84":[()=>n.e(777).then(n.t.bind(n,5745,19)),"/home/runner/work/patronum/patronum/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],"4af54caf":[()=>n.e(774).then(n.bind(n,199)),"@site/../src/and/readme.md",199],"4d9d995f":[()=>n.e(876).then(n.bind(n,8392)),"@site/../src/reshape/readme.md",8392],"5b0e0e08":[()=>n.e(34).then(n.bind(n,3196)),"@site/../src/condition/readme.md",3196],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,6809)),"@generated/docusaurus.config",6809],"6256d5c3":[()=>n.e(151).then(n.bind(n,4668)),"@site/../src/interval/readme.md",4668],"67c026b6":[()=>n.e(873).then(n.bind(n,691)),"@site/../src/debug/readme.md",691],"84071e39":[()=>n.e(231).then(n.bind(n,8806)),"@site/../src/pending/readme.md",8806],"8d0041db":[()=>n.e(885).then(n.t.bind(n,3769,19)),"/home/runner/work/patronum/patronum/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],"8d76850e":[()=>n.e(609).then(n.bind(n,2874)),"@site/../src/once/readme.md",2874],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],"978828ab":[()=>n.e(172).then(n.t.bind(n,7085,19)),"/home/runner/work/patronum/patronum/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",7085],"97ffe59f":[()=>n.e(153).then(n.bind(n,4566)),"@site/../src/index.md",4566],"9dc53199":[()=>n.e(84).then(n.bind(n,6604)),"@site/../src/split-map/readme.md",6604],a765e1a2:[()=>n.e(825).then(n.bind(n,3806)),"@site/src/pages/docs/migration-guide.md",3806],a7fdbc71:[()=>n.e(732).then(n.bind(n,9930)),"@site/../src/time/readme.md",9930],a9298e25:[()=>n.e(585).then(n.bind(n,8603)),"@site/src/pages/docs/installation.md",8603],ad512b16:[()=>n.e(485).then(n.bind(n,4447)),"@site/../src/delay/readme.md",4447],b41febc4:[()=>n.e(35).then(n.bind(n,4653)),"@site/../src/empty/readme.md",4653],c7a80478:[()=>n.e(169).then(n.bind(n,6960)),"@site/../src/reset/readme.md",6960],c9ae8b2d:[()=>n.e(945).then(n.bind(n,7273)),"@site/../src/format/readme.md",7273],deda2cf3:[()=>n.e(493).then(n.bind(n,3419)),"@site/../src/debounce/readme.md",3419],e09d216d:[()=>n.e(236).then(n.bind(n,7788)),"@site/../src/in-flight/readme.md",7788],e55f1e0e:[()=>n.e(778).then(n.bind(n,4995)),"@site/../src/or/readme.md",4995],e9221267:[()=>n.e(916).then(n.bind(n,6035)),"@site/../src/combine-events/readme.md",6035],f304a758:[()=>n.e(549).then(n.bind(n,5724)),"@site/../src/either/readme.md",5724],f6536843:[()=>n.e(613).then(n.bind(n,3928)),"@site/../src/status/readme.md",3928]};function u(e){let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var c=n(3280),d=n(8377);function f(e,t){if("*"===e)return i()({loading:u,loader:()=>n.e(874).then(n.bind(n,7874)),modules:["@theme/NotFound"],webpack:()=>[7874],render(e,t){const n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const o=l[`${e}-${t}`],f={},p=[],m=[],h=(0,c.Z)(o);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=s[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:u,loader:f,modules:p,webpack:()=>m,render(t,n){const i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let o=i;const l=n.split(".");l.slice(0,-1).forEach((e=>{o=o[e]})),o[l[l.length-1]]=a}));const l=i.__comp;delete i.__comp;const s=i.__context;return delete i.__context,r.createElement(d.z,{value:s},r.createElement(l,(0,a.Z)({},i,n)))}})}const p=[{path:"/docs/installation",component:f("/docs/installation","b6a"),exact:!0},{path:"/docs/migration-guide",component:f("/docs/migration-guide","f5d"),exact:!0},{path:"/search",component:f("/search","f2b"),exact:!0},{path:"/methods",component:f("/methods","c65"),routes:[{path:"/methods/",component:f("/methods/","0f3"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/and/",component:f("/methods/and/","663"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/combine-events/",component:f("/methods/combine-events/","d44"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/condition/",component:f("/methods/condition/","f76"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/debounce/",component:f("/methods/debounce/","69f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/debug/",component:f("/methods/debug/","0bc"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/delay/",component:f("/methods/delay/","131"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/either/",component:f("/methods/either/","57a"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/empty/",component:f("/methods/empty/","6ca"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/equals/",component:f("/methods/equals/","bf2"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/every/",component:f("/methods/every/","23e"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/format/",component:f("/methods/format/","f2f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/in-flight/",component:f("/methods/in-flight/","52f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/interval/",component:f("/methods/interval/","132"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/not/",component:f("/methods/not/","07f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/once/",component:f("/methods/once/","523"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/or/",component:f("/methods/or/","fa6"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/pending/",component:f("/methods/pending/","0c7"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/reset/",component:f("/methods/reset/","f60"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/reshape/",component:f("/methods/reshape/","34d"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/snapshot/",component:f("/methods/snapshot/","b6f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/some/",component:f("/methods/some/","74c"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/split-map/",component:f("/methods/split-map/","989"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/spread/",component:f("/methods/spread/","a78"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/status/",component:f("/methods/status/","ca9"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/throttle/",component:f("/methods/throttle/","2e3"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/time/",component:f("/methods/time/","7fc"),exact:!0,sidebar:"methodsSidebar"}]},{path:"/",component:f("/","712"),exact:!0},{path:"*",component:f("*")}]},4469:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>o});var r=n(9496);const a=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),r.createElement(a.Provider,{value:n},t)}},5223:(e,t,n)=>{"use strict";var r=n(9496),a=n(7995),o=n(1),i=n(3629),l=n(5292);const s=[n(5501),n(6590),n(1627),n(6109)];var u=n(3481),c=n(3226),d=n(4984);function f(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var p=n(2081),m=n(6904),h=n(6226),g=n(887),b=n(1773),v=n(5163),y=n(1143),w=n(1600),k=n(7913),E=n(8530);function S(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,h.Z)(),n=(0,y.l)();return r.createElement(m.Z,null,Object.entries(t).map((e=>{let[t,{htmlLang:a}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:a})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function x(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.Z)(),a=function(){const{siteConfig:{url:e}}=(0,h.Z)(),{pathname:t}=(0,c.TH)();return e+(0,g.Z)(t)}(),o=t?`${n}${t}`:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function T(){const{i18n:{currentLocale:e}}=(0,h.Z)(),{metadata:t,image:n}=(0,b.L)();return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),n&&r.createElement(v.d,{image:n}),r.createElement(x,null),r.createElement(S,null),r.createElement(E.Z,{tag:k.HX,locale:e}),r.createElement(m.Z,null,t.map(((e,t)=>r.createElement("meta",(0,p.Z)({key:t},e))))))}const C=new Map;function _(e){if(C.has(e.pathname))return{...e,pathname:C.get(e.pathname)};if((0,d.f)(u.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return C.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),{...e,pathname:t}}var A=n(4469),L=n(85);function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const a=s.map((t=>{var r;const a=(null==(r=t.default)?void 0:r[e])??t[e];return null==a?void 0:a(...n)}));return()=>a.forEach((e=>null==e?void 0:e()))}const O=function(e){let{children:t,location:n,previousLocation:a}=e;return(0,r.useLayoutEffect)((()=>{a!==n&&(a&&function(e){const{hash:t}=e;if(t){const e=decodeURIComponent(t.substring(1)),n=document.getElementById(e);null==n||n.scrollIntoView()}else window.scrollTo(0,0)}(n),R("onRouteDidUpdate",{previousLocation:a,location:n}))}),[a,n]),t};function P(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(u.Z,e))).flat();return Promise.all(t.map((e=>null==e.route.component.preload?void 0:e.route.component.preload())))}class N extends r.Component{constructor(e){super(e),this.previousLocation=void 0,this.routeUpdateCleanupCb=void 0,this.previousLocation=null,this.routeUpdateCleanupCb=l.Z.canUseDOM?R("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=R("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),P(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return r.createElement(O,{previousLocation:this.previousLocation,location:t},r.createElement(c.AW,{location:t,render:()=>e}))}}const I=N,D="docusaurus-base-url-issue-banner-container",M="docusaurus-base-url-issue-banner-suggestion-container",F="__DOCUSAURUS_INSERT_BASEURL_BANNER";function B(e){return`\nwindow['${F}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${F}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${D}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${M}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n var suggestionContainer = document.getElementById('${M}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function j(){const{siteConfig:{baseUrl:e}}=(0,h.Z)();return(0,r.useLayoutEffect)((()=>{window[F]=!1}),[]),r.createElement(r.Fragment,null,!l.Z.canUseDOM&&r.createElement(m.Z,null,r.createElement("script",null,B(e))),r.createElement("div",{id:D}))}function z(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,h.Z)(),{pathname:n}=(0,c.TH)();return t&&n===e?r.createElement(j,null):null}function U(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:a,localeConfigs:o}}=(0,h.Z)(),i=(0,g.Z)(e),{htmlLang:l,direction:s}=o[a];return r.createElement(m.Z,null,r.createElement("html",{lang:l,dir:s}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),r.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&r.createElement("meta",{name:"robots",content:"noindex, nofollow"}),e&&r.createElement("link",{rel:"icon",href:i}))}var $=n(6310);function q(){const e=(0,d.H)(u.Z),t=(0,c.TH)();return r.createElement($.Z,null,r.createElement(L.M,null,r.createElement(A.t,null,r.createElement(f,null,r.createElement(U,null),r.createElement(T,null),r.createElement(z,null),r.createElement(I,{location:_(t)},e)))))}var H=n(6887);const G=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{var r;if("undefined"==typeof document)return void n();const a=document.createElement("link");a.setAttribute("rel","prefetch"),a.setAttribute("href",e),a.onload=()=>t(),a.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??(null==(r=document.getElementsByName("script")[0])?void 0:r.parentNode);null==o||o.appendChild(a)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Z=n(3280);const V=new Set,W=new Set,K=()=>{var e,t;return(null==(e=navigator.connection)?void 0:e.effectiveType.includes("2g"))||(null==(t=navigator.connection)?void 0:t.saveData)},Y={prefetch(e){if(!(e=>!K()&&!W.has(e)&&!V.has(e))(e))return!1;V.add(e);const t=(0,d.f)(u.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(H).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Z.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?G(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!K()&&!W.has(e))(e)&&(W.add(e),P(e))},Q=Object.freeze(Y);if(l.Z.canUseDOM){window.docusaurus=Q;const e=a.hydrate;P(window.location.pathname).then((()=>{e(r.createElement(i.B6,null,r.createElement(o.VK,null,r.createElement(q,null))),document.getElementById("__docusaurus"))}))}},85:(e,t,n)=>{"use strict";n.d(t,{_:()=>c,M:()=>d});var r=n(9496),a=n(6809);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/methods","versions":[{"name":"current","label":"Next","isLast":true,"path":"/methods","mainDocId":"methods","docs":[{"id":"and/readme","path":"/methods/and/","sidebar":"methodsSidebar"},{"id":"combine-events/readme","path":"/methods/combine-events/","sidebar":"methodsSidebar"},{"id":"condition/readme","path":"/methods/condition/","sidebar":"methodsSidebar"},{"id":"debounce/readme","path":"/methods/debounce/","sidebar":"methodsSidebar"},{"id":"debug/readme","path":"/methods/debug/","sidebar":"methodsSidebar"},{"id":"delay/readme","path":"/methods/delay/","sidebar":"methodsSidebar"},{"id":"either/readme","path":"/methods/either/","sidebar":"methodsSidebar"},{"id":"empty/readme","path":"/methods/empty/","sidebar":"methodsSidebar"},{"id":"equals/readme","path":"/methods/equals/","sidebar":"methodsSidebar"},{"id":"every/readme","path":"/methods/every/","sidebar":"methodsSidebar"},{"id":"format/readme","path":"/methods/format/","sidebar":"methodsSidebar"},{"id":"in-flight/readme","path":"/methods/in-flight/","sidebar":"methodsSidebar"},{"id":"interval/readme","path":"/methods/interval/","sidebar":"methodsSidebar"},{"id":"methods","path":"/methods/","sidebar":"methodsSidebar"},{"id":"not/readme","path":"/methods/not/","sidebar":"methodsSidebar"},{"id":"once/readme","path":"/methods/once/","sidebar":"methodsSidebar"},{"id":"or/readme","path":"/methods/or/","sidebar":"methodsSidebar"},{"id":"pending/readme","path":"/methods/pending/","sidebar":"methodsSidebar"},{"id":"reset/readme","path":"/methods/reset/","sidebar":"methodsSidebar"},{"id":"reshape/readme","path":"/methods/reshape/","sidebar":"methodsSidebar"},{"id":"snapshot/readme","path":"/methods/snapshot/","sidebar":"methodsSidebar"},{"id":"some/readme","path":"/methods/some/","sidebar":"methodsSidebar"},{"id":"split-map/readme","path":"/methods/split-map/","sidebar":"methodsSidebar"},{"id":"spread/readme","path":"/methods/spread/","sidebar":"methodsSidebar"},{"id":"status/readme","path":"/methods/status/","sidebar":"methodsSidebar"},{"id":"throttle/readme","path":"/methods/throttle/","sidebar":"methodsSidebar"},{"id":"time/readme","path":"/methods/time/","sidebar":"methodsSidebar"}],"draftIds":[],"sidebars":{"methodsSidebar":{"link":{"path":"/methods/","label":"Methods"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(7529);const s=JSON.parse('{"docusaurusVersion":"2.1.0","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.1.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.1.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.1.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.1.0"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"2.1.0"},"docusaurus-tailwindcss":{"type":"local"}}}'),u={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},c=r.createContext(u);function d(e){let{children:t}=e;return r.createElement(c.Provider,{value:u},t)}},6310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(9496),a=n(5292),o=n(6904),i=n(5886);function l(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}function s(e){let{error:t,tryAgain:n}=e;return r.createElement(c,{fallback:()=>r.createElement(l,{error:t,tryAgain:n})},r.createElement(o.Z,null,r.createElement("title",null,"Page Error")),r.createElement(i.Z,null,r.createElement(l,{error:t,tryAgain:n})))}const u=e=>r.createElement(s,e);class c extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??u)(e)}return e??null}}},5292:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},6904:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9496),a=n(3629);function o(e){return r.createElement(a.ql,e)}},3054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(2081),a=n(9496),o=n(1),i=n(2155),l=n(6226),s=n(4038),u=n(5292);const c=a.createContext({collectLink:()=>{}});var d=n(887);function f(e,t){var n;let{isNavLink:f,to:p,href:m,activeClassName:h,isActive:g,"data-noBrokenLinkCheck":b,autoAddBaseUrl:v=!0,...y}=e;const{siteConfig:{trailingSlash:w,baseUrl:k}}=(0,l.Z)(),{withBaseUrl:E}=(0,d.C)(),S=(0,a.useContext)(c),x=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>x.current));const T=p||m;const C=(0,s.Z)(T),_=null==T?void 0:T.replace("pathname://","");let A=void 0!==_?(L=_,v&&(e=>e.startsWith("/"))(L)?E(L):L):void 0;var L;A&&C&&(A=(0,i.applyTrailingSlash)(A,{trailingSlash:w,baseUrl:k}));const R=(0,a.useRef)(!1),O=f?o.OL:o.rU,P=u.Z.canUseIntersectionObserver,N=(0,a.useRef)();(0,a.useEffect)((()=>(!P&&C&&null!=A&&window.docusaurus.prefetch(A),()=>{P&&N.current&&N.current.disconnect()})),[N,A,P,C]);const I=(null==(n=A)?void 0:n.startsWith("#"))??!1,D=!A||!C||I;return D||b||S.collectLink(A),D?a.createElement("a",(0,r.Z)({ref:x,href:A},T&&!C&&{target:"_blank",rel:"noopener noreferrer"},y)):a.createElement(O,(0,r.Z)({},y,{onMouseEnter:()=>{R.current||null==A||(window.docusaurus.preload(A),R.current=!0)},innerRef:e=>{x.current=e,P&&e&&C&&(N.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(N.current.unobserve(e),N.current.disconnect(),null!=A&&window.docusaurus.prefetch(A))}))})),N.current.observe(e))},to:A},f&&{isActive:g,activeClassName:h}))}const p=a.forwardRef(f)},464:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,I:()=>l});var r=n(9496);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=null==t?void 0:t[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(7529);function i(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return o[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(i({message:n,id:r}),t)}function s(e){let{children:t,id:n,values:o}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");const l=i({message:t,id:n});return r.createElement(r.Fragment,null,a(l,o))}},6522:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},4038:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},887:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,Z:()=>i});var r=n(6226),a=n(4038);function o(){const{siteConfig:{baseUrl:e,url:t}}=(0,r.Z)();return{withBaseUrl:(n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(o)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)}}function i(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},6226:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9496),a=n(85);function o(){return(0,r.useContext)(a._)}},3887:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9496),a=n(4469);function o(){return(0,r.useContext)(a._)}},3280:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});function r(e){const t={};return function e(n,r){Object.entries(n).forEach((n=>{let[a,o]=n;const i=r?`${r}.${a}`:a;var l;"object"==typeof(l=o)&&l&&Object.keys(l).length>0?e(o,i):t[i]=o}))}(e),t}},8377:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>o});var r=n(9496);const a=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...null==n?void 0:n.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return r.createElement(a.Provider,{value:i},t)}},4743:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>b,gA:()=>p,WS:()=>m,_r:()=>d,Jo:()=>v,zh:()=>f,yW:()=>g,gB:()=>h});var r=n(3226),a=n(6226),o=n(6522);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,a.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=l(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}function u(e,t){const n=s(e,t),a=null==n?void 0:n.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const c={},d=()=>i("docusaurus-plugin-content-docs")??c,f=e=>function(e,t,n){void 0===t&&(t=o.m),void 0===n&&(n={});const r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return a}("docusaurus-plugin-content-docs",e,{failfast:!0});function p(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function m(e){void 0===e&&(e={});const t=p(e),{pathname:n}=(0,r.TH)();if(!t)return;return{activePlugin:t,activeVersion:s(t.pluginData,n)}}function h(e){return f(e).versions}function g(e){const t=f(e);return l(t)}function b(e){const t=f(e),{pathname:n}=(0,r.TH)();return u(t,n)}function v(e){const t=f(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=l(e);return{latestDocSuggestion:u(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},314:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var l=n(9496),s=n(507),u=[],c=[];function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function f(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=d(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function p(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var d,f;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=i({loader:null,loading:null,delay:200,timeout:null,render:p,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return u.push(g),"function"==typeof m.webpack&&c.push((function(){if((0,m.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g()})),f=d=function(t){function n(n){var r;return o(a(a(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),r._loadModule()})),g(),r.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},r}r(n,t),n.preload=function(){return g()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.loadable.report(t)})),h.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),m.timeout));var n=function(){t({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts()};h.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),o(d,"contextTypes",{loadable:s.shape({report:s.func.isRequired})}),f}function h(e){return m(d,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(f,e)};var g=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.getChildContext=function(){return{loadable:{report:this.props.report}}},n.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return b(e)}))}o(g,"propTypes",{report:s.func.isRequired}),o(g,"childContextTypes",{loadable:s.shape({report:s.func.isRequired}).isRequired}),h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){b(u).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){b(c).then(e,e)}))},e.exports=h},1627:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(9981),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},6590:(e,t,n)=>{"use strict";n.r(t);var r=n(999),a=n(6809);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(784)(`./prism-${e}`)})),delete globalThis.Prism}(r.Z)},7054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9496);const a="iconExternalLink_yUT8";function o(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:a},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},5886:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ct});var r=n(9496),a=n(5924),o=n(6310),i=n(5163),l=n(4797),s=n(1600),u=n(464),c=n(3226),d=n(3374);function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}const p="skipToContent_DFnh";function m(){const{containerRef:e,handleSkip:t}=function(){const e=(0,r.useRef)(null),{action:t}=(0,c.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.querySelector(`.${l.k.wrapper.main}`);t&&f(t)}),[]);return(0,d.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,handleSkip:n}}();return r.createElement("div",{ref:e,role:"region","aria-label":(0,u.I)({id:"theme.common.skipToMainContent"})},r.createElement("a",{href:"#",className:p,onClick:t},r.createElement(u.Z,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))}var h=n(1773),g=n(5802),b=n(2081);function v(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...l}=e;return r.createElement("svg",(0,b.Z)({viewBox:"0 0 15 15",width:t,height:n},l),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const y="closeButton_aLKC";function w(e){return r.createElement("button",(0,b.Z)({type:"button","aria-label":(0,u.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.Z)("clean-btn close",y,e.className)}),r.createElement(v,{width:14,height:14,strokeWidth:3.1}))}const k="content_sjNs";function E(e){const{announcementBar:t}=(0,h.L)(),{content:n}=t;return r.createElement("div",(0,b.Z)({},e,{className:(0,a.Z)(k,e.className),dangerouslySetInnerHTML:{__html:n}}))}const S="announcementBar_gdXL",x="announcementBarPlaceholder_iu6U",T="announcementBarClose_fzSQ",C="announcementBarContent_Bgx6";function _(){const{announcementBar:e}=(0,h.L)(),{isActive:t,close:n}=(0,g.nT)();if(!t)return null;const{backgroundColor:a,textColor:o,isCloseable:i}=e;return r.createElement("div",{className:S,style:{backgroundColor:a,color:o},role:"banner"},i&&r.createElement("div",{className:x}),r.createElement(E,{className:C}),i&&r.createElement(w,{onClick:n,className:T}))}var A=n(760),L=n(948);var R=n(5651),O=n(3687);const P=r.createContext(null);function N(e){let{children:t}=e;const n=function(){const e=(0,A.e)(),t=(0,O.HY)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,R.D9)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return r.createElement(P.Provider,{value:n},t)}function I(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function D(){const e=(0,r.useContext)(P);if(!e)throw new R.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,O.HY)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:I(o)})),[a,o,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:o}=e;const{shown:i}=D();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var F=n(7888),B=n(3887);function j(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function z(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const U={toggle:"toggle_XYdl",toggleButton:"toggleButton_NzqH",darkToggleIcon:"darkToggleIcon_MhaW",lightToggleIcon:"lightToggleIcon_eGum",toggleButtonDisabled:"toggleButtonDisabled_e800"};function $(e){let{className:t,value:n,onChange:o}=e;const i=(0,B.Z)(),l=(0,u.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,u.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,u.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)(U.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled),type:"button",onClick:()=>o("dark"===n?"light":"dark"),disabled:!i,title:l,"aria-label":l},r.createElement(j,{className:(0,a.Z)(U.toggleIcon,U.lightToggleIcon)}),r.createElement(z,{className:(0,a.Z)(U.toggleIcon,U.darkToggleIcon)})))}const q=r.memo($);function H(e){let{className:t}=e;const n=(0,h.L)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,F.I)();return n?null:r.createElement(q,{className:t,value:a,onChange:o})}var G=n(3862);function Z(){return r.createElement(G.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function V(){const e=(0,A.e)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle()},r.createElement(v,{color:"var(--ifm-color-emphasis-600)"}))}function W(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(Z,null),r.createElement(H,{className:"margin-right--md"}),r.createElement(V,null))}var K=n(3054),Y=n(887),Q=n(4038),X=n(831),J=n(7054);function ee(e){let{activeBasePath:t,activeBaseRegex:n,to:a,href:o,label:i,html:l,isDropdownLink:s,prependBaseUrlToHref:u,...c}=e;const d=(0,Y.Z)(a),f=(0,Y.Z)(t),p=(0,Y.Z)(o,{forcePrependBaseUrl:!0}),m=i&&o&&!(0,Q.Z)(o),h=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,i,m&&r.createElement(J.Z,s&&{width:12,height:12}))};return o?r.createElement(K.Z,(0,b.Z)({href:u?p:o},c,h)):r.createElement(K.Z,(0,b.Z)({to:d,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?(0,X.F)(n,t.pathname):t.pathname.startsWith(f)},c,h))}function te(e){let{className:t,isDropdownItem:n=!1,...o}=e;const i=r.createElement(ee,(0,b.Z)({className:(0,a.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},o));return n?r.createElement("li",null,i):i}function ne(e){let{className:t,isDropdownItem:n,...o}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(ee,(0,b.Z)({className:(0,a.Z)("menu__link",t)},o)))}function re(e){let{mobile:t=!1,position:n,...a}=e;const o=t?ne:te;return r.createElement(o,(0,b.Z)({},a,{activeClassName:a.activeClassName??(t?"menu__link--active":"navbar__link--active")}))}var ae=n(2414),oe=n(3318),ie=n(6226);function le(e,t){return e.some((e=>function(e,t){return!!(0,oe.Mg)(e.to,t)||!!(0,X.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function se(e){let{items:t,position:n,className:o,onClick:i,...l}=e;const s=(0,r.useRef)(null),[u,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[s]),r.createElement("div",{ref:s,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u})},r.createElement(ee,(0,b.Z)({"aria-haspopup":"true","aria-expanded":u,role:"button",href:l.to?void 0:"#",className:(0,a.Z)("navbar__link",o)},l,{onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),c(!u))}}),l.children??l.label),r.createElement("ul",{className:"dropdown__menu"},t.map(((e,n)=>r.createElement(Ue,(0,b.Z)({isDropdownItem:!0,onKeyDown:e=>{if(n===t.length-1&&"Tab"===e.key){e.preventDefault(),c(!1);const t=s.current.nextElementSibling;if(t){(t instanceof HTMLAnchorElement?t:t.querySelector("a")).focus()}}},activeClassName:"dropdown__link--active"},e,{key:n}))))))}function ue(e){let{items:t,className:n,position:o,onClick:i,...l}=e;const s=function(){const{siteConfig:{baseUrl:e}}=(0,ie.Z)(),{pathname:t}=(0,c.TH)();return t.replace(e,"/")}(),u=le(t,s),{collapsed:d,toggleCollapsed:f,setCollapsed:p}=(0,ae.u)({initialState:()=>!u});return(0,r.useEffect)((()=>{u&&p(!u)}),[s,u,p]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":d})},r.createElement(ee,(0,b.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",n)},l,{onClick:e=>{e.preventDefault(),f()}}),l.children??l.label),r.createElement(ae.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:d},t.map(((e,t)=>r.createElement(Ue,(0,b.Z)({mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active"},e,{key:t}))))))}function ce(e){let{mobile:t=!1,...n}=e;const a=t?ue:se;return r.createElement(a,n)}var de=n(1143);function fe(e){let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const pe="iconLanguage_CwT7";var me=n(7995),he=n(6904),ge=n(7608);function be(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var ve=n(2320),ye=["translations"];function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we.apply(this,arguments)}function ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(s){l=!0,a=s}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var xe="Ctrl";var Te=r.forwardRef((function(e,t){var n=e.translations,a=void 0===n?{}:n,o=Se(e,ye),i=a.buttonText,l=void 0===i?"Search":i,s=a.buttonAriaLabel,u=void 0===s?"Search":s,c=ke((0,r.useState)(null),2),d=c[0],f=c[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("\u2318"):f(xe))}),[]),r.createElement("button",we({type:"button",className:"DocSearch DocSearch-Button","aria-label":u},o,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(ve.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},l)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===xe?r.createElement(be,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Ce=n(7913);const _e={button:{buttonText:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,u.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,u.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,u.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,u.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,u.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,u.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,u.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,u.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,u.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,u.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,u.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,u.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,u.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,u.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Ae=null;function Le(e){let{hit:t,children:n}=e;return r.createElement(K.Z,{to:t.url},n)}function Re(e){let{state:t,onClose:n}=e;const{generateSearchPageLink:a}=(0,ge.O)();return r.createElement(K.Z,{to:a(t.query),onClick:n},r.createElement(u.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function Oe(e){var t;let{contextualSearch:a,externalUrlRegex:o,...i}=e;const{siteMetadata:l}=(0,ie.Z)(),s=function(){const{locale:e,tags:t}=(0,Ce._q)();return[`language:${e}`,t.map((e=>`docusaurus_tag:${e}`))]}(),u=(null==(t=i.searchParameters)?void 0:t.facetFilters)??[],d=a?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(s,u):u,f={...i.searchParameters,facetFilters:d},{withBaseUrl:p}=(0,Y.C)(),m=(0,c.k6)(),h=(0,r.useRef)(null),g=(0,r.useRef)(null),[v,y]=(0,r.useState)(!1),[w,k]=(0,r.useState)(void 0),E=(0,r.useCallback)((()=>Ae?Promise.resolve():Promise.all([n.e(391).then(n.bind(n,7391)),Promise.all([n.e(532),n.e(183)]).then(n.bind(n,9183)),Promise.all([n.e(532),n.e(803)]).then(n.bind(n,4803))]).then((e=>{let[{DocSearchModal:t}]=e;Ae=t}))),[]),S=(0,r.useCallback)((()=>{E().then((()=>{h.current=document.createElement("div"),document.body.insertBefore(h.current,document.body.firstChild),y(!0)}))}),[E,y]),x=(0,r.useCallback)((()=>{var e;y(!1),null==(e=h.current)||e.remove()}),[y]),T=(0,r.useCallback)((e=>{E().then((()=>{y(!0),k(e.key)}))}),[E,y,k]),C=(0,r.useRef)({navigate(e){let{itemUrl:t}=e;(0,X.F)(o,t)?window.location.href=t:m.push(t)}}).current,_=(0,r.useRef)((e=>e.map((e=>{if((0,X.F)(o,e.url))return e;const t=new URL(e.url);return{...e,url:p(`${t.pathname}${t.hash}`)}})))).current,A=(0,r.useMemo)((()=>e=>r.createElement(Re,(0,b.Z)({},e,{onClose:x}))),[x]),L=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",l.docusaurusVersion),e)),[l.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){(27===e.keyCode&&t||"k"===e.key&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}({isOpen:v,onOpen:S,onClose:x,onInput:T,searchButtonRef:g}),r.createElement(r.Fragment,null,r.createElement(he.Z,null,r.createElement("link",{rel:"preconnect",href:`https://${i.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})),r.createElement(Te,{onTouchStart:E,onFocus:E,onMouseOver:E,onClick:S,ref:g,translations:_e.button}),v&&Ae&&h.current&&(0,me.createPortal)(r.createElement(Ae,(0,b.Z)({onClose:x,initialScrollY:window.scrollY,initialQuery:w,navigator:C,transformItems:_,hitComponent:Le,transformSearchClient:L},i.searchPagePath&&{resultsFooterComponent:A},i,{searchParameters:f,placeholder:_e.placeholder,translations:_e.modal})),h.current))}function Pe(){const{siteConfig:e}=(0,ie.Z)();return r.createElement(Oe,e.themeConfig.algolia)}function Ne(e){return r.createElement(r.Fragment,null,r.createElement(Pe,e))}const Ie="searchBox_u3D6";function De(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,a.Z)(n,Ie)},t)}var Me=n(4743),Fe=n(5205);var Be=n(4390);const je=e=>e.docs.find((t=>t.id===e.mainDocId));const ze={default:re,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...o}=e;const{i18n:{currentLocale:i,locales:l,localeConfigs:s}}=(0,ie.Z)(),c=(0,de.l)(),d=[...n,...l.map((e=>{const n=`pathname://${c.createUrl({locale:e,fullyQualified:!1})}`;return{label:s[e].label,lang:s[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...a],f=t?(0,u.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):s[i].label;return r.createElement(ce,(0,b.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(fe,{className:pe}),f),items:d}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(De,{className:n},r.createElement(Ne,null))},dropdown:ce,html:function(e){let{value:t,className:n,mobile:o=!1,isDropdownItem:i=!1}=e;const l=i?"li":"div";return r.createElement(l,{className:(0,a.Z)({navbar__item:!o&&!i,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,Me.Iw)(a),l=(0,Fe.vY)(t,a);return null===l?null:r.createElement(re,(0,b.Z)({exact:!0},o,{isActive:()=>(null==i?void 0:i.path)===l.path||!(null==i||!i.sidebar)&&i.sidebar===l.sidebar,label:n??l.id,to:l.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,Me.Iw)(a),l=(0,Fe.oz)(t,a).link;if(!l)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return r.createElement(re,(0,b.Z)({exact:!0},o,{isActive:()=>(null==i?void 0:i.sidebar)===t,label:n??l.label,to:l.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:a,...o}=e;const i=(0,Fe.lO)(a)[0],l=t??i.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return r.createElement(re,(0,b.Z)({},o,{label:l,to:s}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:a,dropdownItemsBefore:o,dropdownItemsAfter:i,...l}=e;const s=(0,Me.Iw)(n),c=(0,Me.gB)(n),{savePreferredVersionName:d}=(0,Be.J)(n),f=[...o,...c.map((e=>{const t=s.alternateDocVersions[e.name]??je(e);return{label:e.label,to:t.path,isActive:()=>e===s.activeVersion,onClick:()=>d(e.name)}})),...i],p=(0,Fe.lO)(n)[0],m=t&&f.length>1?(0,u.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):p.label,h=t&&f.length>1?void 0:je(p).path;return f.length<=1?r.createElement(re,(0,b.Z)({},l,{mobile:t,label:m,to:h,isActive:a?()=>!1:void 0})):r.createElement(ce,(0,b.Z)({},l,{mobile:t,label:m,to:h,items:f,isActive:a?()=>!1:void 0}))}};function Ue(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=ze[a];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return r.createElement(o,n)}function $e(){const e=(0,A.e)(),t=(0,h.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(Ue,(0,b.Z)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function qe(e){return r.createElement("button",(0,b.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(u.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function He(){const e=0===(0,h.L)().navbar.items.length,t=D();return r.createElement(r.Fragment,null,!e&&r.createElement(qe,{onClick:()=>t.hide()}),t.content)}function Ge(){const e=(0,A.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(M,{header:r.createElement(W,null),primaryMenu:r.createElement($e,null),secondaryMenu:r.createElement(He,null)}):null}const Ze="navbarHideable_aRw6",Ve="navbarHidden_mobg";function We(e){return r.createElement("div",(0,b.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function Ke(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,h.L)(),i=(0,A.e)(),{navbarRef:l,isNavbarVisible:s}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,L.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i<o.current)return void n(!0);if(a.current)return void(a.current=!1);const l=null==r?void 0:r.scrollY,s=document.documentElement.scrollHeight-o.current,u=window.innerHeight;l&&i>=l?n(!1):i+u<s&&n(!0)})),(0,d.S)((t=>{if(e)return t.location.hash?(a.current=!0,void n(!1)):void n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:l,className:(0,a.Z)("navbar","navbar--fixed-top",n&&[Ze,!s&&Ve],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown})},t,r.createElement(We,{onClick:i.toggle}),r.createElement(Ge,null))}function Ye(e){let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,b.Z)({className:a,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},o),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function Qe(){const e=(0,A.e)();return r.createElement("button",{onClick:e.toggle,onKeyDown:e.toggle,"aria-label":"Navigation bar toggle",className:"navbar__toggle clean-btn",type:"button",tabIndex:0},r.createElement(Ye,null))}const Xe="colorModeToggle_FBo2";function Je(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(Ue,(0,b.Z)({},e,{key:t})))))}function et(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function tt(){const e=(0,A.e)(),t=(0,h.L)().navbar.items,[n,a]=function(e){function t(e){return"left"===(e.position??"right")}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return r.createElement(et,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(Qe,null),r.createElement(Z,null),r.createElement(Je,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(Je,{items:a}),r.createElement(H,{className:Xe}),!o&&r.createElement(De,null,r.createElement(Ne,null)))})}function nt(){return r.createElement(Ke,null,r.createElement(tt,null))}function rt(e){let{item:t}=e;const{to:n,href:a,label:o,prependBaseUrlToHref:i,...l}=t,s=(0,Y.Z)(n),u=(0,Y.Z)(a,{forcePrependBaseUrl:!0});return r.createElement(K.Z,(0,b.Z)({className:"footer__link-item"},a?{href:i?u:a}:{to:s},l),o,a&&!(0,Q.Z)(a)&&r.createElement(J.Z,null))}function at(e){let{item:t}=e;return t.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement("li",{key:t.href??t.to,className:"footer__item"},r.createElement(rt,{item:t}))}function ot(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(at,{key:t,item:e})))))}function it(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement(ot,{key:t,column:e}))))}function lt(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function st(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement(rt,{item:t})}function ut(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(st,{item:e}),t.length!==n+1&&r.createElement(lt,null))))))}function ct(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(it,{columns:t}):r.createElement(ut,{links:t})}var dt=n(4100);const ft="footerLogoLink_OPts";function pt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,Y.C)(),o={light:n(t.src),dark:n(t.srcDark??t.src)};return r.createElement(dt.Z,{className:(0,a.Z)("footer__logo",t.className),alt:t.alt,sources:o,width:t.width,height:t.height,style:t.style})}function mt(e){let{logo:t}=e;return t.href?r.createElement(K.Z,{href:t.href,className:ft,target:t.target},r.createElement(pt,{logo:t})):r.createElement(pt,{logo:t})}function ht(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function gt(e){let{style:t,links:n,logo:o,copyright:i}=e;return r.createElement("footer",{className:(0,a.Z)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(o||i)&&r.createElement("div",{className:"footer__bottom text--center"},o&&r.createElement("div",{className:"margin-bottom--sm"},o),i)))}function bt(){const{footer:e}=(0,h.L)();if(!e)return null;const{copyright:t,links:n,logo:a,style:o}=e;return r.createElement(gt,{style:o,links:n&&n.length>0&&r.createElement(ct,{links:n}),logo:a&&r.createElement(mt,{logo:a}),copyright:t&&r.createElement(ht,{copyright:t})})}const vt=r.memo(bt);var yt=n(3568);const wt="docusaurus.tab.",kt=r.createContext(void 0);const Et=(0,R.Qc)([F.S,g.pl,function(e){let{children:t}=e;const n=function(){const[e,t]=(0,r.useState)({}),n=(0,r.useCallback)(((e,t)=>{(0,yt.W)(`docusaurus.tab.${e}`).set(t)}),[]);(0,r.useEffect)((()=>{try{const e={};(0,yt._)().forEach((t=>{if(t.startsWith(wt)){const n=t.substring(wt.length);e[n]=(0,yt.W)(t).get()}})),t(e)}catch(e){console.error(e)}}),[]);const a=(0,r.useCallback)(((e,r)=>{t((t=>({...t,[e]:r}))),n(e,r)}),[n]);return(0,r.useMemo)((()=>({tabGroupChoices:e,setTabGroupChoices:a})),[e,a])}();return r.createElement(kt.Provider,{value:n},t)},L.OC,Be.L5,i.VC,function(e){let{children:t}=e;return r.createElement(O.n2,null,r.createElement(A.M,null,r.createElement(N,null,t)))}]);function St(e){let{children:t}=e;return r.createElement(Et,null,t)}function xt(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(u.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(u.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}const Tt="mainWrapper_SqHV";function Ct(e){const{children:t,noFooter:n,wrapperClassName:u,title:c,description:d}=e;return(0,s.t)(),r.createElement(St,null,r.createElement(i.d,{title:c,description:d}),r.createElement(m,null),r.createElement(_,null),r.createElement(nt,null),r.createElement("div",{className:(0,a.Z)(l.k.wrapper.main,Tt,u)},r.createElement(o.Z,{fallback:e=>r.createElement(xt,e)},t)),!n&&r.createElement(vt,null))}},3862:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(2081),a=n(9496),o=n(3054),i=n(887),l=n(6226),s=n(1773),u=n(4100);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,i.Z)(t.src),dark:(0,i.Z)(t.srcDark||t.src)},l=a.createElement(u.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},l):l}function d(e){const{siteConfig:{title:t}}=(0,l.Z)(),{navbar:{title:n,logo:u}}=(0,s.L)(),{imageClassName:d,titleClassName:f,...p}=e,m=(0,i.Z)((null==u?void 0:u.href)||"/"),h=n?"":t,g=(null==u?void 0:u.alt)??h;return a.createElement(o.Z,(0,r.Z)({to:m},p,(null==u?void 0:u.target)&&{target:u.target}),u&&a.createElement(c,{logo:u,alt:g,imageClassName:d}),null!=n&&a.createElement("b",{className:f},n))}},8530:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9496),a=n(6904);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},4100:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(2081),a=n(9496),o=n(5924),i=n(3887),l=n(7888);const s={themedImage:"themedImage_JqrV","themedImage--light":"themedImage--light_AmQA","themedImage--dark":"themedImage--dark_CF8W"};function u(e){const t=(0,i.Z)(),{colorMode:n}=(0,l.I)(),{sources:u,className:c,alt:d,...f}=e,p=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,p.map((e=>a.createElement("img",(0,r.Z)({key:e,src:u[e],alt:d,className:(0,o.Z)(s.themedImage,s[`themedImage--${e}`],c)},f)))))}},2414:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,z:()=>m});var r=n(2081),a=n(9496),o=n(5292);function i(e){let{initialState:t}=e;const[n,r]=(0,a.useState)(t??!1),o=(0,a.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:o}}const l={display:"none",overflow:"hidden",height:"0px"},s={display:"block",overflow:"visible",height:"auto"};function u(e,t){const n=t?l:s;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function c(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const o=(0,a.useRef)(!1);(0,a.useEffect)((()=>{const e=t.current;function a(){const t=e.scrollHeight,n=(null==r?void 0:r.duration)??function(e){const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${(null==r?void 0:r.easing)??"ease-in-out"}`,height:`${t}px`}}function i(){const t=a();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return u(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(i(),requestAnimationFrame((()=>{e.style.height=l.height,e.style.overflow=l.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{i()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function d(e){if(!o.Z.canUseDOM)return e?l:s}function f(e){let{as:t="div",collapsed:n,children:r,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:s}=e;const f=(0,a.useRef)(null);return c({collapsibleRef:f,collapsed:n,animation:o}),a.createElement(t,{ref:f,style:s?void 0:d(n),onTransitionEnd:e=>{"height"===e.propertyName&&(u(f.current,n),null==i||i(n))},className:l},r)}function p(e){let{collapsed:t,...n}=e;const[o,i]=(0,a.useState)(!t),[l,s]=(0,a.useState)(t);return(0,a.useLayoutEffect)((()=>{t||i(!0)}),[t]),(0,a.useLayoutEffect)((()=>{o&&s(t)}),[o,t]),o?a.createElement(f,(0,r.Z)({},n,{collapsed:l})):null}function m(e){let{lazy:t,...n}=e;const r=t?p:f;return a.createElement(r,n)}},5802:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>p});var r=n(9496),a=n(3887),o=n(3568),i=n(5651),l=n(1773);const s=(0,o.W)("docusaurus.announcement.dismiss"),u=(0,o.W)("docusaurus.announcement.id"),c=()=>"true"===s.get(),d=e=>s.set(String(e)),f=r.createContext(null);function p(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.L)(),t=(0,a.Z)(),[n,o]=(0,r.useState)((()=>!!t&&c()));(0,r.useEffect)((()=>{o(c())}),[]);const i=(0,r.useCallback)((()=>{d(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&d(!1),!r&&c()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return r.createElement(f.Provider,{value:n},t)}function m(){const e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},7888:(e,t,n)=>{"use strict";n.d(t,{I:()=>g,S:()=>h});var r=n(9496),a=n(5292),o=n(5651),i=n(3568),l=n(1773);const s=r.createContext(void 0),u="theme",c=(0,i.W)(u),d="light",f="dark",p=e=>e===f?f:d;function m(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.L)(),[o,i]=(0,r.useState)((e=>a.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e))(e));(0,r.useEffect)((()=>{t&&c.del()}),[t]);const s=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(i(t),a&&(e=>{c.set(p(e))})(t)):(i(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f:d:e),c.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=c.get();null!==t&&s(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,s]);const m=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||m.current?m.current=window.matchMedia("print").matches:s(null)};return e.addListener(r),()=>e.removeListener(r)}),[s,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:s,get isDarkTheme(){return o===f},setLightTheme(){s(d)},setDarkTheme(){s(f)}})),[o,s])}function h(e){let{children:t}=e;const n=m();return r.createElement(s.Provider,{value:n},t)}function g(){const e=(0,r.useContext)(s);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},4390:(e,t,n)=>{"use strict";n.d(t,{J:()=>y,L5:()=>b,Oh:()=>w});var r=n(9496),a=n(4743),o=n(6522),i=n(1773),l=n(5205),s=n(5651),u=n(3568);const c=e=>`docs-preferred-version-${e}`,d=(e,t,n)=>{(0,u.W)(c(e),{persistence:t}).set(n)},f=(e,t)=>(0,u.W)(c(e),{persistence:t}).get(),p=(e,t)=>{(0,u.W)(c(e),{persistence:t}).del()};const m=r.createContext(null);function h(){const e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,l]=(0,r.useState)((()=>(e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}]))))(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=f(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(p(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=h();return r.createElement(m.Provider,{value:n},t)}function b(e){let{children:t}=e;return l.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function v(){const e=(0,r.useContext)(m);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function y(e){void 0===e&&(e=o.m);const t=(0,a.zh)(e),[n,i]=v(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function w(){const e=(0,a._r)(),[t]=v();function n(n){const r=e[n],{preferredVersionName:a}=t[n];return r.versions.find((e=>e.name===a))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},5914:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,b:()=>l});var r=n(9496),a=n(5651);const o=Symbol("EmptyContext"),i=r.createContext(o);function l(e){let{children:t,name:n,items:a}=e;const o=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return r.createElement(i.Provider,{value:o},t)}function s(){const e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},760:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(9496),a=n(3687),o=n(8757),i=n(3226),l=n(5651);function s(e){!function(e){const t=(0,i.k6)(),n=(0,l.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var u=n(1773);const c=r.createContext(void 0);function d(){const e=function(){const e=(0,a.HY)(),{items:t}=(0,u.L)().navbar;return 0===t.length&&!e.component}(),t=(0,o.i)(),n=!e&&"mobile"===t,[i,l]=(0,r.useState)(!1);s((()=>{if(i)return l(!1),!1}));const c=(0,r.useCallback)((()=>{l((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&l(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:i})),[e,n,c,i])}function f(e){let{children:t}=e;const n=d();return r.createElement(c.Provider,{value:n},t)}function p(){const e=r.useContext(c);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},3687:(e,t,n)=>{"use strict";n.d(t,{HY:()=>l,Zo:()=>s,n2:()=>i});var r=n(9496),a=n(5651);const o=r.createContext(null);function i(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function l(){const e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");const[,l]=i,s=(0,a.Ql)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},1600:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(9496);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7608:(e,t,n)=>{"use strict";n.d(t,{O:()=>l});var r=n(9496),a=n(3226),o=n(6226);const i="q";function l(){const e=(0,a.k6)(),{siteConfig:{baseUrl:t}}=(0,o.Z)(),[n,l]=(0,r.useState)("");(0,r.useEffect)((()=>{const e=new URLSearchParams(window.location.search).get(i)??"";l(e)}),[]);return{searchQuery:n,setSearchQuery:(0,r.useCallback)((t=>{const n=new URLSearchParams(window.location.search);t?n.set(i,t):n.delete(i),e.replace({search:n.toString()}),l(t)}),[e]),generateSearchPageLink:(0,r.useCallback)((e=>`${t}search?q=${encodeURIComponent(e)}`),[t])}}},8757:(e,t,n)=>{"use strict";n.d(t,{i:()=>u});var r=n(9496),a=n(5292);const o="desktop",i="mobile",l="ssr";function s(){return a.Z.canUseDOM?window.innerWidth>996?o:i:l}function u(){const[e,t]=(0,r.useState)((()=>s()));return(0,r.useEffect)((()=>{function e(){t(s())}return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),e}},4797:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},5205:(e,t,n)=>{"use strict";n.d(t,{Wl:()=>f,_F:()=>m,cE:()=>d,hI:()=>w,lO:()=>b,vY:()=>y,oz:()=>v,s1:()=>g});var r=n(9496),a=n(3226),o=n(4984),i=n(4743),l=n(4390),s=n(5914);function u(e){return Array.from(new Set(e))}var c=n(3318);const d=!!i._r;function f(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=f(t);if(e)return e}}}const p=(e,t)=>void 0!==e&&(0,c.Mg)(e,t);function m(e,t){return"link"===e.type?p(e.href,t):"category"===e.type&&(p(e.href,t)||((e,t)=>e.some((e=>m(e,t))))(e.items,t))}function h(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,c.Mg)(o.href,n)||e(o.items))||"link"===o.type&&(0,c.Mg)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function g(){var e;const t=(0,s.V)(),{pathname:n}=(0,a.TH)();return!1!==(null==(e=(0,i.gA)())?void 0:e.pluginData.breadcrumbs)&&t?h({sidebarItems:t.items,pathname:n}):null}function b(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,l.J)(e),a=(0,i.yW)(e);return(0,r.useMemo)((()=>u([t,n,a].filter(Boolean))),[t,n,a])}function v(e,t){const n=b(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\n Available sidebar ids are:\n - ${Object.keys(t).join("\n- ")}`);return r[1]}),[e,n])}function y(e,t){const n=b(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`DocNavbarItem: couldn't find any doc with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function w(e){let{route:t,versionMetadata:n}=e;const r=(0,a.TH)(),i=t.routes,l=i.find((e=>(0,a.LX)(r.pathname,e)));if(!l)return null;const s=l.sidebar,u=s?n.docsSidebars[s]:void 0;return{docElement:(0,o.H)(i),sidebarName:s,sidebarItems:u}}},699:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(6226);function a(e){const{siteConfig:t}=(0,r.Z)(),{title:n,titleDelimiter:a}=t;return null!=e&&e.trim().length?`${e.trim()} ${a} ${n}`:n}},5163:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>c,VC:()=>p});var r=n(9496),a=n(5924),o=n(6904),i=n(8377);function l(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(887),u=n(699);function c(e){let{title:t,description:n,keywords:a,image:i,children:l}=e;const c=(0,u.p)(t),{withBaseUrl:d}=(0,s.C)(),f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}const d=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(d),l=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(o.Z,null,r.createElement("html",{className:l})),n)}function p(e){let{children:t}=e;const n=l(),o=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const i=`plugin-id-${n.plugin.id}`;return r.createElement(f,{className:(0,a.Z)(o,i)},t)}},5651:(e,t,n)=>{"use strict";n.d(t,{D9:()=>i,Qc:()=>u,Ql:()=>s,i6:()=>l,zX:()=>o});var r=n(9496);const a=n(5292).Z.canUseDOM?r.useLayoutEffect:r.useEffect;function o(e){const t=(0,r.useRef)(e);return a((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function i(e){const t=(0,r.useRef)();return a((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){var n,r,a;super(),this.name="ReactContextError",this.message=`Hook ${(null==(n=this.stack)||null==(r=n.split("\n")[1])||null==(a=r.match(/at (?:\w+\.)?(?<name>\w+)/))?void 0:a.groups.name)??""} is called outside the <${e}>. ${t??""}`}}function s(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return r.createElement(r.Fragment,null,e.reduceRight(((e,t)=>r.createElement(t,null,e)),n))}}},831:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:()=>r})},3318:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>l});var r=n(9496),a=n(3481),o=n(6226);function i(e,t){const n=e=>{var t;return null==(t=!e||e.endsWith("/")?e:`${e}/`)?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){const{baseUrl:e}=(0,o.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.Z,baseUrl:e})),[e])}},948:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>s,RF:()=>d});var r=n(9496),a=n(5292),o=n(3887),i=n(5651);const l=r.createContext(void 0);function s(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(l.Provider,{value:n},t)}function u(){const e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}const c=()=>a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),a=(0,r.useRef)(c()),o=(0,i.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=c();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&a<e)&&(t=requestAnimationFrame(r),window.scrollTo(0,Math.floor(.85*(a-e))+e))}(),()=>t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>null==e.current?void 0:e.current()}}},7913:(e,t,n)=>{"use strict";n.d(t,{HX:()=>i,_q:()=>s,os:()=>l});var r=n(4743),a=n(6226),o=n(4390);const i="default";function l(e,t){return`docs-${e}-${t}`}function s(){const{i18n:e}=(0,a.Z)(),t=(0,r._r)(),n=(0,r.WS)(),s=(0,o.Oh)();const u=[i,...Object.keys(t).map((function(e){const r=(null==n?void 0:n.activePlugin.pluginId)===e?n.activeVersion:void 0,a=s[e],o=t[e].versions.find((e=>e.isLast));return l(e,(r??a??o).name)}))];return{locale:e.currentLocale,tags:u}}},3568:(e,t,n)=>{"use strict";n.d(t,{W:()=>l,_:()=>s});const r="localStorage";function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,o||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),o=!0),null}var t}let o=!1;const i={get:()=>null,set:()=>{},del:()=>{}};function l(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t}}(e);const n=a(null==t?void 0:t.persistence);return null===n?i:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{n.setItem(e,t)}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{n.removeItem(e)}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}}}}function s(e){void 0===e&&(e=r);const t=a(e);if(!t)return[];const n=[];for(let r=0;r<t.length;r+=1){const e=t.key(r);null!==e&&n.push(e)}return n}},1143:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(6226),a=n(3226);function o(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:o}}=(0,r.Z)(),{pathname:i}=(0,a.TH)(),l=o===n?e:e.replace(`/${o}/`,"/"),s=i.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return`${a?t:""}${function(e){return e===n?`${l}`:`${l}${e}/`}(r)}${s}`}}}},3374:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(9496),a=n(3226),o=n(5651);function i(e){const t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},1773:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(6226);function a(){return(0,r.Z)().siteConfig.themeConfig}},1309:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},2155:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="post-content";var a=n(1309);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}})},5924:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}n.d(t,{Z:()=>a});const a=function(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}},4047:(e,t,n)=>{"use strict";n.d(t,{lX:()=>w,q_:()=>C,ob:()=>p,PP:()=>A,Ep:()=>f});var r=n(2081);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],l=e&&a(e),s=t&&a(t),u=l||s;if(e&&a(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var c=i[i.length-1];n="."===c||".."===c||""===c}else n=!1;for(var d=0,f=i.length;f>=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(5408);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var h=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}var b="popstate",v="hashchange";function y(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),h||(0,l.Z)(!1);var t,n=window.history,a=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,u=i.forceRefresh,w=void 0!==u&&u,k=i.getUserConfirmation,E=void 0===k?g:k,S=i.keyLength,x=void 0===S?6:S,T=e.basename?d(s(e.basename)):"";function C(e){var t=e||{},n=t.key,r=t.state,a=window.location,o=a.pathname+a.search+a.hash;return T&&(o=c(o,T)),p(o,r,n)}function _(){return Math.random().toString(36).substr(2,x)}var A=m();function L(e){(0,r.Z)(U,e),U.length=n.length,A.notifyListeners(U.location,U.action)}function R(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(C(e.state))}function O(){N(C(y()))}var P=!1;function N(e){if(P)P=!1,L();else{A.confirmTransitionTo(e,"POP",E,(function(t){t?L({action:"POP",location:e}):function(e){var t=U.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(P=!0,F(a))}(e)}))}}var I=C(y()),D=[I.key];function M(e){return T+f(e)}function F(e){n.go(e)}var B=0;function j(e){1===(B+=e)&&1===e?(window.addEventListener(b,R),o&&window.addEventListener(v,O)):0===B&&(window.removeEventListener(b,R),o&&window.removeEventListener(v,O))}var z=!1;var U={length:n.length,action:"POP",location:I,createHref:M,push:function(e,t){var r="PUSH",o=p(e,t,_(),U.location);A.confirmTransitionTo(o,r,E,(function(e){if(e){var t=M(o),i=o.key,l=o.state;if(a)if(n.pushState({key:i,state:l},null,t),w)window.location.href=t;else{var s=D.indexOf(U.location.key),u=D.slice(0,s+1);u.push(o.key),D=u,L({action:r,location:o})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",o=p(e,t,_(),U.location);A.confirmTransitionTo(o,r,E,(function(e){if(e){var t=M(o),i=o.key,l=o.state;if(a)if(n.replaceState({key:i,state:l},null,t),w)window.location.replace(t);else{var s=D.indexOf(U.location.key);-1!==s&&(D[s]=o.key),L({action:r,location:o})}else window.location.replace(t)}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(e){void 0===e&&(e=!1);var t=A.setPrompt(e);return z||(j(1),z=!0),function(){return z&&(z=!1,j(-1)),t()}},listen:function(e){var t=A.appendListener(e);return j(1),function(){j(-1),t()}}};return U}var k="hashchange",E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+u(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:u,decodePath:s},slash:{encodePath:s,decodePath:s}};function S(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function x(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function T(e){window.location.replace(S(window.location.href)+"#"+e)}function C(e){void 0===e&&(e={}),h||(0,l.Z)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),a=n.getUserConfirmation,o=void 0===a?g:a,i=n.hashType,u=void 0===i?"slash":i,b=e.basename?d(s(e.basename)):"",v=E[u],y=v.encodePath,w=v.decodePath;function C(){var e=w(x());return b&&(e=c(e,b)),p(e)}var _=m();function A(e){(0,r.Z)(z,e),z.length=t.length,_.notifyListeners(z.location,z.action)}var L=!1,R=null;function O(){var e,t,n=x(),r=y(n);if(n!==r)T(r);else{var a=C(),i=z.location;if(!L&&(t=a,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(R===f(a))return;R=null,function(e){if(L)L=!1,A();else{var t="POP";_.confirmTransitionTo(e,t,o,(function(n){n?A({action:t,location:e}):function(e){var t=z.location,n=D.lastIndexOf(f(t));-1===n&&(n=0);var r=D.lastIndexOf(f(e));-1===r&&(r=0);var a=n-r;a&&(L=!0,M(a))}(e)}))}}(a)}}var P=x(),N=y(P);P!==N&&T(N);var I=C(),D=[f(I)];function M(e){t.go(e)}var F=0;function B(e){1===(F+=e)&&1===e?window.addEventListener(k,O):0===F&&window.removeEventListener(k,O)}var j=!1;var z={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=S(window.location.href)),n+"#"+y(b+f(e))},push:function(e,t){var n="PUSH",r=p(e,void 0,void 0,z.location);_.confirmTransitionTo(r,n,o,(function(e){if(e){var t=f(r),a=y(b+t);if(x()!==a){R=t,function(e){window.location.hash=e}(a);var o=D.lastIndexOf(f(z.location)),i=D.slice(0,o+1);i.push(t),D=i,A({action:n,location:r})}else A()}}))},replace:function(e,t){var n="REPLACE",r=p(e,void 0,void 0,z.location);_.confirmTransitionTo(r,n,o,(function(e){if(e){var t=f(r),a=y(b+t);x()!==a&&(R=t,T(a));var o=D.indexOf(f(z.location));-1!==o&&(D[o]=t),A({action:n,location:r})}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return j||(B(1),j=!0),function(){return j&&(j=!1,B(-1)),t()}},listen:function(e){var t=_.appendListener(e);return B(1),function(){B(-1),t()}}};return z}function _(e,t,n){return Math.min(Math.max(e,t),n)}function A(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,a=t.initialEntries,o=void 0===a?["/"]:a,i=t.initialIndex,l=void 0===i?0:i,s=t.keyLength,u=void 0===s?6:s,c=m();function d(e){(0,r.Z)(w,e),w.length=w.entries.length,c.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,u)}var g=_(l,0,o.length-1),b=o.map((function(e){return p(e,void 0,"string"==typeof e?h():e.key||h())})),v=f;function y(e){var t=_(w.index+e,0,w.entries.length-1),r=w.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:v,push:function(e,t){var r="PUSH",a=p(e,t,h(),w.location);c.confirmTransitionTo(a,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,h(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return w}},2535:(e,t,n)=>{"use strict";var r=n(6237),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g<i.length;++g){var b=i[g];if(!(o[b]||r&&r[b]||h&&h[b]||l&&l[b])){var v=f(n,b);try{u(t,b,v)}catch(y){}}}}return t}},3670:e=>{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},901:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},5501:(e,t,n)=>{"use strict";n.r(t)},6109:(e,t,n)=>{"use strict";n.r(t)},9981:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(e,t,n){return e<t?t:e>n?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},2767:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,l,s=a(e),u=1;u<arguments.length;u++){for(var c in i=Object(arguments[u]))n.call(i,c)&&(s[c]=i[c]);if(t){l=t(i);for(var d=0;d<l.length;d++)r.call(i,l[d])&&(s[l[d]]=i[l[d]])}}return s}},7720:(e,t,n)=>{var r=n(901);e.exports=p,e.exports.parse=o,e.exports.compile=function(e,t){return l(o(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],f=n[1],p=n.index;if(l+=e.slice(i,p),i=p+d.length,f)l+=f[1];else{var m=e[i],h=n[2],g=n[3],b=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,E="+"===y||"*"===y,S="?"===y||"*"===y,x=n[2]||c,T=b||v;r.push({name:g||o++,prefix:h||"",delimiter:x,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:T?u(T):w?".*":"[^"+s(x)+"]+?"})}}return i<e.length&&(l+=e.substr(i)),l&&r.push(l),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",d(t)));return function(t,a){for(var o="",l=t||{},s=(a||{}).pretty?i:encodeURIComponent,u=0;u<e.length;u++){var c=e[u];if("string"!=typeof c){var d,f=l[c.name];if(null==f){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(f)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var p=0;p<f.length;p++){if(d=s(f[p]),!n[u].test(d))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(d)+"`");o+=(0===p?c.prefix:c.delimiter)+d}}else{if(d=c.asterisk?encodeURI(f).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(f),!n[u].test(d))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+d+'"');o+=c.prefix+d}}else o+=c}return o}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,o=!1!==n.end,i="",l=0;l<e.length;l++){var u=e[l];if("string"==typeof u)i+=s(u);else{var f=s(u.prefix),p="(?:"+u.pattern+")";t.push(u),u.repeat&&(p+="(?:"+f+p+")*"),i+=p=u.optional?u.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")"}}var m=s(n.delimiter||"/"),h=i.slice(-m.length)===m;return a||(i=(h?i.slice(0,-m.length):i)+"(?:"+m+"(?=$))?"),i+=o?"$":a&&h?"":"(?="+m+"|$)",c(new RegExp("^"+i,d(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(p(e[a],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return f(o(e,n),t,n)}(e,t,n)}},999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=o[l])}var u=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===u&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],a||l);var s=t[l],u=r.util.type(s);"Object"!==u||o[i(s)]?"Array"!==u||o[i(s)]||(o[i(s)]=!0,e(s,n,l,o)):(o[i(s)]=!0,e(s,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};return r.hooks.run("before-tokenize",o),o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new l;return s(a,a.head,e),i(e,a,t,a.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,l,c,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+","+m)return;var h=p[m],g=h.inside,b=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var w=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,w+"g")}for(var k=h.pattern||h,E=l.next,S=c;E!==t.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var T,C=1;if(v){if(!(T=o(k,S,e,b))||T.index>=e.length)break;var _=T.index,A=T.index+T[0].length,L=S;for(L+=E.value.length;_>=L;)L+=(E=E.next).value.length;if(S=L-=E.value.length,E.value instanceof a)continue;for(var R=E;R!==t.tail&&(L<A||"string"==typeof R.value);R=R.next)C++,L+=R.value.length;C--,x=e.slice(S,L),T.index-=S}else if(!(T=o(k,0,x,b)))continue;_=T.index;var O=T[0],P=x.slice(0,_),N=x.slice(_+O.length),I=S+x.length;d&&I>d.reach&&(d.reach=I);var D=E.prev;if(P&&(D=s(t,D,P),S+=P.length),u(t,D,C),E=s(t,D,new a(f,g?r.tokenize(O,g):O,y,O)),N&&s(t,E,N),C>1){var M={cause:f+","+m,reach:I};i(e,t,n,E.prev,S,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var l="";for(var s in o.attributes)l+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+l+">"+o.content+"</"+o.tag+">"},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i<a.length;i++)o[a[i]]=e.languages.bash[a[i]];e.languages.shell=e.languages.bash}(a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a=t[n];if("code"===a.type){var o=a.content[1],i=a.content[3];if(o&&i&&"code-language"===o.type&&"code-block"===i.type&&"string"==typeof o.content){var l=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(l=(/[a-z][\w-]*/i.exec(l)||[""])[0].toLowerCase());i.alias?"string"==typeof i.alias?i.alias=[i.alias,s]:i.alias.push(s):i.alias=[s]}}else e(a.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r],u=/language-(.+)/.exec(o);if(u){n=u[1];break}}var c,d=e.languages[n];if(d)t.content=e.highlight((c=t.content,c.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),s(n);var r=l[t];return r||e}))),d,n);else if(n&&"none"!==n&&e.plugins.autoloader){var f="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=f,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(f);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var i=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===c(1).content){n+=2;var o=f(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=c(0);"variable"===i.type&&(p(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===c(0).content&&(n++,p(c(0),"property-mutation"),a.length>0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s<l;s++){var u=t[s];"variable"===u.type&&a.indexOf(u.content)>=0&&p(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=c(n+t);if(!r||r.type!==e[n])return!1}return!0}function f(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))a++;else if(r.test(l)&&0===--a)return o}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function u(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,s(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,c={},d=s(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=a,n})).join(""),n,r),f=Object.keys(c);return i=0,function e(t){for(var n=0;n<t.length;n++){if(i>=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var s=o.substring(0,l),d=u(c[a]),p=o.substring(l+a.length),m=[];if(s&&m.push(s),m.push(d),p){var h=[p];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r<a;r++){var o=n[r];if("string"!=typeof o){var i=o.content;if(Array.isArray(i))if("template-string"===o.type){var l=i[1];if(3===i.length&&"string"!=typeof l&&"embedded-code"===l.type){var s=f(l),u=l.alias,d=Array.isArray(u)?u[0]:u,p=e.languages[d];if(!p)continue;i[1]=c(s,p,d)}}else t(i);else"string"!=typeof i&&t([i])}}}(t.tokens)}))}(a),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];"RegExp"===e.util.type(o)&&(o=e.languages.javascript[a]={pattern:o});var i=o.inside||{};o.inside=i,i["maybe-class-name"]=/^[A-Z][\s\S]*/}}(a),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(a);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=i(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s<l.length&&!(a>=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),v=[];h&&v.push.apply(v,i([h])),v.push(g),b&&v.push.apply(v,i([b])),"string"==typeof u?l.splice.apply(l,[s,1].concat(v)):u.content=v}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},1064:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},1884:(e,t,n)=>{const r=n(1064),a=n(6474),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(2928).resolve(t)],delete Prism.languages[e],n(2928)(t),o.add(e)}))}i.silent=!1,e.exports=i},2928:(e,t,n)=>{var r={"./":1884};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=2928},6474:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function r(e){var n={},r=[];function a(r,o){if(!(r in n)){o.push(r);var i=o.indexOf(r);if(i<o.length-1)throw new Error("Circular dependency: "+o.slice(i).join(" -> "));var l={},s=e[r];if(s){function u(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in a(t,o),l[t]=!0,n[t])l[i]=!0}t(s.require,u),t(s.optional,u),t(s.modify,u)}n[r]=l,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),u=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(s);i=i.map(u),l=(l||[]).map(u);var c=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(c[t]=!0,e(t))}))}));for(var f,p=r(s),m=c;a(m);){for(var h in f={},m){var g=s[h];t(g&&g.modify,(function(e){e in d&&(f[e]=!0)}))}for(var b in d)if(!(b in c))for(var v in p(b))if(v in c){f[b]=!0;break}for(var y in m=f)c[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,l={},s={};function u(e){if(e in l)return l[e];s[e]=!0;var a,c=[];for(var d in t(e))d in n&&c.push(d);if(0===c.length)a=r(e);else{var f=i(c.map((function(e){var t=u(e);return delete s[e],t})));o?a=o(f,(function(){return r(e)})):r(e)}return l[e]=a}for(var c in n)u(c);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,c,t,n)}};return w}}();e.exports=t},4049:(e,t,n)=>{"use strict";var r=n(6257);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},507:(e,t,n)=>{e.exports=n(4049)()},6257:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7439:(e,t,n)=>{"use strict";var r=n(9496),a=n(2767),o=n(8051);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(i(227));var l=new Set,s={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},h={};function g(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=b.hasOwnProperty(t)?b[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!p.call(h,e)||!p.call(m,e)&&(f.test(e)?h[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,x=60107,T=60108,C=60114,_=60109,A=60110,L=60112,R=60113,O=60120,P=60115,N=60116,I=60121,D=60128,M=60129,F=60130,B=60131;if("function"==typeof Symbol&&Symbol.for){var j=Symbol.for;E=j("react.element"),S=j("react.portal"),x=j("react.fragment"),T=j("react.strict_mode"),C=j("react.profiler"),_=j("react.provider"),A=j("react.context"),L=j("react.forward_ref"),R=j("react.suspense"),O=j("react.suspense_list"),P=j("react.memo"),N=j("react.lazy"),I=j("react.block"),j("react.scope"),D=j("react.opaque.id"),M=j("react.debug_trace_mode"),F=j("react.offscreen"),B=j("react.legacy_hidden")}var z,U="function"==typeof Symbol&&Symbol.iterator;function $(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=U&&e[U]||e["@@iterator"])?e:null}function q(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var H=!1;function G(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"==typeof s.stack){for(var a=s.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,l=o.length-1;1<=i&&0<=l&&a[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(a[i]!==o[l]){if(1!==i||1!==l)do{if(i--,0>--l||a[i]!==o[l])return"\n"+a[i].replace(" at new "," at ")}while(1<=i&&0<=l);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q(e):""}function Z(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=G(e.type,!1);case 11:return e=G(e.type.render,!1);case 22:return e=G(e.type._render,!1);case 1:return e=G(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case C:return"Profiler";case T:return"StrictMode";case R:return"Suspense";case O:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case L:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case P:return V(e.type);case I:return V(e._render);case N:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function W(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ie(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ue(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ge,be=(ge=function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function ke(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function Ee(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=ke(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ye).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var Se=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xe(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function Te(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,Ae=null,Le=null;function Re(e){if(e=ra(e)){if("function"!=typeof _e)throw Error(i(280));var t=e.stateNode;t&&(t=oa(t),_e(e.stateNode,e.type,t))}}function Oe(e){Ae?Le?Le.push(e):Le=[e]:Ae=e}function Pe(){if(Ae){var e=Ae,t=Le;if(Le=Ae=null,Re(e),t)for(e=0;e<t.length;e++)Re(t[e])}}function Ne(e,t){return e(t)}function Ie(e,t,n,r,a){return e(t,n,r,a)}function De(){}var Me=Ne,Fe=!1,Be=!1;function je(){null===Ae&&null===Le||(De(),Pe())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=oa(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}var Ue=!1;if(d)try{var $e={};Object.defineProperty($e,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch(ge){Ue=!1}function qe(e,t,n,r,a,o,i,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var He=!1,Ge=null,Ze=!1,Ve=null,We={onError:function(e){He=!0,Ge=e}};function Ke(e,t,n,r,a,o,i,l,s){He=!1,Ge=null,qe.apply(We,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ye(e)!==e)throw Error(i(188))}function Je(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Xe(a),e;if(o===r)return Xe(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var l=!1,s=a.child;s;){if(s===n){l=!0,n=a,r=o;break}if(s===r){l=!0,r=a,n=o;break}s=s.sibling}if(!l){for(s=o.child;s;){if(s===n){l=!0,n=o,r=a;break}if(s===r){l=!0,r=o,n=a;break}s=s.sibling}if(!l)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,at,ot=!1,it=[],lt=null,st=null,ut=null,ct=new Map,dt=new Map,ft=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function mt(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function ht(e,t){switch(e){case"focusin":case"focusout":lt=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dt.delete(t.pointerId)}}function gt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e=mt(t,n,r,a,o),null!==t&&(null!==(t=ra(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function bt(e){var t=na(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void at(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ra(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function yt(e,t,n){vt(e)&&n.delete(t)}function wt(){for(ot=!1;0<it.length;){var e=it[0];if(null!==e.blockedOn){null!==(e=ra(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&it.shift()}null!==lt&&vt(lt)&&(lt=null),null!==st&&vt(st)&&(st=null),null!==ut&&vt(ut)&&(ut=null),ct.forEach(yt),dt.forEach(yt)}function kt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,wt)))}function Et(e){function t(t){return kt(t,e)}if(0<it.length){kt(it[0],e);for(var n=1;n<it.length;n++){var r=it[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==lt&&kt(lt,e),null!==st&&kt(st,e),null!==ut&&kt(ut,e),ct.forEach(t),dt.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)bt(n),null===n.blockedOn&&ft.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xt={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},Tt={},Ct={};function _t(e){if(Tt[e])return Tt[e];if(!xt[e])return e;var t,n=xt[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ct)return Tt[e]=n[t];return e}d&&(Ct=document.createElement("div").style,"AnimationEvent"in window||(delete xt.animationend.animation,delete xt.animationiteration.animation,delete xt.animationstart.animation),"TransitionEvent"in window||delete xt.transitionend.transition);var At=_t("animationend"),Lt=_t("animationiteration"),Rt=_t("animationstart"),Ot=_t("transitionend"),Pt=new Map,Nt=new Map,It=["abort","abort",At,"animationEnd",Lt,"animationIteration",Rt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ot,"transitionEnd","waiting","waiting"];function Dt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),Nt.set(r,t),Pt.set(r,a),u(a,[r])}}(0,o.unstable_now)();var Mt=8;function Ft(e){if(0!=(1&e))return Mt=15,1;if(0!=(2&e))return Mt=14,2;if(0!=(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!=(32&e)?(Mt=11,32):0!==(t=192&e)?(Mt=10,t):0!=(256&e)?(Mt=9,256):0!==(t=3584&e)?(Mt=8,t):0!=(4096&e)?(Mt=7,4096):0!==(t=4186112&e)?(Mt=6,t):0!==(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!=(134217728&e)?(Mt=3,134217728):0!==(t=805306368&e)?(Mt=2,t):0!=(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function Bt(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,a=0,o=e.expiredLanes,i=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,a=Mt=15;else if(0!==(o=134217727&n)){var s=o&~i;0!==s?(r=Ft(s),a=Mt):0!==(l&=o)&&(r=Ft(l),a=Mt)}else 0!==(o=n&~i)?(r=Ft(o),a=Mt):0!==l&&(r=Ft(l),a=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&i)){if(Ft(t),a<=Mt)return t;Mt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-Ht(t)),r|=e[n],t&=~a;return r}function jt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?zt(10,t):e;case 10:return 0===(e=Ut(192&~t))?zt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(i(358,e))}function Ut(e){return e&-e}function $t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Gt(e)/Zt|0)|0},Gt=Math.log,Zt=Math.LN2;var Vt=o.unstable_UserBlockingPriority,Wt=o.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){Fe||De();var a=Xt,o=Fe;Fe=!0;try{Ie(a,e,t,n,r)}finally{(Fe=o)||je()}}function Qt(e,t,n,r){Wt(Vt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var a;if(Kt)if((a=0==(4&t))&&0<it.length&&-1<pt.indexOf(e))e=mt(null,e,t,n,r),it.push(e);else{var o=Jt(e,t,n,r);if(null===o)a&&ht(e,r);else{if(a){if(-1<pt.indexOf(e))return e=mt(o,e,t,n,r),void it.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return lt=gt(lt,e,t,n,r,a),!0;case"dragenter":return st=gt(st,e,t,n,r,a),!0;case"mouseover":return ut=gt(ut,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return ct.set(o,gt(ct.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,dt.set(o,gt(dt.get(o)||null,e,t,n,r,a)),!0}return!1}(o,e,t,n,r))return;ht(e,r)}Dr(e,t,r,null,n)}}}function Jt(e,t,n,r){var a=Ce(r);if(null!==(a=na(a))){var o=Ye(a);if(null===o)a=null;else{var i=o.tag;if(13===i){if(null!==(a=Qe(o)))return a;a=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return Dr(e,t,r,a,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,a="value"in en?en.value:en.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return nn=a.slice(e,1<t?1-t:void 0)}function an(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function ln(){return!1}function sn(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?on:ln,this.isPropagationStopped=ln,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var un,cn,dn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=sn(fn),mn=a({},fn,{view:0,detail:0}),hn=sn(mn),gn=a({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dn&&(dn&&"mousemove"===e.type?(un=e.screenX-dn.screenX,cn=e.screenY-dn.screenY):cn=un=0,dn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),bn=sn(gn),vn=sn(a({},gn,{dataTransfer:0})),yn=sn(a({},mn,{relatedTarget:0})),wn=sn(a({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=a({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),En=sn(kn),Sn=sn(a({},fn,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function An(){return _n}var Ln=a({},mn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=an(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Tn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?an(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?an(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Rn=sn(Ln),On=sn(a({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=sn(a({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Nn=sn(a({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=a({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=sn(In),Mn=[9,13,27,32],Fn=d&&"CompositionEvent"in window,Bn=null;d&&"documentMode"in document&&(Bn=document.documentMode);var jn=d&&"TextEvent"in window&&!Bn,zn=d&&(!Fn||Bn&&8<Bn&&11>=Bn),Un=String.fromCharCode(32),$n=!1;function qn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1;var Zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Zn[e.type]:"textarea"===t}function Wn(e,t,n,r){Oe(r),0<(t=Fr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Yn=null;function Qn(e){Lr(e,0)}function Xn(e){if(Q(aa(e)))return e}function Jn(e,t){if("change"===e)return t}var er=!1;if(d){var tr;if(d){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"==typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ar(){Kn&&(Kn.detachEvent("onpropertychange",or),Yn=Kn=null)}function or(e){if("value"===e.propertyName&&Xn(Yn)){var t=[];if(Wn(t,Yn,e,Ce(e)),e=Qn,Fe)e(t);else{Fe=!0;try{Ne(e,t)}finally{Fe=!1,je()}}}}function ir(e,t,n){"focusin"===e?(ar(),Yn=n,(Kn=t).attachEvent("onpropertychange",or)):"focusout"===e&&ar()}function lr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Yn)}function sr(e,t){if("click"===e)return Xn(t)}function ur(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},dr=Object.prototype.hasOwnProperty;function fr(e,t){if(cr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!dr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vr=d&&"documentMode"in document&&11>=document.documentMode,yr=null,wr=null,kr=null,Er=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Er||null==yr||yr!==X(r)||("selectionStart"in(r=yr)&&br(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},kr&&fr(kr,r)||(kr=r,0<(r=Fr(wr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}Dt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Dt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Dt(It,2);for(var xr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Tr=0;Tr<xr.length;Tr++)Nt.set(xr[Tr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_r=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,l,s,u){if(Ke.apply(this,arguments),He){if(!He)throw Error(i(198));var c=Ge;He=!1,Ge=null,Ze||(Ze=!0,Ve=c)}}(r,t,void 0,e),e.currentTarget=null}function Lr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==o&&a.isPropagationStopped())break e;Ar(a,l,u),o=s}else for(i=0;i<r.length;i++){if(s=(l=r[i]).instance,u=l.currentTarget,l=l.listener,s!==o&&a.isPropagationStopped())break e;Ar(a,l,u),o=s}}}if(Ze)throw e=Ve,Ze=!1,Ve=null,e}function Rr(e,t){var n=ia(t),r=e+"__bubble";n.has(r)||(Ir(t,e,2,!1),n.add(r))}var Or="_reactListening"+Math.random().toString(36).slice(2);function Pr(e){e[Or]||(e[Or]=!0,l.forEach((function(t){_r.has(t)||Nr(t,!1,e,null),Nr(t,!0,e,null)})))}function Nr(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&_r.has(e)){if("scroll"!==e)return;a|=2,o=r}var i=ia(o),l=e+"__"+(t?"capture":"bubble");i.has(l)||(t&&(a|=4),Ir(o,e,a,t),i.add(l))}function Ir(e,t,n,r){var a=Nt.get(t);switch(void 0===a?2:a){case 0:a=Yt;break;case 1:a=Qt;break;default:a=Xt}n=a.bind(null,t,n,e),a=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Dr(e,t,n,r,a){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===a||8===l.nodeType&&l.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;i=i.return}for(;null!==l;){if(null===(i=na(l)))return;if(5===(s=i.tag)||6===s){r=o=i;continue e}l=l.parentNode}}r=r.return}!function(e,t,n){if(Be)return e(t,n);Be=!0;try{Me(e,t,n)}finally{Be=!1,je()}}((function(){var r=o,a=Ce(n),i=[];e:{var l=Pt.get(e);if(void 0!==l){var s=pn,u=e;switch(e){case"keypress":if(0===an(n))break e;case"keydown":case"keyup":s=Rn;break;case"focusin":u="focus",s=yn;break;case"focusout":u="blur",s=yn;break;case"beforeblur":case"afterblur":s=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=bn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Pn;break;case At:case Lt:case Rt:s=wn;break;case Ot:s=Nn;break;case"scroll":s=hn;break;case"wheel":s=Dn;break;case"copy":case"cut":case"paste":s=En;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=On}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==l?l+"Capture":null:l;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==f&&(null!=(h=ze(m,f))&&c.push(Mr(m,h,p)))),d)break;m=m.return}0<c.length&&(l=new s(l,u,null,n,a),i.push({event:l,listeners:c}))}}if(0==(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(u=n.relatedTarget||n.fromElement)||!na(u)&&!u[ea])&&(s||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?na(u):null)&&(u!==(d=Ye(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=bn,h="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=On,h="onPointerLeave",f="onPointerEnter",m="pointer"),d=null==s?l:aa(s),p=null==u?l:aa(u),(l=new c(h,m+"leave",s,n,a)).target=d,l.relatedTarget=p,h=null,na(a)===r&&((c=new c(f,m+"enter",u,n,a)).target=p,c.relatedTarget=d,h=c),d=h,s&&u)e:{for(f=u,m=0,p=c=s;p;p=Br(p))m++;for(p=0,h=f;h;h=Br(h))p++;for(;0<m-p;)c=Br(c),m--;for(;0<p-m;)f=Br(f),p--;for(;m--;){if(c===f||null!==f&&c===f.alternate)break e;c=Br(c),f=Br(f)}c=null}else c=null;null!==s&&jr(i,l,s,c,!1),null!==u&&null!==d&&jr(i,d,u,c,!0)}if("select"===(s=(l=r?aa(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g=Jn;else if(Vn(l))if(er)g=ur;else{g=lr;var b=ir}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=sr);switch(g&&(g=g(e,r))?Wn(i,g,n,a):(b&&b(e,l,r),"focusout"===e&&(b=l._wrapperState)&&b.controlled&&"number"===l.type&&ae(l,"number",l.value)),b=r?aa(r):window,e){case"focusin":(Vn(b)||"true"===b.contentEditable)&&(yr=b,wr=r,kr=null);break;case"focusout":kr=wr=yr=null;break;case"mousedown":Er=!0;break;case"contextmenu":case"mouseup":case"dragend":Er=!1,Sr(i,n,a);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":Sr(i,n,a)}var v;if(Fn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Gn?qn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(zn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Gn&&(v=rn()):(tn="value"in(en=a)?en.value:en.textContent,Gn=!0)),0<(b=Fr(r,y)).length&&(y=new Sn(y,e,null,n,a),i.push({event:y,listeners:b}),v?y.data=v:null!==(v=Hn(n))&&(y.data=v))),(v=jn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:($n=!0,Un);case"textInput":return(e=t.data)===Un&&$n?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!Fn&&qn(e,t)?(e=rn(),nn=tn=en=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(a=new Sn("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=v))}Lr(i,t)}))}function Mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=ze(e,n))&&r.unshift(Mr(e,o,a)),null!=(o=ze(e,t))&&r.push(Mr(e,o,a))),e=e.return}return r}function Br(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function jr(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,a?null!=(s=ze(n,o))&&i.unshift(Mr(n,s,l)):a||null!=(s=ze(n,o))&&i.push(Mr(n,s,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}function zr(){}var Ur=null,$r=null;function qr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Gr="function"==typeof setTimeout?setTimeout:void 0,Zr="function"==typeof clearTimeout?clearTimeout:void 0;function Vr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Wr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Kr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Jr="__reactProps$"+Qr,ea="__reactContainer$"+Qr,ta="__reactEvents$"+Qr;function na(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ea]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Kr(e);null!==e;){if(n=e[Xr])return n;e=Kr(e)}return t}n=(e=n).parentNode}return null}function ra(e){return!(e=e[Xr]||e[ea])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function aa(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function oa(e){return e[Jr]||null}function ia(e){var t=e[ta];return void 0===t&&(t=e[ta]=new Set),t}var la=[],sa=-1;function ua(e){return{current:e}}function ca(e){0>sa||(e.current=la[sa],la[sa]=null,sa--)}function da(e,t){sa++,la[sa]=e.current,e.current=t}var fa={},pa=ua(fa),ma=ua(!1),ha=fa;function ga(e,t){var n=e.type.contextTypes;if(!n)return fa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ba(e){return null!=(e=e.childContextTypes)}function va(){ca(ma),ca(pa)}function ya(e,t,n){if(pa.current!==fa)throw Error(i(168));da(pa,t),da(ma,n)}function wa(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(i(108,V(t)||"Unknown",o));return a({},n,r)}function ka(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fa,ha=pa.current,da(pa,e),da(ma,ma.current),!0}function Ea(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=wa(e,t,ha),r.__reactInternalMemoizedMergedChildContext=e,ca(ma),ca(pa),da(pa,e)):ca(ma),da(ma,n)}var Sa=null,xa=null,Ta=o.unstable_runWithPriority,Ca=o.unstable_scheduleCallback,_a=o.unstable_cancelCallback,Aa=o.unstable_shouldYield,La=o.unstable_requestPaint,Ra=o.unstable_now,Oa=o.unstable_getCurrentPriorityLevel,Pa=o.unstable_ImmediatePriority,Na=o.unstable_UserBlockingPriority,Ia=o.unstable_NormalPriority,Da=o.unstable_LowPriority,Ma=o.unstable_IdlePriority,Fa={},Ba=void 0!==La?La:function(){},ja=null,za=null,Ua=!1,$a=Ra(),qa=1e4>$a?Ra:function(){return Ra()-$a};function Ha(){switch(Oa()){case Pa:return 99;case Na:return 98;case Ia:return 97;case Da:return 96;case Ma:return 95;default:throw Error(i(332))}}function Ga(e){switch(e){case 99:return Pa;case 98:return Na;case 97:return Ia;case 96:return Da;case 95:return Ma;default:throw Error(i(332))}}function Za(e,t){return e=Ga(e),Ta(e,t)}function Va(e,t,n){return e=Ga(e),Ca(e,t,n)}function Wa(){if(null!==za){var e=za;za=null,_a(e)}Ka()}function Ka(){if(!Ua&&null!==ja){Ua=!0;var e=0;try{var t=ja;Za(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),ja=null}catch(n){throw null!==ja&&(ja=ja.slice(e+1)),Ca(Pa,Wa),n}finally{Ua=!1}}}var Ya=k.ReactCurrentBatchConfig;function Qa(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xa=ua(null),Ja=null,eo=null,to=null;function no(){to=eo=Ja=null}function ro(e){var t=Xa.current;ca(Xa),e.type._context._currentValue=t}function ao(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function oo(e,t){Ja=e,to=eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Fi=!0),e.firstContext=null)}function io(e,t){if(to!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(to=e,t=1073741823),t={context:e,observedBits:t,next:null},null===eo){if(null===Ja)throw Error(i(308));eo=t,Ja.dependencies={lanes:0,firstContext:t,responders:null}}else eo=eo.next=t;return e._currentValue}var lo=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function mo(e,t,n,r){var o=e.updateQueue;lo=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var u=s,c=u.next;u.next=null,null===l?i=c:l.next=c,l=u;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==l&&(null===f?d.firstBaseUpdate=c:f.next=c,d.lastBaseUpdate=u)}}if(null!==i){for(f=o.baseState,l=0,d=c=u=null;;){s=i.lane;var p=i.eventTime;if((r&s)===s){null!==d&&(d=d.next={eventTime:p,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var m=e,h=i;switch(s=t,p=n,h.tag){case 1:if("function"==typeof(m=h.payload)){f=m.call(p,f,s);break e}f=m;break e;case 3:m.flags=-4097&m.flags|64;case 0:if(null==(s="function"==typeof(m=h.payload)?m.call(p,f,s):m))break e;f=a({},f,s);break e;case 2:lo=!0}}null!==i.callback&&(e.flags|=32,null===(s=o.effects)?o.effects=[i]:s.push(i))}else p={eventTime:p,lane:s,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===d?(c=d=p,u=f):d=d.next=p,l|=s;if(null===(i=i.next)){if(null===(s=o.shared.pending))break;i=s.next,s.next=null,o.lastBaseUpdate=s,o.shared.pending=null}}null===d&&(u=f),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=d,Ul|=l,e.lanes=l,e.memoizedState=f}}function ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(i(191,a));a.call(r)}}}var go=(new r.Component).refs;function bo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var vo={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fs(),a=ps(e),o=co(r,a);o.payload=t,null!=n&&(o.callback=n),fo(e,o),ms(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fs(),a=ps(e),o=co(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),fo(e,o),ms(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fs(),r=ps(e),a=co(n,r);a.tag=2,null!=t&&(a.callback=t),fo(e,a),ms(e,r,n)}};function yo(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!fr(n,r)||!fr(a,o))}function wo(e,t,n){var r=!1,a=fa,o=t.contextType;return"object"==typeof o&&null!==o?o=io(o):(a=ba(t)?ha:pa.current,o=(r=null!=(r=t.contextTypes))?ga(e,a):fa),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function ko(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vo.enqueueReplaceState(t,t.state,null)}function Eo(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=go,so(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=io(o):(o=ba(t)?ha:pa.current,a.context=ga(e,o)),mo(e,n,a,r),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(bo(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&vo.enqueueReplaceState(a,a.state,null),mo(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var So=Array.isArray;function xo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;t===go&&(t=r.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function To(e,t){if("textarea"!==e.type)throw Error(i(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Co(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Zs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function l(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=xo(e,t,n),r.return=e,r):((r=Vs(n.type,n.key,n.props,null,e.mode,r)).ref=xo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qs(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Ws(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Vs(t.type,t.key,t.props,null,e.mode,n)).ref=xo(e,null,t),n.return=e,n;case S:return(t=Qs(t,e.mode,n)).return=e,t}if(So(t)||$(t))return(t=Ws(t,e.mode,n,null)).return=e,t;To(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===x?d(e,t,n.props.children,r,a):u(e,t,n,r):null;case S:return n.key===a?c(e,t,n,r):null}if(So(n)||$(n))return null!==a?null:d(e,t,n,r,null);To(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===x?d(t,e,r.props.children,a,r.key):u(t,e,r,a);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(So(r)||$(r))return d(t,e=e.get(n)||null,r,a,null);To(t,r)}return null}function h(a,i,l,s){for(var u=null,c=null,d=i,h=i=0,g=null;null!==d&&h<l.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var b=p(a,d,l[h],s);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(a,d),i=o(b,i,h),null===c?u=b:c.sibling=b,c=b,d=g}if(h===l.length)return n(a,d),u;if(null===d){for(;h<l.length;h++)null!==(d=f(a,l[h],s))&&(i=o(d,i,h),null===c?u=d:c.sibling=d,c=d);return u}for(d=r(a,d);h<l.length;h++)null!==(g=m(d,a,h,l[h],s))&&(e&&null!==g.alternate&&d.delete(null===g.key?h:g.key),i=o(g,i,h),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(a,e)})),u}function g(a,l,s,u){var c=$(s);if("function"!=typeof c)throw Error(i(150));if(null==(s=c.call(s)))throw Error(i(151));for(var d=c=null,h=l,g=l=0,b=null,v=s.next();null!==h&&!v.done;g++,v=s.next()){h.index>g?(b=h,h=null):b=h.sibling;var y=p(a,h,v.value,u);if(null===y){null===h&&(h=b);break}e&&h&&null===y.alternate&&t(a,h),l=o(y,l,g),null===d?c=y:d.sibling=y,d=y,h=b}if(v.done)return n(a,h),c;if(null===h){for(;!v.done;g++,v=s.next())null!==(v=f(a,v.value,u))&&(l=o(v,l,g),null===d?c=v:d.sibling=v,d=v);return c}for(h=r(a,h);!v.done;g++,v=s.next())null!==(v=m(h,a,g,v.value,u))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),l=o(v,l,g),null===d?c=v:d.sibling=v,d=v);return e&&h.forEach((function(e){return t(a,e)})),c}return function(e,r,o,s){var u="object"==typeof o&&null!==o&&o.type===x&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case E:e:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(o.type===x){n(e,u.sibling),(r=a(u,o.props.children)).return=e,e=r;break e}}else if(u.elementType===o.type){n(e,u.sibling),(r=a(u,o.props)).ref=xo(e,u,o),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}o.type===x?((r=Ws(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=Vs(o.type,o.key,o.props,null,e.mode,s)).ref=xo(e,r,o),s.return=e,e=s)}return l(e);case S:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qs(o,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,o)).return=e,e=r):(n(e,r),(r=Ys(o,e.mode,s)).return=e,e=r),l(e);if(So(o))return h(e,r,o,s);if($(o))return g(e,r,o,s);if(c&&To(e,o),void 0===o&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(i(152,V(e.type)||"Component"))}return n(e,r)}}var _o=Co(!0),Ao=Co(!1),Lo={},Ro=ua(Lo),Oo=ua(Lo),Po=ua(Lo);function No(e){if(e===Lo)throw Error(i(174));return e}function Io(e,t){switch(da(Po,t),da(Oo,e),da(Ro,Lo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ca(Ro),da(Ro,t)}function Do(){ca(Ro),ca(Oo),ca(Po)}function Mo(e){No(Po.current);var t=No(Ro.current),n=me(t,e.type);t!==n&&(da(Oo,e),da(Ro,n))}function Fo(e){Oo.current===e&&(ca(Ro),ca(Oo))}var Bo=ua(0);function jo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=null,Uo=null,$o=!1;function qo(e,t){var n=Hs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ho(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Go(e){if($o){var t=Uo;if(t){var n=t;if(!Ho(e,t)){if(!(t=Wr(n.nextSibling))||!Ho(e,t))return e.flags=-1025&e.flags|2,$o=!1,void(zo=e);qo(zo,n)}zo=e,Uo=Wr(t.firstChild)}else e.flags=-1025&e.flags|2,$o=!1,zo=e}}function Zo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zo=e}function Vo(e){if(e!==zo)return!1;if(!$o)return Zo(e),$o=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Uo;t;)qo(e,t),t=Wr(t.nextSibling);if(Zo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Uo=Wr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Uo=null}}else Uo=zo?Wr(e.stateNode.nextSibling):null;return!0}function Wo(){Uo=zo=null,$o=!1}var Ko=[];function Yo(){for(var e=0;e<Ko.length;e++)Ko[e]._workInProgressVersionPrimary=null;Ko.length=0}var Qo=k.ReactCurrentDispatcher,Xo=k.ReactCurrentBatchConfig,Jo=0,ei=null,ti=null,ni=null,ri=!1,ai=!1;function oi(){throw Error(i(321))}function ii(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function li(e,t,n,r,a,o){if(Jo=o,ei=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qo.current=null===e||null===e.memoizedState?Ni:Ii,e=n(r,a),ai){o=0;do{if(ai=!1,!(25>o))throw Error(i(301));o+=1,ni=ti=null,t.updateQueue=null,Qo.current=Di,e=n(r,a)}while(ai)}if(Qo.current=Pi,t=null!==ti&&null!==ti.next,Jo=0,ni=ti=ei=null,ri=!1,t)throw Error(i(300));return e}function si(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ni?ei.memoizedState=ni=e:ni=ni.next=e,ni}function ui(){if(null===ti){var e=ei.alternate;e=null!==e?e.memoizedState:null}else e=ti.next;var t=null===ni?ei.memoizedState:ni.next;if(null!==t)ni=t,ti=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ti=e).memoizedState,baseState:ti.baseState,baseQueue:ti.baseQueue,queue:ti.queue,next:null},null===ni?ei.memoizedState=ni=e:ni=ni.next=e}return ni}function ci(e,t){return"function"==typeof t?t(e):t}function di(e){var t=ui(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ti,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var l=a.next;a.next=o.next,o.next=l}r.baseQueue=a=o,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var s=l=o=null,u=a;do{var c=u.lane;if((Jo&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=d,o=r):s=s.next=d,ei.lanes|=c,Ul|=c}u=u.next}while(null!==u&&u!==a);null===s?o=r:s.next=l,cr(r,t.memoizedState)||(Fi=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fi(e){var t=ui(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var l=a=a.next;do{o=e(o,l.action),l=l.next}while(l!==a);cr(o,t.memoizedState)||(Fi=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function pi(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(Jo&e)===e)&&(t._workInProgressVersionPrimary=r,Ko.push(t))),e)return n(t._source);throw Ko.push(t),Error(i(350))}function mi(e,t,n,r){var a=Nl;if(null===a)throw Error(i(349));var o=t._getVersion,l=o(t._source),s=Qo.current,u=s.useState((function(){return pi(a,t,n)})),c=u[1],d=u[0];u=ni;var f=e.memoizedState,p=f.refs,m=p.getSnapshot,h=f.source;f=f.subscribe;var g=ei;return e.memoizedState={refs:p,source:t,subscribe:r},s.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=o(t._source);if(!cr(l,e)){e=n(t._source),cr(d,e)||(c(e),e=ps(g),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,i=e;0<i;){var s=31-Ht(i),u=1<<s;r[s]|=e,i&=~u}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=ps(g);a.mutableReadLanes|=r&a.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),cr(m,n)&&cr(h,t)&&cr(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ci,lastRenderedState:d}).dispatch=c=Oi.bind(null,ei,e),u.queue=e,u.baseQueue=null,d=pi(a,t,n),u.memoizedState=u.baseState=d),d}function hi(e,t,n){return mi(ui(),e,t,n)}function gi(e){var t=si();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ci,lastRenderedState:e}).dispatch=Oi.bind(null,ei,e),[t.memoizedState,e]}function bi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ei.updateQueue)?(t={lastEffect:null},ei.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function vi(e){return e={current:e},si().memoizedState=e}function yi(){return ui().memoizedState}function wi(e,t,n,r){var a=si();ei.flags|=e,a.memoizedState=bi(1|t,n,void 0,void 0===r?null:r)}function ki(e,t,n,r){var a=ui();r=void 0===r?null:r;var o=void 0;if(null!==ti){var i=ti.memoizedState;if(o=i.destroy,null!==r&&ii(r,i.deps))return void bi(t,n,o,r)}ei.flags|=e,a.memoizedState=bi(1|t,n,o,r)}function Ei(e,t){return wi(516,4,e,t)}function Si(e,t){return ki(516,4,e,t)}function xi(e,t){return ki(4,2,e,t)}function Ti(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ci(e,t,n){return n=null!=n?n.concat([e]):null,ki(4,2,Ti.bind(null,t,e),n)}function _i(){}function Ai(e,t){var n=ui();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ii(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Li(e,t){var n=ui();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ii(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ri(e,t){var n=Ha();Za(98>n?98:n,(function(){e(!0)})),Za(97<n?97:n,(function(){var n=Xo.transition;Xo.transition=1;try{e(!1),t()}finally{Xo.transition=n}}))}function Oi(e,t,n){var r=fs(),a=ps(e),o={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===ei||null!==i&&i===ei)ai=ri=!0;else{if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var l=t.lastRenderedState,s=i(l,n);if(o.eagerReducer=i,o.eagerState=s,cr(s,l))return}catch(u){}ms(e,a,r)}}var Pi={readContext:io,useCallback:oi,useContext:oi,useEffect:oi,useImperativeHandle:oi,useLayoutEffect:oi,useMemo:oi,useReducer:oi,useRef:oi,useState:oi,useDebugValue:oi,useDeferredValue:oi,useTransition:oi,useMutableSource:oi,useOpaqueIdentifier:oi,unstable_isNewReconciler:!1},Ni={readContext:io,useCallback:function(e,t){return si().memoizedState=[e,void 0===t?null:t],e},useContext:io,useEffect:Ei,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,wi(4,2,Ti.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wi(4,2,e,t)},useMemo:function(e,t){var n=si();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=si();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Oi.bind(null,ei,e),[r.memoizedState,e]},useRef:vi,useState:gi,useDebugValue:_i,useDeferredValue:function(e){var t=gi(e),n=t[0],r=t[1];return Ei((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=gi(!1),t=e[0];return vi(e=Ri.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=si();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},mi(r,e,t,n)},useOpaqueIdentifier:function(){if($o){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(i(355))})),n=gi(t)[1];return 0==(2&ei.mode)&&(ei.flags|=516,bi(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return gi(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Ii={readContext:io,useCallback:Ai,useContext:io,useEffect:Si,useImperativeHandle:Ci,useLayoutEffect:xi,useMemo:Li,useReducer:di,useRef:yi,useState:function(){return di(ci)},useDebugValue:_i,useDeferredValue:function(e){var t=di(ci),n=t[0],r=t[1];return Si((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=di(ci)[0];return[yi().current,e]},useMutableSource:hi,useOpaqueIdentifier:function(){return di(ci)[0]},unstable_isNewReconciler:!1},Di={readContext:io,useCallback:Ai,useContext:io,useEffect:Si,useImperativeHandle:Ci,useLayoutEffect:xi,useMemo:Li,useReducer:fi,useRef:yi,useState:function(){return fi(ci)},useDebugValue:_i,useDeferredValue:function(e){var t=fi(ci),n=t[0],r=t[1];return Si((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=fi(ci)[0];return[yi().current,e]},useMutableSource:hi,useOpaqueIdentifier:function(){return fi(ci)[0]},unstable_isNewReconciler:!1},Mi=k.ReactCurrentOwner,Fi=!1;function Bi(e,t,n,r){t.child=null===e?Ao(t,null,n,r):_o(t,e.child,n,r)}function ji(e,t,n,r,a){n=n.render;var o=t.ref;return oo(t,a),r=li(e,t,n,r,o,a),null===e||Fi?(t.flags|=1,Bi(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function zi(e,t,n,r,a,o){if(null===e){var i=n.type;return"function"!=typeof i||Gs(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Vs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ui(e,t,i,r,a,o))}return i=e.child,0==(a&o)&&(a=i.memoizedProps,(n=null!==(n=n.compare)?n:fr)(a,r)&&e.ref===t.ref)?ol(e,t,o):(t.flags|=1,(e=Zs(i,r)).ref=t.ref,e.return=t,t.child=e)}function Ui(e,t,n,r,a,o){if(null!==e&&fr(e.memoizedProps,r)&&e.ref===t.ref){if(Fi=!1,0==(o&a))return t.lanes=e.lanes,ol(e,t,o);0!=(16384&e.flags)&&(Fi=!0)}return Hi(e,t,n,r,o)}function $i(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},Es(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Es(t,e),null;t.memoizedState={baseLanes:0},Es(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Es(t,r);return Bi(e,t,a,n),t.child}function qi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Hi(e,t,n,r,a){var o=ba(n)?ha:pa.current;return o=ga(t,o),oo(t,a),n=li(e,t,n,r,o,a),null===e||Fi?(t.flags|=1,Bi(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function Gi(e,t,n,r,a){if(ba(n)){var o=!0;ka(t)}else o=!1;if(oo(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),wo(t,n,r),Eo(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var s=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=io(u):u=ga(t,u=ba(n)?ha:pa.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||s!==u)&&ko(t,i,r,u),lo=!1;var f=t.memoizedState;i.state=f,mo(t,r,i,a),s=t.memoizedState,l!==r||f!==s||ma.current||lo?("function"==typeof c&&(bo(t,n,c,r),s=t.memoizedState),(l=lo||yo(t,n,l,r,f,s,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4)):("function"==typeof i.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=u,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4),r=!1)}else{i=t.stateNode,uo(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Qa(t.type,l),i.props=u,d=t.pendingProps,f=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=io(s):s=ga(t,s=ba(n)?ha:pa.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||f!==s)&&ko(t,i,r,s),lo=!1,f=t.memoizedState,i.state=f,mo(t,r,i,a);var m=t.memoizedState;l!==d||f!==m||ma.current||lo?("function"==typeof p&&(bo(t,n,p,r),m=t.memoizedState),(u=lo||yo(t,n,u,r,f,m,s))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=s,r=u):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return Zi(e,t,n,r,o,a)}function Zi(e,t,n,r,a,o){qi(e,t);var i=0!=(64&t.flags);if(!r&&!i)return a&&Ea(t,n,!1),ol(e,t,o);r=t.stateNode,Mi.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=_o(t,e.child,null,o),t.child=_o(t,null,l,o)):Bi(e,t,l,o),t.memoizedState=r.state,a&&Ea(t,n,!0),t.child}function Vi(e){var t=e.stateNode;t.pendingContext?ya(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ya(0,t.context,!1),Io(e,t.containerInfo)}var Wi,Ki,Yi,Qi={dehydrated:null,retryLane:0};function Xi(e,t,n){var r,a=t.pendingProps,o=Bo.current,i=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(i=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(o|=1),da(Bo,1&o),null===e?(void 0!==a.fallback&&Go(t),e=a.children,o=a.fallback,i?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qi,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qi,t.lanes=33554432,e):((n=Ks({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,i?(a=tl(e,t,a.children,a.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=Qi,a):(n=el(e,t,a.children,n),t.memoizedState=null,n))}function Ji(e,t,n,r){var a=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&a)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Ks(t,a,0,null),n=Ws(n,a,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function el(e,t,n,r){var a=e.child;return e=a.sibling,n=Zs(a,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tl(e,t,n,r,a){var o=t.mode,i=e.child;e=i.sibling;var l={mode:"hidden",children:n};return 0==(2&o)&&t.child!==i?((n=t.child).childLanes=0,n.pendingProps=l,null!==(i=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=i,i.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Zs(i,l),null!==e?r=Zs(e,r):(r=Ws(r,o,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nl(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ao(e.return,t)}function rl(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.lastEffect=o)}function al(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(Bi(e,t,r.children,n),0!=(2&(r=Bo.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nl(e,n);else if(19===e.tag)nl(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(da(Bo,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===jo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),rl(t,!1,a,n,o,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===jo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}rl(t,!0,n,null,o,t.lastEffect);break;case"together":rl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ul|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Zs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Zs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function il(e,t){if(!$o)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ll(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return ba(t.type)&&va(),null;case 3:return Do(),ca(ma),ca(pa),Yo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Vo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Fo(t);var o=No(Po.current);if(n=t.type,null!==e&&null!=t.stateNode)Ki(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(i(166));return null}if(e=No(Ro.current),Vo(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Xr]=t,r[Jr]=l,n){case"dialog":Rr("cancel",r),Rr("close",r);break;case"iframe":case"object":case"embed":Rr("load",r);break;case"video":case"audio":for(e=0;e<Cr.length;e++)Rr(Cr[e],r);break;case"source":Rr("error",r);break;case"img":case"image":case"link":Rr("error",r),Rr("load",r);break;case"details":Rr("toggle",r);break;case"input":ee(r,l),Rr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Rr("invalid",r);break;case"textarea":se(r,l),Rr("invalid",r)}for(var u in xe(n,l),e=null,l)l.hasOwnProperty(u)&&(o=l[u],"children"===u?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):s.hasOwnProperty(u)&&null!=o&&"onScroll"===u&&Rr("scroll",r));switch(n){case"input":Y(r),re(r,l,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"==typeof l.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(u=9===o.nodeType?o:o.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Xr]=t,e[Jr]=r,Wi(e,t),t.stateNode=e,u=Te(n,r),n){case"dialog":Rr("cancel",e),Rr("close",e),o=r;break;case"iframe":case"object":case"embed":Rr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Cr.length;o++)Rr(Cr[o],e);o=r;break;case"source":Rr("error",e),o=r;break;case"img":case"image":case"link":Rr("error",e),Rr("load",e),o=r;break;case"details":Rr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Rr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=a({},r,{value:void 0}),Rr("invalid",e);break;case"textarea":se(e,r),o=le(e,r),Rr("invalid",e);break;default:o=r}xe(n,o);var c=o;for(l in c)if(c.hasOwnProperty(l)){var d=c[l];"style"===l?Ee(e,d):"dangerouslySetInnerHTML"===l?null!=(d=d?d.__html:void 0)&&be(e,d):"children"===l?"string"==typeof d?("textarea"!==n||""!==d)&&ve(e,d):"number"==typeof d&&ve(e,""+d):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?null!=d&&"onScroll"===l&&Rr("scroll",e):null!=d&&w(e,l,d,u))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(l=r.value)?ie(e,!!r.multiple,l,!1):null!=r.defaultValue&&ie(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=zr)}qr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Yi(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));n=No(Po.current),No(Ro.current),Vo(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return ca(Bo),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Vo(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Bo.current)?0===Bl&&(Bl=3):(0!==Bl&&3!==Bl||(Bl=4),null===Nl||0==(134217727&Ul)&&0==(134217727&$l)||vs(Nl,Dl))),(r||n)&&(t.flags|=4),null);case 4:return Do(),null===e&&Pr(t.stateNode.containerInfo),null;case 10:return ro(t),null;case 19:if(ca(Bo),null===(r=t.memoizedState))return null;if(l=0!=(64&t.flags),null===(u=r.rendering))if(l)il(r,!1);else{if(0!==Bl||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(u=jo(e))){for(t.flags|=64,il(r,!1),null!==(l=u.updateQueue)&&(t.updateQueue=l,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(l=n).flags&=2,l.nextEffect=null,l.firstEffect=null,l.lastEffect=null,null===(u=l.alternate)?(l.childLanes=0,l.lanes=e,l.child=null,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=u.childLanes,l.lanes=u.lanes,l.child=u.child,l.memoizedProps=u.memoizedProps,l.memoizedState=u.memoizedState,l.updateQueue=u.updateQueue,l.type=u.type,e=u.dependencies,l.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return da(Bo,1&Bo.current|2),t.child}e=e.sibling}null!==r.tail&&qa()>Zl&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=jo(u))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),il(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!$o)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*qa()-r.renderingStartTime>Zl&&1073741824!==n&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=qa(),n.sibling=null,t=Bo.current,da(Bo,l?1&t|2:1&t),n):null;case 23:case 24:return Ss(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(i(156,t.tag))}function sl(e){switch(e.tag){case 1:ba(e.type)&&va();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Do(),ca(ma),ca(pa),Yo(),0!=(64&(t=e.flags)))throw Error(i(285));return e.flags=-4097&t|64,e;case 5:return Fo(e),null;case 13:return ca(Bo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ca(Bo),null;case 4:return Do(),null;case 10:return ro(e),null;case 23:case 24:return Ss(),null;default:return null}}function ul(e,t){try{var n="",r=t;do{n+=Z(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a}}function cl(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Wi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ki=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,No(Ro.current);var i,l=null;switch(n){case"input":o=J(e,o),r=J(e,r),l=[];break;case"option":o=oe(e,o),r=oe(e,r),l=[];break;case"select":o=a({},o,{value:void 0}),r=a({},r,{value:void 0}),l=[];break;case"textarea":o=le(e,o),r=le(e,r),l=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=zr)}for(d in xe(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var u=o[d];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var c=r[d];if(u=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(null!=c||null!=u))if("style"===d)if(u){for(i in u)!u.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&u[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(l||(l=[]),l.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(l=l||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(l=l||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Rr("scroll",e),l||u===c||(l=[])):"object"==typeof c&&null!==c&&c.$$typeof===D?c.toString():(l=l||[]).push(d,c))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}},Yi=function(e,t,n,r){n!==r&&(t.flags|=4)};var dl="function"==typeof WeakMap?WeakMap:Map;function fl(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yl||(Yl=!0,Ql=r),cl(0,t)},n}function pl(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return cl(0,t),r(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Xl?Xl=new Set([this]):Xl.add(this),cl(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ml="function"==typeof WeakSet?WeakSet:Set;function hl(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){zs(e,n)}else t.current=null}function gl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qa(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo))}throw Error(i(163))}function bl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,0!=(4&(a=a.tag))&&0!=(1&a)&&(Fs(n,e),Ms(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Qa(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ho(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ho(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&qr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))))}throw Error(i(163))}function vl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=ke("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function yl(e,t){if(xa&&"function"==typeof xa.onCommitFiberUnmount)try{xa.onCommitFiberUnmount(Sa,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(0!=(4&r))Fs(t,n);else{r=t;try{a()}catch(o){zs(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hl(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){zs(t,o)}break;case 5:hl(t);break;case 4:Tl(e,t)}}function wl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function kl(e){return 5===e.tag||3===e.tag||4===e.tag}function El(e){e:{for(var t=e.return;null!==t;){if(kl(t))break e;t=t.return}throw Error(i(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(i(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||kl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Sl(e,n,t):xl(e,n,t)}function Sl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(Sl(e,t,n),e=e.sibling;null!==e;)Sl(e,t,n),e=e.sibling}function xl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(xl(e,t,n),e=e.sibling;null!==e;)xl(e,t,n),e=e.sibling}function Tl(e,t){for(var n,r,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(i(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag){e:for(var l=e,s=a,u=s;;)if(yl(l,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===s)break e;for(;null===u.sibling;){if(null===u.return||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(l=n,s=a.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(yl(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function Cl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Jr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Te(e,a),t=Te(e,r),a=0;a<o.length;a+=2){var l=o[a],s=o[a+1];"style"===l?Ee(n,s):"dangerouslySetInnerHTML"===l?be(n,s):"children"===l?ve(n,s):w(n,l,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ie(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ie(n,!!r.multiple,r.defaultValue,!0):ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(i(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Et(n.containerInfo)));case 13:return null!==t.memoizedState&&(Gl=qa(),vl(t.child,!0)),void _l(t);case 19:return void _l(t);case 23:case 24:return void vl(t,null!==t.memoizedState)}throw Error(i(163))}function _l(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ml),t.forEach((function(t){var r=$s.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Al(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ll=Math.ceil,Rl=k.ReactCurrentDispatcher,Ol=k.ReactCurrentOwner,Pl=0,Nl=null,Il=null,Dl=0,Ml=0,Fl=ua(0),Bl=0,jl=null,zl=0,Ul=0,$l=0,ql=0,Hl=null,Gl=0,Zl=1/0;function Vl(){Zl=qa()+500}var Wl,Kl=null,Yl=!1,Ql=null,Xl=null,Jl=!1,es=null,ts=90,ns=[],rs=[],as=null,os=0,is=null,ls=-1,ss=0,us=0,cs=null,ds=!1;function fs(){return 0!=(48&Pl)?qa():-1!==ls?ls:ls=qa()}function ps(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Ha()?1:2;if(0===ss&&(ss=zl),0!==Ya.transition){0!==us&&(us=null!==Hl?Hl.pendingLanes:0),e=ss;var t=4186112&~us;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Ha(),0!=(4&Pl)&&98===e?e=zt(12,ss):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function ms(e,t,n){if(50<os)throw os=0,is=null,Error(i(185));if(null===(e=hs(e,t)))return null;qt(e,t,n),e===Nl&&($l|=t,4===Bl&&vs(e,Dl));var r=Ha();1===t?0!=(8&Pl)&&0==(48&Pl)?ys(e):(gs(e,n),0===Pl&&(Vl(),Wa())):(0==(4&Pl)||98!==r&&99!==r||(null===as?as=new Set([e]):as.add(e)),gs(e,n)),Hl=e}function hs(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gs(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Ht(l),u=1<<s,c=o[s];if(-1===c){if(0==(u&r)||0!=(u&a)){c=t,Ft(u);var d=Mt;o[s]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=u);l&=~u}if(r=Bt(e,e===Nl?Dl:0),t=Mt,0===r)null!==n&&(n!==Fa&&_a(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Fa&&_a(n)}15===t?(n=ys.bind(null,e),null===ja?(ja=[n],za=Ca(Pa,Ka)):ja.push(n),n=Fa):14===t?n=Va(99,ys.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(i(358,e))}}(t),n=Va(n,bs.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function bs(e){if(ls=-1,us=ss=0,0!=(48&Pl))throw Error(i(327));var t=e.callbackNode;if(Ds()&&e.callbackNode!==t)return null;var n=Bt(e,e===Nl?Dl:0);if(0===n)return null;var r=n,a=Pl;Pl|=16;var o=Cs();for(Nl===e&&Dl===r||(Vl(),xs(e,r));;)try{Ls();break}catch(s){Ts(e,s)}if(no(),Rl.current=o,Pl=a,null!==Il?r=0:(Nl=null,Dl=0,r=Bl),0!=(zl&$l))xs(e,0);else if(0!==r){if(2===r&&(Pl|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=jt(e))&&(r=_s(e,n))),1===r)throw t=jl,xs(e,0),vs(e,n),gs(e,qa()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(i(345));case 2:case 5:Ps(e);break;case 3:if(vs(e,n),(62914560&n)===n&&10<(r=Gl+500-qa())){if(0!==Bt(e,0))break;if(((a=e.suspendedLanes)&n)!==n){fs(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Gr(Ps.bind(null,e),r);break}Ps(e);break;case 4:if(vs(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var l=31-Ht(n);o=1<<l,(l=r[l])>a&&(a=l),n&=~o}if(n=a,10<(n=(120>(n=qa()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ll(n/1960))-n)){e.timeoutHandle=Gr(Ps.bind(null,e),n);break}Ps(e);break;default:throw Error(i(329))}}return gs(e,qa()),e.callbackNode===t?bs.bind(null,e):null}function vs(e,t){for(t&=~ql,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function ys(e){if(0!=(48&Pl))throw Error(i(327));if(Ds(),e===Nl&&0!=(e.expiredLanes&Dl)){var t=Dl,n=_s(e,t);0!=(zl&$l)&&(n=_s(e,t=Bt(e,t)))}else n=_s(e,t=Bt(e,0));if(0!==e.tag&&2===n&&(Pl|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=jt(e))&&(n=_s(e,t))),1===n)throw n=jl,xs(e,0),vs(e,t),gs(e,qa()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ps(e),gs(e,qa()),null}function ws(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&(Vl(),Wa())}}function ks(e,t){var n=Pl;Pl&=-2,Pl|=8;try{return e(t)}finally{0===(Pl=n)&&(Vl(),Wa())}}function Es(e,t){da(Fl,Ml),Ml|=t,zl|=t}function Ss(){Ml=Fl.current,ca(Fl)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Zr(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&va();break;case 3:Do(),ca(ma),ca(pa),Yo();break;case 5:Fo(r);break;case 4:Do();break;case 13:case 19:ca(Bo);break;case 10:ro(r);break;case 23:case 24:Ss()}n=n.return}Nl=e,Il=Zs(e.current,null),Dl=Ml=zl=t,Bl=0,jl=null,ql=$l=Ul=0}function Ts(e,t){for(;;){var n=Il;try{if(no(),Qo.current=Pi,ri){for(var r=ei.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}ri=!1}if(Jo=0,ni=ti=ei=null,ai=!1,Ol.current=null,null===n||null===n.return){Bl=1,jl=t,Il=null;break}e:{var o=e,i=n.return,l=n,s=t;if(t=Dl,l.flags|=2048,l.firstEffect=l.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&l.mode)){var c=l.alternate;c?(l.updateQueue=c.updateQueue,l.memoizedState=c.memoizedState,l.lanes=c.lanes):(l.updateQueue=null,l.memoizedState=null)}var d=0!=(1&Bo.current),f=i;do{var p;if(p=13===f.tag){var m=f.memoizedState;if(null!==m)p=null!==m.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!d)}}if(p){var g=f.updateQueue;if(null===g){var b=new Set;b.add(u),f.updateQueue=b}else g.add(u);if(0==(2&f.mode)){if(f.flags|=64,l.flags|=16384,l.flags&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var v=co(-1,1);v.tag=2,fo(l,v)}l.lanes|=1;break e}s=void 0,l=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new dl,s=new Set,y.set(u,s)):void 0===(s=y.get(u))&&(s=new Set,y.set(u,s)),!s.has(l)){s.add(l);var w=Us.bind(null,o,u,l);u.then(w,w)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);s=Error((V(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Bl&&(Bl=2),s=ul(s,l),f=i;do{switch(f.tag){case 3:o=s,f.flags|=4096,t&=-t,f.lanes|=t,po(f,fl(0,o,t));break e;case 1:o=s;var k=f.type,E=f.stateNode;if(0==(64&f.flags)&&("function"==typeof k.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===Xl||!Xl.has(E)))){f.flags|=4096,t&=-t,f.lanes|=t,po(f,pl(f,o,t));break e}}f=f.return}while(null!==f)}Os(n)}catch(S){t=S,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function Cs(){var e=Rl.current;return Rl.current=Pi,null===e?Pi:e}function _s(e,t){var n=Pl;Pl|=16;var r=Cs();for(Nl===e&&Dl===t||xs(e,t);;)try{As();break}catch(a){Ts(e,a)}if(no(),Pl=n,Rl.current=r,null!==Il)throw Error(i(261));return Nl=null,Dl=0,Bl}function As(){for(;null!==Il;)Rs(Il)}function Ls(){for(;null!==Il&&!Aa();)Rs(Il)}function Rs(e){var t=Wl(e.alternate,e,Ml);e.memoizedProps=e.pendingProps,null===t?Os(e):Il=t,Ol.current=null}function Os(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ll(n,t,Ml)))return void(Il=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ml)||0==(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=sl(t)))return n.flags&=2047,void(Il=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Bl&&(Bl=5)}function Ps(e){var t=Ha();return Za(99,Ns.bind(null,e,t)),null}function Ns(e,t){do{Ds()}while(null!==es);if(0!=(48&Pl))throw Error(i(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,o=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var l=e.eventTimes,s=e.expirationTimes;0<o;){var u=31-Ht(o),c=1<<u;a[u]=0,l[u]=-1,s[u]=-1,o&=~c}if(null!==as&&0==(24&r)&&as.has(e)&&as.delete(e),e===Nl&&(Il=Nl=null,Dl=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=Pl,Pl|=32,Ol.current=null,Ur=Kt,br(l=gr())){if("selectionStart"in l)s={start:l.selectionStart,end:l.selectionEnd};else e:if(s=(s=l.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&0!==c.rangeCount){s=c.anchorNode,o=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{s.nodeType,u.nodeType}catch(C){s=null;break e}var d=0,f=-1,p=-1,m=0,h=0,g=l,b=null;t:for(;;){for(var v;g!==s||0!==o&&3!==g.nodeType||(f=d+o),g!==u||0!==c&&3!==g.nodeType||(p=d+c),3===g.nodeType&&(d+=g.nodeValue.length),null!==(v=g.firstChild);)b=g,g=v;for(;;){if(g===l)break t;if(b===s&&++m===o&&(f=d),b===u&&++h===c&&(p=d),null!==(v=g.nextSibling))break;b=(g=b).parentNode}g=v}s=-1===f||-1===p?null:{start:f,end:p}}else s=null;s=s||{start:0,end:0}}else s=null;$r={focusedElem:l,selectionRange:s},Kt=!1,cs=null,ds=!1,Kl=r;do{try{Is()}catch(C){if(null===Kl)throw Error(i(330));zs(Kl,C),Kl=Kl.nextEffect}}while(null!==Kl);cs=null,Kl=r;do{try{for(l=e;null!==Kl;){var y=Kl.flags;if(16&y&&ve(Kl.stateNode,""),128&y){var w=Kl.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&y){case 2:El(Kl),Kl.flags&=-3;break;case 6:El(Kl),Kl.flags&=-3,Cl(Kl.alternate,Kl);break;case 1024:Kl.flags&=-1025;break;case 1028:Kl.flags&=-1025,Cl(Kl.alternate,Kl);break;case 4:Cl(Kl.alternate,Kl);break;case 8:Tl(l,s=Kl);var E=s.alternate;wl(s),null!==E&&wl(E)}Kl=Kl.nextEffect}}catch(C){if(null===Kl)throw Error(i(330));zs(Kl,C),Kl=Kl.nextEffect}}while(null!==Kl);if(k=$r,w=gr(),y=k.focusedElem,l=k.selectionRange,w!==y&&y&&y.ownerDocument&&hr(y.ownerDocument.documentElement,y)){null!==l&&br(y)&&(w=l.start,void 0===(k=l.end)&&(k=w),"selectionStart"in y?(y.selectionStart=w,y.selectionEnd=Math.min(k,y.value.length)):(k=(w=y.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),s=y.textContent.length,E=Math.min(l.start,s),l=void 0===l.end?E:Math.min(l.end,s),!k.extend&&E>l&&(s=l,l=E,E=s),s=mr(y,E),o=mr(y,l),s&&o&&(1!==k.rangeCount||k.anchorNode!==s.node||k.anchorOffset!==s.offset||k.focusNode!==o.node||k.focusOffset!==o.offset)&&((w=w.createRange()).setStart(s.node,s.offset),k.removeAllRanges(),E>l?(k.addRange(w),k.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),k.addRange(w))))),w=[];for(k=y;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<w.length;y++)(k=w[y]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Kt=!!Ur,$r=Ur=null,e.current=n,Kl=r;do{try{for(y=e;null!==Kl;){var S=Kl.flags;if(36&S&&bl(y,Kl.alternate,Kl),128&S){w=void 0;var x=Kl.ref;if(null!==x){var T=Kl.stateNode;Kl.tag,w=T,"function"==typeof x?x(w):x.current=w}}Kl=Kl.nextEffect}}catch(C){if(null===Kl)throw Error(i(330));zs(Kl,C),Kl=Kl.nextEffect}}while(null!==Kl);Kl=null,Ba(),Pl=a}else e.current=n;if(Jl)Jl=!1,es=e,ts=t;else for(Kl=r;null!==Kl;)t=Kl.nextEffect,Kl.nextEffect=null,8&Kl.flags&&((S=Kl).sibling=null,S.stateNode=null),Kl=t;if(0===(r=e.pendingLanes)&&(Xl=null),1===r?e===is?os++:(os=0,is=e):os=0,n=n.stateNode,xa&&"function"==typeof xa.onCommitFiberRoot)try{xa.onCommitFiberRoot(Sa,n,void 0,64==(64&n.current.flags))}catch(C){}if(gs(e,qa()),Yl)throw Yl=!1,e=Ql,Ql=null,e;return 0!=(8&Pl)||Wa(),null}function Is(){for(;null!==Kl;){var e=Kl.alternate;ds||null===cs||(0!=(8&Kl.flags)?et(Kl,cs)&&(ds=!0):13===Kl.tag&&Al(e,Kl)&&et(Kl,cs)&&(ds=!0));var t=Kl.flags;0!=(256&t)&&gl(e,Kl),0==(512&t)||Jl||(Jl=!0,Va(97,(function(){return Ds(),null}))),Kl=Kl.nextEffect}}function Ds(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Za(e,Bs)}return!1}function Ms(e,t){ns.push(t,e),Jl||(Jl=!0,Va(97,(function(){return Ds(),null})))}function Fs(e,t){rs.push(t,e),Jl||(Jl=!0,Va(97,(function(){return Ds(),null})))}function Bs(){if(null===es)return!1;var e=es;if(es=null,0!=(48&Pl))throw Error(i(331));var t=Pl;Pl|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var a=n[r],o=n[r+1],l=a.destroy;if(a.destroy=void 0,"function"==typeof l)try{l()}catch(u){if(null===o)throw Error(i(330));zs(o,u)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){a=n[r],o=n[r+1];try{var s=a.create;a.destroy=s()}catch(u){if(null===o)throw Error(i(330));zs(o,u)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Pl=t,Wa(),!0}function js(e,t,n){fo(e,t=fl(0,t=ul(n,t),1)),t=fs(),null!==(e=hs(e,1))&&(qt(e,1,t),gs(e,t))}function zs(e,t){if(3===e.tag)js(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){js(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xl||!Xl.has(r))){var a=pl(n,e=ul(t,e),1);if(fo(n,a),a=fs(),null!==(n=hs(n,1)))qt(n,1,a),gs(n,a);else if("function"==typeof r.componentDidCatch&&(null===Xl||!Xl.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Us(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fs(),e.pingedLanes|=e.suspendedLanes&n,Nl===e&&(Dl&n)===n&&(4===Bl||3===Bl&&(62914560&Dl)===Dl&&500>qa()-Gl?xs(e,0):ql|=n),gs(e,t)}function $s(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Ha()?1:2:(0===ss&&(ss=zl),0===(t=Ut(62914560&~ss))&&(t=4194304))),n=fs(),null!==(e=hs(e,t))&&(qt(e,t,n),gs(e,n))}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hs(e,t,n,r){return new qs(e,t,n,r)}function Gs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Zs(e,t){var n=e.alternate;return null===n?((n=Hs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vs(e,t,n,r,a,o){var l=2;if(r=e,"function"==typeof e)Gs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case x:return Ws(n.children,a,o,t);case M:l=8,a|=16;break;case T:l=8,a|=1;break;case C:return(e=Hs(12,n,t,8|a)).elementType=C,e.type=C,e.lanes=o,e;case R:return(e=Hs(13,n,t,a)).type=R,e.elementType=R,e.lanes=o,e;case O:return(e=Hs(19,n,t,a)).elementType=O,e.lanes=o,e;case F:return Ks(n,a,o,t);case B:return(e=Hs(24,n,t,a)).elementType=B,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case _:l=10;break e;case A:l=9;break e;case L:l=11;break e;case P:l=14;break e;case N:l=16,r=null;break e;case I:l=22;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Hs(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Ws(e,t,n,r){return(e=Hs(7,e,r,t)).lanes=n,e}function Ks(e,t,n,r){return(e=Hs(23,e,r,t)).elementType=F,e.lanes=n,e}function Ys(e,t,n){return(e=Hs(6,e,null,t)).lanes=n,e}function Qs(e,t,n){return(t=Hs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Js(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function eu(e,t,n,r){var a=t.current,o=fs(),l=ps(a);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(i(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ba(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(i(171))}if(1===n.tag){var u=n.type;if(ba(u)){n=wa(n,u,s);break e}}n=s}else n=fa;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fo(a,t),ms(a,l,o),l}function tu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ru(e,t){nu(e,t),(e=e.alternate)&&nu(e,t)}function au(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xs(e,t,null!=n&&!0===n.hydrate),t=Hs(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,so(t),e[ea]=n.current,Pr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function ou(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function iu(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if("function"==typeof a){var l=a;a=function(){var e=tu(i);l.call(e)}}eu(t,i,e,a)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new au(e,0,t?{hydrate:!0}:void 0)}(n,r),i=o._internalRoot,"function"==typeof a){var s=a;a=function(){var e=tu(i);s.call(e)}}ks((function(){eu(t,i,e,a)}))}return tu(i)}function lu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ou(t))throw Error(i(200));return Js(e,t,null,n)}Wl=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||ma.current)Fi=!0;else{if(0==(n&r)){switch(Fi=!1,t.tag){case 3:Vi(t),Wo();break;case 5:Mo(t);break;case 1:ba(t.type)&&ka(t);break;case 4:Io(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;da(Xa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Xi(e,t,n):(da(Bo,1&Bo.current),null!==(t=ol(e,t,n))?t.sibling:null);da(Bo,1&Bo.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return al(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),da(Bo,Bo.current),r)break;return null;case 23:case 24:return t.lanes=0,$i(e,t,n)}return ol(e,t,n)}Fi=0!=(16384&e.flags)}else Fi=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=ga(t,pa.current),oo(t,n),a=li(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ba(r)){var o=!0;ka(t)}else o=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,so(t);var l=r.getDerivedStateFromProps;"function"==typeof l&&bo(t,r,l,e),a.updater=vo,t.stateNode=a,a._reactInternals=t,Eo(t,r,e,n),t=Zi(null,t,r,!0,o,n)}else t.tag=0,Bi(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(o=a._init)(a._payload),t.type=a,o=t.tag=function(e){if("function"==typeof e)return Gs(e)?1:0;if(null!=e){if((e=e.$$typeof)===L)return 11;if(e===P)return 14}return 2}(a),e=Qa(a,e),o){case 0:t=Hi(null,t,a,e,n);break e;case 1:t=Gi(null,t,a,e,n);break e;case 11:t=ji(null,t,a,e,n);break e;case 14:t=zi(null,t,a,Qa(a.type,e),r,n);break e}throw Error(i(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,Hi(e,t,r,a=t.elementType===r?a:Qa(r,a),n);case 1:return r=t.type,a=t.pendingProps,Gi(e,t,r,a=t.elementType===r?a:Qa(r,a),n);case 3:if(Vi(t),r=t.updateQueue,null===e||null===r)throw Error(i(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,uo(e,t),mo(t,r,null,n),(r=t.memoizedState.element)===a)Wo(),t=ol(e,t,n);else{if((o=(a=t.stateNode).hydrate)&&(Uo=Wr(t.stateNode.containerInfo.firstChild),zo=t,o=$o=!0),o){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(o=e[a])._workInProgressVersionPrimary=e[a+1],Ko.push(o);for(n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Bi(e,t,r,n),Wo();t=t.child}return t;case 5:return Mo(t),null===e&&Go(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,l=a.children,Hr(r,a)?l=null:null!==o&&Hr(r,o)&&(t.flags|=16),qi(e,t),Bi(e,t,l,n),t.child;case 6:return null===e&&Go(t),null;case 13:return Xi(e,t,n);case 4:return Io(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_o(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,ji(e,t,r,a=t.elementType===r?a:Qa(r,a),n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,l=t.memoizedProps,o=a.value;var s=t.type._context;if(da(Xa,s._currentValue),s._currentValue=o,null!==l)if(s=l.value,0===(o=cr(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(l.children===a.children&&!ma.current){t=ol(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var u=s.dependencies;if(null!==u){l=s.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===s.tag&&((c=co(-1,n&-n)).tag=2,fo(s,c)),s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),ao(s.return,n),u.lanes|=n;break}c=c.next}}else l=10===s.tag&&s.type===t.type?null:s.child;if(null!==l)l.return=s;else for(l=s;null!==l;){if(l===t){l=null;break}if(null!==(s=l.sibling)){s.return=l.return,l=s;break}l=l.return}s=l}Bi(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(o=t.pendingProps).children,oo(t,n),r=r(a=io(a,o.unstable_observedBits)),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return o=Qa(a=t.type,t.pendingProps),zi(e,t,a,o=Qa(a.type,o),r,n);case 15:return Ui(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Qa(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ba(r)?(e=!0,ka(t)):e=!1,oo(t,n),wo(t,r,a),Eo(t,r,a,n),Zi(null,t,r,!0,e,n);case 19:return al(e,t,n);case 23:case 24:return $i(e,t,n)}throw Error(i(156,t.tag))},au.prototype.render=function(e){eu(e,this._internalRoot,null,null)},au.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;eu(null,e,null,(function(){t[ea]=null}))},tt=function(e){13===e.tag&&(ms(e,4,fs()),ru(e,4))},nt=function(e){13===e.tag&&(ms(e,67108864,fs()),ru(e,67108864))},rt=function(e){if(13===e.tag){var t=fs(),n=ps(e);ms(e,n,t),ru(e,n)}},at=function(e,t){return t()},_e=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=oa(r);if(!a)throw Error(i(90));Q(r),ne(r,a)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&ie(e,!!n.multiple,t,!1)}},Ne=ws,Ie=function(e,t,n,r,a){var o=Pl;Pl|=4;try{return Za(98,e.bind(null,t,n,r,a))}finally{0===(Pl=o)&&(Vl(),Wa())}},De=function(){0==(49&Pl)&&(function(){if(null!==as){var e=as;as=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gs(e,qa())}))}Wa()}(),Ds())},Me=function(e,t){var n=Pl;Pl|=2;try{return e(t)}finally{0===(Pl=n)&&(Vl(),Wa())}};var su={Events:[ra,aa,oa,Oe,Pe,Ds,{current:!1}]},uu={findFiberByHostInstance:na,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cu={bundleType:uu.bundleType,version:uu.version,rendererPackageName:uu.rendererPackageName,rendererConfig:uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:uu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{Sa=du.inject(cu),xa=du}catch(ge){}}t.createPortal=lu,t.hydrate=function(e,t,n){if(!ou(t))throw Error(i(200));return iu(null,e,t,!0,n)}},7995:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(7439)},1970:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var l,s,u,c;if(Array.isArray(e)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(!o(e[s],i[s]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;for(c=e.entries();!(s=c.next()).done;)if(!o(s.value[1],i.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(e[s]!==i[s])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((l=(u=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,u[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==u[s]&&"__v"!==u[s]&&"__o"!==u[s]||!e.$$typeof)&&!o(e[u[s]],i[u[s]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},3629:(e,t,n)=>{"use strict";n.d(t,{B6:()=>G,ql:()=>J});var r=n(9496),a=n(507),o=n.n(a),i=n(1970),l=n.n(i),s=n(3670),u=n.n(s),c=n(631),d=n.n(c);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}var g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},b={rel:["amphtml","canonical","alternate"]},v={type:["application/ld+json"]},y={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(g).map((function(e){return g[e]})),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},E=Object.keys(k).reduce((function(e,t){return e[k[t]]=t,e}),{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},x=function(e){var t=S(e,g.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=S(e,"defaultTitle");return t||r||void 0},T=function(e){return S(e,"onChangeClientState")||function(){}},C=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return f({},e,t)}),{})},_=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a<r.length;a+=1){var o=r[a].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}return t}),[])},A=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var a={};n.filter((function(e){for(var n,o=Object.keys(e),i=0;i<o.length;i+=1){var l=o[i],s=l.toLowerCase();-1===t.indexOf(s)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===s&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(l)||"innerHTML"!==l&&"cssText"!==l&&"itemprop"!==l||(n=l)}if(!n||!e[n])return!1;var u=e[n].toLowerCase();return r[n]||(r[n]={}),a[n]||(a[n]={}),!r[n][u]&&(a[n][u]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var o=Object.keys(a),i=0;i<o.length;i+=1){var l=o[i],s=f({},r[l],a[l]);r[l]=s}return e}),[]).reverse()},L=function(e,t){if(Array.isArray(e)&&e.length)for(var n=0;n<e.length;n+=1)if(e[n][t])return!0;return!1},R=function(e){return Array.isArray(e)?e.join(""):e},O=function(e,t){return Array.isArray(e)?e.reduce((function(e,n){return function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1}(n,t)?e.priority.push(n):e.default.push(n),e}),{priority:[],default:[]}):{default:e}},P=function(e,t){var n;return f({},e,((n={})[t]=void 0,n))},N=[g.NOSCRIPT,g.SCRIPT,g.STYLE],I=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},D=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},M=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[k[n]||n]=e[n],t}),t)},F=function(e,t){return t.map((function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach((function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]})),r.createElement(e,o)}))},B=function(e,t,n){switch(e){case g.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=M(n,a),[r.createElement(g.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=D(n),o=R(t);return a?"<"+e+' data-rh="true" '+a+">"+I(o,r)+"</"+e+">":"<"+e+' data-rh="true">'+I(o,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return M(t)},toString:function(){return D(t)}};default:return{toComponent:function(){return F(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+I(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===N.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+"</"+e+">")}),"")}(e,t,n)}}}},j=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,f=e.scriptTags,p={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=O(e.metaTags,y),o=O(t,b),i=O(n,v);return{priorityMethods:{toComponent:function(){return[].concat(F(g.META,a.priority),F(g.LINK,o.priority),F(g.SCRIPT,i.priority))},toString:function(){return B(g.META,a.priority,r)+" "+B(g.LINK,o.priority,r)+" "+B(g.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);p=m.priorityMethods,c=m.linkTags,d=m.metaTags,f=m.scriptTags}return{priority:p,base:B(g.BASE,t,r),bodyAttributes:B("bodyAttributes",n,r),htmlAttributes:B("htmlAttributes",a,r),link:B(g.LINK,c,r),meta:B(g.META,d,r),noscript:B(g.NOSCRIPT,o,r),script:B(g.SCRIPT,f,r),style:B(g.STYLE,i,r),title:B(g.TITLE,{title:s,titleAttributes:u},r)}},z=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?z:n.instances},add:function(e){(n.canUseDOM?z:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?z:n.instances).indexOf(e);(n.canUseDOM?z:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=j({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),q=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),H="undefined"!=typeof document,G=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return p(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);G.canUseDOM=H,G.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},G.defaultProps={context:{}},G.displayName="HelmetProvider";var Z=function(e,t){var n,r=document.head||document.querySelector(g.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some((function(e,t){return n=t,r.isEqualNode(e)}))?o.splice(n,1):i.push(r)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:o,newTags:i}},V=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l<i.length;l+=1){var s=i[l],u=t[s]||"";n.getAttribute(s)!==u&&n.setAttribute(s,u),-1===a.indexOf(s)&&a.push(s);var c=o.indexOf(s);-1!==c&&o.splice(c,1)}for(var d=o.length-1;d>=0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},W=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;V(g.BODY,e.bodyAttributes),V(g.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=R(e)),V(g.TITLE,t)}(c,d);var f={baseTag:Z(g.BASE,n),linkTags:Z(g.LINK,a),metaTags:Z(g.META,o),noscriptTags:Z(g.NOSCRIPT,i),scriptTags:Z(g.SCRIPT,s),styleTags:Z(g.STYLE,u)},p={},m={};Object.keys(f).forEach((function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(m[e]=f[e].oldTags)})),t&&t(),l(e,p,m)},K=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).rendered=!1,t}p(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!d()(e,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,a=null,o=(e=n.helmetInstances.get().map((function(e){var t=f({},e.props);return delete t.context,t})),{baseTag:_(["href"],e),bodyAttributes:C("bodyAttributes",e),defer:S(e,"defer"),encode:S(e,"encodeSpecialCharacters"),htmlAttributes:C("htmlAttributes",e),linkTags:A(g.LINK,["rel","href"],e),metaTags:A(g.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:A(g.NOSCRIPT,["innerHTML"],e),onChangeClientState:T(e),scriptTags:A(g.SCRIPT,["src","innerHTML"],e),styleTags:A(g.STYLE,["cssText"],e),title:x(e),titleAttributes:C("titleAttributes",e),prioritizeSeoTags:L(e,"prioritizeSeoTags")});G.canUseDOM?(t=o,K&&cancelAnimationFrame(K),t.defer?K=requestAnimationFrame((function(){W(t,(function(){K=null}))})):(W(t),K=null)):j&&(a=j(o)),r(a)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(r.Component);Y.propTypes={context:q.isRequired},Y.displayName="HelmetDispatcher";var Q=["children"],X=["children"],J=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!l()(P(this.props,"helmetData"),P(e,"helmetData"))},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case g.SCRIPT:case g.NOSCRIPT:return{innerHTML:t};case g.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return f({},r,((t={})[n.type]=[].concat(r[n.type]||[],[f({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case g.TITLE:return f({},a,((t={})[r.type]=i,t.titleAttributes=f({},o),t));case g.BODY:return f({},a,{bodyAttributes:f({},o)});case g.HTML:return f({},a,{htmlAttributes:f({},o)});default:return f({},a,((n={})[r.type]=f({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=f({},t);return Object.keys(e).forEach((function(t){var r;n=f({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,o=r.children,i=h(r,Q),l=Object.keys(i).reduce((function(e,t){return e[E[t]||t]=i[t],e}),{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,o),s){case g.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:l,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:o})}}})),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=h(e,X),a=f({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(Y,f({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,(function(e){return r.createElement(Y,f({},a,{context:e}))}))},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},198:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case h:case s:return e;default:return t}}case a:return t}}}function E(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||k(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===g},t.isMemo=function(e){return k(e)===h},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=k},6237:(e,t,n)=>{"use strict";e.exports=n(198)},4984:(e,t,n)=>{"use strict";n.d(t,{H:()=>l,f:()=>i});var r=n(3226),a=n(2081),o=n(9496);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?(0,r.LX)(t,e):n.length?n[n.length-1].match:r.F0.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.rs,n,e.map((function(e,n){return o.createElement(r.AW,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.Z)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.Z)({},n,t,{route:e}))}})}))):null}},1:(e,t,n)=>{"use strict";n.d(t,{OL:()=>y,VK:()=>c,rU:()=>g});var r=n(3226),a=n(4185),o=n(9496),i=n(4047),l=n(2081),s=n(4604),u=n(5408),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.lX)(t.props),t}return(0,a.Z)(t,e),t.prototype.render=function(){return o.createElement(r.F0,{history:this.history,children:this.props.children})},t}(o.Component);o.Component;var d=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.ob)(e,null,null,t):e},p=function(e){return e},m=o.forwardRef;void 0===m&&(m=p);var h=m((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,i=(0,s.Z)(e,["innerRef","navigate","onClick"]),u=i.target,c=(0,l.Z)({},i,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||u&&"_self"!==u||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=p!==m&&t||n,o.createElement("a",c)}));var g=m((function(e,t){var n=e.component,a=void 0===n?h:n,c=e.replace,g=e.to,b=e.innerRef,v=(0,s.Z)(e,["component","replace","to","innerRef"]);return o.createElement(r.s6.Consumer,null,(function(e){e||(0,u.Z)(!1);var n=e.history,r=f(d(g,e.location),e.location),s=r?n.createHref(r):"",h=(0,l.Z)({},v,{href:s,navigate:function(){var t=d(g,e.location),r=(0,i.Ep)(e.location)===(0,i.Ep)(f(t));(c||r?n.replace:n.push)(t)}});return p!==m?h.ref=t||b:h.innerRef=b,o.createElement(a,h)}))})),b=function(e){return e},v=o.forwardRef;void 0===v&&(v=b);var y=v((function(e,t){var n=e["aria-current"],a=void 0===n?"page":n,i=e.activeClassName,c=void 0===i?"active":i,p=e.activeStyle,m=e.className,h=e.exact,y=e.isActive,w=e.location,k=e.sensitive,E=e.strict,S=e.style,x=e.to,T=e.innerRef,C=(0,s.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.createElement(r.s6.Consumer,null,(function(e){e||(0,u.Z)(!1);var n=w||e.location,i=f(d(x,n),n),s=i.pathname,_=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=_?(0,r.LX)(n.pathname,{path:_,exact:h,sensitive:k,strict:E}):null,L=!!(y?y(A,n):A),R="function"==typeof m?m(L):m,O="function"==typeof S?S(L):S;L&&(R=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(R,c),O=(0,l.Z)({},O,p));var P=(0,l.Z)({"aria-current":L&&a||null,className:R,style:O,to:i},C);return b!==v?P.ref=t||T:P.innerRef=T,o.createElement(g,P)}))}))},3226:(e,t,n)=>{"use strict";n.d(t,{AW:()=>T,F0:()=>k,rs:()=>O,s6:()=>w,LX:()=>x,k6:()=>N,TH:()=>I});var r=n(4185),a=n(9496),o=n(4047),i=n(507),l=n.n(i),s=1073741823,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var d=a.createContext||function(e,t){var n,o,i="__create-react-context-"+function(){var e="__global_unique_id__";return u[e]=(u[e]||0)+1}()+"__",d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}(0,r.Z)(n,e);var a=n.prototype;return a.getChildContext=function(){var e;return(e={})[i]=this.emitter,e},a.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((o=r)===(i=a)?0!==o||1/o==1/i:o!=o&&i!=i)?n=0:(n="function"==typeof t?t(r,a):s,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,i},a.render=function(){return this.props.children},n}(a.Component);d.childContextTypes=((n={})[i]=l().object.isRequired,n);var f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}(0,r.Z)(n,t);var a=n.prototype;return a.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?s:t},a.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?s:e},a.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},a.getValue=function(){return this.context[i]?this.context[i].get():e},a.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(a.Component);return f.contextTypes=((o={})[i]=l().object,o),{Provider:d,Consumer:f}};const f=d;var p=n(5408),m=n(2081),h=n(7720),g=n.n(h),b=(n(6237),n(4604)),v=(n(2535),function(e){var t=f();return t.displayName=e,t}),y=v("Router-History"),w=v("Router"),k=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.Z)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a.createElement(w.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.Component);a.Component;a.Component;var E={},S=0;function x(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,i=n.strict,l=void 0!==i&&i,s=n.sensitive,u=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=E[n]||(E[n]={});if(r[e])return r[e];var a=[],o={regexp:g()(e,a,t),keys:a};return S<1e4&&(r[e]=o,S++),o}(n,{end:o,strict:l,sensitive:u}),a=r.regexp,i=r.keys,s=a.exec(e);if(!s)return null;var c=s[0],d=s.slice(1),f=e===c;return o&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:i.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var T=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){var e=this;return a.createElement(w.Consumer,null,(function(t){t||(0,p.Z)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?x(n.pathname,e.props):t.match,o=(0,m.Z)({},t,{location:n,match:r}),i=e.props,l=i.children,s=i.component,u=i.render;return Array.isArray(l)&&function(e){return 0===a.Children.count(e)}(l)&&(l=null),a.createElement(w.Provider,{value:o},o.match?l?"function"==typeof l?l(o):l:s?a.createElement(s,o):u?u(o):null:"function"==typeof l?l(o):null)}))},t}(a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function _(e,t){if(!e)return t;var n=C(e);return 0!==t.pathname.indexOf(n)?t:(0,m.Z)({},t,{pathname:t.pathname.substr(n.length)})}function A(e){return"string"==typeof e?e:(0,o.Ep)(e)}function L(e){return function(){(0,p.Z)(!1)}}function R(){}a.Component;var O=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){var e=this;return a.createElement(w.Consumer,null,(function(t){t||(0,p.Z)(!1);var n,r,o=e.props.location||t.location;return a.Children.forEach(e.props.children,(function(e){if(null==r&&a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?x(o.pathname,(0,m.Z)({},e.props,{path:i})):t.match}})),r?a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(a.Component);var P=a.useContext;function N(){return P(y)}function I(){return P(w).location}},1288:(e,t,n)=>{"use strict";var r=n(2767),a=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var i=60109,l=60110,s=60112;t.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;a=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),i=d("react.provider"),l=d("react.context"),s=d("react.forward_ref"),t.Suspense=d("react.suspense"),u=d("react.memo"),c=d("react.lazy")}var f="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=g.prototype;var y=v.prototype=new b;y.constructor=v,r(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},i=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,r)&&!E.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:a,type:e,key:i,ref:l,props:o,_owner:w.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var T=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function _(e,t,n,r,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case a:case o:s=!0}}if(s)return i=i(s=e),e=""===r?"."+C(s,0):r,Array.isArray(i)?(n="",null!=e&&(n=e.replace(T,"$&/")+"/"),_(i,t,n,"",(function(e){return e}))):null!=i&&(x(i)&&(i=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(T,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=r+C(l=e[u],u);s+=_(l,t,n,c,i)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)s+=_(l=l.value,t,n,c=r+C(l,u++),i);else if("object"===l)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function A(e,t,n){if(null==e)return e;var r=[],a=0;return _(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var R={current:null};function O(){var e=R.current;if(null===e)throw Error(p(321));return e}var P={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error(p(143));return e}},t.Component=g,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var o=r({},e.props),i=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=w.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)k.call(t,c)&&!E.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:a,type:e.type,key:i,ref:l,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return O().useCallback(e,t)},t.useContext=function(e,t){return O().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return O().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return O().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return O().useLayoutEffect(e,t)},t.useMemo=function(e,t){return O().useMemo(e,t)},t.useReducer=function(e,t,n){return O().useReducer(e,t,n)},t.useRef=function(e){return O().useRef(e)},t.useState=function(e){return O().useState(e)},t.version="17.0.2"},9496:(e,t,n)=>{"use strict";e.exports=n(1288)},9787:(e,t)=>{"use strict";var n,r,a,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(d,0),n}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(d,0))},r=function(e,t){c=setTimeout(e,t)},a=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var h=!1,g=null,b=-1,v=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();y=e+v;try{g(!0,e)?k.postMessage(null):(h=!1,g=null)}catch(n){throw k.postMessage(null),n}}else h=!1},n=function(e){g=e,h||(h=!0,k.postMessage(null))},r=function(e,n){b=f((function(){e(t.unstable_now())}),n)},a=function(){p(b),b=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<T(a,t)))break e;e[r]=t,e[n]=a,n=r}}function S(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var o=2*(r+1)-1,i=e[o],l=o+1,s=e[l];if(void 0!==i&&0>T(i,n))void 0!==s&&0>T(s,i)?(e[r]=s,e[l]=n,r=l):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==s&&0>T(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],_=[],A=1,L=null,R=3,O=!1,P=!1,N=!1;function I(e){for(var t=S(_);null!==t;){if(null===t.callback)x(_);else{if(!(t.startTime<=e))break;x(_),t.sortIndex=t.expirationTime,E(C,t)}t=S(_)}}function D(e){if(N=!1,I(e),!P)if(null!==S(C))P=!0,n(M);else{var t=S(_);null!==t&&r(D,t.startTime-e)}}function M(e,n){P=!1,N&&(N=!1,a()),O=!0;var o=R;try{for(I(n),L=S(C);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var i=L.callback;if("function"==typeof i){L.callback=null,R=L.priorityLevel;var l=i(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?L.callback=l:L===S(C)&&x(C),I(n)}else x(C);L=S(C)}if(null!==L)var s=!0;else{var u=S(_);null!==u&&r(D,u.startTime-n),s=!1}return s}finally{L=null,R=o,O=!1}}var F=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){P||O||(P=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return S(C)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,o,i){var l=t.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?l+i:l:i=l,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:A++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>l?(e.sortIndex=i,E(_,e),null===S(C)&&e===S(_)&&(N?a():N=!0,r(D,i-l))):(e.sortIndex=s,E(C,e),P||O||(P=!0,n(M))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},8051:(e,t,n)=>{"use strict";e.exports=n(9787)},631:e=>{e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<o.length;s++){var u=o[s];if(!l(u))return!1;var c=e[u],d=t[u];if(!1===(a=n?n.call(r,c,d,u):void 0)||void 0===a&&c!==d)return!1}return!0}},5408:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r="Invariant failed";function a(e,t){if(!e)throw new Error(r)}},6809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"effector patronum",tagline:"Operators library delivering modularity and convenience.",url:"https://patronum.effector.dev",baseUrl:"/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.ico",organizationName:"effector",projectName:"patronum",i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"../src/",routeBasePath:"/methods",sidebarPath:"/home/runner/work/patronum/patronum/website/sidebars.js",breadcrumbs:!0,editUrl:"https://github.com/effector/patronum/tree/main/src/"},pages:{},blog:!1,theme:{customCss:"/home/runner/work/patronum/patronum/website/src/main.css"}}]],plugins:[null],themeConfig:{navbar:{title:"effector patronum \u2728",logo:{alt:"effector patronum",src:"img/comet.png"},items:[{to:"docs/installation",position:"left",label:"Installation"},{type:"doc",docId:"methods",position:"left",label:"Methods"},{href:"https://share.effector.dev/YC6TiqYW",label:"Try",position:"left"},{href:"https://github.com/effector/patronum",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Docs",items:[{label:"Installation",to:"/docs/installation"},{label:"Migration guide",to:"/docs/migration-guide"}]},{title:"Community",items:[{label:"Telegram",href:"https://t.me/effector_ru"},{label:"Telegram EN",href:"https://t.me/effector_en"},{label:"Twitter",href:"https://twitter.com/effectorjs"}]},{title:"More",items:[{label:"Dev.to",to:"https://dev.to/effector"},{label:"GitHub",href:"https://github.com/effector"}]}],copyright:"Copyright \xa9 2020-2023 Effector Core Team"},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},algolia:{appId:"OEOSWK083U",apiKey:"d14c8069434613d33755df5cd29c3ded",indexName:"crawler_Patronum",contextualSearch:!0,searchPagePath:"search",searchParameters:{}},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},themes:[],scripts:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},2081:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},4185:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>a})},4604:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{Z:()=>r})},7529:e=>{"use strict";e.exports={}},6887:e=>{"use strict";e.exports=JSON.parse('{"/docs/installation-b6a":{"__comp":"1f391b9e","__context":{"plugin":"48e94e84"},"content":"a9298e25"},"/docs/migration-guide-f5d":{"__comp":"1f391b9e","__context":{"plugin":"48e94e84"},"content":"a765e1a2"},"/search-f2b":{"__comp":"1a4e3797","__context":{"plugin":"978828ab"}},"/methods-c65":{"__comp":"1be78505","__context":{"plugin":"8d0041db"},"versionMetadata":"935f2afb"},"/methods/-0f3":{"__comp":"17896441","content":"97ffe59f"},"/methods/and/-663":{"__comp":"17896441","content":"4af54caf"},"/methods/combine-events/-d44":{"__comp":"17896441","content":"e9221267"},"/methods/condition/-f76":{"__comp":"17896441","content":"5b0e0e08"},"/methods/debounce/-69f":{"__comp":"17896441","content":"deda2cf3"},"/methods/debug/-0bc":{"__comp":"17896441","content":"67c026b6"},"/methods/delay/-131":{"__comp":"17896441","content":"ad512b16"},"/methods/either/-57a":{"__comp":"17896441","content":"f304a758"},"/methods/empty/-6ca":{"__comp":"17896441","content":"b41febc4"},"/methods/equals/-bf2":{"__comp":"17896441","content":"1ae5d93b"},"/methods/every/-23e":{"__comp":"17896441","content":"08f30e7d"},"/methods/format/-f2f":{"__comp":"17896441","content":"c9ae8b2d"},"/methods/in-flight/-52f":{"__comp":"17896441","content":"e09d216d"},"/methods/interval/-132":{"__comp":"17896441","content":"6256d5c3"},"/methods/not/-07f":{"__comp":"17896441","content":"308aca62"},"/methods/once/-523":{"__comp":"17896441","content":"8d76850e"},"/methods/or/-fa6":{"__comp":"17896441","content":"e55f1e0e"},"/methods/pending/-0c7":{"__comp":"17896441","content":"84071e39"},"/methods/reset/-f60":{"__comp":"17896441","content":"c7a80478"},"/methods/reshape/-34d":{"__comp":"17896441","content":"4d9d995f"},"/methods/snapshot/-b6f":{"__comp":"17896441","content":"2b95ca9d"},"/methods/some/-74c":{"__comp":"17896441","content":"33c22581"},"/methods/split-map/-989":{"__comp":"17896441","content":"9dc53199"},"/methods/spread/-a78":{"__comp":"17896441","content":"1178bc06"},"/methods/status/-ca9":{"__comp":"17896441","content":"f6536843"},"/methods/throttle/-2e3":{"__comp":"17896441","content":"08154ee9"},"/methods/time/-7fc":{"__comp":"17896441","content":"a7fdbc71"},"/-712":{"__comp":"1df93b7f","__context":{"plugin":"48e94e84"},"config":"5e9f5e1a"}}')}},e=>{e.O(0,[532],(()=>{return t=5223,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.849a2d8c.js b/assets/js/main.849a2d8c.js new file mode 100644 index 00000000..cef05a17 --- /dev/null +++ b/assets/js/main.849a2d8c.js @@ -0,0 +1,2 @@ +/*! For license information please see main.849a2d8c.js.LICENSE.txt */ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[179],{687:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var r=n(9231);function a(){return r.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},r.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},5481:(e,t,n)=>{var r={"./":9637};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=5481},1730:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>o});var r=n(9231);const a=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),r.createElement(a.Provider,{value:n},t)}},3004:(e,t,n)=>{"use strict";var r=n(9231),a=n(4151),o=n(7962),i=n(7100),l=n(7698);const s=[n(2898),n(4900),n(3645),n(1068)];var u=n(9023),c=n(9409),d=n(260);function f(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var p=n(4011),m=n(5070),h=n(8607),g=n(4590),b=n(4176),v=n(9211),y=n(4869),w=n(2772),k=n(9373),E=n(5601),S=n(1701);function x(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,h.Z)(),n=(0,y.l)();return r.createElement(m.Z,null,Object.entries(t).map((e=>{let[t,{htmlLang:a}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:a})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function C(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.Z)(),a=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,h.Z)(),{pathname:r}=(0,c.TH)();return e+(0,E.applyTrailingSlash)((0,g.Z)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function T(){const{i18n:{currentLocale:e}}=(0,h.Z)(),{metadata:t,image:n}=(0,b.L)();return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),n&&r.createElement(v.d,{image:n}),r.createElement(C,null),r.createElement(x,null),r.createElement(S.Z,{tag:k.HX,locale:e}),r.createElement(m.Z,null,t.map(((e,t)=>r.createElement("meta",(0,p.Z)({key:t},e))))))}const _=new Map;function A(e){if(_.has(e.pathname))return{...e,pathname:_.get(e.pathname)};if((0,d.f)(u.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return _.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return _.set(e.pathname,t),{...e,pathname:t}}var L=n(1730),R=n(2039);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const a=s.map((t=>{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const O=function(e){let{children:t,location:n,previousLocation:a}=e;return(0,r.useLayoutEffect)((()=>{a!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:a}),N("onRouteDidUpdate",{previousLocation:a,location:n}))}),[a,n]),t};function P(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(u.Z,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class I extends r.Component{constructor(e){super(e),this.previousLocation=void 0,this.routeUpdateCleanupCb=void 0,this.previousLocation=null,this.routeUpdateCleanupCb=l.Z.canUseDOM?N("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=N("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),P(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return r.createElement(O,{previousLocation:this.previousLocation,location:t},r.createElement(c.AW,{location:t,render:()=>e}))}}const D=I,M="__docusaurus-base-url-issue-banner-container",F="__docusaurus-base-url-issue-banner",B="__docusaurus-base-url-issue-banner-suggestion-container",j="__DOCUSAURUS_INSERT_BASEURL_BANNER";function z(e){return`\nwindow['${j}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${j}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${M}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="${F}" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseUrl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${B}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n var suggestionContainer = document.getElementById('${B}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function U(){const{siteConfig:{baseUrl:e}}=(0,h.Z)();return(0,r.useLayoutEffect)((()=>{window[j]=!1}),[]),r.createElement(r.Fragment,null,!l.Z.canUseDOM&&r.createElement(m.Z,null,r.createElement("script",null,z(e))),r.createElement("div",{id:M}))}function $(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,h.Z)(),{pathname:n}=(0,c.TH)();return t&&n===e?r.createElement(U,null):null}function q(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:a,localeConfigs:o}}=(0,h.Z)(),i=(0,g.Z)(e),{htmlLang:l,direction:s}=o[a];return r.createElement(m.Z,null,r.createElement("html",{lang:l,dir:s}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),r.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&r.createElement("meta",{name:"robots",content:"noindex, nofollow"}),e&&r.createElement("link",{rel:"icon",href:i}))}var H=n(6728),G=n(6852);function Z(){const e=(0,G.Z)();return r.createElement(m.Z,null,r.createElement("html",{"data-has-hydrated":e}))}function V(){const e=(0,d.H)(u.Z),t=(0,c.TH)();return r.createElement(H.Z,null,r.createElement(R.M,null,r.createElement(L.t,null,r.createElement(f,null,r.createElement(q,null),r.createElement(T,null),r.createElement($,null),r.createElement(D,{location:A(t)},e)),r.createElement(Z,null))))}var W=n(6887);const K=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(7823);const Q=new Set,X=new Set,J=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch(e){if(!(e=>!J()&&!X.has(e)&&!Q.has(e))(e))return!1;Q.add(e);const t=(0,d.f)(u.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(W).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?K(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!J()&&!X.has(e))(e)&&(X.add(e),P(e))},te=Object.freeze(ee);if(l.Z.canUseDOM){window.docusaurus=te;const e=a.hydrate;P(window.location.pathname).then((()=>{e(r.createElement(i.B6,null,r.createElement(o.VK,null,r.createElement(V,null))),document.getElementById("__docusaurus"))}))}},2039:(e,t,n)=>{"use strict";n.d(t,{_:()=>c,M:()=>d});var r=n(9231),a=n(6809);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/methods","versions":[{"name":"current","label":"Next","isLast":true,"path":"/methods","mainDocId":"methods","docs":[{"id":"and/readme","path":"/methods/and/","sidebar":"methodsSidebar"},{"id":"combine-events/readme","path":"/methods/combine-events/","sidebar":"methodsSidebar"},{"id":"condition/readme","path":"/methods/condition/","sidebar":"methodsSidebar"},{"id":"debounce/readme","path":"/methods/debounce/","sidebar":"methodsSidebar"},{"id":"debug/readme","path":"/methods/debug/","sidebar":"methodsSidebar"},{"id":"delay/readme","path":"/methods/delay/","sidebar":"methodsSidebar"},{"id":"either/readme","path":"/methods/either/","sidebar":"methodsSidebar"},{"id":"empty/readme","path":"/methods/empty/","sidebar":"methodsSidebar"},{"id":"equals/readme","path":"/methods/equals/","sidebar":"methodsSidebar"},{"id":"every/readme","path":"/methods/every/","sidebar":"methodsSidebar"},{"id":"format/readme","path":"/methods/format/","sidebar":"methodsSidebar"},{"id":"in-flight/readme","path":"/methods/in-flight/","sidebar":"methodsSidebar"},{"id":"interval/readme","path":"/methods/interval/","sidebar":"methodsSidebar"},{"id":"methods","path":"/methods/","sidebar":"methodsSidebar"},{"id":"not/readme","path":"/methods/not/","sidebar":"methodsSidebar"},{"id":"once/readme","path":"/methods/once/","sidebar":"methodsSidebar"},{"id":"or/readme","path":"/methods/or/","sidebar":"methodsSidebar"},{"id":"pending/readme","path":"/methods/pending/","sidebar":"methodsSidebar"},{"id":"previous/readme","path":"/methods/previous/","sidebar":"methodsSidebar"},{"id":"reset/readme","path":"/methods/reset/","sidebar":"methodsSidebar"},{"id":"reshape/readme","path":"/methods/reshape/","sidebar":"methodsSidebar"},{"id":"snapshot/readme","path":"/methods/snapshot/","sidebar":"methodsSidebar"},{"id":"some/readme","path":"/methods/some/","sidebar":"methodsSidebar"},{"id":"split-map/readme","path":"/methods/split-map/","sidebar":"methodsSidebar"},{"id":"spread/readme","path":"/methods/spread/","sidebar":"methodsSidebar"},{"id":"status/readme","path":"/methods/status/","sidebar":"methodsSidebar"},{"id":"throttle/readme","path":"/methods/throttle/","sidebar":"methodsSidebar"},{"id":"time/readme","path":"/methods/time/","sidebar":"methodsSidebar"}],"draftIds":[],"sidebars":{"methodsSidebar":{"link":{"path":"/methods/","label":"Methods"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(7529);const s=JSON.parse('{"docusaurusVersion":"2.4.3","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.4.3"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.4.3"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.4.3"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.4.3"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"2.4.3"},"docusaurus-tailwindcss":{"type":"local"}}}'),u={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},c=r.createContext(u);function d(e){let{children:t}=e;return r.createElement(c.Provider,{value:u},t)}},6728:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(9231),a=n(7698),o=n(5070),i=n(5601),l=n(9450);function s(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"}},r.createElement("h1",{style:{fontSize:"3rem"}},"This page crashed"),r.createElement("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"}},"Try again"),r.createElement(u,{error:t}))}function u(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return r.createElement("p",{style:{whiteSpace:"pre-wrap"}},n)}function c(e){let{error:t,tryAgain:n}=e;return r.createElement(f,{fallback:()=>r.createElement(s,{error:t,tryAgain:n})},r.createElement(o.Z,null,r.createElement("title",null,"Page Error")),r.createElement(l.Z,null,r.createElement(s,{error:t,tryAgain:n})))}const d=e=>r.createElement(c,e);class f extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??d)(e)}return e??null}}},7698:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5070:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9231),a=n(7100);function o(e){return r.createElement(a.ql,e)}},6299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(4011),a=n(9231),o=n(7962),i=n(5601),l=n(8607),s=n(6111),u=n(7698);const c=a.createContext({collectLink:()=>{}});var d=n(4590);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":g,autoAddBaseUrl:b=!0,...v}=e;const{siteConfig:{trailingSlash:y,baseUrl:w}}=(0,l.Z)(),{withBaseUrl:k}=(0,d.C)(),E=(0,a.useContext)(c),S=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>S.current));const x=f||p;const C=(0,s.Z)(x),T=x?.replace("pathname://","");let _=void 0!==T?(A=T,b&&(e=>e.startsWith("/"))(A)?k(A):A):void 0;var A;_&&C&&(_=(0,i.applyTrailingSlash)(_,{trailingSlash:y,baseUrl:w}));const L=(0,a.useRef)(!1),R=n?o.OL:o.rU,N=u.Z.canUseIntersectionObserver,O=(0,a.useRef)(),P=()=>{L.current||null==_||(window.docusaurus.preload(_),L.current=!0)};(0,a.useEffect)((()=>(!N&&C&&null!=_&&window.docusaurus.prefetch(_),()=>{N&&O.current&&O.current.disconnect()})),[O,_,N,C]);const I=_?.startsWith("#")??!1,D=!_||!C||I;return D||g||E.collectLink(_),D?a.createElement("a",(0,r.Z)({ref:S,href:_},x&&!C&&{target:"_blank",rel:"noopener noreferrer"},v)):a.createElement(R,(0,r.Z)({},v,{onMouseEnter:P,onTouchStart:P,innerRef:e=>{S.current=e,N&&e&&C&&(O.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(O.current.unobserve(e),O.current.disconnect(),null!=_&&window.docusaurus.prefetch(_))}))})),O.current.observe(e))},to:_},n&&{isActive:h,activeClassName:m}))}const p=a.forwardRef(f)},4428:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,I:()=>l});var r=n(9231);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(7529);function i(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return o[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(i({message:n,id:r}),t)}function s(e){let{children:t,id:n,values:o}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");const l=i({message:t,id:n});return r.createElement(r.Fragment,null,a(l,o))}},9814:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},6111:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},4590:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>l});var r=n(9231),a=n(8607),o=n(6111);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.Z)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},8607:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9231),a=n(2039);function o(){return(0,r.useContext)(a._)}},6852:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9231),a=n(1730);function o(){return(0,r.useContext)(a._)}},7823:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const l=a?`${a}.${o}`:o;r(i)?e(i,l):t[l]=i}))}(e),t}},2625:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>o});var r=n(9231);const a=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return r.createElement(a.Provider,{value:i},t)}},527:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>b,gA:()=>p,WS:()=>m,_r:()=>d,Jo:()=>v,zh:()=>f,yW:()=>g,gB:()=>h});var r=n(9409),a=n(8607),o=n(9814);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,a.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=l(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}function u(e,t){const n=s(e,t),a=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const c={},d=()=>i("docusaurus-plugin-content-docs")??c,f=e=>function(e,t,n){void 0===t&&(t=o.m),void 0===n&&(n={});const r=i(e),a=r?.[t];if(!a&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return a}("docusaurus-plugin-content-docs",e,{failfast:!0});function p(e){void 0===e&&(e={});const t=d(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function m(e){void 0===e&&(e={});const t=p(e),{pathname:n}=(0,r.TH)();if(!t)return;return{activePlugin:t,activeVersion:s(t.pluginData,n)}}function h(e){return f(e).versions}function g(e){const t=f(e);return l(t)}function b(e){const t=f(e),{pathname:n}=(0,r.TH)();return u(t,n)}function v(e){const t=f(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=l(e);return{latestDocSuggestion:u(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},9513:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var l=n(9231),s=n(9519),u=[],c=[];function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function f(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=d(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function p(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var d,f;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=i({loader:null,loading:null,delay:200,timeout:null,render:p,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return u.push(g),"function"==typeof m.webpack&&c.push((function(){if((0,m.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g()})),f=d=function(t){function n(n){var r;return o(a(a(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),r._loadModule()})),g(),r.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},r}r(n,t),n.preload=function(){return g()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.loadable.report(t)})),h.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),m.timeout));var n=function(){t({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts()};h.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),o(d,"contextTypes",{loadable:s.shape({report:s.func.isRequired})}),f}function h(e){return m(d,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(f,e)};var g=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.getChildContext=function(){return{loadable:{report:this.props.report}}},n.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return b(e)}))}o(g,"propTypes",{report:s.func.isRequired}),o(g,"childContextTypes",{loadable:s.shape({report:s.func.isRequired}).isRequired}),h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){b(u).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){b(c).then(e,e)}))},e.exports=h},3645:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(7811),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},4900:(e,t,n)=>{"use strict";n.r(t);var r=n(5036),a=n(6809);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(5481)(`./prism-${e}`)})),delete globalThis.Prism}(r.Z)},7085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9231);const a={iconExternalLink:"iconExternalLink_Vz7m"};function o(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:a.iconExternalLink},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},9450:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Nt});var r=n(9231),a=n(9841),o=n(6728),i=n(9211),l=n(4011),s=n(9409),u=n(4428),c=n(8337);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,s.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,c.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const m=(0,u.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:a}=p();return r.createElement("div",{ref:n,role:"region","aria-label":m},r.createElement("a",(0,l.Z)({},e,{href:`#${d}`,onClick:a}),t))}var g=n(7847),b=n(2772);const v={skipToContent:"skipToContent_gZEN"};function y(){return r.createElement(h,{className:v.skipToContent})}var w=n(4176),k=n(8918);function E(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...s}=e;return r.createElement("svg",(0,l.Z)({viewBox:"0 0 15 15",width:t,height:n},s),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const S={closeButton:"closeButton_nECp"};function x(e){return r.createElement("button",(0,l.Z)({type:"button","aria-label":(0,u.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.Z)("clean-btn close",S.closeButton,e.className)}),r.createElement(E,{width:14,height:14,strokeWidth:3.1}))}const C={content:"content_OYtk"};function T(e){const{announcementBar:t}=(0,w.L)(),{content:n}=t;return r.createElement("div",(0,l.Z)({},e,{className:(0,a.Z)(C.content,e.className),dangerouslySetInnerHTML:{__html:n}}))}const _={announcementBar:"announcementBar_MW_A",announcementBarPlaceholder:"announcementBarPlaceholder_m5YH",announcementBarClose:"announcementBarClose_uNNo",announcementBarContent:"announcementBarContent_g7nS"};function A(){const{announcementBar:e}=(0,w.L)(),{isActive:t,close:n}=(0,k.nT)();if(!t)return null;const{backgroundColor:a,textColor:o,isCloseable:i}=e;return r.createElement("div",{className:_.announcementBar,style:{backgroundColor:a,color:o},role:"banner"},i&&r.createElement("div",{className:_.announcementBarPlaceholder}),r.createElement(T,{className:_.announcementBarContent}),i&&r.createElement(x,{onClick:n,className:_.announcementBarClose}))}var L=n(1450),R=n(8083);var N=n(6291),O=n(2251);const P=r.createContext(null);function I(e){let{children:t}=e;const n=function(){const e=(0,L.e)(),t=(0,O.HY)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,N.D9)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return r.createElement(P.Provider,{value:n},t)}function D(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function M(){const e=(0,r.useContext)(P);if(!e)throw new N.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,O.HY)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:D(o)})),[a,o,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:o}=e;const{shown:i}=M();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var B=n(9405),j=n(6852);function z(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function U(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const $={toggle:"toggle_siZM",toggleButton:"toggleButton_sInD",darkToggleIcon:"darkToggleIcon_udOP",lightToggleIcon:"lightToggleIcon_gNSF",toggleButtonDisabled:"toggleButtonDisabled_TX_f"};function q(e){let{className:t,buttonClassName:n,value:o,onChange:i}=e;const l=(0,j.Z)(),s=(0,u.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===o?(0,u.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,u.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)($.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",$.toggleButton,!l&&$.toggleButtonDisabled,n),type:"button",onClick:()=>i("dark"===o?"light":"dark"),disabled:!l,title:s,"aria-label":s,"aria-live":"polite"},r.createElement(z,{className:(0,a.Z)($.toggleIcon,$.lightToggleIcon)}),r.createElement(U,{className:(0,a.Z)($.toggleIcon,$.darkToggleIcon)})))}const H=r.memo(q),G={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_VBZG"};function Z(e){let{className:t}=e;const n=(0,w.L)().navbar.style,a=(0,w.L)().colorMode.disableSwitch,{colorMode:o,setColorMode:i}=(0,B.I)();return a?null:r.createElement(H,{className:t,buttonClassName:"dark"===n?G.darkNavbarColorModeToggle:void 0,value:o,onChange:i})}var V=n(4833);function W(){return r.createElement(V.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,L.e)();return r.createElement("button",{type:"button","aria-label":(0,u.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle()},r.createElement(E,{color:"var(--ifm-color-emphasis-600)"}))}function Y(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(W,null),r.createElement(Z,{className:"margin-right--md"}),r.createElement(K,null))}var Q=n(6299),X=n(4590),J=n(6111),ee=n(6908),te=n(7085);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:a,href:o,label:i,html:s,isDropdownLink:u,prependBaseUrlToHref:c,...d}=e;const f=(0,X.Z)(a),p=(0,X.Z)(t),m=(0,X.Z)(o,{forcePrependBaseUrl:!0}),h=i&&o&&!(0,J.Z)(o),g=s?{dangerouslySetInnerHTML:{__html:s}}:{children:r.createElement(r.Fragment,null,i,h&&r.createElement(te.Z,u&&{width:12,height:12}))};return o?r.createElement(Q.Z,(0,l.Z)({href:c?m:o},d,g)):r.createElement(Q.Z,(0,l.Z)({to:f,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?(0,ee.F)(n,t.pathname):t.pathname.startsWith(p)},d,g))}function re(e){let{className:t,isDropdownItem:n=!1,...o}=e;const i=r.createElement(ne,(0,l.Z)({className:(0,a.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},o));return n?r.createElement("li",null,i):i}function ae(e){let{className:t,isDropdownItem:n,...o}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(ne,(0,l.Z)({className:(0,a.Z)("menu__link",t)},o)))}function oe(e){let{mobile:t=!1,position:n,...a}=e;const o=t?ae:re;return r.createElement(o,(0,l.Z)({},a,{activeClassName:a.activeClassName??(t?"menu__link--active":"navbar__link--active")}))}var ie=n(3071),le=n(8521),se=n(8607);function ue(e,t){return e.some((e=>function(e,t){return!!(0,le.Mg)(e.to,t)||!!(0,ee.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function ce(e){let{items:t,position:n,className:o,onClick:i,...s}=e;const u=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{u.current&&!u.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[u]),r.createElement("div",{ref:u,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c})},r.createElement(ne,(0,l.Z)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,a.Z)("navbar__link",o)},s,{onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))}}),s.children??s.label),r.createElement("ul",{className:"dropdown__menu"},t.map(((e,t)=>r.createElement(He,(0,l.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))))))}function de(e){let{items:t,className:n,position:o,onClick:i,...u}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,se.Z)(),{pathname:t}=(0,s.TH)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:f,toggleCollapsed:p,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":f})},r.createElement(ne,(0,l.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",n)},u,{onClick:e=>{e.preventDefault(),p()}}),u.children??u.label),r.createElement(ie.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:f},t.map(((e,t)=>r.createElement(He,(0,l.Z)({mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active"},e,{key:t}))))))}function fe(e){let{mobile:t=!1,...n}=e;const a=t?de:ce;return r.createElement(a,n)}var pe=n(4869);function me(e){let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const he="iconLanguage_gkzn";function ge(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var be=n(687),ve=["translations"];function ye(){return ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(this,arguments)}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(s){l=!0,a=s}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ke(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ee(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Se="Ctrl";var xe=r.forwardRef((function(e,t){var n=e.translations,a=void 0===n?{}:n,o=Ee(e,ve),i=a.buttonText,l=void 0===i?"Search":i,s=a.buttonAriaLabel,u=void 0===s?"Search":s,c=we((0,r.useState)(null),2),d=c[0],f=c[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("\u2318"):f(Se))}),[]),r.createElement("button",ye({type:"button",className:"DocSearch DocSearch-Button","aria-label":u},o,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(be.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},l)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===Se?r.createElement(ge,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Ce=n(5070),Te=n(9761),_e=n(8034),Ae=n(9373);var Le=n(4151);const Re={button:{buttonText:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,u.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,u.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,u.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,u.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,u.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,u.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,u.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,u.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,u.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,u.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,u.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,u.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,u.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,u.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Ne=null;function Oe(e){let{hit:t,children:n}=e;return r.createElement(Q.Z,{to:t.url},n)}function Pe(e){let{state:t,onClose:n}=e;const a=(0,Te.M)();return r.createElement(Q.Z,{to:a(t.query),onClick:n},r.createElement(u.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function Ie(e){let{contextualSearch:t,externalUrlRegex:a,...o}=e;const{siteMetadata:i}=(0,se.Z)(),u=(0,_e.l)(),c=function(){const{locale:e,tags:t}=(0,Ae._q)();return[`language:${e}`,t.map((e=>`docusaurus_tag:${e}`))]}(),d=o.searchParameters?.facetFilters??[],f=t?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(c,d):d,p={...o.searchParameters,facetFilters:f},m=(0,s.k6)(),h=(0,r.useRef)(null),g=(0,r.useRef)(null),[b,v]=(0,r.useState)(!1),[y,w]=(0,r.useState)(void 0),k=(0,r.useCallback)((()=>Ne?Promise.resolve():Promise.all([n.e(530).then(n.bind(n,9530)),Promise.all([n.e(532),n.e(901)]).then(n.bind(n,8901)),Promise.all([n.e(532),n.e(654)]).then(n.bind(n,6654))]).then((e=>{let[{DocSearchModal:t}]=e;Ne=t}))),[]),E=(0,r.useCallback)((()=>{k().then((()=>{h.current=document.createElement("div"),document.body.insertBefore(h.current,document.body.firstChild),v(!0)}))}),[k,v]),S=(0,r.useCallback)((()=>{v(!1),h.current?.remove()}),[v]),x=(0,r.useCallback)((e=>{k().then((()=>{v(!0),w(e.key)}))}),[k,v,w]),C=(0,r.useRef)({navigate(e){let{itemUrl:t}=e;(0,ee.F)(a,t)?window.location.href=t:m.push(t)}}).current,T=(0,r.useRef)((e=>o.transformItems?o.transformItems(e):e.map((e=>({...e,url:u(e.url)}))))).current,_=(0,r.useMemo)((()=>e=>r.createElement(Pe,(0,l.Z)({},e,{onClose:S}))),[S]),A=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",i.docusaurusVersion),e)),[i.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}({isOpen:b,onOpen:E,onClose:S,onInput:x,searchButtonRef:g}),r.createElement(r.Fragment,null,r.createElement(Ce.Z,null,r.createElement("link",{rel:"preconnect",href:`https://${o.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})),r.createElement(xe,{onTouchStart:k,onFocus:k,onMouseOver:k,onClick:E,ref:g,translations:Re.button}),b&&Ne&&h.current&&(0,Le.createPortal)(r.createElement(Ne,(0,l.Z)({onClose:S,initialScrollY:window.scrollY,initialQuery:y,navigator:C,transformItems:T,hitComponent:Oe,transformSearchClient:A},o.searchPagePath&&{resultsFooterComponent:_},o,{searchParameters:p,placeholder:Re.placeholder,translations:Re.modal})),h.current))}function De(){const{siteConfig:e}=(0,se.Z)();return r.createElement(Ie,e.themeConfig.algolia)}function Me(e){return r.createElement(r.Fragment,null,r.createElement(De,e))}const Fe={searchBox:"searchBox_TfO7"};function Be(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,a.Z)(n,Fe.searchBox)},t)}var je=n(527),ze=n(2397);var Ue=n(636);const $e=e=>e.docs.find((t=>t.id===e.mainDocId));const qe={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...o}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,se.Z)(),f=(0,pe.l)(),{search:p,hash:m}=(0,s.TH)(),h=[...n,...c.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${m}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...a],g=t?(0,u.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return r.createElement(fe,(0,l.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(me,{className:he}),g),items:h}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(Be,{className:n},r.createElement(Me,null))},dropdown:fe,html:function(e){let{value:t,className:n,mobile:o=!1,isDropdownItem:i=!1}=e;const l=i?"li":"div";return r.createElement(l,{className:(0,a.Z)({navbar__item:!o&&!i,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,je.Iw)(a),s=(0,ze.vY)(t,a);return null===s?null:r.createElement(oe,(0,l.Z)({exact:!0},o,{isActive:()=>i?.path===s.path||!!i?.sidebar&&i.sidebar===s.sidebar,label:n??s.id,to:s.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,je.Iw)(a),s=(0,ze.oz)(t,a).link;if(!s)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return r.createElement(oe,(0,l.Z)({exact:!0},o,{isActive:()=>i?.sidebar===t,label:n??s.label,to:s.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:a,...o}=e;const i=(0,ze.lO)(a)[0],s=t??i.label,u=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return r.createElement(oe,(0,l.Z)({},o,{label:s,to:u}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:a,dropdownItemsBefore:o,dropdownItemsAfter:i,...c}=e;const{search:d,hash:f}=(0,s.TH)(),p=(0,je.Iw)(n),m=(0,je.gB)(n),{savePreferredVersionName:h}=(0,Ue.J)(n),g=[...o,...m.map((e=>{const t=p.alternateDocVersions[e.name]??$e(e);return{label:e.label,to:`${t.path}${d}${f}`,isActive:()=>e===p.activeVersion,onClick:()=>h(e.name)}})),...i],b=(0,ze.lO)(n)[0],v=t&&g.length>1?(0,u.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):b.label,y=t&&g.length>1?void 0:$e(b).path;return g.length<=1?r.createElement(oe,(0,l.Z)({},c,{mobile:t,label:v,to:y,isActive:a?()=>!1:void 0})):r.createElement(fe,(0,l.Z)({},c,{mobile:t,label:v,to:y,items:g,isActive:a?()=>!1:void 0}))}};function He(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=qe[a];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return r.createElement(o,n)}function Ge(){const e=(0,L.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(He,(0,l.Z)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function Ze(e){return r.createElement("button",(0,l.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(u.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function Ve(){const e=0===(0,w.L)().navbar.items.length,t=M();return r.createElement(r.Fragment,null,!e&&r.createElement(Ze,{onClick:()=>t.hide()}),t.content)}function We(){const e=(0,L.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(F,{header:r.createElement(Y,null),primaryMenu:r.createElement(Ge,null),secondaryMenu:r.createElement(Ve,null)}):null}const Ke={navbarHideable:"navbarHideable_RgHW",navbarHidden:"navbarHidden_IgQW"};function Ye(e){return r.createElement("div",(0,l.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function Qe(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.L)(),i=(0,L.e)(),{navbarRef:l,isNavbarVisible:s}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,R.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i<o.current)return void n(!0);if(a.current)return void(a.current=!1);const l=r?.scrollY,s=document.documentElement.scrollHeight-o.current,u=window.innerHeight;l&&i>=l?n(!1):i+u<s&&n(!0)})),(0,c.S)((t=>{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:l,"aria-label":(0,u.I)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.Z)("navbar","navbar--fixed-top",n&&[Ke.navbarHideable,!s&&Ke.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown})},t,r.createElement(Ye,{onClick:i.toggle}),r.createElement(We,null))}var Xe=n(5601);const Je={errorBoundaryError:"errorBoundaryError_Isv5"};function et(e){return r.createElement("button",(0,l.Z)({type:"button"},e),r.createElement(u.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error"},"Try again"))}function tt(e){let{error:t}=e;const n=(0,Xe.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return r.createElement("p",{className:Je.errorBoundaryError},n)}class nt extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const rt="right";function at(e){let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,l.Z)({className:a,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},o),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function ot(){const{toggle:e,shown:t}=(0,L.e)();return r.createElement("button",{onClick:e,"aria-label":(0,u.I)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button"},r.createElement(at,null))}const it={colorModeToggle:"colorModeToggle_KMRx"};function lt(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(nt,{key:t,onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t})},r.createElement(He,e)))))}function st(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function ut(){const e=(0,L.e)(),t=(0,w.L)().navbar.items,[n,a]=function(e){function t(e){return"left"===(e.position??rt)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return r.createElement(st,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(ot,null),r.createElement(W,null),r.createElement(lt,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(lt,{items:a}),r.createElement(Z,{className:it.colorModeToggle}),!o&&r.createElement(Be,null,r.createElement(Me,null)))})}function ct(){return r.createElement(Qe,null,r.createElement(ut,null))}function dt(e){let{item:t}=e;const{to:n,href:a,label:o,prependBaseUrlToHref:i,...s}=t,u=(0,X.Z)(n),c=(0,X.Z)(a,{forcePrependBaseUrl:!0});return r.createElement(Q.Z,(0,l.Z)({className:"footer__link-item"},a?{href:i?c:a}:{to:u},s),o,a&&!(0,J.Z)(a)&&r.createElement(te.Z,null))}function ft(e){let{item:t}=e;return t.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement("li",{key:t.href??t.to,className:"footer__item"},r.createElement(dt,{item:t}))}function pt(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(ft,{key:t,item:e})))))}function mt(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement(pt,{key:t,column:e}))))}function ht(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function gt(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement(dt,{item:t})}function bt(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(gt,{item:e}),t.length!==n+1&&r.createElement(ht,null))))))}function vt(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(mt,{columns:t}):r.createElement(bt,{links:t})}var yt=n(1751);const wt={footerLogoLink:"footerLogoLink_BlGw"};function kt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.C)(),o={light:n(t.src),dark:n(t.srcDark??t.src)};return r.createElement(yt.Z,{className:(0,a.Z)("footer__logo",t.className),alt:t.alt,sources:o,width:t.width,height:t.height,style:t.style})}function Et(e){let{logo:t}=e;return t.href?r.createElement(Q.Z,{href:t.href,className:wt.footerLogoLink,target:t.target},r.createElement(kt,{logo:t})):r.createElement(kt,{logo:t})}function St(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function xt(e){let{style:t,links:n,logo:o,copyright:i}=e;return r.createElement("footer",{className:(0,a.Z)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(o||i)&&r.createElement("div",{className:"footer__bottom text--center"},o&&r.createElement("div",{className:"margin-bottom--sm"},o),i)))}function Ct(){const{footer:e}=(0,w.L)();if(!e)return null;const{copyright:t,links:n,logo:a,style:o}=e;return r.createElement(xt,{style:o,links:n&&n.length>0&&r.createElement(vt,{links:n}),logo:a&&r.createElement(Et,{logo:a}),copyright:t&&r.createElement(St,{copyright:t})})}const Tt=r.memo(Ct),_t=(0,N.Qc)([B.S,k.pl,R.OC,Ue.L5,i.VC,function(e){let{children:t}=e;return r.createElement(O.n2,null,r.createElement(L.M,null,r.createElement(I,null,t)))}]);function At(e){let{children:t}=e;return r.createElement(_t,null,t)}function Lt(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(u.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(et,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(tt,{error:t})))))}const Rt={mainWrapper:"mainWrapper_v8uG"};function Nt(e){const{children:t,noFooter:n,wrapperClassName:l,title:s,description:u}=e;return(0,b.t)(),r.createElement(At,null,r.createElement(i.d,{title:s,description:u}),r.createElement(y,null),r.createElement(A,null),r.createElement(ct,null),r.createElement("div",{id:d,className:(0,a.Z)(g.k.wrapper.main,Rt.mainWrapper,l)},r.createElement(o.Z,{fallback:e=>r.createElement(Lt,e)},t)),!n&&r.createElement(Tt,null))}},4833:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(4011),a=n(9231),o=n(6299),i=n(4590),l=n(8607),s=n(4176),u=n(1751);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,i.Z)(t.src),dark:(0,i.Z)(t.srcDark||t.src)},l=a.createElement(u.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},l):l}function d(e){const{siteConfig:{title:t}}=(0,l.Z)(),{navbar:{title:n,logo:u}}=(0,s.L)(),{imageClassName:d,titleClassName:f,...p}=e,m=(0,i.Z)(u?.href||"/"),h=n?"":t,g=u?.alt??h;return a.createElement(o.Z,(0,r.Z)({to:m},p,u?.target&&{target:u.target}),u&&a.createElement(c,{logo:u,alt:g,imageClassName:d}),null!=n&&a.createElement("b",{className:f},n))}},1701:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9231),a=n(5070);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},1751:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(4011),a=n(9231),o=n(9841),i=n(6852),l=n(9405);const s={themedImage:"themedImage_Q_MY","themedImage--light":"themedImage--light_UdwQ","themedImage--dark":"themedImage--dark_U_dk"};function u(e){const t=(0,i.Z)(),{colorMode:n}=(0,l.I)(),{sources:u,className:c,alt:d,...f}=e,p=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,p.map((e=>a.createElement("img",(0,r.Z)({key:e,src:u[e],alt:d,className:(0,o.Z)(s.themedImage,s[`themedImage--${e}`],c)},f)))))}},3071:(e,t,n)=>{"use strict";n.d(t,{u:()=>s,z:()=>g});var r=n(4011),a=n(9231),o=n(7698),i=n(5641);const l="ease-in-out";function s(e){let{initialState:t}=e;const[n,r]=(0,a.useState)(t??!1),o=(0,a.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:o}}const u={display:"none",overflow:"hidden",height:"0px"},c={display:"block",overflow:"visible",height:"auto"};function d(e,t){const n=t?u:c;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const o=(0,a.useRef)(!1);(0,a.useEffect)((()=>{const e=t.current;function a(){const t=e.scrollHeight,n=r?.duration??function(e){if((0,i.n)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${r?.easing??l}`,height:`${t}px`}}function s(){const t=a();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return d(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function p(e){if(!o.Z.canUseDOM)return e?u:c}function m(e){let{as:t="div",collapsed:n,children:r,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:s}=e;const u=(0,a.useRef)(null);return f({collapsibleRef:u,collapsed:n,animation:o}),a.createElement(t,{ref:u,style:s?void 0:p(n),onTransitionEnd:e=>{"height"===e.propertyName&&(d(u.current,n),i?.(n))},className:l},r)}function h(e){let{collapsed:t,...n}=e;const[o,i]=(0,a.useState)(!t),[l,s]=(0,a.useState)(t);return(0,a.useLayoutEffect)((()=>{t||i(!0)}),[t]),(0,a.useLayoutEffect)((()=>{o&&s(t)}),[o,t]),o?a.createElement(m,(0,r.Z)({},n,{collapsed:l})):null}function g(e){let{lazy:t,...n}=e;const r=t?h:m;return a.createElement(r,n)}},8918:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>p});var r=n(9231),a=n(6852),o=n(9459),i=n(6291),l=n(4176);const s=(0,o.WA)("docusaurus.announcement.dismiss"),u=(0,o.WA)("docusaurus.announcement.id"),c=()=>"true"===s.get(),d=e=>s.set(String(e)),f=r.createContext(null);function p(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.L)(),t=(0,a.Z)(),[n,o]=(0,r.useState)((()=>!!t&&c()));(0,r.useEffect)((()=>{o(c())}),[]);const i=(0,r.useCallback)((()=>{d(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&d(!1),!r&&c()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return r.createElement(f.Provider,{value:n},t)}function m(){const e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},9405:(e,t,n)=>{"use strict";n.d(t,{I:()=>g,S:()=>h});var r=n(9231),a=n(7698),o=n(6291),i=n(9459),l=n(4176);const s=r.createContext(void 0),u="theme",c=(0,i.WA)(u),d={light:"light",dark:"dark"},f=e=>e===d.dark?d.dark:d.light,p=e=>a.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),m=e=>{c.set(f(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.L)(),[a,o]=(0,r.useState)(p(e));(0,r.useEffect)((()=>{t&&c.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&m(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:e),c.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=c.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===d.dark},setLightTheme(){i(d.light)},setDarkTheme(){i(d.dark)}})),[a,i])}();return r.createElement(s.Provider,{value:n},t)}function g(){const e=(0,r.useContext)(s);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},636:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,L5:()=>g,Oh:()=>y});var r=n(9231),a=n(527),o=n(9814),i=n(4176),l=n(2397),s=n(6291),u=n(9459);const c=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,u.WA)(c(e),{persistence:t}).set(n)},read:(e,t)=>(0,u.WA)(c(e),{persistence:t}).get(),clear:(e,t)=>{(0,u.WA)(c(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const p=r.createContext(null);function m(){const e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,l]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return r.createElement(p.Provider,{value:n},t)}function g(e){let{children:t}=e;return l.cE?r.createElement(h,null,t):r.createElement(r.Fragment,null,t)}function b(){const e=(0,r.useContext)(p);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.m);const t=(0,a.zh)(e),[n,i]=b(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function y(){const e=(0,a._r)(),[t]=b();function n(n){const r=e[n],{preferredVersionName:a}=t[n];return r.versions.find((e=>e.name===a))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},7731:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,b:()=>l});var r=n(9231),a=n(6291);const o=Symbol("EmptyContext"),i=r.createContext(o);function l(e){let{children:t,name:n,items:a}=e;const o=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return r.createElement(i.Provider,{value:o},t)}function s(){const e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},1450:(e,t,n)=>{"use strict";n.d(t,{M:()=>d,e:()=>f});var r=n(9231),a=n(2251),o=n(4642),i=n(1589),l=n(4176),s=n(6291);const u=r.createContext(void 0);function c(){const e=function(){const e=(0,a.HY)(),{items:t}=(0,l.L)().navbar;return 0===t.length&&!e.component}(),t=(0,o.i)(),n=!e&&"mobile"===t,[s,u]=(0,r.useState)(!1);(0,i.Rb)((()=>{if(s)return u(!1),!1}));const c=(0,r.useCallback)((()=>{u((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&u(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:s})),[e,n,c,s])}function d(e){let{children:t}=e;const n=c();return r.createElement(u.Provider,{value:n},t)}function f(){const e=r.useContext(u);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},2251:(e,t,n)=>{"use strict";n.d(t,{HY:()=>l,Zo:()=>s,n2:()=>i});var r=n(9231),a=n(6291);const o=r.createContext(null);function i(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function l(){const e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");const[,l]=i,s=(0,a.Ql)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},2772:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(9231);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},9761:(e,t,n)=>{"use strict";n.d(t,{K:()=>l,M:()=>s});var r=n(9231),a=n(8607),o=n(1589);const i="q";function l(){return(0,o.Nc)(i)}function s(){const{siteConfig:{baseUrl:e,themeConfig:t}}=(0,a.Z)(),{algolia:{searchPagePath:n}}=t;return(0,r.useCallback)((t=>`${e}${n}?${i}=${encodeURIComponent(t)}`),[e,n])}},4642:(e,t,n)=>{"use strict";n.d(t,{i:()=>u});var r=n(9231),a=n(7698);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return a.Z.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}const s=!1;function u(){const[e,t]=(0,r.useState)((()=>s?"ssr":l()));return(0,r.useEffect)((()=>{function e(){t(l())}const n=s?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(n)}}),[]),e}},7847:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},5641:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},2397:(e,t,n)=>{"use strict";n.d(t,{Wl:()=>f,_F:()=>h,cE:()=>d,hI:()=>k,lO:()=>v,vY:()=>w,oz:()=>y,s1:()=>b});var r=n(9231),a=n(9409),o=n(260),i=n(527),l=n(636),s=n(7731);function u(e){return Array.from(new Set(e))}var c=n(8521);const d=!!i._r;function f(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=f(t);if(e)return e}}}const p=(e,t)=>void 0!==e&&(0,c.Mg)(e,t),m=(e,t)=>e.some((e=>h(e,t)));function h(e,t){return"link"===e.type?p(e.href,t):"category"===e.type&&(p(e.href,t)||m(e.items,t))}function g(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,c.Mg)(o.href,n)||e(o.items))||"link"===o.type&&(0,c.Mg)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function b(){const e=(0,s.V)(),{pathname:t}=(0,a.TH)(),n=(0,i.gA)()?.pluginData.breadcrumbs;return!1!==n&&e?g({sidebarItems:e.items,pathname:t}):null}function v(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,l.J)(e),a=(0,i.yW)(e);return(0,r.useMemo)((()=>u([t,n,a].filter(Boolean))),[t,n,a])}function y(e,t){const n=v(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function w(e,t){const n=v(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function k(e){let{route:t,versionMetadata:n}=e;const r=(0,a.TH)(),i=t.routes,l=i.find((e=>(0,a.LX)(r.pathname,e)));if(!l)return null;const s=l.sidebar,u=s?n.docsSidebars[s]:void 0;return{docElement:(0,o.H)(i),sidebarName:s,sidebarItems:u}}},4760:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(8607);function a(e){const{siteConfig:t}=(0,r.Z)(),{title:n,titleDelimiter:a}=t;return e?.trim().length?`${e.trim()} ${a} ${n}`:n}},1589:(e,t,n)=>{"use strict";n.d(t,{Nc:()=>u,Rb:()=>l});var r=n(9231),a=n(9409),o=n(4001),i=n(6291);function l(e){!function(e){const t=(0,a.k6)(),n=(0,i.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){return function(e){const t=(0,a.k6)();return(0,o.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}function u(e){const t=s(e)??"",n=function(){const e=(0,a.k6)();return(0,r.useCallback)(((t,n,r)=>{const a=new URLSearchParams(e.location.search);n?a.set(t,n):a.delete(t),(r?.push?e.push:e.replace)({search:a.toString()})}),[e])}();return[t,(0,r.useCallback)(((t,r)=>{n(e,t,r)}),[n,e])]}},9211:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>c,VC:()=>p});var r=n(9231),a=n(9841),o=n(5070),i=n(2625);function l(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(4590),u=n(4760);function c(e){let{title:t,description:n,keywords:a,image:i,children:l}=e;const c=(0,u.p)(t),{withBaseUrl:d}=(0,s.C)(),f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}const d=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(d),l=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(o.Z,null,r.createElement("html",{className:l})),n)}function p(e){let{children:t}=e;const n=l(),o=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const i=`plugin-id-${n.plugin.id}`;return r.createElement(f,{className:(0,a.Z)(o,i)},t)}},6291:(e,t,n)=>{"use strict";n.d(t,{D9:()=>i,Qc:()=>u,Ql:()=>s,i6:()=>l,zX:()=>o});var r=n(9231);const a=n(7698).Z.canUseDOM?r.useLayoutEffect:r.useEffect;function o(e){const t=(0,r.useRef)(e);return a((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function i(e){const t=(0,r.useRef)();return a((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?<name>\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function s(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return r.createElement(r.Fragment,null,e.reduceRight(((e,t)=>r.createElement(t,null,e)),n))}}},6908:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:()=>r})},8521:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>l});var r=n(9231),a=n(9023),o=n(8607);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,o.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.Z,baseUrl:e})),[e])}},8083:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>s,RF:()=>d});var r=n(9231),a=n(7698),o=n(6852),i=n(6291);const l=r.createContext(void 0);function s(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(l.Provider,{value:n},t)}function u(){const e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}const c=()=>a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),a=(0,r.useRef)(c()),o=(0,i.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=c();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&a<e)&&(t=requestAnimationFrame(r),window.scrollTo(0,Math.floor(.85*(a-e))+e))}(),()=>t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},9373:(e,t,n)=>{"use strict";n.d(t,{HX:()=>i,_q:()=>s,os:()=>l});var r=n(527),a=n(8607),o=n(636);const i="default";function l(e,t){return`docs-${e}-${t}`}function s(){const{i18n:e}=(0,a.Z)(),t=(0,r._r)(),n=(0,r.WS)(),s=(0,o.Oh)();const u=[i,...Object.keys(t).map((function(e){const r=n?.activePlugin.pluginId===e?n.activeVersion:void 0,a=s[e],o=t[e].versions.find((e=>e.isLast));return l(e,(r??a??o).name)}))];return{locale:e.currentLocale,tags:u}}},9459:(e,t,n)=>{"use strict";n.d(t,{WA:()=>s});n(9231),n(4001);const r="localStorage";function a(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function o(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}let i=!1;const l={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function s(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=o(t?.persistence);return null===n?l:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},4869:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});var r=n(8607),a=n(9409),o=n(5601);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.Z)(),{pathname:s}=(0,a.TH)(),u=(0,o.applyTrailingSlash)(s,{trailingSlash:n,baseUrl:e}),c=l===i?e:e.replace(`/${l}/`,"/"),d=u.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${c}`:`${c}${e}/`}(n)}${d}`}}}},8337:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(9231),a=n(9409),o=n(6291);function i(e){const t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},4176:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(8607);function a(){return(0,r.Z)().siteConfig.themeConfig}},9871:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(8607);function a(){const{siteConfig:{themeConfig:e}}=(0,r.Z)();return e}},8034:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(9231),a=n(6908),o=n(4590),i=n(9871);function l(){const{withBaseUrl:e}=(0,o.C)(),{algolia:{externalUrlRegex:t,replaceSearchResultPathname:n}}=(0,i.L)();return(0,r.useCallback)((r=>{const o=new URL(r);if((0,a.F)(t,o.href))return r;const i=`${o.pathname+o.hash}`;return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(i,n))}),[e,t,n])}},540:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},6867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},5601:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(540);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(6867);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},9023:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(9231),a=n(4011),o=n(9513),i=n.n(o),l=n(6887);const s={"08154ee9":[()=>n.e(896).then(n.bind(n,8746)),"@site/../src/throttle/readme.md",8746],"08f30e7d":[()=>n.e(222).then(n.bind(n,9668)),"@site/../src/every/readme.md",9668],"1178bc06":[()=>n.e(502).then(n.bind(n,2200)),"@site/../src/spread/readme.md",2200],17896441:[()=>Promise.all([n.e(532),n.e(638),n.e(918)]).then(n.bind(n,1340)),"@theme/DocItem",1340],"1a4e3797":[()=>Promise.all([n.e(532),n.e(920)]).then(n.bind(n,1962)),"@theme/SearchPage",1962],"1ae5d93b":[()=>n.e(900).then(n.bind(n,343)),"@site/../src/equals/readme.md",343],"1be78505":[()=>Promise.all([n.e(532),n.e(514)]).then(n.bind(n,3206)),"@theme/DocPage",3206],"1df93b7f":[()=>n.e(237).then(n.bind(n,8001)),"@site/src/pages/index.tsx",8001],"1f391b9e":[()=>Promise.all([n.e(532),n.e(638),n.e(85)]).then(n.bind(n,6183)),"@theme/MDXPage",6183],"2b95ca9d":[()=>n.e(817).then(n.bind(n,158)),"@site/../src/snapshot/readme.md",158],"308aca62":[()=>n.e(687).then(n.bind(n,8295)),"@site/../src/not/readme.md",8295],"33c22581":[()=>n.e(299).then(n.bind(n,637)),"@site/../src/some/readme.md",637],"48e94e84":[()=>n.e(777).then(n.t.bind(n,5745,19)),"/home/runner/work/patronum/patronum/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],"4af54caf":[()=>n.e(774).then(n.bind(n,3205)),"@site/../src/and/readme.md",3205],"4d9d995f":[()=>n.e(876).then(n.bind(n,9333)),"@site/../src/reshape/readme.md",9333],"5b0e0e08":[()=>n.e(34).then(n.bind(n,4208)),"@site/../src/condition/readme.md",4208],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,6809)),"@generated/docusaurus.config",6809],"6256d5c3":[()=>n.e(151).then(n.bind(n,7021)),"@site/../src/interval/readme.md",7021],"67c026b6":[()=>n.e(873).then(n.bind(n,3408)),"@site/../src/debug/readme.md",3408],"7921cf10":[()=>n.e(662).then(n.bind(n,6347)),"@site/../src/previous/readme.md",6347],"84071e39":[()=>n.e(231).then(n.bind(n,5504)),"@site/../src/pending/readme.md",5504],"8d0041db":[()=>n.e(885).then(n.t.bind(n,3769,19)),"/home/runner/work/patronum/patronum/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],"8d76850e":[()=>n.e(609).then(n.bind(n,2072)),"@site/../src/once/readme.md",2072],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],"978828ab":[()=>n.e(172).then(n.t.bind(n,1572,19)),"/home/runner/work/patronum/patronum/website/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json",1572],"97ffe59f":[()=>n.e(153).then(n.bind(n,9524)),"@site/../src/index.md",9524],"9dc53199":[()=>n.e(84).then(n.bind(n,731)),"@site/../src/split-map/readme.md",731],a765e1a2:[()=>n.e(825).then(n.bind(n,2349)),"@site/src/pages/docs/migration-guide.md",2349],a7fdbc71:[()=>n.e(732).then(n.bind(n,9540)),"@site/../src/time/readme.md",9540],a9298e25:[()=>n.e(585).then(n.bind(n,4175)),"@site/src/pages/docs/installation.md",4175],ad512b16:[()=>n.e(485).then(n.bind(n,9783)),"@site/../src/delay/readme.md",9783],b41febc4:[()=>n.e(35).then(n.bind(n,8142)),"@site/../src/empty/readme.md",8142],c7a80478:[()=>n.e(169).then(n.bind(n,2921)),"@site/../src/reset/readme.md",2921],c9ae8b2d:[()=>n.e(945).then(n.bind(n,4544)),"@site/../src/format/readme.md",4544],deda2cf3:[()=>n.e(493).then(n.bind(n,185)),"@site/../src/debounce/readme.md",185],e09d216d:[()=>n.e(236).then(n.bind(n,1284)),"@site/../src/in-flight/readme.md",1284],e55f1e0e:[()=>n.e(778).then(n.bind(n,8724)),"@site/../src/or/readme.md",8724],e9221267:[()=>n.e(916).then(n.bind(n,5500)),"@site/../src/combine-events/readme.md",5500],f304a758:[()=>n.e(549).then(n.bind(n,366)),"@site/../src/either/readme.md",366],f6536843:[()=>n.e(613).then(n.bind(n,4019)),"@site/../src/status/readme.md",4019]};function u(e){let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var c=n(7823),d=n(2625);function f(e,t){if("*"===e)return i()({loading:u,loader:()=>n.e(967).then(n.bind(n,967)),modules:["@theme/NotFound"],webpack:()=>[967],render(e,t){const n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const o=l[`${e}-${t}`],f={},p=[],m=[],h=(0,c.Z)(o);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=s[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:u,loader:f,modules:p,webpack:()=>m,render(t,n){const i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let o=i;const l=n.split(".");l.slice(0,-1).forEach((e=>{o=o[e]})),o[l[l.length-1]]=a}));const l=i.__comp;delete i.__comp;const s=i.__context;return delete i.__context,r.createElement(d.z,{value:s},r.createElement(l,(0,a.Z)({},i,n)))}})}const p=[{path:"/docs/installation",component:f("/docs/installation","b6a"),exact:!0},{path:"/docs/migration-guide",component:f("/docs/migration-guide","f5d"),exact:!0},{path:"/search",component:f("/search","f2b"),exact:!0},{path:"/methods",component:f("/methods","e3e"),routes:[{path:"/methods/",component:f("/methods/","0f3"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/and/",component:f("/methods/and/","663"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/combine-events/",component:f("/methods/combine-events/","d44"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/condition/",component:f("/methods/condition/","f76"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/debounce/",component:f("/methods/debounce/","69f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/debug/",component:f("/methods/debug/","0bc"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/delay/",component:f("/methods/delay/","131"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/either/",component:f("/methods/either/","57a"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/empty/",component:f("/methods/empty/","6ca"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/equals/",component:f("/methods/equals/","bf2"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/every/",component:f("/methods/every/","23e"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/format/",component:f("/methods/format/","f2f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/in-flight/",component:f("/methods/in-flight/","52f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/interval/",component:f("/methods/interval/","132"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/not/",component:f("/methods/not/","07f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/once/",component:f("/methods/once/","523"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/or/",component:f("/methods/or/","fa6"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/pending/",component:f("/methods/pending/","0c7"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/previous/",component:f("/methods/previous/","4e1"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/reset/",component:f("/methods/reset/","f60"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/reshape/",component:f("/methods/reshape/","34d"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/snapshot/",component:f("/methods/snapshot/","b6f"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/some/",component:f("/methods/some/","74c"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/split-map/",component:f("/methods/split-map/","989"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/spread/",component:f("/methods/spread/","a78"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/status/",component:f("/methods/status/","ca9"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/throttle/",component:f("/methods/throttle/","2e3"),exact:!0,sidebar:"methodsSidebar"},{path:"/methods/time/",component:f("/methods/time/","7fc"),exact:!0,sidebar:"methodsSidebar"}]},{path:"/",component:f("/","712"),exact:!0},{path:"*",component:f("*")}]},9841:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}n.d(t,{Z:()=>a});const a=function(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}},2852:(e,t,n)=>{"use strict";n.d(t,{lX:()=>w,q_:()=>T,ob:()=>p,PP:()=>A,Ep:()=>f});var r=n(4011);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],l=e&&a(e),s=t&&a(t),u=l||s;if(e&&a(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var c=i[i.length-1];n="."===c||".."===c||""===c}else n=!1;for(var d=0,f=i.length;f>=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(6381);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var h=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}var b="popstate",v="hashchange";function y(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),h||(0,l.Z)(!1);var t,n=window.history,a=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,u=i.forceRefresh,w=void 0!==u&&u,k=i.getUserConfirmation,E=void 0===k?g:k,S=i.keyLength,x=void 0===S?6:S,C=e.basename?d(s(e.basename)):"";function T(e){var t=e||{},n=t.key,r=t.state,a=window.location,o=a.pathname+a.search+a.hash;return C&&(o=c(o,C)),p(o,r,n)}function _(){return Math.random().toString(36).substr(2,x)}var A=m();function L(e){(0,r.Z)(U,e),U.length=n.length,A.notifyListeners(U.location,U.action)}function R(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||P(T(e.state))}function N(){P(T(y()))}var O=!1;function P(e){if(O)O=!1,L();else{A.confirmTransitionTo(e,"POP",E,(function(t){t?L({action:"POP",location:e}):function(e){var t=U.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(O=!0,F(a))}(e)}))}}var I=T(y()),D=[I.key];function M(e){return C+f(e)}function F(e){n.go(e)}var B=0;function j(e){1===(B+=e)&&1===e?(window.addEventListener(b,R),o&&window.addEventListener(v,N)):0===B&&(window.removeEventListener(b,R),o&&window.removeEventListener(v,N))}var z=!1;var U={length:n.length,action:"POP",location:I,createHref:M,push:function(e,t){var r="PUSH",o=p(e,t,_(),U.location);A.confirmTransitionTo(o,r,E,(function(e){if(e){var t=M(o),i=o.key,l=o.state;if(a)if(n.pushState({key:i,state:l},null,t),w)window.location.href=t;else{var s=D.indexOf(U.location.key),u=D.slice(0,s+1);u.push(o.key),D=u,L({action:r,location:o})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",o=p(e,t,_(),U.location);A.confirmTransitionTo(o,r,E,(function(e){if(e){var t=M(o),i=o.key,l=o.state;if(a)if(n.replaceState({key:i,state:l},null,t),w)window.location.replace(t);else{var s=D.indexOf(U.location.key);-1!==s&&(D[s]=o.key),L({action:r,location:o})}else window.location.replace(t)}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(e){void 0===e&&(e=!1);var t=A.setPrompt(e);return z||(j(1),z=!0),function(){return z&&(z=!1,j(-1)),t()}},listen:function(e){var t=A.appendListener(e);return j(1),function(){j(-1),t()}}};return U}var k="hashchange",E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+u(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:u,decodePath:s},slash:{encodePath:s,decodePath:s}};function S(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function x(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(S(window.location.href)+"#"+e)}function T(e){void 0===e&&(e={}),h||(0,l.Z)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),a=n.getUserConfirmation,o=void 0===a?g:a,i=n.hashType,u=void 0===i?"slash":i,b=e.basename?d(s(e.basename)):"",v=E[u],y=v.encodePath,w=v.decodePath;function T(){var e=w(x());return b&&(e=c(e,b)),p(e)}var _=m();function A(e){(0,r.Z)(z,e),z.length=t.length,_.notifyListeners(z.location,z.action)}var L=!1,R=null;function N(){var e,t,n=x(),r=y(n);if(n!==r)C(r);else{var a=T(),i=z.location;if(!L&&(t=a,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(R===f(a))return;R=null,function(e){if(L)L=!1,A();else{var t="POP";_.confirmTransitionTo(e,t,o,(function(n){n?A({action:t,location:e}):function(e){var t=z.location,n=D.lastIndexOf(f(t));-1===n&&(n=0);var r=D.lastIndexOf(f(e));-1===r&&(r=0);var a=n-r;a&&(L=!0,M(a))}(e)}))}}(a)}}var O=x(),P=y(O);O!==P&&C(P);var I=T(),D=[f(I)];function M(e){t.go(e)}var F=0;function B(e){1===(F+=e)&&1===e?window.addEventListener(k,N):0===F&&window.removeEventListener(k,N)}var j=!1;var z={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=S(window.location.href)),n+"#"+y(b+f(e))},push:function(e,t){var n="PUSH",r=p(e,void 0,void 0,z.location);_.confirmTransitionTo(r,n,o,(function(e){if(e){var t=f(r),a=y(b+t);if(x()!==a){R=t,function(e){window.location.hash=e}(a);var o=D.lastIndexOf(f(z.location)),i=D.slice(0,o+1);i.push(t),D=i,A({action:n,location:r})}else A()}}))},replace:function(e,t){var n="REPLACE",r=p(e,void 0,void 0,z.location);_.confirmTransitionTo(r,n,o,(function(e){if(e){var t=f(r),a=y(b+t);x()!==a&&(R=t,C(a));var o=D.indexOf(f(z.location));-1!==o&&(D[o]=t),A({action:n,location:r})}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return j||(B(1),j=!0),function(){return j&&(j=!1,B(-1)),t()}},listen:function(e){var t=_.appendListener(e);return B(1),function(){B(-1),t()}}};return z}function _(e,t,n){return Math.min(Math.max(e,t),n)}function A(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,a=t.initialEntries,o=void 0===a?["/"]:a,i=t.initialIndex,l=void 0===i?0:i,s=t.keyLength,u=void 0===s?6:s,c=m();function d(e){(0,r.Z)(w,e),w.length=w.entries.length,c.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,u)}var g=_(l,0,o.length-1),b=o.map((function(e){return p(e,void 0,"string"==typeof e?h():e.key||h())})),v=f;function y(e){var t=_(w.index+e,0,w.entries.length-1),r=w.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:v,push:function(e,t){var r="PUSH",a=p(e,t,h(),w.location);c.confirmTransitionTo(a,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,h(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return w}},6095:(e,t,n)=>{"use strict";var r=n(5566),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g<i.length;++g){var b=i[g];if(!(o[b]||r&&r[b]||h&&h[b]||l&&l[b])){var v=f(n,b);try{u(t,b,v)}catch(y){}}}}return t}},2722:e=>{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},566:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2898:(e,t,n)=>{"use strict";n.r(t)},1068:(e,t,n)=>{"use strict";n.r(t)},7811:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(e,t,n){return e<t?t:e>n?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},1538:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,a){for(var o,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var u in o=Object(arguments[s]))n.call(o,u)&&(l[u]=o[u]);if(t){i=t(o);for(var c=0;c<i.length;c++)r.call(o,i[c])&&(l[i[c]]=o[i[c]])}}return l}},6084:(e,t,n)=>{var r=n(566);e.exports=p,e.exports.parse=o,e.exports.compile=function(e,t){return l(o(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],f=n[1],p=n.index;if(l+=e.slice(i,p),i=p+d.length,f)l+=f[1];else{var m=e[i],h=n[2],g=n[3],b=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,E="+"===y||"*"===y,S="?"===y||"*"===y,x=n[2]||c,C=b||v;r.push({name:g||o++,prefix:h||"",delimiter:x,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:C?u(C):w?".*":"[^"+s(x)+"]+?"})}}return i<e.length&&(l+=e.substr(i)),l&&r.push(l),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",d(t)));return function(t,a){for(var o="",l=t||{},s=(a||{}).pretty?i:encodeURIComponent,u=0;u<e.length;u++){var c=e[u];if("string"!=typeof c){var d,f=l[c.name];if(null==f){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(f)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var p=0;p<f.length;p++){if(d=s(f[p]),!n[u].test(d))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(d)+"`");o+=(0===p?c.prefix:c.delimiter)+d}}else{if(d=c.asterisk?encodeURI(f).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(f),!n[u].test(d))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+d+'"');o+=c.prefix+d}}else o+=c}return o}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,o=!1!==n.end,i="",l=0;l<e.length;l++){var u=e[l];if("string"==typeof u)i+=s(u);else{var f=s(u.prefix),p="(?:"+u.pattern+")";t.push(u),u.repeat&&(p+="(?:"+f+p+")*"),i+=p=u.optional?u.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")"}}var m=s(n.delimiter||"/"),h=i.slice(-m.length)===m;return a||(i=(h?i.slice(0,-m.length):i)+"(?:"+m+"(?=$))?"),i+=o?"$":a&&h?"":"(?="+m+"|$)",c(new RegExp("^"+i,d(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(p(e[a],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return f(o(e,n),t,n)}(e,t,n)}},5036:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=o[l])}var u=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===u&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],a||l);var s=t[l],u=r.util.type(s);"Object"!==u||o[i(s)]?"Array"!==u||o[i(s)]||(o[i(s)]=!0,e(s,n,l,o)):(o[i(s)]=!0,e(s,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};return r.hooks.run("before-tokenize",o),o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new l;return s(a,a.head,e),i(e,a,t,a.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,l,c,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+","+m)return;var h=p[m],g=h.inside,b=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var w=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,w+"g")}for(var k=h.pattern||h,E=l.next,S=c;E!==t.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var C,T=1;if(v){if(!(C=o(k,S,e,b))||C.index>=e.length)break;var _=C.index,A=C.index+C[0].length,L=S;for(L+=E.value.length;_>=L;)L+=(E=E.next).value.length;if(S=L-=E.value.length,E.value instanceof a)continue;for(var R=E;R!==t.tail&&(L<A||"string"==typeof R.value);R=R.next)T++,L+=R.value.length;T--,x=e.slice(S,L),C.index-=S}else if(!(C=o(k,0,x,b)))continue;_=C.index;var N=C[0],O=x.slice(0,_),P=x.slice(_+N.length),I=S+x.length;d&&I>d.reach&&(d.reach=I);var D=E.prev;if(O&&(D=s(t,D,O),S+=O.length),u(t,D,T),E=s(t,D,new a(f,g?r.tokenize(N,g):N,y,N)),P&&s(t,E,P),T>1){var M={cause:f+","+m,reach:I};i(e,t,n,E.prev,S,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var l="";for(var s in o.attributes)l+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+l+">"+o.content+"</"+o.tag+">"},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i<a.length;i++)o[a[i]]=e.languages.bash[a[i]];e.languages.shell=e.languages.bash}(a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a=t[n];if("code"===a.type){var o=a.content[1],i=a.content[3];if(o&&i&&"code-language"===o.type&&"code-block"===i.type&&"string"==typeof o.content){var l=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(l=(/[a-z][\w-]*/i.exec(l)||[""])[0].toLowerCase());i.alias?"string"==typeof i.alias?i.alias=[i.alias,s]:i.alias.push(s):i.alias=[s]}}else e(a.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r],u=/language-(.+)/.exec(o);if(u){n=u[1];break}}var c,d=e.languages[n];if(d)t.content=e.highlight((c=t.content,c.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),s(n);var r=l[t];return r||e}))),d,n);else if(n&&"none"!==n&&e.plugins.autoloader){var f="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=f,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(f);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var i=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===c(1).content){n+=2;var o=f(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=c(0);"variable"===i.type&&(p(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===c(0).content&&(n++,p(c(0),"property-mutation"),a.length>0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s<l;s++){var u=t[s];"variable"===u.type&&a.indexOf(u.content)>=0&&p(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=c(n+t);if(!r||r.type!==e[n])return!1}return!0}function f(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))a++;else if(r.test(l)&&0===--a)return o}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function u(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,s(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,c={},d=s(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=a,n})).join(""),n,r),f=Object.keys(c);return i=0,function e(t){for(var n=0;n<t.length;n++){if(i>=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var s=o.substring(0,l),d=u(c[a]),p=o.substring(l+a.length),m=[];if(s&&m.push(s),m.push(d),p){var h=[p];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r<a;r++){var o=n[r];if("string"!=typeof o){var i=o.content;if(Array.isArray(i))if("template-string"===o.type){var l=i[1];if(3===i.length&&"string"!=typeof l&&"embedded-code"===l.type){var s=f(l),u=l.alias,d=Array.isArray(u)?u[0]:u,p=e.languages[d];if(!p)continue;i[1]=c(s,p,d)}}else t(i);else"string"!=typeof i&&t([i])}}}(t.tokens)}))}(a),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];"RegExp"===e.util.type(o)&&(o=e.languages.javascript[a]={pattern:o});var i=o.inside||{};o.inside=i,i["maybe-class-name"]=/^[A-Z][\s\S]*/}}(a),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(a);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=i(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s<l.length&&!(a>=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),v=[];h&&v.push.apply(v,i([h])),v.push(g),b&&v.push.apply(v,i([b])),"string"==typeof u?l.splice.apply(l,[s,1].concat(v)):u.content=v}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},6744:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},9637:(e,t,n)=>{const r=n(6744),a=n(6123),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(6341).resolve(t)],delete Prism.languages[e],n(6341)(t),o.add(e)}))}i.silent=!1,e.exports=i},6341:(e,t,n)=>{var r={"./":9637};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=6341},6123:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function r(e){var n={},r=[];function a(r,o){if(!(r in n)){o.push(r);var i=o.indexOf(r);if(i<o.length-1)throw new Error("Circular dependency: "+o.slice(i).join(" -> "));var l={},s=e[r];if(s){function u(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in a(t,o),l[t]=!0,n[t])l[i]=!0}t(s.require,u),t(s.optional,u),t(s.modify,u)}n[r]=l,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),u=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(s);i=i.map(u),l=(l||[]).map(u);var c=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(c[t]=!0,e(t))}))}));for(var f,p=r(s),m=c;a(m);){for(var h in f={},m){var g=s[h];t(g&&g.modify,(function(e){e in d&&(f[e]=!0)}))}for(var b in d)if(!(b in c))for(var v in p(b))if(v in c){f[b]=!0;break}for(var y in m=f)c[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,l={},s={};function u(e){if(e in l)return l[e];s[e]=!0;var a,c=[];for(var d in t(e))d in n&&c.push(d);if(0===c.length)a=r(e);else{var f=i(c.map((function(e){var t=u(e);return delete s[e],t})));o?a=o(f,(function(){return r(e)})):r(e)}return l[e]=a}for(var c in n)u(c);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,c,t,n)}};return w}}();e.exports=t},4835:(e,t,n)=>{"use strict";var r=n(1596);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},9519:(e,t,n)=>{e.exports=n(4835)()},1596:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4005:(e,t,n)=>{"use strict";var r=n(9231),a=n(1538),o=n(1851);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(i(227));var l=new Set,s={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},h={};function g(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=b.hasOwnProperty(t)?b[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!p.call(h,e)||!p.call(m,e)&&(f.test(e)?h[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,x=60107,C=60108,T=60114,_=60109,A=60110,L=60112,R=60113,N=60120,O=60115,P=60116,I=60121,D=60128,M=60129,F=60130,B=60131;if("function"==typeof Symbol&&Symbol.for){var j=Symbol.for;E=j("react.element"),S=j("react.portal"),x=j("react.fragment"),C=j("react.strict_mode"),T=j("react.profiler"),_=j("react.provider"),A=j("react.context"),L=j("react.forward_ref"),R=j("react.suspense"),N=j("react.suspense_list"),O=j("react.memo"),P=j("react.lazy"),I=j("react.block"),j("react.scope"),D=j("react.opaque.id"),M=j("react.debug_trace_mode"),F=j("react.offscreen"),B=j("react.legacy_hidden")}var z,U="function"==typeof Symbol&&Symbol.iterator;function $(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=U&&e[U]||e["@@iterator"])?e:null}function q(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var H=!1;function G(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"==typeof s.stack){for(var a=s.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,l=o.length-1;1<=i&&0<=l&&a[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(a[i]!==o[l]){if(1!==i||1!==l)do{if(i--,0>--l||a[i]!==o[l])return"\n"+a[i].replace(" at new "," at ")}while(1<=i&&0<=l);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q(e):""}function Z(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=G(e.type,!1);case 11:return e=G(e.type.render,!1);case 22:return e=G(e.type._render,!1);case 1:return e=G(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case T:return"Profiler";case C:return"StrictMode";case R:return"Suspense";case N:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case L:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case O:return V(e.type);case I:return V(e._render);case P:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function W(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ie(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ue(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,he,ge=(he=function(e,t){if(e.namespaceURI!==de.svg||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return he(e,t)}))}:he);function be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ve).forEach((function(e){ye.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var Ee=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,_e=null,Ae=null;function Le(e){if(e=na(e)){if("function"!=typeof Te)throw Error(i(280));var t=e.stateNode;t&&(t=aa(t),Te(e.stateNode,e.type,t))}}function Re(e){_e?Ae?Ae.push(e):Ae=[e]:_e=e}function Ne(){if(_e){var e=_e,t=Ae;if(Ae=_e=null,Le(e),t)for(e=0;e<t.length;e++)Le(t[e])}}function Oe(e,t){return e(t)}function Pe(e,t,n,r,a){return e(t,n,r,a)}function Ie(){}var De=Oe,Me=!1,Fe=!1;function Be(){null===_e&&null===Ae||(Ie(),Ne())}function je(e,t){var n=e.stateNode;if(null===n)return null;var r=aa(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}var ze=!1;if(d)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){ze=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch(he){ze=!1}function $e(e,t,n,r,a,o,i,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var qe=!1,He=null,Ge=!1,Ze=null,Ve={onError:function(e){qe=!0,He=e}};function We(e,t,n,r,a,o,i,l,s){qe=!1,He=null,$e.apply(Ve,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ye(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Qe(e){if(Ke(e)!==e)throw Error(i(188))}function Xe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Qe(a),e;if(o===r)return Qe(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var l=!1,s=a.child;s;){if(s===n){l=!0,n=a,r=o;break}if(s===r){l=!0,r=a,n=o;break}s=s.sibling}if(!l){for(s=o.child;s;){if(s===n){l=!0,n=o,r=a;break}if(s===r){l=!0,r=o,n=a;break}s=s.sibling}if(!l)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,at=!1,ot=[],it=null,lt=null,st=null,ut=new Map,ct=new Map,dt=[],ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":it=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":st=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ct.delete(t.pointerId)}}function ht(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,a,o),null!==t&&(null!==(t=na(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function gt(e){var t=ta(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ye(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=na(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){bt(e)&&n.delete(t)}function yt(){for(at=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=na(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==it&&bt(it)&&(it=null),null!==lt&&bt(lt)&&(lt=null),null!==st&&bt(st)&&(st=null),ut.forEach(vt),ct.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,yt)))}function kt(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==it&&wt(it,e),null!==lt&&wt(lt,e),null!==st&&wt(st,e),ut.forEach(t),ct.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},xt={},Ct={};function Tt(e){if(xt[e])return xt[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ct)return xt[e]=n[t];return e}d&&(Ct=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var _t=Tt("animationend"),At=Tt("animationiteration"),Lt=Tt("animationstart"),Rt=Tt("transitionend"),Nt=new Map,Ot=new Map,Pt=["abort","abort",_t,"animationEnd",At,"animationIteration",Lt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Rt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),Ot.set(r,t),Nt.set(r,a),u(a,[r])}}(0,o.unstable_now)();var Dt=8;function Mt(e){if(0!=(1&e))return Dt=15,1;if(0!=(2&e))return Dt=14,2;if(0!=(4&e))return Dt=13,4;var t=24&e;return 0!==t?(Dt=12,t):0!=(32&e)?(Dt=11,32):0!==(t=192&e)?(Dt=10,t):0!=(256&e)?(Dt=9,256):0!==(t=3584&e)?(Dt=8,t):0!=(4096&e)?(Dt=7,4096):0!==(t=4186112&e)?(Dt=6,t):0!==(t=62914560&e)?(Dt=5,t):67108864&e?(Dt=4,67108864):0!=(134217728&e)?(Dt=3,134217728):0!==(t=805306368&e)?(Dt=2,t):0!=(1073741824&e)?(Dt=1,1073741824):(Dt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Dt=0;var r=0,a=0,o=e.expiredLanes,i=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,a=Dt=15;else if(0!==(o=134217727&n)){var s=o&~i;0!==s?(r=Mt(s),a=Dt):0!==(l&=o)&&(r=Mt(l),a=Dt)}else 0!==(o=n&~i)?(r=Mt(o),a=Dt):0!==l&&(r=Mt(l),a=Dt);if(0===r)return 0;if(r=n&((0>(r=31-qt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&i)){if(Mt(t),a<=Dt)return t;Dt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-qt(t)),r|=e[n],t&=~a;return r}function Bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function jt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=zt(24&~t))?jt(10,t):e;case 10:return 0===(e=zt(192&~t))?jt(8,t):e;case 8:return 0===(e=zt(3584&~t))&&(0===(e=zt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=zt(805306368&~t))&&(t=268435456),t}throw Error(i(358,e))}function zt(e){return e&-e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-qt(t)]=n}var qt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ht(e)/Gt|0)|0},Ht=Math.log,Gt=Math.LN2;var Zt=o.unstable_UserBlockingPriority,Vt=o.unstable_runWithPriority,Wt=!0;function Kt(e,t,n,r){Me||Ie();var a=Qt,o=Me;Me=!0;try{Pe(a,e,t,n,r)}finally{(Me=o)||Be()}}function Yt(e,t,n,r){Vt(Zt,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){var a;if(Wt)if((a=0==(4&t))&&0<ot.length&&-1<ft.indexOf(e))e=pt(null,e,t,n,r),ot.push(e);else{var o=Xt(e,t,n,r);if(null===o)a&&mt(e,r);else{if(a){if(-1<ft.indexOf(e))return e=pt(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return it=ht(it,e,t,n,r,a),!0;case"dragenter":return lt=ht(lt,e,t,n,r,a),!0;case"mouseover":return st=ht(st,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return ut.set(o,ht(ut.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,ct.set(o,ht(ct.get(o)||null,e,t,n,r,a)),!0}return!1}(o,e,t,n,r))return;mt(e,r)}Ir(e,t,r,null,n)}}}function Xt(e,t,n,r){var a=Ce(r);if(null!==(a=ta(a))){var o=Ke(a);if(null===o)a=null;else{var i=o.tag;if(13===i){if(null!==(a=Ye(o)))return a;a=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return Ir(e,t,r,a,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,a="value"in Jt?Jt.value:Jt.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return tn=a.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function on(){return!1}function ln(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?an:on,this.isPropagationStopped=on,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var sn,un,cn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=ln(dn),pn=a({},dn,{view:0,detail:0}),mn=ln(pn),hn=a({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(sn=e.screenX-cn.screenX,un=e.screenY-cn.screenY):un=sn=0,cn=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:un}}),gn=ln(hn),bn=ln(a({},hn,{dataTransfer:0})),vn=ln(a({},pn,{relatedTarget:0})),yn=ln(a({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=a({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=ln(wn),En=ln(a({},dn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function _n(){return Tn}var An=a({},pn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ln=ln(An),Rn=ln(a({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=ln(a({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),On=ln(a({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=a({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=ln(Pn),Dn=[9,13,27,32],Mn=d&&"CompositionEvent"in window,Fn=null;d&&"documentMode"in document&&(Fn=document.documentMode);var Bn=d&&"TextEvent"in window&&!Fn,jn=d&&(!Mn||Fn&&8<Fn&&11>=Fn),zn=String.fromCharCode(32),Un=!1;function $n(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var Gn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Gn[e.type]:"textarea"===t}function Vn(e,t,n,r){Re(r),0<(t=Mr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Kn=null;function Yn(e){Ar(e,0)}function Qn(e){if(Q(ra(e)))return e}function Xn(e,t){if("change"===e)return t}var Jn=!1;if(d){var er;if(d){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9<document.documentMode)}function rr(){Wn&&(Wn.detachEvent("onpropertychange",ar),Kn=Wn=null)}function ar(e){if("value"===e.propertyName&&Qn(Kn)){var t=[];if(Vn(t,Kn,e,Ce(e)),e=Yn,Me)e(t);else{Me=!0;try{Oe(e,t)}finally{Me=!1,Be()}}}}function or(e,t,n){"focusin"===e?(rr(),Kn=n,(Wn=t).attachEvent("onpropertychange",ar)):"focusout"===e&&rr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Kn)}function lr(e,t){if("click"===e)return Qn(t)}function sr(e,t){if("input"===e||"change"===e)return Qn(t)}var ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},cr=Object.prototype.hasOwnProperty;function dr(e,t){if(ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!cr.call(t,n[r])||!ur(e[n[r]],t[n[r]]))return!1;return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=fr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var br=d&&"documentMode"in document&&11>=document.documentMode,vr=null,yr=null,wr=null,kr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==vr||vr!==X(r)||("selectionStart"in(r=vr)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Mr(yr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Pt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<Sr.length;xr++)Ot.set(Sr[xr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Tr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function _r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,l,s,u){if(We.apply(this,arguments),qe){if(!qe)throw Error(i(198));var c=He;qe=!1,He=null,Ge||(Ge=!0,Ze=c)}}(r,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==o&&a.isPropagationStopped())break e;_r(a,l,u),o=s}else for(i=0;i<r.length;i++){if(s=(l=r[i]).instance,u=l.currentTarget,l=l.listener,s!==o&&a.isPropagationStopped())break e;_r(a,l,u),o=s}}}if(Ge)throw e=Ze,Ge=!1,Ze=null,e}function Lr(e,t){var n=oa(t),r=e+"__bubble";n.has(r)||(Pr(t,e,2,!1),n.add(r))}var Rr="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){e[Rr]||(e[Rr]=!0,l.forEach((function(t){Tr.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Tr.has(e)){if("scroll"!==e)return;a|=2,o=r}var i=oa(o),l=e+"__"+(t?"capture":"bubble");i.has(l)||(t&&(a|=4),Pr(o,e,a,t),i.add(l))}function Pr(e,t,n,r){var a=Ot.get(t);switch(void 0===a?2:a){case 0:a=Kt;break;case 1:a=Yt;break;default:a=Qt}n=a.bind(null,t,n,e),a=void 0,!ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Ir(e,t,n,r,a){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===a||8===l.nodeType&&l.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;i=i.return}for(;null!==l;){if(null===(i=ta(l)))return;if(5===(s=i.tag)||6===s){r=o=i;continue e}l=l.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{return De(e,t,n)}finally{Fe=!1,Be()}}((function(){var r=o,a=Ce(n),i=[];e:{var l=Nt.get(e);if(void 0!==l){var s=fn,u=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":s=Ln;break;case"focusin":u="focus",s=vn;break;case"focusout":u="blur",s=vn;break;case"beforeblur":case"afterblur":s=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=bn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Nn;break;case _t:case At:case Lt:s=yn;break;case Rt:s=On;break;case"scroll":s=mn;break;case"wheel":s=In;break;case"copy":case"cut":case"paste":s=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Rn}var c=0!=(4&t),d=!c&&"scroll"===e,f=c?null!==l?l+"Capture":null:l;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==f&&(null!=(h=je(m,f))&&c.push(Dr(m,h,p)))),d)break;m=m.return}0<c.length&&(l=new s(l,u,null,n,a),i.push({event:l,listeners:c}))}}if(0==(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(u=n.relatedTarget||n.fromElement)||!ta(u)&&!u[Jr])&&(s||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?ta(u):null)&&(u!==(d=Ke(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=gn,h="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=Rn,h="onPointerLeave",f="onPointerEnter",m="pointer"),d=null==s?l:ra(s),p=null==u?l:ra(u),(l=new c(h,m+"leave",s,n,a)).target=d,l.relatedTarget=p,h=null,ta(a)===r&&((c=new c(f,m+"enter",u,n,a)).target=p,c.relatedTarget=d,h=c),d=h,s&&u)e:{for(f=u,m=0,p=c=s;p;p=Fr(p))m++;for(p=0,h=f;h;h=Fr(h))p++;for(;0<m-p;)c=Fr(c),m--;for(;0<p-m;)f=Fr(f),p--;for(;m--;){if(c===f||null!==f&&c===f.alternate)break e;c=Fr(c),f=Fr(f)}c=null}else c=null;null!==s&&Br(i,l,s,c,!1),null!==u&&null!==d&&Br(i,d,u,c,!0)}if("select"===(s=(l=r?ra(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g=Xn;else if(Zn(l))if(Jn)g=sr;else{g=ir;var b=or}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=lr);switch(g&&(g=g(e,r))?Vn(i,g,n,a):(b&&b(e,l,r),"focusout"===e&&(b=l._wrapperState)&&b.controlled&&"number"===l.type&&ae(l,"number",l.value)),b=r?ra(r):window,e){case"focusin":(Zn(b)||"true"===b.contentEditable)&&(vr=b,yr=r,wr=null);break;case"focusout":wr=yr=vr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,Er(i,n,a);break;case"selectionchange":if(br)break;case"keydown":case"keyup":Er(i,n,a)}var v;if(Mn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Hn?$n(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(jn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Hn&&(v=nn()):(en="value"in(Jt=a)?Jt.value:Jt.textContent,Hn=!0)),0<(b=Mr(r,y)).length&&(y=new En(y,e,null,n,a),i.push({event:y,listeners:b}),v?y.data=v:null!==(v=qn(n))&&(y.data=v))),(v=Bn?function(e,t){switch(e){case"compositionend":return qn(t);case"keypress":return 32!==t.which?null:(Un=!0,zn);case"textInput":return(e=t.data)===zn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Mn&&$n(e,t)?(e=nn(),tn=en=Jt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Mr(r,"onBeforeInput")).length&&(a=new En("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=v))}Ar(i,t)}))}function Dr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Mr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=je(e,n))&&r.unshift(Dr(e,o,a)),null!=(o=je(e,t))&&r.push(Dr(e,o,a))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,a?null!=(s=je(n,o))&&i.unshift(Dr(n,s,l)):a||null!=(s=je(n,o))&&i.push(Dr(n,s,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}function jr(){}var zr=null,Ur=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function qr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Hr="function"==typeof setTimeout?setTimeout:void 0,Gr="function"==typeof clearTimeout?clearTimeout:void 0;function Zr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Vr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Yr=Math.random().toString(36).slice(2),Qr="__reactFiber$"+Yr,Xr="__reactProps$"+Yr,Jr="__reactContainer$"+Yr,ea="__reactEvents$"+Yr;function ta(e){var t=e[Qr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Qr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Qr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function na(e){return!(e=e[Qr]||e[Jr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ra(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function aa(e){return e[Xr]||null}function oa(e){var t=e[ea];return void 0===t&&(t=e[ea]=new Set),t}var ia=[],la=-1;function sa(e){return{current:e}}function ua(e){0>la||(e.current=ia[la],ia[la]=null,la--)}function ca(e,t){la++,ia[la]=e.current,e.current=t}var da={},fa=sa(da),pa=sa(!1),ma=da;function ha(e,t){var n=e.type.contextTypes;if(!n)return da;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ga(e){return null!=(e=e.childContextTypes)}function ba(){ua(pa),ua(fa)}function va(e,t,n){if(fa.current!==da)throw Error(i(168));ca(fa,t),ca(pa,n)}function ya(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(i(108,V(t)||"Unknown",o));return a({},n,r)}function wa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||da,ma=fa.current,ca(fa,e),ca(pa,pa.current),!0}function ka(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=ya(e,t,ma),r.__reactInternalMemoizedMergedChildContext=e,ua(pa),ua(fa),ca(fa,e)):ua(pa),ca(pa,n)}var Ea=null,Sa=null,xa=o.unstable_runWithPriority,Ca=o.unstable_scheduleCallback,Ta=o.unstable_cancelCallback,_a=o.unstable_shouldYield,Aa=o.unstable_requestPaint,La=o.unstable_now,Ra=o.unstable_getCurrentPriorityLevel,Na=o.unstable_ImmediatePriority,Oa=o.unstable_UserBlockingPriority,Pa=o.unstable_NormalPriority,Ia=o.unstable_LowPriority,Da=o.unstable_IdlePriority,Ma={},Fa=void 0!==Aa?Aa:function(){},Ba=null,ja=null,za=!1,Ua=La(),$a=1e4>Ua?La:function(){return La()-Ua};function qa(){switch(Ra()){case Na:return 99;case Oa:return 98;case Pa:return 97;case Ia:return 96;case Da:return 95;default:throw Error(i(332))}}function Ha(e){switch(e){case 99:return Na;case 98:return Oa;case 97:return Pa;case 96:return Ia;case 95:return Da;default:throw Error(i(332))}}function Ga(e,t){return e=Ha(e),xa(e,t)}function Za(e,t,n){return e=Ha(e),Ca(e,t,n)}function Va(){if(null!==ja){var e=ja;ja=null,Ta(e)}Wa()}function Wa(){if(!za&&null!==Ba){za=!0;var e=0;try{var t=Ba;Ga(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ba=null}catch(n){throw null!==Ba&&(Ba=Ba.slice(e+1)),Ca(Na,Va),n}finally{za=!1}}}var Ka=k.ReactCurrentBatchConfig;function Ya(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Qa=sa(null),Xa=null,Ja=null,eo=null;function to(){eo=Ja=Xa=null}function no(e){var t=Qa.current;ua(Qa),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ao(e,t){Xa=e,eo=Ja=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Mi=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ja){if(null===Xa)throw Error(i(308));Ja=t,Xa.dependencies={lanes:0,firstContext:t,responders:null}}else Ja=Ja.next=t;return e._currentValue}var io=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function so(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var o=e.updateQueue;io=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var u=s,c=u.next;u.next=null,null===l?i=c:l.next=c,l=u;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==l&&(null===f?d.firstBaseUpdate=c:f.next=c,d.lastBaseUpdate=u)}}if(null!==i){for(f=o.baseState,l=0,d=c=u=null;;){s=i.lane;var p=i.eventTime;if((r&s)===s){null!==d&&(d=d.next={eventTime:p,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var m=e,h=i;switch(s=t,p=n,h.tag){case 1:if("function"==typeof(m=h.payload)){f=m.call(p,f,s);break e}f=m;break e;case 3:m.flags=-4097&m.flags|64;case 0:if(null==(s="function"==typeof(m=h.payload)?m.call(p,f,s):m))break e;f=a({},f,s);break e;case 2:io=!0}}null!==i.callback&&(e.flags|=32,null===(s=o.effects)?o.effects=[i]:s.push(i))}else p={eventTime:p,lane:s,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===d?(c=d=p,u=f):d=d.next=p,l|=s;if(null===(i=i.next)){if(null===(s=o.shared.pending))break;i=s.next,s.next=null,o.lastBaseUpdate=s,o.shared.pending=null}}null===d&&(u=f),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=d,Ul|=l,e.lanes=l,e.memoizedState=f}}function mo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(i(191,a));a.call(r)}}}var ho=(new r.Component).refs;function go(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var bo={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fs(),a=ps(e),o=uo(r,a);o.payload=t,null!=n&&(o.callback=n),co(e,o),ms(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fs(),a=ps(e),o=uo(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),co(e,o),ms(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fs(),r=ps(e),a=uo(n,r);a.tag=2,null!=t&&(a.callback=t),co(e,a),ms(e,r,n)}};function vo(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(a,o))}function yo(e,t,n){var r=!1,a=da,o=t.contextType;return"object"==typeof o&&null!==o?o=oo(o):(a=ga(t)?ma:fa.current,o=(r=null!=(r=t.contextTypes))?ha(e,a):da),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=bo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function wo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function ko(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=ho,lo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=oo(o):(o=ga(t)?ma:fa.current,a.context=ha(e,o)),po(e,n,a,r),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(go(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&bo.enqueueReplaceState(a,a.state,null),po(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var Eo=Array.isArray;function So(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(i(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Co(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Zs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function l(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=So(e,t,n),r.return=e,r):((r=Vs(n.type,n.key,n.props,null,e.mode,r)).ref=So(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qs(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Ws(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Vs(t.type,t.key,t.props,null,e.mode,n)).ref=So(e,null,t),n.return=e,n;case S:return(t=Qs(t,e.mode,n)).return=e,t}if(Eo(t)||$(t))return(t=Ws(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===x?d(e,t,n.props.children,r,a):u(e,t,n,r):null;case S:return n.key===a?c(e,t,n,r):null}if(Eo(n)||$(n))return null!==a?null:d(e,t,n,r,null);xo(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===x?d(t,e,r.props.children,a,r.key):u(t,e,r,a);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(Eo(r)||$(r))return d(t,e=e.get(n)||null,r,a,null);xo(t,r)}return null}function h(a,i,l,s){for(var u=null,c=null,d=i,h=i=0,g=null;null!==d&&h<l.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var b=p(a,d,l[h],s);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(a,d),i=o(b,i,h),null===c?u=b:c.sibling=b,c=b,d=g}if(h===l.length)return n(a,d),u;if(null===d){for(;h<l.length;h++)null!==(d=f(a,l[h],s))&&(i=o(d,i,h),null===c?u=d:c.sibling=d,c=d);return u}for(d=r(a,d);h<l.length;h++)null!==(g=m(d,a,h,l[h],s))&&(e&&null!==g.alternate&&d.delete(null===g.key?h:g.key),i=o(g,i,h),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(a,e)})),u}function g(a,l,s,u){var c=$(s);if("function"!=typeof c)throw Error(i(150));if(null==(s=c.call(s)))throw Error(i(151));for(var d=c=null,h=l,g=l=0,b=null,v=s.next();null!==h&&!v.done;g++,v=s.next()){h.index>g?(b=h,h=null):b=h.sibling;var y=p(a,h,v.value,u);if(null===y){null===h&&(h=b);break}e&&h&&null===y.alternate&&t(a,h),l=o(y,l,g),null===d?c=y:d.sibling=y,d=y,h=b}if(v.done)return n(a,h),c;if(null===h){for(;!v.done;g++,v=s.next())null!==(v=f(a,v.value,u))&&(l=o(v,l,g),null===d?c=v:d.sibling=v,d=v);return c}for(h=r(a,h);!v.done;g++,v=s.next())null!==(v=m(h,a,g,v.value,u))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),l=o(v,l,g),null===d?c=v:d.sibling=v,d=v);return e&&h.forEach((function(e){return t(a,e)})),c}return function(e,r,o,s){var u="object"==typeof o&&null!==o&&o.type===x&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case E:e:{for(c=o.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(o.type===x){n(e,u.sibling),(r=a(u,o.props.children)).return=e,e=r;break e}}else if(u.elementType===o.type){n(e,u.sibling),(r=a(u,o.props)).ref=So(e,u,o),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}o.type===x?((r=Ws(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=Vs(o.type,o.key,o.props,null,e.mode,s)).ref=So(e,r,o),s.return=e,e=s)}return l(e);case S:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qs(o,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,o)).return=e,e=r):(n(e,r),(r=Ys(o,e.mode,s)).return=e,e=r),l(e);if(Eo(o))return h(e,r,o,s);if($(o))return g(e,r,o,s);if(c&&xo(e,o),void 0===o&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(i(152,V(e.type)||"Component"))}return n(e,r)}}var To=Co(!0),_o=Co(!1),Ao={},Lo=sa(Ao),Ro=sa(Ao),No=sa(Ao);function Oo(e){if(e===Ao)throw Error(i(174));return e}function Po(e,t){switch(ca(No,t),ca(Ro,e),ca(Lo,Ao),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ua(Lo),ca(Lo,t)}function Io(){ua(Lo),ua(Ro),ua(No)}function Do(e){Oo(No.current);var t=Oo(Lo.current),n=pe(t,e.type);t!==n&&(ca(Ro,e),ca(Lo,n))}function Mo(e){Ro.current===e&&(ua(Lo),ua(Ro))}var Fo=sa(0);function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=null,zo=null,Uo=!1;function $o(e,t){var n=Hs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ho(e){if(Uo){var t=zo;if(t){var n=t;if(!qo(e,t)){if(!(t=Vr(n.nextSibling))||!qo(e,t))return e.flags=-1025&e.flags|2,Uo=!1,void(jo=e);$o(jo,n)}jo=e,zo=Vr(t.firstChild)}else e.flags=-1025&e.flags|2,Uo=!1,jo=e}}function Go(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;jo=e}function Zo(e){if(e!==jo)return!1;if(!Uo)return Go(e),Uo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!qr(t,e.memoizedProps))for(t=zo;t;)$o(e,t),t=Vr(t.nextSibling);if(Go(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){zo=Vr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}zo=null}}else zo=jo?Vr(e.stateNode.nextSibling):null;return!0}function Vo(){zo=jo=null,Uo=!1}var Wo=[];function Ko(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Yo=k.ReactCurrentDispatcher,Qo=k.ReactCurrentBatchConfig,Xo=0,Jo=null,ei=null,ti=null,ni=!1,ri=!1;function ai(){throw Error(i(321))}function oi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function ii(e,t,n,r,a,o){if(Xo=o,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yo.current=null===e||null===e.memoizedState?Oi:Pi,e=n(r,a),ri){o=0;do{if(ri=!1,!(25>o))throw Error(i(301));o+=1,ti=ei=null,t.updateQueue=null,Yo.current=Ii,e=n(r,a)}while(ri)}if(Yo.current=Ni,t=null!==ei&&null!==ei.next,Xo=0,ti=ei=Jo=null,ni=!1,t)throw Error(i(300));return e}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ti?Jo.memoizedState=ti=e:ti=ti.next=e,ti}function si(){if(null===ei){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ei.next;var t=null===ti?Jo.memoizedState:ti.next;if(null!==t)ti=t,ei=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ei=e).memoizedState,baseState:ei.baseState,baseQueue:ei.baseQueue,queue:ei.queue,next:null},null===ti?Jo.memoizedState=ti=e:ti=ti.next=e}return ti}function ui(e,t){return"function"==typeof t?t(e):t}function ci(e){var t=si(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ei,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var l=a.next;a.next=o.next,o.next=l}r.baseQueue=a=o,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var s=l=o=null,u=a;do{var c=u.lane;if((Xo&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=d,o=r):s=s.next=d,Jo.lanes|=c,Ul|=c}u=u.next}while(null!==u&&u!==a);null===s?o=r:s.next=l,ur(r,t.memoizedState)||(Mi=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function di(e){var t=si(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var l=a=a.next;do{o=e(o,l.action),l=l.next}while(l!==a);ur(o,t.memoizedState)||(Mi=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function fi(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(Xo&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(i(350))}function pi(e,t,n,r){var a=Pl;if(null===a)throw Error(i(349));var o=t._getVersion,l=o(t._source),s=Yo.current,u=s.useState((function(){return fi(a,t,n)})),c=u[1],d=u[0];u=ti;var f=e.memoizedState,p=f.refs,m=p.getSnapshot,h=f.source;f=f.subscribe;var g=Jo;return e.memoizedState={refs:p,source:t,subscribe:r},s.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=o(t._source);if(!ur(l,e)){e=n(t._source),ur(d,e)||(c(e),e=ps(g),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,i=e;0<i;){var s=31-qt(i),u=1<<s;r[s]|=e,i&=~u}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=ps(g);a.mutableReadLanes|=r&a.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),ur(m,n)&&ur(h,t)&&ur(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ui,lastRenderedState:d}).dispatch=c=Ri.bind(null,Jo,e),u.queue=e,u.baseQueue=null,d=fi(a,t,n),u.memoizedState=u.baseState=d),d}function mi(e,t,n){return pi(si(),e,t,n)}function hi(e){var t=li();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ui,lastRenderedState:e}).dispatch=Ri.bind(null,Jo,e),[t.memoizedState,e]}function gi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Jo.updateQueue)?(t={lastEffect:null},Jo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function bi(e){return e={current:e},li().memoizedState=e}function vi(){return si().memoizedState}function yi(e,t,n,r){var a=li();Jo.flags|=e,a.memoizedState=gi(1|t,n,void 0,void 0===r?null:r)}function wi(e,t,n,r){var a=si();r=void 0===r?null:r;var o=void 0;if(null!==ei){var i=ei.memoizedState;if(o=i.destroy,null!==r&&oi(r,i.deps))return void gi(t,n,o,r)}Jo.flags|=e,a.memoizedState=gi(1|t,n,o,r)}function ki(e,t){return yi(516,4,e,t)}function Ei(e,t){return wi(516,4,e,t)}function Si(e,t){return wi(4,2,e,t)}function xi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ci(e,t,n){return n=null!=n?n.concat([e]):null,wi(4,2,xi.bind(null,t,e),n)}function Ti(){}function _i(e,t){var n=si();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ai(e,t){var n=si();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Li(e,t){var n=qa();Ga(98>n?98:n,(function(){e(!0)})),Ga(97<n?97:n,(function(){var n=Qo.transition;Qo.transition=1;try{e(!1),t()}finally{Qo.transition=n}}))}function Ri(e,t,n){var r=fs(),a=ps(e),o={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Jo||null!==i&&i===Jo)ri=ni=!0;else{if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var l=t.lastRenderedState,s=i(l,n);if(o.eagerReducer=i,o.eagerState=s,ur(s,l))return}catch(u){}ms(e,a,r)}}var Ni={readContext:oo,useCallback:ai,useContext:ai,useEffect:ai,useImperativeHandle:ai,useLayoutEffect:ai,useMemo:ai,useReducer:ai,useRef:ai,useState:ai,useDebugValue:ai,useDeferredValue:ai,useTransition:ai,useMutableSource:ai,useOpaqueIdentifier:ai,unstable_isNewReconciler:!1},Oi={readContext:oo,useCallback:function(e,t){return li().memoizedState=[e,void 0===t?null:t],e},useContext:oo,useEffect:ki,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,yi(4,2,xi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yi(4,2,e,t)},useMemo:function(e,t){var n=li();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=li();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ri.bind(null,Jo,e),[r.memoizedState,e]},useRef:bi,useState:hi,useDebugValue:Ti,useDeferredValue:function(e){var t=hi(e),n=t[0],r=t[1];return ki((function(){var t=Qo.transition;Qo.transition=1;try{r(e)}finally{Qo.transition=t}}),[e]),n},useTransition:function(){var e=hi(!1),t=e[0];return bi(e=Li.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=li();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},pi(r,e,t,n)},useOpaqueIdentifier:function(){if(Uo){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(i(355))})),n=hi(t)[1];return 0==(2&Jo.mode)&&(Jo.flags|=516,gi(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return hi(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},Pi={readContext:oo,useCallback:_i,useContext:oo,useEffect:Ei,useImperativeHandle:Ci,useLayoutEffect:Si,useMemo:Ai,useReducer:ci,useRef:vi,useState:function(){return ci(ui)},useDebugValue:Ti,useDeferredValue:function(e){var t=ci(ui),n=t[0],r=t[1];return Ei((function(){var t=Qo.transition;Qo.transition=1;try{r(e)}finally{Qo.transition=t}}),[e]),n},useTransition:function(){var e=ci(ui)[0];return[vi().current,e]},useMutableSource:mi,useOpaqueIdentifier:function(){return ci(ui)[0]},unstable_isNewReconciler:!1},Ii={readContext:oo,useCallback:_i,useContext:oo,useEffect:Ei,useImperativeHandle:Ci,useLayoutEffect:Si,useMemo:Ai,useReducer:di,useRef:vi,useState:function(){return di(ui)},useDebugValue:Ti,useDeferredValue:function(e){var t=di(ui),n=t[0],r=t[1];return Ei((function(){var t=Qo.transition;Qo.transition=1;try{r(e)}finally{Qo.transition=t}}),[e]),n},useTransition:function(){var e=di(ui)[0];return[vi().current,e]},useMutableSource:mi,useOpaqueIdentifier:function(){return di(ui)[0]},unstable_isNewReconciler:!1},Di=k.ReactCurrentOwner,Mi=!1;function Fi(e,t,n,r){t.child=null===e?_o(t,null,n,r):To(t,e.child,n,r)}function Bi(e,t,n,r,a){n=n.render;var o=t.ref;return ao(t,a),r=ii(e,t,n,r,o,a),null===e||Mi?(t.flags|=1,Fi(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function ji(e,t,n,r,a,o){if(null===e){var i=n.type;return"function"!=typeof i||Gs(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Vs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,zi(e,t,i,r,a,o))}return i=e.child,0==(a&o)&&(a=i.memoizedProps,(n=null!==(n=n.compare)?n:dr)(a,r)&&e.ref===t.ref)?ol(e,t,o):(t.flags|=1,(e=Zs(i,r)).ref=t.ref,e.return=t,t.child=e)}function zi(e,t,n,r,a,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Mi=!1,0==(o&a))return t.lanes=e.lanes,ol(e,t,o);0!=(16384&e.flags)&&(Mi=!0)}return qi(e,t,n,r,o)}function Ui(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},Es(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Es(t,e),null;t.memoizedState={baseLanes:0},Es(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Es(t,r);return Fi(e,t,a,n),t.child}function $i(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function qi(e,t,n,r,a){var o=ga(n)?ma:fa.current;return o=ha(t,o),ao(t,a),n=ii(e,t,n,r,o,a),null===e||Mi?(t.flags|=1,Fi(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function Hi(e,t,n,r,a){if(ga(n)){var o=!0;wa(t)}else o=!1;if(ao(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),yo(t,n,r),ko(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var s=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=oo(u):u=ha(t,u=ga(n)?ma:fa.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||s!==u)&&wo(t,i,r,u),io=!1;var f=t.memoizedState;i.state=f,po(t,r,i,a),s=t.memoizedState,l!==r||f!==s||pa.current||io?("function"==typeof c&&(go(t,n,c,r),s=t.memoizedState),(l=io||vo(t,n,l,r,f,s,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4)):("function"==typeof i.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=u,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4),r=!1)}else{i=t.stateNode,so(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ya(t.type,l),i.props=u,d=t.pendingProps,f=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=oo(s):s=ha(t,s=ga(n)?ma:fa.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||f!==s)&&wo(t,i,r,s),io=!1,f=t.memoizedState,i.state=f,po(t,r,i,a);var m=t.memoizedState;l!==d||f!==m||pa.current||io?("function"==typeof p&&(go(t,n,p,r),m=t.memoizedState),(u=io||vo(t,n,u,r,f,m,s))?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=s,r=u):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return Gi(e,t,n,r,o,a)}function Gi(e,t,n,r,a,o){$i(e,t);var i=0!=(64&t.flags);if(!r&&!i)return a&&ka(t,n,!1),ol(e,t,o);r=t.stateNode,Di.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=To(t,e.child,null,o),t.child=To(t,null,l,o)):Fi(e,t,l,o),t.memoizedState=r.state,a&&ka(t,n,!0),t.child}function Zi(e){var t=e.stateNode;t.pendingContext?va(0,t.pendingContext,t.pendingContext!==t.context):t.context&&va(0,t.context,!1),Po(e,t.containerInfo)}var Vi,Wi,Ki,Yi,Qi={dehydrated:null,retryLane:0};function Xi(e,t,n){var r,a=t.pendingProps,o=Fo.current,i=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(i=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(o|=1),ca(Fo,1&o),null===e?(void 0!==a.fallback&&Ho(t),e=a.children,o=a.fallback,i?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qi,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qi,t.lanes=33554432,e):((n=Ks({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,i?(a=tl(e,t,a.children,a.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=Qi,a):(n=el(e,t,a.children,n),t.memoizedState=null,n))}function Ji(e,t,n,r){var a=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&a)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Ks(t,a,0,null),n=Ws(n,a,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function el(e,t,n,r){var a=e.child;return e=a.sibling,n=Zs(a,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tl(e,t,n,r,a){var o=t.mode,i=e.child;e=i.sibling;var l={mode:"hidden",children:n};return 0==(2&o)&&t.child!==i?((n=t.child).childLanes=0,n.pendingProps=l,null!==(i=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=i,i.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Zs(i,l),null!==e?r=Zs(e,r):(r=Ws(r,o,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nl(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ro(e.return,t)}function rl(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.lastEffect=o)}function al(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(Fi(e,t,r.children,n),0!=(2&(r=Fo.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nl(e,n);else if(19===e.tag)nl(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ca(Fo,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Bo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),rl(t,!1,a,n,o,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Bo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}rl(t,!0,n,null,o,t.lastEffect);break;case"together":rl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ul|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Zs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Zs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function il(e,t){if(!Uo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ll(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return ga(t.type)&&ba(),null;case 3:return Io(),ua(pa),ua(fa),Ko(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Zo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Wi(t),null;case 5:Mo(t);var o=Oo(No.current);if(n=t.type,null!==e&&null!=t.stateNode)Ki(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(i(166));return null}if(e=Oo(Lo.current),Zo(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Qr]=t,r[Xr]=l,n){case"dialog":Lr("cancel",r),Lr("close",r);break;case"iframe":case"object":case"embed":Lr("load",r);break;case"video":case"audio":for(e=0;e<Cr.length;e++)Lr(Cr[e],r);break;case"source":Lr("error",r);break;case"img":case"image":case"link":Lr("error",r),Lr("load",r);break;case"details":Lr("toggle",r);break;case"input":ee(r,l),Lr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Lr("invalid",r);break;case"textarea":se(r,l),Lr("invalid",r)}for(var u in Se(n,l),e=null,l)l.hasOwnProperty(u)&&(o=l[u],"children"===u?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):s.hasOwnProperty(u)&&null!=o&&"onScroll"===u&&Lr("scroll",r));switch(n){case"input":Y(r),re(r,l,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"==typeof l.onClick&&(r.onclick=jr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(u=9===o.nodeType?o:o.ownerDocument,e===de.html&&(e=fe(n)),e===de.html?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Qr]=t,e[Xr]=r,Vi(e,t,!1,!1),t.stateNode=e,u=xe(n,r),n){case"dialog":Lr("cancel",e),Lr("close",e),o=r;break;case"iframe":case"object":case"embed":Lr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Cr.length;o++)Lr(Cr[o],e);o=r;break;case"source":Lr("error",e),o=r;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),o=r;break;case"details":Lr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Lr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=a({},r,{value:void 0}),Lr("invalid",e);break;case"textarea":se(e,r),o=le(e,r),Lr("invalid",e);break;default:o=r}Se(n,o);var c=o;for(l in c)if(c.hasOwnProperty(l)){var d=c[l];"style"===l?ke(e,d):"dangerouslySetInnerHTML"===l?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===l?"string"==typeof d?("textarea"!==n||""!==d)&&be(e,d):"number"==typeof d&&be(e,""+d):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?null!=d&&"onScroll"===l&&Lr("scroll",e):null!=d&&w(e,l,d,u))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(l=r.value)?ie(e,!!r.multiple,l,!1):null!=r.defaultValue&&ie(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=jr)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Yi(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));n=Oo(No.current),Oo(Lo.current),Zo(t)?(r=t.stateNode,n=t.memoizedProps,r[Qr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Qr]=t,t.stateNode=r)}return null;case 13:return ua(Fo),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Zo(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Fo.current)?0===Bl&&(Bl=3):(0!==Bl&&3!==Bl||(Bl=4),null===Pl||0==(134217727&Ul)&&0==(134217727&$l)||vs(Pl,Dl))),(r||n)&&(t.flags|=4),null);case 4:return Io(),Wi(t),null===e&&Nr(t.stateNode.containerInfo),null;case 10:return no(t),null;case 19:if(ua(Fo),null===(r=t.memoizedState))return null;if(l=0!=(64&t.flags),null===(u=r.rendering))if(l)il(r,!1);else{if(0!==Bl||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(u=Bo(e))){for(t.flags|=64,il(r,!1),null!==(l=u.updateQueue)&&(t.updateQueue=l,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(l=n).flags&=2,l.nextEffect=null,l.firstEffect=null,l.lastEffect=null,null===(u=l.alternate)?(l.childLanes=0,l.lanes=e,l.child=null,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=u.childLanes,l.lanes=u.lanes,l.child=u.child,l.memoizedProps=u.memoizedProps,l.memoizedState=u.memoizedState,l.updateQueue=u.updateQueue,l.type=u.type,e=u.dependencies,l.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ca(Fo,1&Fo.current|2),t.child}e=e.sibling}null!==r.tail&&$a()>Zl&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Bo(u))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),il(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!Uo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*$a()-r.renderingStartTime>Zl&&1073741824!==n&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=$a(),n.sibling=null,t=Fo.current,ca(Fo,l?1&t|2:1&t),n):null;case 23:case 24:return Ss(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(i(156,t.tag))}function sl(e){switch(e.tag){case 1:ga(e.type)&&ba();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Io(),ua(pa),ua(fa),Ko(),0!=(64&(t=e.flags)))throw Error(i(285));return e.flags=-4097&t|64,e;case 5:return Mo(e),null;case 13:return ua(Fo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ua(Fo),null;case 4:return Io(),null;case 10:return no(e),null;case 23:case 24:return Ss(),null;default:return null}}function ul(e,t){try{var n="",r=t;do{n+=Z(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a}}function cl(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Vi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wi=function(){},Ki=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Oo(Lo.current);var i,l=null;switch(n){case"input":o=J(e,o),r=J(e,r),l=[];break;case"option":o=oe(e,o),r=oe(e,r),l=[];break;case"select":o=a({},o,{value:void 0}),r=a({},r,{value:void 0}),l=[];break;case"textarea":o=le(e,o),r=le(e,r),l=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=jr)}for(d in Se(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var u=o[d];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var c=r[d];if(u=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(null!=c||null!=u))if("style"===d)if(u){for(i in u)!u.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&u[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(l||(l=[]),l.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(l=l||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(l=l||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Lr("scroll",e),l||u===c||(l=[])):"object"==typeof c&&null!==c&&c.$$typeof===D?c.toString():(l=l||[]).push(d,c))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}},Yi=function(e,t,n,r){n!==r&&(t.flags|=4)};var dl="function"==typeof WeakMap?WeakMap:Map;function fl(e,t,n){(n=uo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yl||(Yl=!0,Ql=r),cl(0,t)},n}function pl(e,t,n){(n=uo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return cl(0,t),r(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Xl?Xl=new Set([this]):Xl.add(this),cl(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ml="function"==typeof WeakSet?WeakSet:Set;function hl(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){zs(e,n)}else t.current=null}function gl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ya(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Zr(t.stateNode.containerInfo))}throw Error(i(163))}function bl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,0!=(4&(a=a.tag))&&0!=(1&a)&&(Fs(n,e),Ms(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ya(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&mo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}mo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))))}throw Error(i(163))}function vl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=we("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function yl(e,t){if(Sa&&"function"==typeof Sa.onCommitFiberUnmount)try{Sa.onCommitFiberUnmount(Ea,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(0!=(4&r))Fs(t,n);else{r=t;try{a()}catch(o){zs(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hl(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){zs(t,o)}break;case 5:hl(t);break;case 4:Cl(e,t)}}function wl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function kl(e){return 5===e.tag||3===e.tag||4===e.tag}function El(e){e:{for(var t=e.return;null!==t;){if(kl(t))break e;t=t.return}throw Error(i(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(i(161))}16&n.flags&&(be(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||kl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Sl(e,n,t):xl(e,n,t)}function Sl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=jr));else if(4!==r&&null!==(e=e.child))for(Sl(e,t,n),e=e.sibling;null!==e;)Sl(e,t,n),e=e.sibling}function xl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(xl(e,t,n),e=e.sibling;null!==e;)xl(e,t,n),e=e.sibling}function Cl(e,t){for(var n,r,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(i(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag){e:for(var l=e,s=a,u=s;;)if(yl(l,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===s)break e;for(;null===u.sibling;){if(null===u.return||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(l=n,s=a.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(yl(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function Tl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Xr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),xe(e,a),t=xe(e,r),a=0;a<o.length;a+=2){var l=o[a],s=o[a+1];"style"===l?ke(n,s):"dangerouslySetInnerHTML"===l?ge(n,s):"children"===l?be(n,s):w(n,l,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ie(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ie(n,!!r.multiple,r.defaultValue,!0):ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(i(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Gl=$a(),vl(t.child,!0)),void _l(t);case 19:return void _l(t);case 23:case 24:return void vl(t,null!==t.memoizedState)}throw Error(i(163))}function _l(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ml),t.forEach((function(t){var r=$s.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Al(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ll=Math.ceil,Rl=k.ReactCurrentDispatcher,Nl=k.ReactCurrentOwner,Ol=0,Pl=null,Il=null,Dl=0,Ml=0,Fl=sa(0),Bl=0,jl=null,zl=0,Ul=0,$l=0,ql=0,Hl=null,Gl=0,Zl=1/0;function Vl(){Zl=$a()+500}var Wl,Kl=null,Yl=!1,Ql=null,Xl=null,Jl=!1,es=null,ts=90,ns=[],rs=[],as=null,os=0,is=null,ls=-1,ss=0,us=0,cs=null,ds=!1;function fs(){return 0!=(48&Ol)?$a():-1!==ls?ls:ls=$a()}function ps(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===qa()?1:2;if(0===ss&&(ss=zl),0!==Ka.transition){0!==us&&(us=null!==Hl?Hl.pendingLanes:0),e=ss;var t=4186112&~us;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qa(),0!=(4&Ol)&&98===e?e=jt(12,ss):e=jt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function ms(e,t,n){if(50<os)throw os=0,is=null,Error(i(185));if(null===(e=hs(e,t)))return null;$t(e,t,n),e===Pl&&($l|=t,4===Bl&&vs(e,Dl));var r=qa();1===t?0!=(8&Ol)&&0==(48&Ol)?ys(e):(gs(e,n),0===Ol&&(Vl(),Va())):(0==(4&Ol)||98!==r&&99!==r||(null===as?as=new Set([e]):as.add(e)),gs(e,n)),Hl=e}function hs(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gs(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-qt(l),u=1<<s,c=o[s];if(-1===c){if(0==(u&r)||0!=(u&a)){c=t,Mt(u);var d=Dt;o[s]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=u);l&=~u}if(r=Ft(e,e===Pl?Dl:0),t=Dt,0===r)null!==n&&(n!==Ma&&Ta(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Ma&&Ta(n)}15===t?(n=ys.bind(null,e),null===Ba?(Ba=[n],ja=Ca(Na,Wa)):Ba.push(n),n=Ma):14===t?n=Za(99,ys.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(i(358,e))}}(t),n=Za(n,bs.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function bs(e){if(ls=-1,us=ss=0,0!=(48&Ol))throw Error(i(327));var t=e.callbackNode;if(Ds()&&e.callbackNode!==t)return null;var n=Ft(e,e===Pl?Dl:0);if(0===n)return null;var r=n,a=Ol;Ol|=16;var o=Ts();for(Pl===e&&Dl===r||(Vl(),xs(e,r));;)try{Ls();break}catch(s){Cs(e,s)}if(to(),Rl.current=o,Ol=a,null!==Il?r=0:(Pl=null,Dl=0,r=Bl),0!=(zl&$l))xs(e,0);else if(0!==r){if(2===r&&(Ol|=64,e.hydrate&&(e.hydrate=!1,Zr(e.containerInfo)),0!==(n=Bt(e))&&(r=_s(e,n))),1===r)throw t=jl,xs(e,0),vs(e,n),gs(e,$a()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(i(345));case 2:case 5:Os(e);break;case 3:if(vs(e,n),(62914560&n)===n&&10<(r=Gl+500-$a())){if(0!==Ft(e,0))break;if(((a=e.suspendedLanes)&n)!==n){fs(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Hr(Os.bind(null,e),r);break}Os(e);break;case 4:if(vs(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var l=31-qt(n);o=1<<l,(l=r[l])>a&&(a=l),n&=~o}if(n=a,10<(n=(120>(n=$a()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ll(n/1960))-n)){e.timeoutHandle=Hr(Os.bind(null,e),n);break}Os(e);break;default:throw Error(i(329))}}return gs(e,$a()),e.callbackNode===t?bs.bind(null,e):null}function vs(e,t){for(t&=~ql,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function ys(e){if(0!=(48&Ol))throw Error(i(327));if(Ds(),e===Pl&&0!=(e.expiredLanes&Dl)){var t=Dl,n=_s(e,t);0!=(zl&$l)&&(n=_s(e,t=Ft(e,t)))}else n=_s(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Ol|=64,e.hydrate&&(e.hydrate=!1,Zr(e.containerInfo)),0!==(t=Bt(e))&&(n=_s(e,t))),1===n)throw n=jl,xs(e,0),vs(e,t),gs(e,$a()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Os(e),gs(e,$a()),null}function ws(e,t){var n=Ol;Ol|=1;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}}function ks(e,t){var n=Ol;Ol&=-2,Ol|=8;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}}function Es(e,t){ca(Fl,Ml),Ml|=t,zl|=t}function Ss(){Ml=Fl.current,ua(Fl)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Gr(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&ba();break;case 3:Io(),ua(pa),ua(fa),Ko();break;case 5:Mo(r);break;case 4:Io();break;case 13:case 19:ua(Fo);break;case 10:no(r);break;case 23:case 24:Ss()}n=n.return}Pl=e,Il=Zs(e.current,null),Dl=Ml=zl=t,Bl=0,jl=null,ql=$l=Ul=0}function Cs(e,t){for(;;){var n=Il;try{if(to(),Yo.current=Ni,ni){for(var r=Jo.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}ni=!1}if(Xo=0,ti=ei=Jo=null,ri=!1,Nl.current=null,null===n||null===n.return){Bl=1,jl=t,Il=null;break}e:{var o=e,i=n.return,l=n,s=t;if(t=Dl,l.flags|=2048,l.firstEffect=l.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&l.mode)){var c=l.alternate;c?(l.updateQueue=c.updateQueue,l.memoizedState=c.memoizedState,l.lanes=c.lanes):(l.updateQueue=null,l.memoizedState=null)}var d=0!=(1&Fo.current),f=i;do{var p;if(p=13===f.tag){var m=f.memoizedState;if(null!==m)p=null!==m.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!d)}}if(p){var g=f.updateQueue;if(null===g){var b=new Set;b.add(u),f.updateQueue=b}else g.add(u);if(0==(2&f.mode)){if(f.flags|=64,l.flags|=16384,l.flags&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var v=uo(-1,1);v.tag=2,co(l,v)}l.lanes|=1;break e}s=void 0,l=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new dl,s=new Set,y.set(u,s)):void 0===(s=y.get(u))&&(s=new Set,y.set(u,s)),!s.has(l)){s.add(l);var w=Us.bind(null,o,u,l);u.then(w,w)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);s=Error((V(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Bl&&(Bl=2),s=ul(s,l),f=i;do{switch(f.tag){case 3:o=s,f.flags|=4096,t&=-t,f.lanes|=t,fo(f,fl(0,o,t));break e;case 1:o=s;var k=f.type,E=f.stateNode;if(0==(64&f.flags)&&("function"==typeof k.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===Xl||!Xl.has(E)))){f.flags|=4096,t&=-t,f.lanes|=t,fo(f,pl(f,o,t));break e}}f=f.return}while(null!==f)}Ns(n)}catch(S){t=S,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function Ts(){var e=Rl.current;return Rl.current=Ni,null===e?Ni:e}function _s(e,t){var n=Ol;Ol|=16;var r=Ts();for(Pl===e&&Dl===t||xs(e,t);;)try{As();break}catch(a){Cs(e,a)}if(to(),Ol=n,Rl.current=r,null!==Il)throw Error(i(261));return Pl=null,Dl=0,Bl}function As(){for(;null!==Il;)Rs(Il)}function Ls(){for(;null!==Il&&!_a();)Rs(Il)}function Rs(e){var t=Wl(e.alternate,e,Ml);e.memoizedProps=e.pendingProps,null===t?Ns(e):Il=t,Nl.current=null}function Ns(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ll(n,t,Ml)))return void(Il=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ml)||0==(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=sl(t)))return n.flags&=2047,void(Il=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Bl&&(Bl=5)}function Os(e){var t=qa();return Ga(99,Ps.bind(null,e,t)),null}function Ps(e,t){do{Ds()}while(null!==es);if(0!=(48&Ol))throw Error(i(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,o=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var l=e.eventTimes,s=e.expirationTimes;0<o;){var u=31-qt(o),c=1<<u;a[u]=0,l[u]=-1,s[u]=-1,o&=~c}if(null!==as&&0==(24&r)&&as.has(e)&&as.delete(e),e===Pl&&(Il=Pl=null,Dl=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=Ol,Ol|=32,Nl.current=null,zr=Wt,gr(l=hr())){if("selectionStart"in l)s={start:l.selectionStart,end:l.selectionEnd};else e:if(s=(s=l.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&0!==c.rangeCount){s=c.anchorNode,o=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{s.nodeType,u.nodeType}catch(T){s=null;break e}var d=0,f=-1,p=-1,m=0,h=0,g=l,b=null;t:for(;;){for(var v;g!==s||0!==o&&3!==g.nodeType||(f=d+o),g!==u||0!==c&&3!==g.nodeType||(p=d+c),3===g.nodeType&&(d+=g.nodeValue.length),null!==(v=g.firstChild);)b=g,g=v;for(;;){if(g===l)break t;if(b===s&&++m===o&&(f=d),b===u&&++h===c&&(p=d),null!==(v=g.nextSibling))break;b=(g=b).parentNode}g=v}s=-1===f||-1===p?null:{start:f,end:p}}else s=null;s=s||{start:0,end:0}}else s=null;Ur={focusedElem:l,selectionRange:s},Wt=!1,cs=null,ds=!1,Kl=r;do{try{Is()}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);cs=null,Kl=r;do{try{for(l=e;null!==Kl;){var y=Kl.flags;if(16&y&&be(Kl.stateNode,""),128&y){var w=Kl.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&y){case 2:El(Kl),Kl.flags&=-3;break;case 6:El(Kl),Kl.flags&=-3,Tl(Kl.alternate,Kl);break;case 1024:Kl.flags&=-1025;break;case 1028:Kl.flags&=-1025,Tl(Kl.alternate,Kl);break;case 4:Tl(Kl.alternate,Kl);break;case 8:Cl(l,s=Kl);var E=s.alternate;wl(s),null!==E&&wl(E)}Kl=Kl.nextEffect}}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);if(k=Ur,w=hr(),y=k.focusedElem,l=k.selectionRange,w!==y&&y&&y.ownerDocument&&mr(y.ownerDocument.documentElement,y)){null!==l&&gr(y)&&(w=l.start,void 0===(k=l.end)&&(k=w),"selectionStart"in y?(y.selectionStart=w,y.selectionEnd=Math.min(k,y.value.length)):(k=(w=y.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),s=y.textContent.length,E=Math.min(l.start,s),l=void 0===l.end?E:Math.min(l.end,s),!k.extend&&E>l&&(s=l,l=E,E=s),s=pr(y,E),o=pr(y,l),s&&o&&(1!==k.rangeCount||k.anchorNode!==s.node||k.anchorOffset!==s.offset||k.focusNode!==o.node||k.focusOffset!==o.offset)&&((w=w.createRange()).setStart(s.node,s.offset),k.removeAllRanges(),E>l?(k.addRange(w),k.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),k.addRange(w))))),w=[];for(k=y;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<w.length;y++)(k=w[y]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Wt=!!zr,Ur=zr=null,e.current=n,Kl=r;do{try{for(y=e;null!==Kl;){var S=Kl.flags;if(36&S&&bl(y,Kl.alternate,Kl),128&S){w=void 0;var x=Kl.ref;if(null!==x){var C=Kl.stateNode;Kl.tag,w=C,"function"==typeof x?x(w):x.current=w}}Kl=Kl.nextEffect}}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);Kl=null,Fa(),Ol=a}else e.current=n;if(Jl)Jl=!1,es=e,ts=t;else for(Kl=r;null!==Kl;)t=Kl.nextEffect,Kl.nextEffect=null,8&Kl.flags&&((S=Kl).sibling=null,S.stateNode=null),Kl=t;if(0===(r=e.pendingLanes)&&(Xl=null),1===r?e===is?os++:(os=0,is=e):os=0,n=n.stateNode,Sa&&"function"==typeof Sa.onCommitFiberRoot)try{Sa.onCommitFiberRoot(Ea,n,void 0,64==(64&n.current.flags))}catch(T){}if(gs(e,$a()),Yl)throw Yl=!1,e=Ql,Ql=null,e;return 0!=(8&Ol)||Va(),null}function Is(){for(;null!==Kl;){var e=Kl.alternate;ds||null===cs||(0!=(8&Kl.flags)?Je(Kl,cs)&&(ds=!0):13===Kl.tag&&Al(e,Kl)&&Je(Kl,cs)&&(ds=!0));var t=Kl.flags;0!=(256&t)&&gl(e,Kl),0==(512&t)||Jl||(Jl=!0,Za(97,(function(){return Ds(),null}))),Kl=Kl.nextEffect}}function Ds(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Ga(e,Bs)}return!1}function Ms(e,t){ns.push(t,e),Jl||(Jl=!0,Za(97,(function(){return Ds(),null})))}function Fs(e,t){rs.push(t,e),Jl||(Jl=!0,Za(97,(function(){return Ds(),null})))}function Bs(){if(null===es)return!1;var e=es;if(es=null,0!=(48&Ol))throw Error(i(331));var t=Ol;Ol|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var a=n[r],o=n[r+1],l=a.destroy;if(a.destroy=void 0,"function"==typeof l)try{l()}catch(u){if(null===o)throw Error(i(330));zs(o,u)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){a=n[r],o=n[r+1];try{var s=a.create;a.destroy=s()}catch(u){if(null===o)throw Error(i(330));zs(o,u)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Ol=t,Va(),!0}function js(e,t,n){co(e,t=fl(0,t=ul(n,t),1)),t=fs(),null!==(e=hs(e,1))&&($t(e,1,t),gs(e,t))}function zs(e,t){if(3===e.tag)js(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){js(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xl||!Xl.has(r))){var a=pl(n,e=ul(t,e),1);if(co(n,a),a=fs(),null!==(n=hs(n,1)))$t(n,1,a),gs(n,a);else if("function"==typeof r.componentDidCatch&&(null===Xl||!Xl.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Us(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fs(),e.pingedLanes|=e.suspendedLanes&n,Pl===e&&(Dl&n)===n&&(4===Bl||3===Bl&&(62914560&Dl)===Dl&&500>$a()-Gl?xs(e,0):ql|=n),gs(e,t)}function $s(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===qa()?1:2:(0===ss&&(ss=zl),0===(t=zt(62914560&~ss))&&(t=4194304))),n=fs(),null!==(e=hs(e,t))&&($t(e,t,n),gs(e,n))}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hs(e,t,n,r){return new qs(e,t,n,r)}function Gs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Zs(e,t){var n=e.alternate;return null===n?((n=Hs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vs(e,t,n,r,a,o){var l=2;if(r=e,"function"==typeof e)Gs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case x:return Ws(n.children,a,o,t);case M:l=8,a|=16;break;case C:l=8,a|=1;break;case T:return(e=Hs(12,n,t,8|a)).elementType=T,e.type=T,e.lanes=o,e;case R:return(e=Hs(13,n,t,a)).type=R,e.elementType=R,e.lanes=o,e;case N:return(e=Hs(19,n,t,a)).elementType=N,e.lanes=o,e;case F:return Ks(n,a,o,t);case B:return(e=Hs(24,n,t,a)).elementType=B,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case _:l=10;break e;case A:l=9;break e;case L:l=11;break e;case O:l=14;break e;case P:l=16,r=null;break e;case I:l=22;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Hs(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Ws(e,t,n,r){return(e=Hs(7,e,r,t)).lanes=n,e}function Ks(e,t,n,r){return(e=Hs(23,e,r,t)).elementType=F,e.lanes=n,e}function Ys(e,t,n){return(e=Hs(6,e,null,t)).lanes=n,e}function Qs(e,t,n){return(t=Hs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.mutableSourceEagerHydrationData=null}function Js(e,t,n,r){var a=t.current,o=fs(),l=ps(a);e:if(n){t:{if(Ke(n=n._reactInternals)!==n||1!==n.tag)throw Error(i(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ga(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(i(171))}if(1===n.tag){var u=n.type;if(ga(u)){n=ya(n,u,s);break e}}n=s}else n=da;return null===t.context?t.context=n:t.pendingContext=n,(t=uo(o,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),co(a,t),ms(a,l,o),l}function eu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function nu(e,t){tu(e,t),(e=e.alternate)&&tu(e,t)}function ru(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xs(e,t,null!=n&&!0===n.hydrate),t=Hs(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,lo(t),e[Jr]=n.current,Nr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function au(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ou(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if("function"==typeof a){var l=a;a=function(){var e=eu(i);l.call(e)}}Js(t,i,e,a)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ru(e,0,t?{hydrate:!0}:void 0)}(n,r),i=o._internalRoot,"function"==typeof a){var s=a;a=function(){var e=eu(i);s.call(e)}}ks((function(){Js(t,i,e,a)}))}return eu(i)}function iu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!au(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Wl=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pa.current)Mi=!0;else{if(0==(n&r)){switch(Mi=!1,t.tag){case 3:Zi(t),Vo();break;case 5:Do(t);break;case 1:ga(t.type)&&wa(t);break;case 4:Po(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;ca(Qa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Xi(e,t,n):(ca(Fo,1&Fo.current),null!==(t=ol(e,t,n))?t.sibling:null);ca(Fo,1&Fo.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return al(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),ca(Fo,Fo.current),r)break;return null;case 23:case 24:return t.lanes=0,Ui(e,t,n)}return ol(e,t,n)}Mi=0!=(16384&e.flags)}else Mi=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=ha(t,fa.current),ao(t,n),a=ii(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ga(r)){var o=!0;wa(t)}else o=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,lo(t);var l=r.getDerivedStateFromProps;"function"==typeof l&&go(t,r,l,e),a.updater=bo,t.stateNode=a,a._reactInternals=t,ko(t,r,e,n),t=Gi(null,t,r,!0,o,n)}else t.tag=0,Fi(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(o=a._init)(a._payload),t.type=a,o=t.tag=function(e){if("function"==typeof e)return Gs(e)?1:0;if(null!=e){if((e=e.$$typeof)===L)return 11;if(e===O)return 14}return 2}(a),e=Ya(a,e),o){case 0:t=qi(null,t,a,e,n);break e;case 1:t=Hi(null,t,a,e,n);break e;case 11:t=Bi(null,t,a,e,n);break e;case 14:t=ji(null,t,a,Ya(a.type,e),r,n);break e}throw Error(i(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,qi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 1:return r=t.type,a=t.pendingProps,Hi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 3:if(Zi(t),r=t.updateQueue,null===e||null===r)throw Error(i(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,so(e,t),po(t,r,null,n),(r=t.memoizedState.element)===a)Vo(),t=ol(e,t,n);else{if((o=(a=t.stateNode).hydrate)&&(zo=Vr(t.stateNode.containerInfo.firstChild),jo=t,o=Uo=!0),o){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(o=e[a])._workInProgressVersionPrimary=e[a+1],Wo.push(o);for(n=_o(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Fi(e,t,r,n),Vo();t=t.child}return t;case 5:return Do(t),null===e&&Ho(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,l=a.children,qr(r,a)?l=null:null!==o&&qr(r,o)&&(t.flags|=16),$i(e,t),Fi(e,t,l,n),t.child;case 6:return null===e&&Ho(t),null;case 13:return Xi(e,t,n);case 4:return Po(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=To(t,null,r,n):Fi(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Bi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 7:return Fi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fi(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,l=t.memoizedProps,o=a.value;var s=t.type._context;if(ca(Qa,s._currentValue),s._currentValue=o,null!==l)if(s=l.value,0===(o=ur(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(l.children===a.children&&!pa.current){t=ol(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var u=s.dependencies;if(null!==u){l=s.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===s.tag&&((c=uo(-1,n&-n)).tag=2,co(s,c)),s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),ro(s.return,n),u.lanes|=n;break}c=c.next}}else l=10===s.tag&&s.type===t.type?null:s.child;if(null!==l)l.return=s;else for(l=s;null!==l;){if(l===t){l=null;break}if(null!==(s=l.sibling)){s.return=l.return,l=s;break}l=l.return}s=l}Fi(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(o=t.pendingProps).children,ao(t,n),r=r(a=oo(a,o.unstable_observedBits)),t.flags|=1,Fi(e,t,r,n),t.child;case 14:return o=Ya(a=t.type,t.pendingProps),ji(e,t,a,o=Ya(a.type,o),r,n);case 15:return zi(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ya(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ga(r)?(e=!0,wa(t)):e=!1,ao(t,n),yo(t,r,a),ko(t,r,a,n),Gi(null,t,r,!0,e,n);case 19:return al(e,t,n);case 23:case 24:return Ui(e,t,n)}throw Error(i(156,t.tag))},ru.prototype.render=function(e){Js(e,this._internalRoot,null,null)},ru.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Js(null,e,null,(function(){t[Jr]=null}))},et=function(e){13===e.tag&&(ms(e,4,fs()),nu(e,4))},tt=function(e){13===e.tag&&(ms(e,67108864,fs()),nu(e,67108864))},nt=function(e){if(13===e.tag){var t=fs(),n=ps(e);ms(e,n,t),nu(e,n)}},rt=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=aa(r);if(!a)throw Error(i(90));Q(r),ne(r,a)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&ie(e,!!n.multiple,t,!1)}},Oe=ws,Pe=function(e,t,n,r,a){var o=Ol;Ol|=4;try{return Ga(98,e.bind(null,t,n,r,a))}finally{0===(Ol=o)&&(Vl(),Va())}},Ie=function(){0==(49&Ol)&&(function(){if(null!==as){var e=as;as=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gs(e,$a())}))}Va()}(),Ds())},De=function(e,t){var n=Ol;Ol|=2;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}};var lu={Events:[na,ra,aa,Re,Ne,Ds,{current:!1}]},su={findFiberByHostInstance:ta,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},uu={bundleType:su.bundleType,version:su.version,rendererPackageName:su.rendererPackageName,rendererConfig:su.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Xe(e))?null:e.stateNode},findFiberByHostInstance:su.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var cu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cu.isDisabled&&cu.supportsFiber)try{Ea=cu.inject(uu),Sa=cu}catch(he){}}t.createPortal=iu,t.hydrate=function(e,t,n){if(!au(t))throw Error(i(200));return ou(null,e,t,!0,n)}},4151:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4005)},7753:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var l,s,u,c;if(Array.isArray(e)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(!o(e[s],i[s]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;for(c=e.entries();!(s=c.next()).done;)if(!o(s.value[1],i.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(e[s]!==i[s])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((l=(u=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,u[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==u[s]&&"__v"!==u[s]&&"__o"!==u[s]||!e.$$typeof)&&!o(e[u[s]],i[u[s]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},7100:(e,t,n)=>{"use strict";n.d(t,{B6:()=>G,ql:()=>J});var r=n(9231),a=n(9519),o=n.n(a),i=n(7753),l=n.n(i),s=n(2722),u=n.n(s),c=n(5218),d=n.n(c);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}var g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},b={rel:["amphtml","canonical","alternate"]},v={type:["application/ld+json"]},y={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(g).map((function(e){return g[e]})),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},E=Object.keys(k).reduce((function(e,t){return e[k[t]]=t,e}),{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},x=function(e){var t=S(e,g.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=S(e,"defaultTitle");return t||r||void 0},C=function(e){return S(e,"onChangeClientState")||function(){}},T=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return f({},e,t)}),{})},_=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a<r.length;a+=1){var o=r[a].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}return t}),[])},A=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var a={};n.filter((function(e){for(var n,o=Object.keys(e),i=0;i<o.length;i+=1){var l=o[i],s=l.toLowerCase();-1===t.indexOf(s)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===s&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(l)||"innerHTML"!==l&&"cssText"!==l&&"itemprop"!==l||(n=l)}if(!n||!e[n])return!1;var u=e[n].toLowerCase();return r[n]||(r[n]={}),a[n]||(a[n]={}),!r[n][u]&&(a[n][u]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var o=Object.keys(a),i=0;i<o.length;i+=1){var l=o[i],s=f({},r[l],a[l]);r[l]=s}return e}),[]).reverse()},L=function(e,t){if(Array.isArray(e)&&e.length)for(var n=0;n<e.length;n+=1)if(e[n][t])return!0;return!1},R=function(e){return Array.isArray(e)?e.join(""):e},N=function(e,t){return Array.isArray(e)?e.reduce((function(e,n){return function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1}(n,t)?e.priority.push(n):e.default.push(n),e}),{priority:[],default:[]}):{default:e}},O=function(e,t){var n;return f({},e,((n={})[t]=void 0,n))},P=[g.NOSCRIPT,g.SCRIPT,g.STYLE],I=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},D=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},M=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[k[n]||n]=e[n],t}),t)},F=function(e,t){return t.map((function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach((function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]})),r.createElement(e,o)}))},B=function(e,t,n){switch(e){case g.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=M(n,a),[r.createElement(g.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=D(n),o=R(t);return a?"<"+e+' data-rh="true" '+a+">"+I(o,r)+"</"+e+">":"<"+e+' data-rh="true">'+I(o,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return M(t)},toString:function(){return D(t)}};default:return{toComponent:function(){return F(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+I(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===P.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+"</"+e+">")}),"")}(e,t,n)}}}},j=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,f=e.scriptTags,p={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=N(e.metaTags,y),o=N(t,b),i=N(n,v);return{priorityMethods:{toComponent:function(){return[].concat(F(g.META,a.priority),F(g.LINK,o.priority),F(g.SCRIPT,i.priority))},toString:function(){return B(g.META,a.priority,r)+" "+B(g.LINK,o.priority,r)+" "+B(g.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);p=m.priorityMethods,c=m.linkTags,d=m.metaTags,f=m.scriptTags}return{priority:p,base:B(g.BASE,t,r),bodyAttributes:B("bodyAttributes",n,r),htmlAttributes:B("htmlAttributes",a,r),link:B(g.LINK,c,r),meta:B(g.META,d,r),noscript:B(g.NOSCRIPT,o,r),script:B(g.SCRIPT,f,r),style:B(g.STYLE,i,r),title:B(g.TITLE,{title:s,titleAttributes:u},r)}},z=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?z:n.instances},add:function(e){(n.canUseDOM?z:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?z:n.instances).indexOf(e);(n.canUseDOM?z:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=j({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),q=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),H="undefined"!=typeof document,G=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return p(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);G.canUseDOM=H,G.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},G.defaultProps={context:{}},G.displayName="HelmetProvider";var Z=function(e,t){var n,r=document.head||document.querySelector(g.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some((function(e,t){return n=t,r.isEqualNode(e)}))?o.splice(n,1):i.push(r)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:o,newTags:i}},V=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l<i.length;l+=1){var s=i[l],u=t[s]||"";n.getAttribute(s)!==u&&n.setAttribute(s,u),-1===a.indexOf(s)&&a.push(s);var c=o.indexOf(s);-1!==c&&o.splice(c,1)}for(var d=o.length-1;d>=0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},W=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;V(g.BODY,e.bodyAttributes),V(g.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=R(e)),V(g.TITLE,t)}(c,d);var f={baseTag:Z(g.BASE,n),linkTags:Z(g.LINK,a),metaTags:Z(g.META,o),noscriptTags:Z(g.NOSCRIPT,i),scriptTags:Z(g.SCRIPT,s),styleTags:Z(g.STYLE,u)},p={},m={};Object.keys(f).forEach((function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(m[e]=f[e].oldTags)})),t&&t(),l(e,p,m)},K=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).rendered=!1,t}p(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!d()(e,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,a=null,o=(e=n.helmetInstances.get().map((function(e){var t=f({},e.props);return delete t.context,t})),{baseTag:_(["href"],e),bodyAttributes:T("bodyAttributes",e),defer:S(e,"defer"),encode:S(e,"encodeSpecialCharacters"),htmlAttributes:T("htmlAttributes",e),linkTags:A(g.LINK,["rel","href"],e),metaTags:A(g.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:A(g.NOSCRIPT,["innerHTML"],e),onChangeClientState:C(e),scriptTags:A(g.SCRIPT,["src","innerHTML"],e),styleTags:A(g.STYLE,["cssText"],e),title:x(e),titleAttributes:T("titleAttributes",e),prioritizeSeoTags:L(e,"prioritizeSeoTags")});G.canUseDOM?(t=o,K&&cancelAnimationFrame(K),t.defer?K=requestAnimationFrame((function(){W(t,(function(){K=null}))})):(W(t),K=null)):j&&(a=j(o)),r(a)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(r.Component);Y.propTypes={context:q.isRequired},Y.displayName="HelmetDispatcher";var Q=["children"],X=["children"],J=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!l()(O(this.props,"helmetData"),O(e,"helmetData"))},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case g.SCRIPT:case g.NOSCRIPT:return{innerHTML:t};case g.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return f({},r,((t={})[n.type]=[].concat(r[n.type]||[],[f({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case g.TITLE:return f({},a,((t={})[r.type]=i,t.titleAttributes=f({},o),t));case g.BODY:return f({},a,{bodyAttributes:f({},o)});case g.HTML:return f({},a,{htmlAttributes:f({},o)});default:return f({},a,((n={})[r.type]=f({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=f({},t);return Object.keys(e).forEach((function(t){var r;n=f({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,o=r.children,i=h(r,Q),l=Object.keys(i).reduce((function(e,t){return e[E[t]||t]=i[t],e}),{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,o),s){case g.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:l,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:o})}}})),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=h(e,X),a=f({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(Y,f({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,(function(e){return r.createElement(Y,f({},a,{context:e}))}))},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},3802:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case g:case h:case s:return e;default:return t}}case a:return t}}}function E(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=h,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||k(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===g},t.isMemo=function(e){return k(e)===h},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=k},5566:(e,t,n)=>{"use strict";e.exports=n(3802)},260:(e,t,n)=>{"use strict";n.d(t,{H:()=>l,f:()=>i});var r=n(9409),a=n(4011),o=n(9231);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?(0,r.LX)(t,e):n.length?n[n.length-1].match:r.F0.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.rs,n,e.map((function(e,n){return o.createElement(r.AW,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.Z)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.Z)({},n,t,{route:e}))}})}))):null}},7962:(e,t,n)=>{"use strict";n.d(t,{OL:()=>y,VK:()=>c,rU:()=>g});var r=n(9409),a=n(8829),o=n(9231),i=n(2852),l=n(4011),s=n(4126),u=n(6381),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.lX)(t.props),t}return(0,a.Z)(t,e),t.prototype.render=function(){return o.createElement(r.F0,{history:this.history,children:this.props.children})},t}(o.Component);o.Component;var d=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.ob)(e,null,null,t):e},p=function(e){return e},m=o.forwardRef;void 0===m&&(m=p);var h=m((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,i=(0,s.Z)(e,["innerRef","navigate","onClick"]),u=i.target,c=(0,l.Z)({},i,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||u&&"_self"!==u||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=p!==m&&t||n,o.createElement("a",c)}));var g=m((function(e,t){var n=e.component,a=void 0===n?h:n,c=e.replace,g=e.to,b=e.innerRef,v=(0,s.Z)(e,["component","replace","to","innerRef"]);return o.createElement(r.s6.Consumer,null,(function(e){e||(0,u.Z)(!1);var n=e.history,r=f(d(g,e.location),e.location),s=r?n.createHref(r):"",h=(0,l.Z)({},v,{href:s,navigate:function(){var t=d(g,e.location),r=(0,i.Ep)(e.location)===(0,i.Ep)(f(t));(c||r?n.replace:n.push)(t)}});return p!==m?h.ref=t||b:h.innerRef=b,o.createElement(a,h)}))})),b=function(e){return e},v=o.forwardRef;void 0===v&&(v=b);var y=v((function(e,t){var n=e["aria-current"],a=void 0===n?"page":n,i=e.activeClassName,c=void 0===i?"active":i,p=e.activeStyle,m=e.className,h=e.exact,y=e.isActive,w=e.location,k=e.sensitive,E=e.strict,S=e.style,x=e.to,C=e.innerRef,T=(0,s.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.createElement(r.s6.Consumer,null,(function(e){e||(0,u.Z)(!1);var n=w||e.location,i=f(d(x,n),n),s=i.pathname,_=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=_?(0,r.LX)(n.pathname,{path:_,exact:h,sensitive:k,strict:E}):null,L=!!(y?y(A,n):A),R="function"==typeof m?m(L):m,N="function"==typeof S?S(L):S;L&&(R=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(R,c),N=(0,l.Z)({},N,p));var O=(0,l.Z)({"aria-current":L&&a||null,className:R,style:N,to:i},T);return b!==v?O.ref=t||C:O.innerRef=C,o.createElement(g,O)}))}))},9409:(e,t,n)=>{"use strict";n.d(t,{AW:()=>x,F0:()=>y,LX:()=>S,TH:()=>P,k6:()=>O,rs:()=>R,s6:()=>v});var r=n(8829),a=n(9231),o=n(9519),i=n.n(o),l=n(2852),s=n(6381),u=n(4011),c=n(6084),d=n.n(c),f=(n(5566),n(4126)),p=(n(6095),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var h=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter((function(t){return t!==e}))},get:function(){return n},set:function(e,t){n=e,r.forEach((function(e){return e(n,t)}))}}),t}(0,r.Z)(n,e);var a=n.prototype;return a.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},a.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((o=r)===(i=a)?0!==o||1/o==1/i:o!=o&&i!=i)?n=0:(n="function"==typeof t?t(r,a):p,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,i},a.render=function(){return this.props.children},n}(a.Component);s.childContextTypes=((n={})[l]=i().object.isRequired,n);var u=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}(0,r.Z)(n,t);var a=n.prototype;return a.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?p:t},a.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?p:e},a.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},a.getValue=function(){return this.context[l]?this.context[l].get():e},a.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(a.Component);return u.contextTypes=((o={})[l]=i().object,o),{Provider:s,Consumer:u}},g=function(e){var t=h();return t.displayName=e,t},b=g("Router-History"),v=g("Router"),y=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.Z)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a.createElement(v.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.createElement(b.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.Component);a.Component;a.Component;var w={},k=1e4,E=0;function S(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,i=n.strict,l=void 0!==i&&i,s=n.sensitive,u=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=w[n]||(w[n]={});if(r[e])return r[e];var a=[],o={regexp:d()(e,a,t),keys:a};return E<k&&(r[e]=o,E++),o}(n,{end:o,strict:l,sensitive:u}),a=r.regexp,i=r.keys,s=a.exec(e);if(!s)return null;var c=s[0],f=s.slice(1),p=e===c;return o&&!p?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:p,params:i.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var x=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){var e=this;return a.createElement(v.Consumer,null,(function(t){t||(0,s.Z)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?S(n.pathname,e.props):t.match,o=(0,u.Z)({},t,{location:n,match:r}),i=e.props,l=i.children,c=i.component,d=i.render;return Array.isArray(l)&&function(e){return 0===a.Children.count(e)}(l)&&(l=null),a.createElement(v.Provider,{value:o},o.match?l?"function"==typeof l?l(o):l:c?a.createElement(c,o):d?d(o):null:"function"==typeof l?l(o):null)}))},t}(a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function T(e,t){if(!e)return t;var n=C(e);return 0!==t.pathname.indexOf(n)?t:(0,u.Z)({},t,{pathname:t.pathname.substr(n.length)})}function _(e){return"string"==typeof e?e:(0,l.Ep)(e)}function A(e){return function(){(0,s.Z)(!1)}}function L(){}a.Component;var R=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){var e=this;return a.createElement(v.Consumer,null,(function(t){t||(0,s.Z)(!1);var n,r,o=e.props.location||t.location;return a.Children.forEach(e.props.children,(function(e){if(null==r&&a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?S(o.pathname,(0,u.Z)({},e.props,{path:i})):t.match}})),r?a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(a.Component);var N=a.useContext;function O(){return N(b)}function P(){return N(v).location}},8618:(e,t,n)=>{"use strict";var r=n(1538),a=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var i=60109,l=60110,s=60112;t.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;a=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),i=d("react.provider"),l=d("react.context"),s=d("react.forward_ref"),t.Suspense=d("react.suspense"),u=d("react.memo"),c=d("react.lazy")}var f="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=g.prototype;var y=v.prototype=new b;y.constructor=v,r(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},i=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,r)&&!E.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:a,type:e,key:i,ref:l,props:o,_owner:w.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var C=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function _(e,t,n,r,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case a:case o:s=!0}}if(s)return i=i(s=e),e=""===r?"."+T(s,0):r,Array.isArray(i)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),_(i,t,n,"",(function(e){return e}))):null!=i&&(x(i)&&(i=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(C,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=r+T(l=e[u],u);s+=_(l,t,n,c,i)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)s+=_(l=l.value,t,n,c=r+T(l,u++),i);else if("object"===l)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function A(e,t,n){if(null==e)return e;var r=[],a=0;return _(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var R={current:null};function N(){var e=R.current;if(null===e)throw Error(p(321));return e}var O={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error(p(143));return e}},t.Component=g,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var o=r({},e.props),i=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=w.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)k.call(t,c)&&!E.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:a,type:e.type,key:i,ref:l,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="17.0.2"},9231:(e,t,n)=>{"use strict";e.exports=n(8618)},5726:(e,t)=>{"use strict";var n,r,a,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(d,0),n}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(d,0))},r=function(e,t){c=setTimeout(e,t)},a=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var h=!1,g=null,b=-1,v=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();y=e+v;try{g(!0,e)?k.postMessage(null):(h=!1,g=null)}catch(n){throw k.postMessage(null),n}}else h=!1},n=function(e){g=e,h||(h=!0,k.postMessage(null))},r=function(e,n){b=f((function(){e(t.unstable_now())}),n)},a=function(){p(b),b=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<C(a,t)))break e;e[r]=t,e[n]=a,n=r}}function S(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var o=2*(r+1)-1,i=e[o],l=o+1,s=e[l];if(void 0!==i&&0>C(i,n))void 0!==s&&0>C(s,i)?(e[r]=s,e[l]=n,r=l):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==s&&0>C(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],_=[],A=1,L=null,R=3,N=!1,O=!1,P=!1;function I(e){for(var t=S(_);null!==t;){if(null===t.callback)x(_);else{if(!(t.startTime<=e))break;x(_),t.sortIndex=t.expirationTime,E(T,t)}t=S(_)}}function D(e){if(P=!1,I(e),!O)if(null!==S(T))O=!0,n(M);else{var t=S(_);null!==t&&r(D,t.startTime-e)}}function M(e,n){O=!1,P&&(P=!1,a()),N=!0;var o=R;try{for(I(n),L=S(T);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var i=L.callback;if("function"==typeof i){L.callback=null,R=L.priorityLevel;var l=i(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?L.callback=l:L===S(T)&&x(T),I(n)}else x(T);L=S(T)}if(null!==L)var s=!0;else{var u=S(_);null!==u&&r(D,u.startTime-n),s=!1}return s}finally{L=null,R=o,N=!1}}var F=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){O||N||(O=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return S(T)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,o,i){var l=t.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?l+i:l:i=l,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:A++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>l?(e.sortIndex=i,E(_,e),null===S(T)&&e===S(_)&&(P?a():P=!0,r(D,i-l))):(e.sortIndex=s,E(T,e),O||N||(O=!0,n(M))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},1851:(e,t,n)=>{"use strict";e.exports=n(5726)},5218:e=>{e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<o.length;s++){var u=o[s];if(!l(u))return!1;var c=e[u],d=t[u];if(!1===(a=n?n.call(r,c,d,u):void 0)||void 0===a&&c!==d)return!1}return!0}},3704:(e,t,n)=>{"use strict";var r=n(9231);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,i=r.useEffect,l=r.useLayoutEffect,s=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(e,n)}catch(r){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),a=r[0].inst,c=r[1];return l((function(){a.value=n,a.getSnapshot=t,u(a)&&c({inst:a})}),[e,n,t]),i((function(){return u(a)&&c({inst:a}),e((function(){u(a)&&c({inst:a})}))}),[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},4001:(e,t,n)=>{"use strict";e.exports=n(3704)},4011:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},8829:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>a})},4126:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{Z:()=>r})},6381:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=!0,a="Invariant failed";function o(e,t){if(!e){if(r)throw new Error(a);var n="function"==typeof t?t():t,o=n?"".concat(a,": ").concat(n):a;throw new Error(o)}}},6809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"effector patronum",tagline:"Operators library delivering modularity and convenience.",url:"https://patronum.effector.dev",baseUrl:"/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.ico",organizationName:"effector",projectName:"patronum",i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"../src/",routeBasePath:"/methods",sidebarPath:"/home/runner/work/patronum/patronum/website/sidebars.js",breadcrumbs:!0,editUrl:"https://github.com/effector/patronum/tree/main/src/"},pages:{},blog:!1,theme:{customCss:"/home/runner/work/patronum/patronum/website/src/main.css"}}]],plugins:[null],themeConfig:{navbar:{title:"effector patronum \u2728",logo:{alt:"effector patronum",src:"img/comet.png"},items:[{to:"docs/installation",position:"left",label:"Installation"},{type:"doc",docId:"methods",position:"left",label:"Methods"},{href:"https://share.effector.dev/YC6TiqYW",label:"Try",position:"left"},{href:"https://github.com/effector/patronum",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Docs",items:[{label:"Installation",to:"/docs/installation"},{label:"Migration guide",to:"/docs/migration-guide"}]},{title:"Community",items:[{label:"Telegram",href:"https://t.me/effector_ru"},{label:"Telegram EN",href:"https://t.me/effector_en"},{label:"Twitter",href:"https://twitter.com/effectorjs"}]},{title:"More",items:[{label:"Dev.to",to:"https://dev.to/effector"},{label:"GitHub",href:"https://github.com/effector"}]}],copyright:"Copyright \xa9 2020-2023 Effector Core Team"},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},algolia:{appId:"OEOSWK083U",apiKey:"d14c8069434613d33755df5cd29c3ded",indexName:"crawler_Patronum",contextualSearch:!0,searchPagePath:"search",searchParameters:{}},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},themes:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1,markdown:{mermaid:!1}}},7529:e=>{"use strict";e.exports={}},6887:e=>{"use strict";e.exports=JSON.parse('{"/docs/installation-b6a":{"__comp":"1f391b9e","__context":{"plugin":"48e94e84"},"content":"a9298e25"},"/docs/migration-guide-f5d":{"__comp":"1f391b9e","__context":{"plugin":"48e94e84"},"content":"a765e1a2"},"/search-f2b":{"__comp":"1a4e3797","__context":{"plugin":"978828ab"}},"/methods-e3e":{"__comp":"1be78505","__context":{"plugin":"8d0041db"},"versionMetadata":"935f2afb"},"/methods/-0f3":{"__comp":"17896441","content":"97ffe59f"},"/methods/and/-663":{"__comp":"17896441","content":"4af54caf"},"/methods/combine-events/-d44":{"__comp":"17896441","content":"e9221267"},"/methods/condition/-f76":{"__comp":"17896441","content":"5b0e0e08"},"/methods/debounce/-69f":{"__comp":"17896441","content":"deda2cf3"},"/methods/debug/-0bc":{"__comp":"17896441","content":"67c026b6"},"/methods/delay/-131":{"__comp":"17896441","content":"ad512b16"},"/methods/either/-57a":{"__comp":"17896441","content":"f304a758"},"/methods/empty/-6ca":{"__comp":"17896441","content":"b41febc4"},"/methods/equals/-bf2":{"__comp":"17896441","content":"1ae5d93b"},"/methods/every/-23e":{"__comp":"17896441","content":"08f30e7d"},"/methods/format/-f2f":{"__comp":"17896441","content":"c9ae8b2d"},"/methods/in-flight/-52f":{"__comp":"17896441","content":"e09d216d"},"/methods/interval/-132":{"__comp":"17896441","content":"6256d5c3"},"/methods/not/-07f":{"__comp":"17896441","content":"308aca62"},"/methods/once/-523":{"__comp":"17896441","content":"8d76850e"},"/methods/or/-fa6":{"__comp":"17896441","content":"e55f1e0e"},"/methods/pending/-0c7":{"__comp":"17896441","content":"84071e39"},"/methods/previous/-4e1":{"__comp":"17896441","content":"7921cf10"},"/methods/reset/-f60":{"__comp":"17896441","content":"c7a80478"},"/methods/reshape/-34d":{"__comp":"17896441","content":"4d9d995f"},"/methods/snapshot/-b6f":{"__comp":"17896441","content":"2b95ca9d"},"/methods/some/-74c":{"__comp":"17896441","content":"33c22581"},"/methods/split-map/-989":{"__comp":"17896441","content":"9dc53199"},"/methods/spread/-a78":{"__comp":"17896441","content":"1178bc06"},"/methods/status/-ca9":{"__comp":"17896441","content":"f6536843"},"/methods/throttle/-2e3":{"__comp":"17896441","content":"08154ee9"},"/methods/time/-7fc":{"__comp":"17896441","content":"a7fdbc71"},"/-712":{"__comp":"1df93b7f","__context":{"plugin":"48e94e84"},"config":"5e9f5e1a"}}')}},e=>{e.O(0,[532],(()=>{return t=3004,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.535b577d.js.LICENSE.txt b/assets/js/main.849a2d8c.js.LICENSE.txt similarity index 83% rename from assets/js/main.535b577d.js.LICENSE.txt rename to assets/js/main.849a2d8c.js.LICENSE.txt index 6e08db29..eb75d691 100644 --- a/assets/js/main.535b577d.js.LICENSE.txt +++ b/assets/js/main.849a2d8c.js.LICENSE.txt @@ -7,6 +7,16 @@ object-assign /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */ +/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + /** * Prism: Lightweight, robust, elegant syntax highlighting * diff --git a/assets/js/runtime~main.c0401702.js b/assets/js/runtime~main.c0401702.js deleted file mode 100644 index 94094c7d..00000000 --- a/assets/js/runtime~main.c0401702.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,t,r,a,f,d={},o={};function c(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=d,c.c=o,e=[],c.O=(t,r,a,f)=>{if(!r){var d=1/0;for(i=0;i<e.length;i++){r=e[i][0],a=e[i][1],f=e[i][2];for(var o=!0,b=0;b<r.length;b++)(!1&f||d>=f)&&Object.keys(c.O).every((e=>c.O[e](r[b])))?r.splice(b--,1):(o=!1,f<d&&(d=f));if(o){e.splice(i--,1);var n=a();void 0!==n&&(t=n)}}return t}f=f||0;for(var i=e.length;i>0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[r,a,f]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var f=Object.create(null);c.r(f);var d={};t=t||[null,r({}),r([]),r(r)];for(var o=2&a&&e;"object"==typeof o&&!~t.indexOf(o);o=r(o))Object.getOwnPropertyNames(o).forEach((t=>d[t]=()=>e[t]));return d.default=()=>e,c.d(f,d),f},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({34:"5b0e0e08",35:"b41febc4",53:"935f2afb",84:"9dc53199",85:"1f391b9e",151:"6256d5c3",153:"97ffe59f",169:"c7a80478",172:"978828ab",222:"08f30e7d",231:"84071e39",236:"e09d216d",237:"1df93b7f",299:"33c22581",485:"ad512b16",493:"deda2cf3",502:"1178bc06",514:"1be78505",549:"f304a758",585:"a9298e25",609:"8d76850e",613:"f6536843",687:"308aca62",732:"a7fdbc71",774:"4af54caf",777:"48e94e84",778:"e55f1e0e",817:"2b95ca9d",825:"a765e1a2",873:"67c026b6",876:"4d9d995f",885:"8d0041db",896:"08154ee9",900:"1ae5d93b",916:"e9221267",918:"17896441",920:"1a4e3797",945:"c9ae8b2d"}[e]||e)+"."+{34:"ffc5f899",35:"c1f4a408",53:"bcb89381",84:"034d793b",85:"d7a93e55",93:"a2b79ba7",151:"8607788e",153:"e6e36e03",169:"c92878af",172:"e1fb4f64",183:"fbf1cbae",222:"b55ffd9c",231:"c7a34779",236:"1cad6e0f",237:"37dfdc4a",299:"0eb23410",391:"9664fa7c",485:"823efa27",493:"7cf3a9b3",502:"2ff96855",514:"a3fef0ca",549:"6729241d",585:"d4bdbfaa",609:"ac0fc698",613:"7e6a94bf",687:"59e32b7c",732:"624c5cce",774:"ceab87e8",777:"57154658",778:"0eeec080",803:"7f7c270e",817:"9f76bd77",825:"4454540d",873:"3a469de0",874:"519a8f23",876:"4ead4532",885:"2d0bbcd6",896:"20f2322d",900:"cbd18f44",916:"5d0d64ec",918:"091b0213",920:"bbf5a46b",945:"e7ae4f05"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},f="website:",c.l=(e,t,r,d)=>{if(a[e])a[e].push(t);else{var o,b;if(void 0!==r)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var u=n[i];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==f+r){o=u;break}}o||(b=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,c.nc&&o.setAttribute("nonce",c.nc),o.setAttribute("data-webpack",f+r),o.src=e),a[e]=[t];var l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(s);var f=a[e];if(delete a[e],o.parentNode&&o.parentNode.removeChild(o),f&&f.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),b&&document.head.appendChild(o)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/",c.gca=function(e){return e={17896441:"918","5b0e0e08":"34",b41febc4:"35","935f2afb":"53","9dc53199":"84","1f391b9e":"85","6256d5c3":"151","97ffe59f":"153",c7a80478:"169","978828ab":"172","08f30e7d":"222","84071e39":"231",e09d216d:"236","1df93b7f":"237","33c22581":"299",ad512b16:"485",deda2cf3:"493","1178bc06":"502","1be78505":"514",f304a758:"549",a9298e25:"585","8d76850e":"609",f6536843:"613","308aca62":"687",a7fdbc71:"732","4af54caf":"774","48e94e84":"777",e55f1e0e:"778","2b95ca9d":"817",a765e1a2:"825","67c026b6":"873","4d9d995f":"876","8d0041db":"885","08154ee9":"896","1ae5d93b":"900",e9221267:"916","1a4e3797":"920",c9ae8b2d:"945"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var f=new Promise(((r,f)=>a=e[t]=[r,f]));r.push(a[2]=f);var d=c.p+c.u(t),o=new Error;c.l(d,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var f=r&&("load"===r.type?"missing":r.type),d=r&&r.target&&r.target.src;o.message="Loading chunk "+t+" failed.\n("+f+": "+d+")",o.name="ChunkLoadError",o.type=f,o.request=d,a[1](o)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,f,d=r[0],o=r[1],b=r[2],n=0;if(d.some((t=>0!==e[t]))){for(a in o)c.o(o,a)&&(c.m[a]=o[a]);if(b)var i=b(c)}for(t&&t(r);n<d.length;n++)f=d[n],c.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return c.O(i)},r=self.webpackChunkwebsite=self.webpackChunkwebsite||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})()})(); \ No newline at end of file diff --git a/assets/js/runtime~main.c83f3d46.js b/assets/js/runtime~main.c83f3d46.js new file mode 100644 index 00000000..63a02852 --- /dev/null +++ b/assets/js/runtime~main.c83f3d46.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,t,a,r,d,f={},o={};function c(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={id:e,loaded:!1,exports:{}};return f[e].call(a.exports,a,a.exports,c),a.loaded=!0,a.exports}c.m=f,c.c=o,e=[],c.O=(t,a,r,d)=>{if(!a){var f=1/0;for(i=0;i<e.length;i++){a=e[i][0],r=e[i][1],d=e[i][2];for(var o=!0,n=0;n<a.length;n++)(!1&d||f>=d)&&Object.keys(c.O).every((e=>c.O[e](a[n])))?a.splice(n--,1):(o=!1,d<f&&(f=d));if(o){e.splice(i--,1);var b=r();void 0!==b&&(t=b)}}return t}d=d||0;for(var i=e.length;i>0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[a,r,d]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var d=Object.create(null);c.r(d);var f={};t=t||[null,a({}),a([]),a(a)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=a(o))Object.getOwnPropertyNames(o).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,c.d(d,f),d},c.d=(e,t)=>{for(var a in t)c.o(t,a)&&!c.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,a)=>(c.f[a](e,t),t)),[])),c.u=e=>"assets/js/"+({34:"5b0e0e08",35:"b41febc4",53:"935f2afb",84:"9dc53199",85:"1f391b9e",151:"6256d5c3",153:"97ffe59f",169:"c7a80478",172:"978828ab",222:"08f30e7d",231:"84071e39",236:"e09d216d",237:"1df93b7f",299:"33c22581",485:"ad512b16",493:"deda2cf3",502:"1178bc06",514:"1be78505",549:"f304a758",585:"a9298e25",609:"8d76850e",613:"f6536843",662:"7921cf10",687:"308aca62",732:"a7fdbc71",774:"4af54caf",777:"48e94e84",778:"e55f1e0e",817:"2b95ca9d",825:"a765e1a2",873:"67c026b6",876:"4d9d995f",885:"8d0041db",896:"08154ee9",900:"1ae5d93b",916:"e9221267",918:"17896441",920:"1a4e3797",945:"c9ae8b2d"}[e]||e)+"."+{34:"975d4ae9",35:"fb3c65a7",53:"95e49b9c",84:"13b40e3c",85:"48bd894a",151:"49478c67",153:"983e3cb0",169:"e20ccc9f",172:"1ad8f25b",222:"ad0ac244",231:"321abdbd",236:"5c109b9d",237:"52a1d67f",299:"de5322e1",485:"2de7ded0",493:"6f2a713d",502:"b61c1d3d",514:"51b45561",530:"f5cc4ef9",549:"756c8e8b",585:"a535df35",609:"662cf357",613:"20f6a121",638:"b54116d7",654:"d636b64d",662:"f96dc439",687:"b045aa80",732:"8c5cb0f4",774:"0b1ea9c3",777:"57154658",778:"1e3aaf8e",817:"d3b76552",825:"b6852205",873:"8e6669d1",876:"aa00eebb",885:"2d0bbcd6",896:"011f7e3f",900:"85fac64d",901:"5fd7132c",916:"8faa3552",918:"98c8b99a",920:"67205d40",945:"e7e15d92",967:"d43ac743"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},d="website:",c.l=(e,t,a,f)=>{if(r[e])r[e].push(t);else{var o,n;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i<b.length;i++){var u=b[i];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==d+a){o=u;break}}o||(n=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,c.nc&&o.setAttribute("nonce",c.nc),o.setAttribute("data-webpack",d+a),o.src=e),r[e]=[t];var l=(t,a)=>{o.onerror=o.onload=null,clearTimeout(s);var d=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),d&&d.forEach((e=>e(a))),t)return t(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),n&&document.head.appendChild(o)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/",c.gca=function(e){return e={17896441:"918","5b0e0e08":"34",b41febc4:"35","935f2afb":"53","9dc53199":"84","1f391b9e":"85","6256d5c3":"151","97ffe59f":"153",c7a80478:"169","978828ab":"172","08f30e7d":"222","84071e39":"231",e09d216d:"236","1df93b7f":"237","33c22581":"299",ad512b16:"485",deda2cf3:"493","1178bc06":"502","1be78505":"514",f304a758:"549",a9298e25:"585","8d76850e":"609",f6536843:"613","7921cf10":"662","308aca62":"687",a7fdbc71:"732","4af54caf":"774","48e94e84":"777",e55f1e0e:"778","2b95ca9d":"817",a765e1a2:"825","67c026b6":"873","4d9d995f":"876","8d0041db":"885","08154ee9":"896","1ae5d93b":"900",e9221267:"916","1a4e3797":"920",c9ae8b2d:"945"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,a)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var d=new Promise(((a,d)=>r=e[t]=[a,d]));a.push(r[2]=d);var f=c.p+c.u(t),o=new Error;c.l(f,(a=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var d=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;o.message="Loading chunk "+t+" failed.\n("+d+": "+f+")",o.name="ChunkLoadError",o.type=d,o.request=f,r[1](o)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,a)=>{var r,d,f=a[0],o=a[1],n=a[2],b=0;if(f.some((t=>0!==e[t]))){for(r in o)c.o(o,r)&&(c.m[r]=o[r]);if(n)var i=n(c)}for(t&&t(a);b<f.length;b++)d=f[b],c.o(e,d)&&e[d]&&e[d][0](),e[d]=0;return c.O(i)},a=self.webpackChunkwebsite=self.webpackChunkwebsite||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})()})(); \ No newline at end of file diff --git a/docs/installation/index.html b/docs/installation/index.html index 746ec9c0..2e5eca31 100644 --- a/docs/installation/index.html +++ b/docs/installation/index.html @@ -1,16 +1,16 @@ <!doctype html> -<html lang="en" dir="ltr" class="mdx-wrapper mdx-page plugin-pages plugin-id-default"> +<html lang="en" dir="ltr" class="mdx-wrapper mdx-page plugin-pages plugin-id-default" data-has-hydrated="false"> <head> <meta charset="UTF-8"> -<meta name="generator" content="Docusaurus v2.1.0"> -<title data-rh="true">Installation | effector patronum - - + +Installation | effector patronum + + -
-

Installation

yarn add patronum
# or
npm add patronum
# or
pnpm add patronum

Usage

Just import method from the root module:

import { throttle, splitMap } from 'patronum';

Or from the personal module:

import { throttle } from 'patronum/throttle';
import { splitMap } from 'patronum/split-map';

Except patronum/debug. It is only available by personal module import.

Be careful in the module naming:

  • Method export always exports as named export in camelCase
  • Module with the operator always named in param-case

Tests and SSR support

At the moment patronum supports only Babel.

Just add patronum/babel-preset to your .babelrc or babel.config.js at the "presets" section:

{
"presets": ["patronum/babel-preset"]
}

Logger and CRA support with macros

babel-plugin-macros is bundled into CRA, so we can use it due CRA don't support adding babel plugins into .babelrc or babel.config.js.

Just import from patronum/macro and effector-logger/macro, and use as early:

import { createStore, createEffect, sample } from 'effector-logger/macro';
import { status, splitMap, combineEvents } from 'patronum/macro';
  • Warning: babel-plugin-macros do not support import * as name!
  • Note: Since release of patronum v2.0.0 it is required to use babel-plugin-macros v3.0.0 or higher.
  • Please note, that react-scripts v4.0.3 and older uses outdated version of this plugin - you can either use yarn resolutions or use react-scripts v5.0.0 or higher.
- - +
+

Installation

yarn add patronum
# or
npm add patronum
# or
pnpm add patronum

Usage

Just import method from the root module:

import { throttle, splitMap } from 'patronum';

Or from the personal module:

import { throttle } from 'patronum/throttle';
import { splitMap } from 'patronum/split-map';

Except patronum/debug. It is only available by personal module import.

Be careful in the module naming:

  • Method export always exports as named export in camelCase
  • Module with the operator always named in param-case

Tests and SSR support

At the moment patronum supports only Babel.

Just add patronum/babel-preset to your .babelrc or babel.config.js at the "presets" section:

{
"presets": ["patronum/babel-preset"]
}

Logger and CRA support with macros

babel-plugin-macros is bundled into CRA, so we can use it due CRA don't support adding babel plugins into .babelrc or babel.config.js.

Just import from patronum/macro and effector-logger/macro, and use as early:

import { createStore, createEffect, sample } from 'effector-logger/macro';
import { status, splitMap, combineEvents } from 'patronum/macro';
  • Warning: babel-plugin-macros do not support import * as name!
  • Note: Since release of patronum v2.0.0 it is required to use babel-plugin-macros v3.0.0 or higher.
  • Please note, that react-scripts v4.0.3 and older uses outdated version of this plugin - you can either use yarn resolutions or use react-scripts v5.0.0 or higher.
+ + \ No newline at end of file diff --git a/docs/migration-guide/index.html b/docs/migration-guide/index.html index 65eade15..1fd2455e 100644 --- a/docs/migration-guide/index.html +++ b/docs/migration-guide/index.html @@ -1,17 +1,17 @@ - + - -Migration guide | effector patronum - - + +Migration guide | effector patronum + + -
-

Migration guide

v1.0.0

Removed support of effector v21. Now the minimum supported version is v22.1.2. -No breaking changes in code.

v0.110

From v0.110.0 patronum removed support of effector v20. Now minimum supported version is v21.4.

Please, before upgrade review release notes of effector v21.

v0.100

From v0.100.0 patronum introduced object arguments form with BREAKING CHANGES.

npm install patronum@0.14.3
# or
yarn add patronum@0.14.3
throttle
import { throttle } from 'patronum/throttle';

Previous version v0.14.x

const throttled = throttle(source, timeout);

Current version v0.102.x

const throttled = throttle({ source, timeout });

// Also you can set target
const throttled2 = createEvent(); // or any unit
throttle({ source, timeout, target: throttled2 });
  • Wrap source and timeout arguments to object
  • Optionally add target parameter

https://github.com/sergeysova/patronum/pull/31

debounce
import { debounce } from 'patronum/debounce';

Previous version v0.14.x

const debounced = debounce(source, timeout);

Current version v0.102.x

const debounced = debounce({ source, timeout });

// Also you can set target
const debounced = createEvent(); // or any unit
debounce({ source, timeout, target: debounced });
  • Wrap source and timeout arguments to object
  • Optionally add target parameter

https://github.com/sergeysova/patronum/pull/38

splitMap
import { splitMap } from 'patronum/split-map';

Previous version v0.14.x

const received = splitMap(nameReceived, {
firstName: (string) => string.split(' ')[0], // string | undefined
lastName: (string) => string.split(' ')[1], // string | undefined
});

Current version v0.102.x

const received = splitMap({
source: nameReceived,
cases: {
firstName: (string) => string.split(' ')[0], // string | undefined
lastName: (string) => string.split(' ')[1], // string | undefined
},
});
  • First argument should be source
  • Second argument should be cases

https://github.com/sergeysova/patronum/pull/41

some
import { some } from 'patronum/some';

Previous version v0.14.x

const $tooBig = some((size) => size > 800, [$width, $height]);

Current version v0.102.x

const $tooBig = some({
predicate: (size) => size > 800,
stores: [$width, $height],
});
  • First argument should be predicate
  • Second argument should be stores

https://github.com/sergeysova/patronum/pull/43

every
import { every } from 'patronum/every';

Previous version v0.14.x

const $result = every(true, [$a, $b, $c]);
const $result = every(() => true, [$a, $b, $c]);

Current version v0.102.x

const $result = every({ predicate: true, stores: [$a, $b, $c] });
const $result = every({ predicate: () => true, stores: [$a, $b, $c] });
  • First argument should be predicate
  • Second argument should be stores

https://github.com/sergeysova/patronum/pull/50

delay
import { delay } from 'patronum/delay';

Previous version v0.14.x

const delayed = delay(unit, 100);
const logDelayed = delay(unit, { time: (payload) => 100 });

Current version v0.102.x

const delayed = delay({
source: unit,
timeout: 100,
});

const delayed = delay({
source: unit,
timeout: (payload) => 100,
});

const delayed = delay({
source: unit,
timeout: $timeout,
});
  • First argument should be source
  • Second argument should be timeout
  • time property from second argument should be timeout
  • timeout can be Store<number>

https://github.com/sergeysova/patronum/pull/51

status
import { status } from 'patronum/status';

Previous version v0.14.x

const $status = status(effect, 'initial');

Current version v0.102.x

const $status = status({ effect, defaultValue: 'initial' });
  • First argument should be effect in object
  • Second argument should be defaultValue and can be optional

https://github.com/sergeysova/patronum/pull/55

reshape
import { reshape } from 'patronum/reshape';

Previous version v0.14.x

const parts = reshape($original, {
length: (string) => string.length,
first: (string) => string.split(' ')[0] || '',
second: (string) => string.split(' ')[1] || '',
});

Current version v0.102.x

const parts = reshape({
source: $original,
shape: {
length: (string) => string.length,
first: (string) => string.split(' ')[0] || '',
second: (string) => string.split(' ')[1] || '',
},
});
  • First argument should be source
  • Second argument should be shape

https://github.com/sergeysova/patronum/pull/57

combineEvents
import { combineEvents } from 'patronum/combine-events';

Previous version v0.14.x

const target = combineEvents([first, second, third]);
const target = combineEvents({
key1: event1,
key2: event2,
});

Current version v0.102.x

const target = combineEvents({ events: [first, second, third] });
const target = combineEvents({
events: {
key1: event1,
key2: event2,
},
});
  • Assign first argument to property events in object

https://github.com/sergeysova/patronum/pull/58

spread
import { spread } from 'patronum/spread';

Previous version v0.14.x

spread(formReceived, {
first: $first,
last: $last,
});

const source = spread({
first: $first,
last: $last,
});

Current version v0.102.x

spread({
source: formReceived,
targets: {
first: $first,
last: $last,
},
});

const source = spread({
targets: {
first: $first,
last: $last,
},
});
  1. If you have two arguments:
  • First argument should be source in object
  • Second argument should be targets
  1. If only one argument:
  • Wrap it to object and assign to targets

https://github.com/sergeysova/patronum/pull/61

- - +
+

Migration guide

v1.0.0

Removed support of effector v21. Now the minimum supported version is v22.1.2. +No breaking changes in code.

v0.110

From v0.110.0 patronum removed support of effector v20. Now minimum supported version is v21.4.

Please, before upgrade review release notes of effector v21.

v0.100

From v0.100.0 patronum introduced object arguments form with BREAKING CHANGES.

npm install patronum@0.14.3
# or
yarn add patronum@0.14.3
throttle
import { throttle } from 'patronum/throttle';

Previous version v0.14.x

const throttled = throttle(source, timeout);

Current version v0.102.x

const throttled = throttle({ source, timeout });

// Also you can set target
const throttled2 = createEvent(); // or any unit
throttle({ source, timeout, target: throttled2 });
  • Wrap source and timeout arguments to object
  • Optionally add target parameter

https://github.com/sergeysova/patronum/pull/31

debounce
import { debounce } from 'patronum/debounce';

Previous version v0.14.x

const debounced = debounce(source, timeout);

Current version v0.102.x

const debounced = debounce({ source, timeout });

// Also you can set target
const debounced = createEvent(); // or any unit
debounce({ source, timeout, target: debounced });
  • Wrap source and timeout arguments to object
  • Optionally add target parameter

https://github.com/sergeysova/patronum/pull/38

splitMap
import { splitMap } from 'patronum/split-map';

Previous version v0.14.x

const received = splitMap(nameReceived, {
firstName: (string) => string.split(' ')[0], // string | undefined
lastName: (string) => string.split(' ')[1], // string | undefined
});

Current version v0.102.x

const received = splitMap({
source: nameReceived,
cases: {
firstName: (string) => string.split(' ')[0], // string | undefined
lastName: (string) => string.split(' ')[1], // string | undefined
},
});
  • First argument should be source
  • Second argument should be cases

https://github.com/sergeysova/patronum/pull/41

some
import { some } from 'patronum/some';

Previous version v0.14.x

const $tooBig = some((size) => size > 800, [$width, $height]);

Current version v0.102.x

const $tooBig = some({
predicate: (size) => size > 800,
stores: [$width, $height],
});
  • First argument should be predicate
  • Second argument should be stores

https://github.com/sergeysova/patronum/pull/43

every
import { every } from 'patronum/every';

Previous version v0.14.x

const $result = every(true, [$a, $b, $c]);
const $result = every(() => true, [$a, $b, $c]);

Current version v0.102.x

const $result = every({ predicate: true, stores: [$a, $b, $c] });
const $result = every({ predicate: () => true, stores: [$a, $b, $c] });
  • First argument should be predicate
  • Second argument should be stores

https://github.com/sergeysova/patronum/pull/50

delay
import { delay } from 'patronum/delay';

Previous version v0.14.x

const delayed = delay(unit, 100);
const logDelayed = delay(unit, { time: (payload) => 100 });

Current version v0.102.x

const delayed = delay({
source: unit,
timeout: 100,
});

const delayed = delay({
source: unit,
timeout: (payload) => 100,
});

const delayed = delay({
source: unit,
timeout: $timeout,
});
  • First argument should be source
  • Second argument should be timeout
  • time property from second argument should be timeout
  • timeout can be Store<number>

https://github.com/sergeysova/patronum/pull/51

status
import { status } from 'patronum/status';

Previous version v0.14.x

const $status = status(effect, 'initial');

Current version v0.102.x

const $status = status({ effect, defaultValue: 'initial' });
  • First argument should be effect in object
  • Second argument should be defaultValue and can be optional

https://github.com/sergeysova/patronum/pull/55

reshape
import { reshape } from 'patronum/reshape';

Previous version v0.14.x

const parts = reshape($original, {
length: (string) => string.length,
first: (string) => string.split(' ')[0] || '',
second: (string) => string.split(' ')[1] || '',
});

Current version v0.102.x

const parts = reshape({
source: $original,
shape: {
length: (string) => string.length,
first: (string) => string.split(' ')[0] || '',
second: (string) => string.split(' ')[1] || '',
},
});
  • First argument should be source
  • Second argument should be shape

https://github.com/sergeysova/patronum/pull/57

combineEvents
import { combineEvents } from 'patronum/combine-events';

Previous version v0.14.x

const target = combineEvents([first, second, third]);
const target = combineEvents({
key1: event1,
key2: event2,
});

Current version v0.102.x

const target = combineEvents({ events: [first, second, third] });
const target = combineEvents({
events: {
key1: event1,
key2: event2,
},
});
  • Assign first argument to property events in object

https://github.com/sergeysova/patronum/pull/58

spread
import { spread } from 'patronum/spread';

Previous version v0.14.x

spread(formReceived, {
first: $first,
last: $last,
});

const source = spread({
first: $first,
last: $last,
});

Current version v0.102.x

spread({
source: formReceived,
targets: {
first: $first,
last: $last,
},
});

const source = spread({
targets: {
first: $first,
last: $last,
},
});
  1. If you have two arguments:
  • First argument should be source in object
  • Second argument should be targets
  1. If only one argument:
  • Wrap it to object and assign to targets

https://github.com/sergeysova/patronum/pull/61

+ + \ No newline at end of file diff --git a/index.html b/index.html index a503849b..5647c918 100644 --- a/index.html +++ b/index.html @@ -1,16 +1,16 @@ - + - -Welcome | effector patronum - - + +Welcome | effector patronum + + - - - + + + \ No newline at end of file diff --git a/methods/and/index.html b/methods/and/index.html index 89be4ba9..9300a04a 100644 --- a/methods/and/index.html +++ b/methods/and/index.html @@ -1,17 +1,17 @@ - + - -and | effector patronum - - + +and | effector patronum + + -
-

and

since

patronum 1.11.0

import { and } from 'patronum';
// or
import { and } from 'patronum/and';

Motivation

The method allows to check each passed store for thruthy values. -It can be compared with if (a && b && c && d).

Formulae

$result = and(...stores);
  • $result store contains true if each passed store contains "truthy" values.

Arguments

The method receives any amount of arguments.

  • ...stores: Array<Store<T>> — Each argument must be store with a value of any kind.

Returns

  • $result: Store<boolean> — The store contains false if at least one passed store in stores contains "falsey" value

Example

const $isAuthorized = createStore(true);
const $isAdmin = createStore(false);
const $orderFinished = createStore(true);

const $showCancelButton = and($isAuthorized, $isAdmin, $orderFinished);
console.assert(false === $showCancelButton.getState());

Try it

Composition

const $showRegisterLink = and(
not($isAuthorized),
or($isRegisterInProcess, $isEmailRecovering),
);

Alternative

const $showRegisterLink = combine(
$isAuthorized,
$isRegisterInProcess,
$isEmailRecovering,
(isAuthorized, isRegisterInProcess, isEmailRecovering) => {
return !isAuthorized && (isRegisterInProcess || isEmailRecovering);
}
);
console.assert(false === $showRegisterLink.getState());
- - +
+

and

since

patronum 1.11.0

import { and } from 'patronum';
// or
import { and } from 'patronum/and';

Motivation

The method allows to check each passed store for thruthy values. +It can be compared with if (a && b && c && d).

Formulae

$result = and(...stores);
  • $result store contains true if each passed store contains "truthy" values.

Arguments

The method receives any amount of arguments.

  • ...stores: Array<Store<T>> — Each argument must be store with a value of any kind.

Returns

  • $result: Store<boolean> — The store contains false if at least one passed store in stores contains "falsey" value

Example

const $isAuthorized = createStore(true);
const $isAdmin = createStore(false);
const $orderFinished = createStore(true);

const $showCancelButton = and($isAuthorized, $isAdmin, $orderFinished);
console.assert(false === $showCancelButton.getState());

Try it

Composition

const $showRegisterLink = and(
not($isAuthorized),
or($isRegisterInProcess, $isEmailRecovering),
);

Alternative

const $showRegisterLink = combine(
$isAuthorized,
$isRegisterInProcess,
$isEmailRecovering,
(isAuthorized, isRegisterInProcess, isEmailRecovering) => {
return !isAuthorized && (isRegisterInProcess || isEmailRecovering);
}
);
console.assert(false === $showRegisterLink.getState());
+ + \ No newline at end of file diff --git a/methods/combine-events/index.html b/methods/combine-events/index.html index 143117b0..c3a3d83c 100644 --- a/methods/combine-events/index.html +++ b/methods/combine-events/index.html @@ -1,16 +1,17 @@ - + - -combineEvents | effector patronum - - + +combineEvents | effector patronum + + -
-

combineEvents

import { combineEvents } from 'patronum';
// or
import { combineEvents } from 'patronum/combine-events';

combineEvents({ events: Record<key, Event<T>>, reset?: Unit<any> })

Formulae

const target = combineEvents({
events: {
key1: event1,
key2: event2,
},
});
  • When all events (event1 and event2 from example) is triggered, trigger target with data from events mapped to key1 and key2

Arguments

  1. events — Object of events

Returns

  • target — Event with the same shape as events, that triggered after all events triggered

Example

const first = createEvent<number>();
const second = createEvent<string>();
const third = createEvent<boolean>();

const target = combineEvents({
events: {
a: first,
second,
another: third,
},
});

target.watch((object) => {
console.log('first event data', object.a);
console.log('second event data', object.second);
console.log('third event data', object.another);
});

first(15); // nothing
second('wow'); // nothing
third(false); // target triggered with object

combineEvents({ events: Array<Event<T>> })

Formulae

const target = combineEvents({ events: [event1, event2] });
  • When all events (event1 and event2 from example) is triggered, trigger target with array from events with the same order as events

Example

const first = createEvent<number>();
const second = createEvent<string>();
const third = createEvent<boolean>();

const target = combineEvents({ events: [first, second, third] });

target.watch((list) => {
console.log('first event data', list[0]);
console.log('second event data', list[1]);
console.log('third event data', list[2]);
});

first(15); // nothing
second('wow'); // nothing
third(false); // target triggered with array
- - +
+

combineEvents

import { combineEvents } from 'patronum';
// or
import { combineEvents } from 'patronum/combine-events';

combineEvents(events)

since

patronum 2.1.0 +Use combineEvents({ events }) with patronum < 2.1.0

Motivation

Method allows to trigger event when all of given events are triggered, with payloads ov given events

note

Consider using stores with combine in case of lazy-loaded modules, as they could miss some updates happened before module loaded

Formulae

const target = combineEvents({ key1: event1, key2: event2 });
  • When all events are triggered, trigger target with {key1: firstPayload, key2: secondPayload}
const target = combineEvents([event1, event2]);
  • When all events are triggered, trigger target with [firstPayload, secondPayload]

Arguments

  1. events — Object or array with events

Returns

  • target — Event with the same shape as events, that triggered after all events triggered

combineEvents({ events, reset, target })

Motivation

Object form which allow to pass reset unit or target

Formulae

const target = combineEvents({
events: {
key1: event1,
key2: event2,
},
reset: resetUnit,
target: targetUnit,
});
  • When all events are triggered, trigger target with {key1: firstPayload, key2: secondPayload}
const target = combineEvents({
events: [event1, event2],
reset: resetUnit,
target: targetUnit,
});
  • When all events are triggered, trigger target with [firstPayload, secondPayload]

Arguments

  1. events — Object or array with events
  2. reset (Unit<any>) - Optional. Any unit which will reset state of combineEvents and collecting of payloads will start from scratch
  3. target (Unit<Shape>) - Optional. Any unit with type matching events shape

Returns

  • target — When target option is not defined, will return new event with the same shape as events, otherwise target unit will returns

Example

const first = createEvent<number>();
const second = createEvent<string>();
const third = createEvent<boolean>();
const target = createEvent<{ a: number; b: string; c: boolean }>();
const reset = createEvent();

combineEvents({
events: {
a: first,
b: second,
c: third,
},
reset,
target,
});

target.watch((object) => {
console.log('first event data', object.a);
console.log('second event data', object.b);
console.log('third event data', object.c);
});

first(15); // nothing
second('wow'); // nothing
third(false); // target triggered with {a: 15, b: 'wow', c: false}

first(10);
second('-');

reset(); // combineEvents state is erased

third(true); // nothing, as it's a first saved payload
first(0);
second('ok'); // target triggered with {a: 0, b: 'ok', c: true}
+ + \ No newline at end of file diff --git a/methods/condition/index.html b/methods/condition/index.html index 4c1c03eb..d9861520 100644 --- a/methods/condition/index.html +++ b/methods/condition/index.html @@ -1,16 +1,16 @@ - + - -condition | effector patronum - - + +condition | effector patronum + + -
-

condition

import { condition } from 'patronum';
// or
import { condition } from 'patronum/condition';

Motivation

Condition is very similar to guard, but allows you to have else branch along with simple if matcher.

condition({ source: Unit, if: Store, then?: Unit, else?: Unit })

Formulae

result = condition({
source,
if: $checker,
then,
else,
});
  • When source is triggered, check value of $checker, if it equals true, trigger then with value from source, otherwise trigger else with value from source
  • result is the same unit as source allows to nest condition to another condition or sample

Arguments

  1. source (Unit<T>) — Data from this unit will be passed to then or else
  2. if (Store<boolean>) — Updates of this store will not trigger then and else
  3. then (Unit<T>) — This unit will be triggered with data from source if $checker contains true. Required if else is not provided
  4. else (Unit<T>) — This unit will be triggered with data from source if $checker contains false. Required if then is not provided

Returns

  1. (Unit<T>) — The same unit type that passed to source

Example

const change = createEvent();
const $source = createStore('data').on(change, (_, payload) => payload);

const toggle = createEvent();
const $isEnabled = createStore(false).on(toggle, (is) => !is);

const enabled = createEvent();
const disabled = createEvent();

condition({
source: $source,
if: $isEnabled,
then: enabled,
else: disabled,
});
enabled.watch((payload) => console.log('enabled -', payload));
disabled.watch((payload) => console.log('disabled -', payload));

change('newdata');
// => disabled - newdata

toggle();
change('data');
// => enabled - data

condition({ source: Unit<T>, if: T, then?: Unit, else?: Unit })

Formulae

result = condition({
source,
if: value,
then,
else,
});
  • When source is triggered, compare value literal with source payload, if it equals trigger then with value from source, otherwise trigger else with value from source
  • result is the same unit as source allows to nest condition to another condition or sample

Arguments

  1. source (Unit<T>) — Data from this unit will be passed to then or else
  2. if (T) — Just value to compare with source payload. Note: objects will be compared by reference
  3. then (Unit<T>) — This unit will be triggered with data from source if $checker contains true. Required if else is not provided
  4. else (Unit<T>) — This unit will be triggered with data from source if $checker contains false. Required if then is not provided

Returns

  1. (Unit<T>) — The same unit type that passed to source

Example

const increment = createEvent();
const $source = createStore(0).on(increment, (state) => state + 1);

const log = createEvent();
const run = createEffect().use((data) => {
console.info('FAKE RUN EFFECT', data);
});

condition({
source: $source,
if: 4,
then: run,
else: log,
});

log.watch((payload) => console.log('LOG ABOUT IT', payload));

increment(); // => LOG ABOUT IT 1
increment(); // => LOG ABOUT IT 2
increment(); // => LOG ABOUT IT 3
increment(); // => FAKE RUN EFFECT 4
increment(); // => LOG ABOUT IT 5

condition({ source: Unit<T>, if: Function, then?: Unit, else?: Unit })

Formulae

result = condition({
source,
if: (payload) => boolean,
then,
else,
});
  • When source is triggered, call if with source payload, if it returns true trigger then with value from source, otherwise trigger else with value from source
  • result is the same unit as source allows to nest condition to another condition or sample

Arguments

  1. source (Unit<T>) — Data from this unit will be passed to then or else
  2. if ((payload: T) => boolean) — Function comparator. It should return boolean
  3. then (Unit<T>) — This unit will be triggered with data from source if $checker contains true. Required if else is not provided
  4. else (Unit<T>) — This unit will be triggered with data from source if $checker contains false. Required if then is not provided

Returns

  1. (Unit<T>) — The same unit type that passed to source

Example

const change = createEvent();
const $source = createStore('data').on(change, (_, payload) => payload);
const target = createEvent();
const another = createEvent();

condition({
source: $source,
if: (source) => source.length > 3,
then: target,
else: another,
});
target.watch((payload) => console.log('triggered', payload));
another.watch((payload) => console.log('condition else:', payload));

change('newdata');
// => triggered newdata

change('old');
// => condition else: old

Examples

Source is event

const inputChanged = createEvent();
const $value = createStore('');
const $error = createStore(false);

const setError = createEvent();
const setValue = createEvent();

$value.on(setValue, (_, value) => value);
$error.on(setError, () => true).on(setValue, () => false);

condition({
source: inputChanged,
if: isValid,
then: setValue,
else: setError,
});

function isValid(value) {
return value.trim().length > 0;
}

Condition can be nested

const $value = createStore('hello@world');
const updateEmail = createEvent<string>();

condition({
source: $value,
if: (length) => length > 0,
then: condition({
if: (string) => string.includes('@'),
then: updateEmail,
}),
});
- - +
+

condition

import { condition } from 'patronum';
// or
import { condition } from 'patronum/condition';

Motivation

Condition is very similar to sample, but allows you to have else branch along with simple if matcher.

condition({ source: Unit, if: Store, then?: Unit, else?: Unit })

Formulae

result = condition({
source,
if: $checker,
then,
else,
});
  • When source is triggered, check value of $checker, if it equals true, trigger then with value from source, otherwise trigger else with value from source
  • result is the same unit as source allows to nest condition to another condition or sample

Arguments

  1. source (Unit<T>) — Data from this unit will be passed to then or else
  2. if (Store<boolean>) — Updates of this store will not trigger then and else
  3. then (Unit<T>) — This unit will be triggered with data from source if $checker contains true. Required if else is not provided
  4. else (Unit<T>) — This unit will be triggered with data from source if $checker contains false. Required if then is not provided

Returns

  1. (Unit<T>) — The same unit type that passed to source

Example

const change = createEvent();
const $source = createStore('data').on(change, (_, payload) => payload);

const toggle = createEvent();
const $isEnabled = createStore(false).on(toggle, (is) => !is);

const enabled = createEvent();
const disabled = createEvent();

condition({
source: $source,
if: $isEnabled,
then: enabled,
else: disabled,
});
enabled.watch((payload) => console.log('enabled -', payload));
disabled.watch((payload) => console.log('disabled -', payload));

change('newdata');
// => disabled - newdata

toggle();
change('data');
// => enabled - data

condition({ source: Unit<T>, if: T, then?: Unit, else?: Unit })

Formulae

result = condition({
source,
if: value,
then,
else,
});
  • When source is triggered, compare value literal with source payload, if it equals trigger then with value from source, otherwise trigger else with value from source
  • result is the same unit as source allows to nest condition to another condition or sample

Arguments

  1. source (Unit<T>) — Data from this unit will be passed to then or else
  2. if (T) — Just value to compare with source payload. Note: objects will be compared by reference
  3. then (Unit<T>) — This unit will be triggered with data from source if $checker contains true. Required if else is not provided
  4. else (Unit<T>) — This unit will be triggered with data from source if $checker contains false. Required if then is not provided

Returns

  1. (Unit<T>) — The same unit type that passed to source

Example

const increment = createEvent();
const $source = createStore(0).on(increment, (state) => state + 1);

const log = createEvent();
const run = createEffect().use((data) => {
console.info('FAKE RUN EFFECT', data);
});

condition({
source: $source,
if: 4,
then: run,
else: log,
});

log.watch((payload) => console.log('LOG ABOUT IT', payload));

increment(); // => LOG ABOUT IT 1
increment(); // => LOG ABOUT IT 2
increment(); // => LOG ABOUT IT 3
increment(); // => FAKE RUN EFFECT 4
increment(); // => LOG ABOUT IT 5

condition({ source: Unit<T>, if: Function, then?: Unit, else?: Unit })

Formulae

result = condition({
source,
if: (payload) => boolean,
then,
else,
});
  • When source is triggered, call if with source payload, if it returns true trigger then with value from source, otherwise trigger else with value from source
  • result is the same unit as source allows to nest condition to another condition or sample

Arguments

  1. source (Unit<T>) — Data from this unit will be passed to then or else
  2. if ((payload: T) => boolean) — Function comparator. It should return boolean
  3. then (Unit<T>) — This unit will be triggered with data from source if $checker contains true. Required if else is not provided
  4. else (Unit<T>) — This unit will be triggered with data from source if $checker contains false. Required if then is not provided

Returns

  1. (Unit<T>) — The same unit type that passed to source

Example

const change = createEvent();
const $source = createStore('data').on(change, (_, payload) => payload);
const target = createEvent();
const another = createEvent();

condition({
source: $source,
if: (source) => source.length > 3,
then: target,
else: another,
});
target.watch((payload) => console.log('triggered', payload));
another.watch((payload) => console.log('condition else:', payload));

change('newdata');
// => triggered newdata

change('old');
// => condition else: old

Examples

Source is event

const inputChanged = createEvent();
const $value = createStore('');
const $error = createStore(false);

const setError = createEvent();
const setValue = createEvent();

$value.on(setValue, (_, value) => value);
$error.on(setError, () => true).on(setValue, () => false);

condition({
source: inputChanged,
if: isValid,
then: setValue,
else: setError,
});

function isValid(value) {
return value.trim().length > 0;
}

Condition can be nested

const $value = createStore('hello@world');
const updateEmail = createEvent<string>();

condition({
source: $value,
if: (length) => length > 0,
then: condition({
if: (string) => string.includes('@'),
then: updateEmail,
}),
});
+ + \ No newline at end of file diff --git a/methods/debounce/index.html b/methods/debounce/index.html index 7ed3ae04..c29e1814 100644 --- a/methods/debounce/index.html +++ b/methods/debounce/index.html @@ -1,18 +1,19 @@ - + - -debounce | effector patronum - - + +debounce | effector patronum + + -
-

debounce

import { debounce } from 'patronum';
// or
import { debounce } from 'patronum/debounce';

debounce({ source, timeout })

Motivation

Method creates a new event, that will be triggered after some time. It is useful for handling user events such as scrolling, mouse movement, or keypressing. -It is useful when you want to pass created event immediately to another method as argument.

Formulae

event = debounce({ source, timeout });
  • Wait for timeout after the last time source was triggered, then trigger event with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used by the event
  2. timeout (number | Store<number>) — time to wait before trigger event

Returns

  • event (Event<T>) — New event, that triggered after delay

Example

import { createEvent } from 'effector';
import { debounce } from 'patronum/debounce';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const someHappened = createEvent<number>();
const debounced = debounce({
source: someHappened,
timeout: DEBOUNCE_TIMEOUT_IN_MS,
});

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// someHappened now 4

debounce({ source, timeout, target })

Motivation

This overload receives target as argument, that will be triggered after timeout. -It is useful when you already have an unit that you need to trigger.

Formulae

event = debounce({ source, timeout, target });
  • Wait for timeout after the last time source was triggered and call target with data from the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with payload of the source
  2. timeout (number | Store<number>) — time to wait before trigger event
  3. target (Event<T> | Store<T> | Effect<T>) — Target unit, data from the source will be passed to this unit

Returns

  • target (Event<T> | Store<T> | Effect<T>) — Target unit that was passed to input argument target

Example

import { createEvent, createStore } from 'effector';
import { debounce } from 'patronum/debounce';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const someHappened = createEvent<number>();
const target = createStore<number>(0);
const debounced = debounce({
source: someHappened,
timeout: DEBOUNCE_TIMEOUT_IN_MS,
target,
});

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

target.watch((payload) => {
console.info('got data', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// someHappened now 4
// got data 4

Example with timeout as store

import { createStore } from 'effector';
import { debounce } from 'patronum';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const changeTimeout = createEvent<number>();
const $timeout = createStore(DEBOUNCE_TIMEOUT_IN_MS).on(
changeTimeout,
(_, value) => value,
);
const someHappened = createEvent<number>();
const debounced = debounce({
source: someHappened,
timeout: $timeout,
});

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
changeTimeout(400); // will be applied after next source trigger
someHappened(2);

setTimeout(() => {
// console clear
}, 200);

setTimeout(() => {
// someHappened now 2
}, 400);
- - +
+

debounce

import { debounce } from 'patronum';
// or
import { debounce } from 'patronum/debounce';

debounce(source, timeout)

Motivation

Method creates a new event, that will be triggered after some time. It is useful for handling user events such as scrolling, mouse movement, or keypressing. +It is useful when you want to pass created event immediately to another method as argument.

since

patronum 2.1.0 +Use debounce({ source, timeout }) with patronum < 2.1.0

Formulae

event = debounce(source, timeout);
  • Wait for timeout after the last time source was triggered, then trigger event with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used by the event
  2. timeout (number | Store<number>) — time to wait before trigger event

Returns

  • event (Event<T>) — New event, that triggered after delay

Example

import { createEvent } from 'effector';
import { debounce } from 'patronum/debounce';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const someHappened = createEvent<number>();
const debounced = debounce(someHappened, DEBOUNCE_TIMEOUT_IN_MS);

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// someHappened now 4

Example with timeout as store

import { createStore } from 'effector';
import { debounce } from 'patronum';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const changeTimeout = createEvent<number>();
const $timeout = createStore(DEBOUNCE_TIMEOUT_IN_MS).on(
changeTimeout,
(_, value) => value,
);
const someHappened = createEvent<number>();
const debounced = debounce(someHappened, $timeout);

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
changeTimeout(400); // will be applied after next source trigger
someHappened(2);

setTimeout(() => {
// console clear
}, 200);

setTimeout(() => {
// someHappened now 2
}, 400);

debounce({ source, timeout, target })

Motivation

This overload receives target as argument, that will be triggered after timeout. +It is useful when you already have an unit that you need to trigger.

Formulae

event = debounce({ source, timeout, target });
  • Wait for timeout after the last time source was triggered and call target with data from the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with payload of the source
  2. timeout (number | Store<number>) — time to wait before trigger event
  3. target (Event<T> | Store<T> | Effect<T>) — Target unit, data from the source will be passed to this unit

Returns

  • target (Event<T> | Store<T> | Effect<T>) — Target unit that was passed to input argument target

Example

import { createEvent, createStore } from 'effector';
import { debounce } from 'patronum/debounce';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const someHappened = createEvent<number>();
const target = createStore<number>(0);
const debounced = debounce({
source: someHappened,
timeout: DEBOUNCE_TIMEOUT_IN_MS,
target,
});

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

target.watch((payload) => {
console.info('got data', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// someHappened now 4
// got data 4

debounce({ source, timeout })

Motivation

This overload recieves source and timeout as an object. May be useful for additional clarity, but it's longer to write

Formulae

event = debounce({ source, timeout });
  • Wait for timeout after the last time source was triggered, then trigger event with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used by the event
  2. timeout (number | Store<number>) — time to wait before trigger event

Returns

  • event (Event<T>) — New event, that triggered after delay

Example

import { createEvent } from 'effector';
import { debounce } from 'patronum/debounce';

const DEBOUNCE_TIMEOUT_IN_MS = 200;

const someHappened = createEvent<number>();
const debounced = debounce({
source: someHappened,
timeout: DEBOUNCE_TIMEOUT_IN_MS,
});

debounced.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// someHappened now 4
+ + \ No newline at end of file diff --git a/methods/debug/index.html b/methods/debug/index.html index e5539e57..8b401e3b 100644 --- a/methods/debug/index.html +++ b/methods/debug/index.html @@ -1,19 +1,19 @@ - + - -debug | effector patronum - - + +debug | effector patronum + + -
-

debug

import { debug } from 'patronum';
// or
import { debug } from 'patronum/debug';

It is helpful to debug your application's logic.

Just pass any effector's unit to debug.

Motivation

Sometimes during development, it is necessary to display the value of the stores and payload of events, each time you write console.log inside .watch and copy/paste it is unpleasant. debug allows you to speed up this process a lot by passing all the necessary units for a debugging into a method arguments.

Example

import { createStore, createEvent, createEffect } from 'effector';
import { debug } from 'patronum/debug';

const event = createEvent();
const effect = createEffect().use((payload) => Promise.resolve('result' + payload));
const $store = createStore(0)
.on(event, (state, value) => state + value)
.on(effect.done, (state) => state * 10);

debug($store, event, effect);

event(5);
effect('demo');

// => [store] $store 1
// => [event] event 5
// => [store] $store 6
// => [effect] effect demo
// => [effect] effect.done {"params":"demo", "result": "resultdemo"}
// => [store] $store 60

Traces

since

patronum 1.9.0

patronum/debug supports computation traces logging, if { trace: true } is set. -It is recommended to use this feature along with effector/babel-plugin.

const inputChanged = createEvent();
const $form = createStore(0).on(inputChanged, (s) => s + 1);

debug({ trace: true }, $form, submitFx);

inputChanged();

// "[store] $form 0",
// "[store] $form 1",
// "[store] $form trace",
// "<- [store] $form 1",
// "<- [$form.on] $form.on(inputChanged) 1",
// "<- [event] inputChanged ",

Custom names

Sometimes unit name in specific context may be different from the one it was initially created with. -e.g., an unit may be exported under an alias for explicitness:

export const $productsListVisible = productsPageModel.$open;
const productAdded = createEvent();

debug($productsListVisible, productAdded);
// or
debug({ trace: true }, $productsListVisible, productAdded);

In this case, because of effector/babel-plugin which provided productsPageModel.$open store its name at the moment of its creation, public name in the debug logs will be $open instead of $productsListVisible.

It can be fixed with custom name, which can be provided by using Record<string, Unit> instead of a list of units:

export const $productsListVisible = productsPageModel.$open;
const productAdded = createEvent();

debug({ $productsListVisible, customEventName: productAdded });
// or
debug({ trace: true }, { $productsListVisible, customEventName: productAdded });

This way $productsListVisible name in the logs will be the same, as the one which was provided to debug. The productAdded event will be named customEventName.

Fork API and Scope

Effector can run multiple "instances" of the app simultaniosly via Fork API - it is useful for tests and SSR. Usually you would also use scope on the client in the case of SSR. debug will log "scoped" updates in such case:

const up = createEvent();
const $count = createStore(0).on(up, (s) => s + 1);
const fx = createEffect(() => {});
sample({
clock: $count,
target: fx,
});

debug(fx);

const scopeA = fork();

await allSettled(up, { scope: scopeA });

// "[effect] (scope: unknown_scope_3) fx 1",
// "[effect] (scope: unknown_scope_3) fx.done {\\"params\\":1}",

By default detected scope will be given default name.

Scope registration

It is possible to explicitly register scope with given name to have a more explicit logs.

It can work like this:

const scope = fork({ values: window.__SSR_VALUES__ });

// this way we can commit this to our repo and be sure,
// that bundler will cut this out of production bundle
if (process.env.NODE_ENV === 'development') {
debug.registerScope(scope, { name: 'my_client_scope' });
}

This way scope will be given explicit name in the logs.

// "[effect] (scope: my_client_scope) fx 1",
// "[effect] (scope: my_client_scope) fx.done {\\"params\\":1}",

It is also possible to unregister scope to prevent memory leak, if scope is no longer needed:

const unregister = debug.registerScope(scope, { name: `my_scope` });

unregister();

Or unregister all scopes at once:

debug.unregisterAllScopes();

Initial store state

debug($store) always immediatly prints current state of the store, but this state can be different in different scopes. -It is recommened to register scopes explicitly, since debug will print current state of the store in every known scope:

const $count = createStore(0);

const scopeA = fork({
values: [[$count, 42]],
});
const scopeB = fork({
values: [[$count, 1337]],
});

debug.registerScope(scopeA, { name: 'scope_42' });
debug.registerScope(scopeB, { name: 'scope_1337' });

debug($count);

// "[store] $count 0",
// "[store] (scope: scope_42) $count 42",
// "[store] (scope: scope_1337) $count 1337",

Customization

The patronum/debug package extracts quite a lot of low-level effector data in a universal format that may be useful for other dev tools or monitoring tools, so there is a special API to add your own way of handling this data.

Custom handler

You can provide custom log handler in the config. It can be useful, if console.info somehow doesn't fit your use-case: e.g. you want advanced info from patronum/debug to built your own dev-tools, debug especially hard case, etc.

Handler is called for each update with context object like this:

Common fields:

  • logType - initial | update - log type for convenience. All provided stores current values are logged with initial for all known scopes right away. Same after new scope was registered. All other updates are of update type.
  • scope - Scope | null - effector's Scope context object, which owns this particular update
  • scopeName - string | null - name of the Scope, if registered and null otherwise.
  • node - Node - effector's internal node, which update is being logged.
  • name - string | null - node's name for convenience. null - if node doesn't have own name (like sample calls).
  • kind - string - node's kind for convenience. It can be unit's kind (e.g. store or event) or operation kind (e.g. sample, split, etc).
  • value - unknown - value of the update.
  • loc - { file?: string; line: number; column: number; } - location in the source code, if known
  • stackMeta - { Record<string, unknown> } - effector's internal stack metadata, available if provided. For example, effect calls provide an fxID that is stable between fx and fx.finally updates - this allows you to associate a fx.finally update with a particular fx call (available since effector@22.5.0)

Special field if trace: true provided:

  • trace - Array<{ node: Node; name: string | null; kind: string; value: unknown; loc?: Loc; stackMeta?: Record<string, unknown> }> - trace of updates.

The trace array is always empty (i.e. trace is not collected), if debug's config does not have trace: true.

debug(
{
trace: true,
// custom log handler
handler: ({ trace, scope, scopeName, node, value, name, kind }) => {
// your own way to log updates
doStuff(node, value);

if (trace) {
// log trace part
trace.forEach(({ name, kind, node, value }) => doStuff(node, value));
}
},
},
{ $a, $b, c },
);
- - +
+

debug

import { debug } from 'patronum';
// or
import { debug } from 'patronum/debug';

It is helpful to debug your application's logic.

Just pass any effector's unit to debug.

Motivation

Sometimes during development, it is necessary to display the value of the stores and payload of events, each time you write console.log inside .watch and copy/paste it is unpleasant. debug allows you to speed up this process a lot by passing all the necessary units for a debugging into a method arguments.

Example

import { createStore, createEvent, createEffect } from 'effector';
import { debug } from 'patronum/debug';

const event = createEvent();
const effect = createEffect().use((payload) => Promise.resolve('result' + payload));
const $store = createStore(0)
.on(event, (state, value) => state + value)
.on(effect.done, (state) => state * 10);

debug($store, event, effect);

event(5);
effect('demo');

// => [store] $store 1
// => [event] event 5
// => [store] $store 6
// => [effect] effect demo
// => [effect] effect.done {"params":"demo", "result": "resultdemo"}
// => [store] $store 60

Traces

since

patronum 1.9.0

patronum/debug supports computation traces logging, if { trace: true } is set. +It is recommended to use this feature along with effector/babel-plugin.

const inputChanged = createEvent();
const $form = createStore(0).on(inputChanged, (s) => s + 1);

debug({ trace: true }, $form, submitFx);

inputChanged();

// "[store] $form 0",
// "[store] $form 1",
// "[store] $form trace",
// "<- [store] $form 1",
// "<- [$form.on] $form.on(inputChanged) 1",
// "<- [event] inputChanged ",

Custom names

Sometimes unit name in specific context may be different from the one it was initially created with. +e.g., an unit may be exported under an alias for explicitness:

export const $productsListVisible = productsPageModel.$open;
const productAdded = createEvent();

debug($productsListVisible, productAdded);
// or
debug({ trace: true }, $productsListVisible, productAdded);

In this case, because of effector/babel-plugin which provided productsPageModel.$open store its name at the moment of its creation, public name in the debug logs will be $open instead of $productsListVisible.

It can be fixed with custom name, which can be provided by using Record<string, Unit> instead of a list of units:

export const $productsListVisible = productsPageModel.$open;
const productAdded = createEvent();

debug({ $productsListVisible, customEventName: productAdded });
// or
debug({ trace: true }, { $productsListVisible, customEventName: productAdded });

This way $productsListVisible name in the logs will be the same, as the one which was provided to debug. The productAdded event will be named customEventName.

Fork API and Scope

Effector can run multiple "instances" of the app simultaniosly via Fork API - it is useful for tests and SSR. Usually you would also use scope on the client in the case of SSR. debug will log "scoped" updates in such case:

const up = createEvent();
const $count = createStore(0).on(up, (s) => s + 1);
const fx = createEffect(() => {});
sample({
clock: $count,
target: fx,
});

debug(fx);

const scopeA = fork();

await allSettled(up, { scope: scopeA });

// "[effect] (scope: unknown_scope_3) fx 1",
// "[effect] (scope: unknown_scope_3) fx.done {\\"params\\":1}",

By default detected scope will be given default name.

Scope registration

It is possible to explicitly register scope with given name to have a more explicit logs.

It can work like this:

const scope = fork({ values: window.__SSR_VALUES__ });

// this way we can commit this to our repo and be sure,
// that bundler will cut this out of production bundle
if (process.env.NODE_ENV === 'development') {
debug.registerScope(scope, { name: 'my_client_scope' });
}

This way scope will be given explicit name in the logs.

// "[effect] (scope: my_client_scope) fx 1",
// "[effect] (scope: my_client_scope) fx.done {\\"params\\":1}",

It is also possible to unregister scope to prevent memory leak, if scope is no longer needed:

const unregister = debug.registerScope(scope, { name: `my_scope` });

unregister();

Or unregister all scopes at once:

debug.unregisterAllScopes();

Initial store state

debug($store) always immediatly prints current state of the store, but this state can be different in different scopes. +It is recommened to register scopes explicitly, since debug will print current state of the store in every known scope:

const $count = createStore(0);

const scopeA = fork({
values: [[$count, 42]],
});
const scopeB = fork({
values: [[$count, 1337]],
});

debug.registerScope(scopeA, { name: 'scope_42' });
debug.registerScope(scopeB, { name: 'scope_1337' });

debug($count);

// "[store] $count 0",
// "[store] (scope: scope_42) $count 42",
// "[store] (scope: scope_1337) $count 1337",

Customization

The patronum/debug package extracts quite a lot of low-level effector data in a universal format that may be useful for other dev tools or monitoring tools, so there is a special API to add your own way of handling this data.

Custom handler

You can provide custom log handler in the config. It can be useful, if console.info somehow doesn't fit your use-case: e.g. you want advanced info from patronum/debug to built your own dev-tools, debug especially hard case, etc.

Handler is called for each update with context object like this:

Common fields:

  • logType - initial | update - log type for convenience. All provided stores current values are logged with initial for all known scopes right away. Same after new scope was registered. All other updates are of update type.
  • scope - Scope | null - effector's Scope context object, which owns this particular update
  • scopeName - string | null - name of the Scope, if registered and null otherwise.
  • node - Node - effector's internal node, which update is being logged.
  • name - string | null - node's name for convenience. null - if node doesn't have own name (like sample calls).
  • kind - string - node's kind for convenience. It can be unit's kind (e.g. store or event) or operation kind (e.g. sample, split, etc).
  • value - unknown - value of the update.
  • loc - { file?: string; line: number; column: number; } - location in the source code, if known
  • stackMeta - { Record<string, unknown> } - effector's internal stack metadata, available if provided. For example, effect calls provide an fxID that is stable between fx and fx.finally updates - this allows you to associate a fx.finally update with a particular fx call (available since effector@22.5.0)

Special field if trace: true provided:

  • trace - Array<{ node: Node; name: string | null; kind: string; value: unknown; loc?: Loc; stackMeta?: Record<string, unknown> }> - trace of updates.

The trace array is always empty (i.e. trace is not collected), if debug's config does not have trace: true.

debug(
{
trace: true,
// custom log handler
handler: ({ trace, scope, scopeName, node, value, name, kind }) => {
// your own way to log updates
doStuff(node, value);

if (trace) {
// log trace part
trace.forEach(({ name, kind, node, value }) => doStuff(node, value));
}
},
},
{ $a, $b, c },
);
+ + \ No newline at end of file diff --git a/methods/delay/index.html b/methods/delay/index.html index 15d2214b..b306a745 100644 --- a/methods/delay/index.html +++ b/methods/delay/index.html @@ -1,18 +1,23 @@ - + - -delay | effector patronum - - + +delay | effector patronum + + -
-

delay

import { delay } from 'patronum';
// or
import { delay } from 'patronum/delay';

delay({ source, timeout: number, target })

Formulae

target = delay({ source, timeout: number, target });
  • When source is triggered, wait for timeout, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout (number) — time to wait before trigger event
  3. target (Unit<T> | Array<Unit<T>>) — Optional. Target unit or array of units that will be called after delay.

Returns

  • target (Unit<T> | Array<Unit<T>>) — Target unit or units that were passed to delay

Example

import { createEvent } from 'effector';
import { delay } from 'patronum/delay';

const trigger = createEvent<string>(); // createStore or createEffect
const delayed = delay({ source: trigger, timeout: 300 });

delayed.watch((payload) => console.info('triggered', payload));

trigger('hello');
// after 300ms
// => triggered hello

delay({ source, timeout: Function, target })

Motivation

This overload allows to calculate timeout from payload of source. -It is useful when you know that calculations requires more time if you have more data for payload.

Formulae

target = delay({ source, timeout: Function, target });
  • When source is triggered, call timeout with payload to get the timeout for delay, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout ((payload: T) => number) — Calculate delay for each source call. Receives the payload of source as argument. Should return number — delay in milliseconds.
  3. target (Unit<T> | Array<Unit<T>>) — Optional. Target unit or array of units that will be called after delay.

Returns

  • target (Unit<T> | Array<Unit<T>>) — Target unit or units that were passed to delay

Example

import { createEvent, createStore } from 'effector';
import { delay } from 'patronum/delay';

const update = createEvent<string>();
const logDelayed = createEvent<string>();
const $data = createStore('');

delay({
source: $data,
timeout: (string) => string.length * 100,
target: logDelayed,
});

logDelayed.watch((data) => console.log('log', data));

update('Hello');
// after 500ms
// => log Hello

update('!');
// after 100ms
// => log !

delay({ source, timeout: Store<T>, target })

Motivation

This overload allows you to read timeout from another store. -It is useful when you writing music editor and need dynamic delay for your events.

Formulae

target = delay({ source, timeout: $store, target });
  • When source is triggered, read timeout from timeout store, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout (Store<number>) — Store with number — delay in milliseconds.
  3. target (Unit<T> | Array<Unit<T>>) — Optional. Target unit or array of units that will be called after delay.

Returns

  • target (Unit<T> | Array<Unit<T>>) — Target unit or units that were passed to delay

Example

import { createEvent, createStore } from 'effector';
import { delay } from 'patronum/delay';

const update = createEvent<string>();
const $timeout = createStore(500);

const logDelayed = delay({
source: update,
timeout: $timeout,
});

logDelayed.watch((data) => console.log('log', data));

update('Hello');
// after 500ms
// => log Hello
- - +
+

delay

import { delay } from 'patronum';
// or
import { delay } from 'patronum/delay';

Method for delaying triggering given unit for some amount of time. Can accept number, Store<number> or (sourceValue) => number (function for calculating timeout based on source payload) as timeout. Exists in two form: shorthand delay(source, timeout) and object form delay({source, timeout, target}), the first one needs to create new unit for this specific purpose, last one needs when target unit is already exists and the goal is just to call it after delay

delay(source, timeout: number)

since

patronum 2.1.0 +Use delay({ source, timeout }) with patronum < 2.1.0

Formulae

target = delay(source, timeout);
  • When source is triggered, wait for timeout, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout (number) — time to wait before trigger event

Returns

  • target (Event<T>) — New event which will receive source payload after timeout delay

Example

import { createEvent } from 'effector';
import { delay } from 'patronum/delay';

const trigger = createEvent<string>(); // createStore or createEffect
const delayed = delay(trigger, 300);

delayed.watch((payload) => console.info('triggered', payload));

trigger('hello');
// after 300ms
// => triggered hello

delay({ source, timeout: number, target })

Formulae

target = delay({ source, timeout: number, target });
  • When source is triggered, wait for timeout, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout (number) — time to wait before trigger event
  3. target (Unit<T> | Array<Unit<T>>) — Optional. Target unit or array of units that will be called after delay.

Returns

  • target (Unit<T> | Array<Unit<T>>) — Target unit or units that were passed to delay

Example

import { createEvent } from 'effector';
import { delay } from 'patronum/delay';

const trigger = createEvent<string>(); // createStore or createEffect
const delayed = createEvent<string>();
delay({
source: trigger,
timeout: 300,
target: delayed,
});

delayed.watch((payload) => console.info('triggered', payload));

trigger('hello');
// after 300ms
// => triggered hello

delay(source, timeout: Function)

since

patronum 2.1.0 +Use delay({ source, timeout }) with patronum < 2.1.0

Motivation

This overload allows to calculate timeout from payload of source. +It is useful when you know that calculations requires more time if you have more data for payload.

Formulae

target = delay(source, timeout);
  • When source is triggered, call timeout with payload to get the timeout for delay, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout ((payload: T) => number) — Calculate delay for each source call. Receives the payload of source as argument. Should return number — delay in milliseconds.

Returns

  • target (Event<T>) — New event which will receive source payload after timeout delay

Example

import { createEvent, createStore } from 'effector';
import { delay } from 'patronum/delay';

const update = createEvent<string>();
const $data = createStore('');
const logDelayed = delay($data, (string) => string.length * 100);

logDelayed.watch((data) => console.log('log', data));

update('Hello');
// after 500ms
// => log Hello

update('!');
// after 100ms
// => log !

delay({ source, timeout: Function, target })

Motivation

This overload allows to calculate timeout from payload of source. +It is useful when you know that calculations requires more time if you have more data for payload.

Formulae

target = delay({ source, timeout: Function, target });
  • When source is triggered, call timeout with payload to get the timeout for delay, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout ((payload: T) => number) — Calculate delay for each source call. Receives the payload of source as argument. Should return number — delay in milliseconds.
  3. target (Unit<T> | Array<Unit<T>>) — Optional. Target unit or array of units that will be called after delay.

Returns

  • target (Unit<T> | Array<Unit<T>>) — Target unit or units that were passed to delay

Example

import { createEvent, createStore } from 'effector';
import { delay } from 'patronum/delay';

const update = createEvent<string>();
const logDelayed = createEvent<string>();
const $data = createStore('');

delay({
source: $data,
timeout: (string) => string.length * 100,
target: logDelayed,
});

logDelayed.watch((data) => console.log('log', data));

update('Hello');
// after 500ms
// => log Hello

update('!');
// after 100ms
// => log !

delay(source, timeout: Store<T>)

since

patronum 2.1.0 +Use delay({ source, timeout }) with patronum < 2.1.0

Motivation

This overload allows you to read timeout from another store. +It is useful when you writing music editor and need dynamic delay for your events.

Formulae

target = delay(source, timeout);
  • When source is triggered, read timeout from timeout store, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout (Store<number>) — Store with number — delay in milliseconds.

Returns

  • target (Event<T>) — New event which will receive source payload after timeout delay

Example

import { createEvent, createStore } from 'effector';
import { delay } from 'patronum/delay';

const update = createEvent<string>();
const $timeout = createStore(500);

const logDelayed = delay(update, $timeout);

logDelayed.watch((data) => console.log('log', data));

update('Hello');
// after 500ms
// => log Hello

delay({ source, timeout: Store<T>, target })

Motivation

This overload allows you to read timeout from another store. +It is useful when you writing music editor and need dynamic delay for your events.

Formulae

target = delay({ source, timeout: $store, target });
  • When source is triggered, read timeout from timeout store, then trigger target with payload of the source

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data from this unit used to trigger target with.
  2. timeout (Store<number>) — Store with number — delay in milliseconds.
  3. target (Unit<T> | Array<Unit<T>>) — Optional. Target unit or array of units that will be called after delay.

Returns

  • target (Unit<T> | Array<Unit<T>>) — Target unit or units that were passed to delay

Example

import { createEvent, createStore } from 'effector';
import { delay } from 'patronum/delay';

const update = createEvent<string>();
const $timeout = createStore(500);

delay({
source: update,
timeout: $timeout,
target: logDelayed,
});

logDelayed.watch((data) => console.log('log', data));

update('Hello');
// after 500ms
// => log Hello
+ + \ No newline at end of file diff --git a/methods/either/index.html b/methods/either/index.html index 6f02a519..c106e0a1 100644 --- a/methods/either/index.html +++ b/methods/either/index.html @@ -1,17 +1,17 @@ - + - -either | effector patronum - - + +either | effector patronum + + -
-

either

since

patronum 1.11.0

import { either } from 'patronum';
// or
import { either } from 'patronum/either';

Motivation

The method select one or other value based on condition. -You can think about it as a ternary operator a ? b : c.

Formulae

$result = either($filter, then, other);
  • $result store contains value of then if $filter store contains true
  • $result store contains value of other if $filter store contains false

Arguments

  1. $filter: Store<boolean> — The store contains condition how to select between then and other
  2. then: Store<Then> | Then — First value can be a Store, and returned when $filter is true
  3. other: Store<Other> | Other — Second value can be a Store too, returned only when $filter if false
  • Then — Generic type argument. Required only to distinguish this type from Other
  • Other — Generic type argument used for the alternative value when $filter is false

Returns

  • $result: Store<Then | Other> — Store contains one of the value depends on $filter value

Object form arguments

For some cases it is useful to add names for each argument.

$result = either({
filter,
then,
other,
});

Types, descriptions, and usage the same as for positional arguments.

Example

const $showLatest = createStore(false);
const $latestTweets = createStore<Tweet[]>([]);
const $recommendedTweets = createStore<Tweet[]>([]);

export const $tweets = either($showLatest, $latestTweets, $recommendedTweets);

Try it

Select just one argument

Sometimes we want to write an inverted expression, like this imperative code:

if (!active) {
return another;
}
return null;

We can write exactly null as is:

const $result = either($active, null, $another); // Store<null | Another>

We may want to use not for condition:

import { either, not } from 'patronum';

const $result = either(not($active), $another, null);

Alternative

import { createStore, combine } from 'effector';
const $showLatest = createStore(false);
const $latestTweets = createStore<Tweet[]>([]);
const $recommendedTweets = createStore<Tweet[]>([]);

export const $tweets = combine(
$showLatest,
$latestTweets,
$recommendedTweets,
(showLatest, latestTweets, recommendedTweets) =>
showLatest ? latestTweets : recommendedTweets,
);
- - +
+

either

since

patronum 1.11.0

import { either } from 'patronum';
// or
import { either } from 'patronum/either';

Motivation

The method select one or other value based on condition. +You can think about it as a ternary operator a ? b : c.

Formulae

$result = either($filter, then, other);
  • $result store contains value of then if $filter store contains true
  • $result store contains value of other if $filter store contains false

Arguments

  1. $filter: Store<boolean> — The store contains condition how to select between then and other
  2. then: Store<Then> | Then — First value can be a Store, and returned when $filter is true
  3. other: Store<Other> | Other — Second value can be a Store too, returned only when $filter if false
  • Then — Generic type argument. Required only to distinguish this type from Other
  • Other — Generic type argument used for the alternative value when $filter is false

Returns

  • $result: Store<Then | Other> — Store contains one of the value depends on $filter value

Object form arguments

For some cases it is useful to add names for each argument.

$result = either({
filter,
then,
other,
});

Types, descriptions, and usage the same as for positional arguments.

Example

const $showLatest = createStore(false);
const $latestTweets = createStore<Tweet[]>([]);
const $recommendedTweets = createStore<Tweet[]>([]);

export const $tweets = either($showLatest, $latestTweets, $recommendedTweets);

Try it

Select just one argument

Sometimes we want to write an inverted expression, like this imperative code:

if (!active) {
return another;
}
return null;

We can write exactly null as is:

const $result = either($active, null, $another); // Store<null | Another>

We may want to use not for condition:

import { either, not } from 'patronum';

const $result = either(not($active), $another, null);

Alternative

import { createStore, combine } from 'effector';
const $showLatest = createStore(false);
const $latestTweets = createStore<Tweet[]>([]);
const $recommendedTweets = createStore<Tweet[]>([]);

export const $tweets = combine(
$showLatest,
$latestTweets,
$recommendedTweets,
(showLatest, latestTweets, recommendedTweets) =>
showLatest ? latestTweets : recommendedTweets,
);
+ + \ No newline at end of file diff --git a/methods/empty/index.html b/methods/empty/index.html index a6817e09..267754ac 100644 --- a/methods/empty/index.html +++ b/methods/empty/index.html @@ -1,17 +1,17 @@ - + - -empty (experimental) | effector patronum - - + +empty (experimental) | effector patronum + + -
-

empty (experimental)

since

patronum 1.10.0

experimental

Operator is going to be renamed. Please review the discussion.

import { empty } from 'patronum';
// or
import { empty } from 'patronum/empty';

Motivation

The method allows to check passed value for null. -Sometimes you need just to check for nullability, and go on.

Formulae

$result = empty($value);
  • $result store contains true if $value store contains null

Arguments

  • $value: Store<T | null> — The store contains any kind of value.

Returns

  • $result: Store<boolean> — The store contains false if passed $value store contains any kind of value other from null

Example

const $account = createStore<Account | null>(null);
const $anonymous = empty($account);
const $authorized = not($anonymous);

console.assert(true === $anonymous.getState());
console.assert(false === $authorized.getState());

Try it

Alternative

import { createStore } from 'effector';
const $account = createStore<Account | null>(null);
const $anonymous = $account.map((account) => account === null);
const $authorized = $anonymous.map((anonymous) => !anonymous);

console.assert(true === $anonymous.getState());
console.assert(false === $authorized.getState());
- - +
+

empty (experimental)

since

patronum 1.10.0

experimental

Operator is going to be renamed. Please review the discussion.

import { empty } from 'patronum';
// or
import { empty } from 'patronum/empty';

Motivation

The method allows to check passed value for null. +Sometimes you need just to check for nullability, and go on.

Formulae

$result = empty($value);
  • $result store contains true if $value store contains null

Arguments

  • $value: Store<T | null> — The store contains any kind of value.

Returns

  • $result: Store<boolean> — The store contains false if passed $value store contains any kind of value other from null

Example

const $account = createStore<Account | null>(null);
const $anonymous = empty($account);
const $authorized = not($anonymous);

console.assert(true === $anonymous.getState());
console.assert(false === $authorized.getState());

Try it

Alternative

import { createStore } from 'effector';
const $account = createStore<Account | null>(null);
const $anonymous = $account.map((account) => account === null);
const $authorized = $anonymous.map((anonymous) => !anonymous);

console.assert(true === $anonymous.getState());
console.assert(false === $authorized.getState());
+ + \ No newline at end of file diff --git a/methods/equals/index.html b/methods/equals/index.html index 6f32c307..b1ed533e 100644 --- a/methods/equals/index.html +++ b/methods/equals/index.html @@ -1,16 +1,16 @@ - + - -equals | effector patronum - - + +equals | effector patronum + + -
-

equals

since

patronum 1.11.0

import { equals } from 'patronum';
// or
import { equals } from 'patronum/equals';

Motivation

The method allows to compare store value with another value wrote as literal or contained in another store.

Formulae

$isEquals = equals(first, second);
  • $isEquals will be store with true if value in first and second is equals by comparing them with ===

Arguments

  1. first: Store<T> | T — A value or the store to compare with second
  2. second: Store<T> | T — A value or the store to be compared with first

Returns

  • $isEquals: Store<boolean> — The store contains true if values is equals

Example

const $first = createStore('foo bar');
const $isEquals = equals($first, 'foo bar');

console.assert(true === $isEquals.getState());

Try it

Composition

The equals operator can be composed with any other method of patronum:

const $account = createStore<Account | null>(null);
const $authorized = not(equals($account, null));
// $authorized contains `true` only when $account contains not `null`

Alternative

Compare to literal value:

import { createStore } from 'effector';
const $first = createStore('foo bar');
const $isEquals = $first.map((first) => first === 'foo bar');

console.assert(true === $isEquals.getState());

Compare to another store:

import { createStore, combine } from 'effector';
const $first = createStore('foo bar');
const $second = createStore('foo bar');
const $isEquals = combine($first, $second, (first, second) => first === second);

console.assert(true === $isEquals.getState());
- - +
+

equals

since

patronum 1.11.0

import { equals } from 'patronum';
// or
import { equals } from 'patronum/equals';

Motivation

The method allows to compare store value with another value wrote as literal or contained in another store.

Formulae

$isEquals = equals(first, second);
  • $isEquals will be store with true if value in first and second is equals by comparing them with ===

Arguments

  1. first: Store<T> | T — A value or the store to compare with second
  2. second: Store<T> | T — A value or the store to be compared with first

Returns

  • $isEquals: Store<boolean> — The store contains true if values is equals

Example

const $first = createStore('foo bar');
const $isEquals = equals($first, 'foo bar');

console.assert(true === $isEquals.getState());

Try it

Composition

The equals operator can be composed with any other method of patronum:

const $account = createStore<Account | null>(null);
const $authorized = not(equals($account, null));
// $authorized contains `true` only when $account contains not `null`

Alternative

Compare to literal value:

import { createStore } from 'effector';
const $first = createStore('foo bar');
const $isEquals = $first.map((first) => first === 'foo bar');

console.assert(true === $isEquals.getState());

Compare to another store:

import { createStore, combine } from 'effector';
const $first = createStore('foo bar');
const $second = createStore('foo bar');
const $isEquals = combine($first, $second, (first, second) => first === second);

console.assert(true === $isEquals.getState());
+ + \ No newline at end of file diff --git a/methods/every/index.html b/methods/every/index.html index db5f5aca..5e54c965 100644 --- a/methods/every/index.html +++ b/methods/every/index.html @@ -1,19 +1,19 @@ - + - -every | effector patronum - - + +every | effector patronum + + -
-

every

import { every } from 'patronum';
// or
import { every } from 'patronum/every';

every({ predicate: Function, stores })

Motivation

The method calculates boolean value if each store satisfies the condition in predicate. -It is useful to check that user has correct values in each state.

Formulae

$result = every({ predicate: fn, stores });
  • $result will be true if each call predicate on each store value from values returns true, otherwise it will be false

Arguments

  1. predicate: (value: T) => boolean — Function to check store value
  2. stores: Array<Store<T>> — List of stores

Return

  • $result: Store<boolean>true if each store corresponds to predicate

Example

const $width = createStore(440);
const $height = createStore(780);

const $fitsSquare = every({
predicate: (size) => size < 800,
stores: [$width, $height],
});

console.assert(true === $fitsSquare.getState());

every({ predicate: value, stores })

Motivation

This overload compares each store to specific value in predicate. -It is useful when you write combine with && very often, for example to create a pending state or a form valid flag.

Formulae

$result = every({ predicate: value, stores });
  • $result will be true if each value in stores equals value, otherwise it will be false

Arguments

  1. predicate (T) — Data to compare stores values with
  2. stores (Array<Store<T>>) — List of stores to compare with value
  3. type of value and stores should be the same

Return

  • $result (Store<boolean>)true if each store contains value

Example

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormCorrect = every({
predicate: true,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(true === $isFormCorrect.getState());

every({ predicate: Store, stores })

Motivation

This overload compares each store to specific value in the store predicate. -It is useful when you write combine with && very often, for example to create a pending state or a form valid flag.

Formulae

since

patronum 1.7.0

$result = every({ predicate: $value, stores });
  • $result will be true if each value in stores equals value in the $value, otherwise it will be false

Arguments

  1. predicate (Store<T>) — Store contains value to compare values from stores with
  2. stores (Array<Store<T>>) — List of stores to compare with $value store
  3. type of value and stores should be the same

Return

  • $result (Store<boolean>)true if each store contains value from the predicate store

Example

const $allowToCompare = createStore(true);

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormCorrect = every({
predicate: $allowToCompare,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(true === $isFormCorrect.getState());

Shorthands

since

patronum 1.7.0

$result = every(stores, value);
$result = every(stores, (value) => false);
$result = every(stores, $predicate);

Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form.

Arguments

  1. stores (Array<Store<T>>) — List of stores to compare with predicate in the second argument
  2. predicate (Store<T> | (value: T) => boolean | T) — Predicate to compare with
- - +
+

every

import { every } from 'patronum';
// or
import { every } from 'patronum/every';

every({ predicate: Function, stores })

Motivation

The method calculates boolean value if each store satisfies the condition in predicate. +It is useful to check that user has correct values in each state.

Formulae

$result = every({ predicate: fn, stores });
  • $result will be true if each call predicate on each store value from values returns true, otherwise it will be false

Arguments

  1. predicate: (value: T) => boolean — Function to check store value
  2. stores: Array<Store<T>> — List of stores

Return

  • $result: Store<boolean>true if each store corresponds to predicate

Example

const $width = createStore(440);
const $height = createStore(780);

const $fitsSquare = every({
predicate: (size) => size < 800,
stores: [$width, $height],
});

console.assert(true === $fitsSquare.getState());

every({ predicate: value, stores })

Motivation

This overload compares each store to specific value in predicate. +It is useful when you write combine with && very often, for example to create a pending state or a form valid flag.

Formulae

$result = every({ predicate: value, stores });
  • $result will be true if each value in stores equals value, otherwise it will be false

Arguments

  1. predicate (T) — Data to compare stores values with
  2. stores (Array<Store<T>>) — List of stores to compare with value
  3. type of value and stores should be the same

Return

  • $result (Store<boolean>)true if each store contains value

Example

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormCorrect = every({
predicate: true,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(true === $isFormCorrect.getState());

every({ predicate: Store, stores })

Motivation

This overload compares each store to specific value in the store predicate. +It is useful when you write combine with && very often, for example to create a pending state or a form valid flag.

Formulae

since

patronum 1.7.0

$result = every({ predicate: $value, stores });
  • $result will be true if each value in stores equals value in the $value, otherwise it will be false

Arguments

  1. predicate (Store<T>) — Store contains value to compare values from stores with
  2. stores (Array<Store<T>>) — List of stores to compare with $value store
  3. type of value and stores should be the same

Return

  • $result (Store<boolean>)true if each store contains value from the predicate store

Example

const $allowToCompare = createStore(true);

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormCorrect = every({
predicate: $allowToCompare,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(true === $isFormCorrect.getState());

Shorthands

since

patronum 1.7.0

$result = every(stores, value);
$result = every(stores, (value) => false);
$result = every(stores, $predicate);

Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form.

Arguments

  1. stores (Array<Store<T>>) — List of stores to compare with predicate in the second argument
  2. predicate (Store<T> | (value: T) => boolean | T) — Predicate to compare with
+ + \ No newline at end of file diff --git a/methods/format/index.html b/methods/format/index.html index 383b7e02..d0f8c83c 100644 --- a/methods/format/index.html +++ b/methods/format/index.html @@ -1,17 +1,17 @@ - + - -format | effector patronum - - + +format | effector patronum + + -
-

format

since

patronum 1.7.0

import { format } from 'patronum';
// or
import { format } from 'patronum/format';

Motivation

Sometimes you need to combine several stores into one string, but without format you need to write boring combine with combinator-function.

Formulae

$string = format`parts${$store}`;
  • on each $store change recalculate template and update $string

Arguments

format should be called as tagged template literal function

Each part of template literal will be converted to string by String(argument), -that's why format supports Store<boolean | string | number>, but also you can pass list of values, and raw values.

Returns

Method always returns Store<string>

Example with stores with strings

import { createStore } from 'effector';
import { format } from 'patronum';

const $firstName = createStore('John');
const $lastName = createStore('Doe');

const $fullName = format`${$firstName} ${$lastName}`;
$fullName.watch(console.log);
// => John Doe

Example with stores with arrays

import { createStore } from 'effector';
import { format } from 'patronum';

const $list = createStore(['First', 'Second', 'Third']);

const $string = format`We have: "${list}"`;
$string.watch(console.log);
// => We have: "First, Second, Third"
- - +
+

format

since

patronum 1.7.0

import { format } from 'patronum';
// or
import { format } from 'patronum/format';

Motivation

Sometimes you need to combine several stores into one string, but without format you need to write boring combine with combinator-function.

Formulae

$string = format`parts${$store}`;
  • on each $store change recalculate template and update $string

Arguments

format should be called as tagged template literal function

Each part of template literal will be converted to string by String(argument), +that's why format supports Store<boolean | string | number>, but also you can pass list of values, and raw values.

Returns

Method always returns Store<string>

Example with stores with strings

import { createStore } from 'effector';
import { format } from 'patronum';

const $firstName = createStore('John');
const $lastName = createStore('Doe');

const $fullName = format`${$firstName} ${$lastName}`;
$fullName.watch(console.log);
// => John Doe

Example with stores with arrays

import { createStore } from 'effector';
import { format } from 'patronum';

const $list = createStore(['First', 'Second', 'Third']);

const $string = format`We have: "${list}"`;
$string.watch(console.log);
// => We have: "First, Second, Third"
+ + \ No newline at end of file diff --git a/methods/in-flight/index.html b/methods/in-flight/index.html index 95155e15..934b6432 100644 --- a/methods/in-flight/index.html +++ b/methods/in-flight/index.html @@ -1,18 +1,19 @@ - + - -inFlight | effector patronum - - + +inFlight | effector patronum + + -
-

inFlight

import { inFlight } from 'patronum';
// or
import { inFlight } from 'patronum/in-flight';

inFlight({ effects: [] })

Motivation

Method allows to calculate total current in flight states of each passed effect. -It is useful when you want to show pending state of complex process.

Formulae

$count = inFlight({ effects: [fx1, fx2] });
  • Count all pending runs of effects in one store

Arguments

  1. effects (Array<Effect<any, any, any>>) - array of any effects

Returns

  • $count (Store<number>) - Store with count of run effects in pending state

Example

import { createEffect } from 'effector';
import { inFlight } from 'patronum/in-flight';

const loadFirst = createEffect().use(() => Promise.resolve(null));
const loadSecond = createEffect().use(() => Promise.resolve(2));
const $count = inFlight({ effects: [loadFirst, loadSecond] });

$count.watch((count) => console.info(`count: ${count}`));
// => count: 0

loadFirst();
loadSecond();
// => count: 2

loadSecond();
loadSecond();
// => count: 4

// Wait to resolve all effects
// => count: 0

inFlight({ domain })

Motivation

This overload allows to count effects in flight of the whole domain. -It is usef when you want to show loading state of the whole application.

Formulae

$count = inFlight({ domain });
  • Count all pending runs of effects in passed domain in one store

Arguments

  1. domain (Domain) - domain to count effects from

Returns

  • $count (Store<number>) - Store with count of run effects in pending state

Example

import { createDomain } from 'effector';
import { inFlight } from 'patronum/in-flight';

const app = createDomain();
const loadFirst = app.createEffect().use(() => Promise.resolve(null));
const loadSecond = app.createEffect().use(() => Promise.resolve(2));
const $count = inFlight({ domain: app });

$count.watch((count) => console.info(`count: ${count}`));
// => count: 0

loadFirst();
loadSecond();
// => count: 2

loadSecond();
loadSecond();
// => count: 4

// Wait to resolve all effects
// => count: 0
- - +
+

inFlight

import { inFlight } from 'patronum';
// or
import { inFlight } from 'patronum/in-flight';

inFlight(effects)

since

patronum 2.1.0 +Use inFlight({ effects }) with patronum < 2.1.0

Motivation

Method allows to calculate total current in flight states of each passed effect. +It is useful when you want to show pending state of complex process.

Formulae

$count = inFlight([fx1, fx2]);
  • Count all pending runs of effects in one store

Arguments

  1. effects (Array<Effect<any, any, any>>) - array of any effects

Returns

  • $count (Store<number>) - Store with count of run effects in pending state

Example

import { createEffect } from 'effector';
import { inFlight } from 'patronum/in-flight';

const loadFirst = createEffect().use(() => Promise.resolve(null));
const loadSecond = createEffect().use(() => Promise.resolve(2));
const $count = inFlight([loadFirst, loadSecond]);

$count.watch((count) => console.info(`count: ${count}`));
// => count: 0

loadFirst();
loadSecond();
// => count: 2

loadSecond();
loadSecond();
// => count: 4

// Wait to resolve all effects
// => count: 0

inFlight({ domain })

Motivation

This overload allows to count effects in flight of the whole domain. +It is usef when you want to show loading state of the whole application.

Formulae

$count = inFlight({ domain });
  • Count all pending runs of effects in passed domain in one store

Arguments

  1. domain (Domain) - domain to count effects from

Returns

  • $count (Store<number>) - Store with count of run effects in pending state

Example

import { createDomain } from 'effector';
import { inFlight } from 'patronum/in-flight';

const app = createDomain();
const loadFirst = app.createEffect().use(() => Promise.resolve(null));
const loadSecond = app.createEffect().use(() => Promise.resolve(2));
const $count = inFlight({ domain: app });

$count.watch((count) => console.info(`count: ${count}`));
// => count: 0

loadFirst();
loadSecond();
// => count: 2

loadSecond();
loadSecond();
// => count: 4

// Wait to resolve all effects
// => count: 0

inFlight({ effects: [] })

Motivation

This overload recieves effects as an object. May be useful for additional clarity, but it's longer to write

Formulae

$count = inFlight({ effects: [fx1, fx2] });
  • Count all pending runs of effects in one store

Arguments

  1. effects (Array<Effect<any, any, any>>) - array of any effects

Returns

  • $count (Store<number>) - Store with count of run effects in pending state

Example

import { createEffect } from 'effector';
import { inFlight } from 'patronum/in-flight';

const loadFirst = createEffect().use(() => Promise.resolve(null));
const loadSecond = createEffect().use(() => Promise.resolve(2));
const $count = inFlight({ effects: [loadFirst, loadSecond] });

$count.watch((count) => console.info(`count: ${count}`));
// => count: 0

loadFirst();
loadSecond();
// => count: 2

loadSecond();
loadSecond();
// => count: 4

// Wait to resolve all effects
// => count: 0
+ + \ No newline at end of file diff --git a/methods/index.html b/methods/index.html index 6ce49ff1..bce37872 100644 --- a/methods/index.html +++ b/methods/index.html @@ -1,16 +1,16 @@ - + - -Methods | effector patronum - - + +Methods | effector patronum + + -
-

Methods

All methods split into categories.

Predicate

  • and — Checks all stores by truthy value.
  • condition — Trigger then or else by condition.
  • either — Selects just one value based on condition.
  • empty — Checks the store for null.
  • equals — Checks the store for some value.
  • every — Checks that state in each store passes the predicate test.
  • not — Inverts store boolean-value.
  • or — Checks at least one store for truthy value.
  • once — Runs only once.
  • reset — Reset all passed stores by clock.
  • some — Checks that state in at least one store passes the predicate test.

Effect

  • inFlight — Counts all pending effects
  • pending — Checks that has effects in pending state.
  • status — Return text representation of effect state.

Timeouts

  • debounce — Creates event which waits until time passes after previous trigger.
  • delay — Delays the call of the event by defined timeout.
  • interval — Creates a dynamic interval with any timeout.
  • throttle — Creates event which triggers at most once per timeout.
  • time — Allows reading current timestamp by triggering clock.

Combination/Decomposition

  • combineEvents — Wait for all passed events is triggered.
  • format — Combine stores to a string literal.
  • reshape — Destructure one store to different stores
  • snapshot — Create store value snapshot.
  • splitMap — Split event to different events and map data.
  • spread — Send fields from object to same targets.

Debug

  • debug — Log triggers of passed units.
- - +
+

Methods

All methods split into categories.

Predicate

  • and — Checks all stores by truthy value.
  • condition — Trigger then or else by condition.
  • either — Selects just one value based on condition.
  • empty — Checks the store for null.
  • equals — Checks the store for some value.
  • every — Checks that state in each store passes the predicate test.
  • not — Inverts store boolean-value.
  • or — Checks at least one store for truthy value.
  • once — Runs only once.
  • reset — Reset all passed stores by clock.
  • some — Checks that state in at least one store passes the predicate test.

Effect

  • inFlight — Counts all pending effects
  • pending — Checks that has effects in pending state.
  • status — Return text representation of effect state.

Timeouts

  • debounce — Creates event which waits until time passes after previous trigger.
  • delay — Delays the call of the event by defined timeout.
  • interval — Creates a dynamic interval with any timeout.
  • throttle — Creates event which triggers at most once per timeout.
  • time — Allows reading current timestamp by triggering clock.

Combination/Decomposition

  • combineEvents — Wait for all passed events is triggered.
  • format — Combine stores to a string literal.
  • reshape — Destructure one store to different stores
  • snapshot — Create store value snapshot.
  • splitMap — Split event to different events and map data.
  • spread — Send fields from object to same targets.
  • previous - Get previous value of store.

Debug

  • debug — Log triggers of passed units.
+ + \ No newline at end of file diff --git a/methods/interval/index.html b/methods/interval/index.html index 30023d59..2071e589 100644 --- a/methods/interval/index.html +++ b/methods/interval/index.html @@ -1,23 +1,23 @@ - + - -interval | effector patronum - - + +interval | effector patronum + + -
-

interval

since

patronum 1.7.0

import { interval } from 'patronum';
// or
import { interval } from 'patronum/interval';

interval({ timeout, start, stop })

Motivation

Creates a dynamic interval with events to start, stop interval, and handle tick.

Formulae

const { tick, isRunning } = interval({
timeout,
start,
stop,
leading,
trailing,
});
  • When start is triggered, tick will be triggered each timeout ms
  • Till start is triggered, until stop is triggered, isRunning will +
    +

    interval

    since

    patronum 1.7.0

    import { interval } from 'patronum';
    // or
    import { interval } from 'patronum/interval';

    interval({ timeout, start, stop })

    Motivation

    Creates a dynamic interval with events to start, stop interval, and handle tick.

    Formulae

    const { tick, isRunning } = interval({
    timeout,
    start,
    stop,
    leading,
    trailing,
    });
    • When start is triggered, tick will be triggered each timeout ms
    • Till start is triggered, until stop is triggered, isRunning will be true
    • After stop is triggered tick won't be triggered, until start is run -again

    Arguments

    1. timeout (number | Store<number>) - timeout for each tick run
    2. start (Event<any>) - start triggering tick. Double trigger +again

Arguments

  1. timeout (number | Store<number>) - timeout for each tick run
  2. start (Event<any>) - start triggering tick. Double trigger without stop call, do nothing.
  3. stop (Event<any>) - stop triggering tick. Double trigger without start call between them, do nothing.
  4. leading (boolean) - Allows running tick when start is triggered.
  5. trailing (boolean) - Allows running tick when stop is triggered, it -will be final call of tick.

Returns

  • An object of event tick and store isRunning
    • tick (Event<void) - the event is run on each timeout ms after start +will be final call of tick.
    • Returns

      • An object of event tick and store isRunning
        • tick (Event<void) - the event is run on each timeout ms after start trigger until stop trigger
        • isRunning (Store<boolean>) - the store contains false until start is -triggered, next until stop triggered the store will be true.

      Example

      import { createStore, createEvent } from 'effector';
      import { interval } from 'patronum';

      const startCounter = createEvent();
      const stopCounter = createEvent();
      const $counter = createStore(0);

      const { tick } = interval({
      timeout: 500,
      start: startCounter,
      stop: stopCounter,
      });

      $counter.on(tick, (number) => number + 1);
      $counter.watch((value) => console.log('COUNTER', value));

      startCounter();

      setTimeout(() => stopCounter(), 5000);

      Try it

      @@trigger protocol

      interval supports @@trigger protocol. It means that you can use interval whatever you can use trigger with, just do not pass start and stop options.

      import { interval } from 'patronum';

      somethingThatRequiresTrigger({
      trigger: interval({ timeout: 1000 }),
      });

      For example, you can use interval to refresh data in the Query from the library Farfetched using @@trigger protocol.

      import { keepFresh } from '@farfetched/core';
      import { interval } from 'patronum';

      keepFresh(someQuery, {
      // 👇 Query will be refreshed each 1000 ms
      triggers: [interval({ timeout: 1000 })],
      });
- - +triggered, next until stop triggered the store will be true.

Example

import { createStore, createEvent } from 'effector';
import { interval } from 'patronum';

const startCounter = createEvent();
const stopCounter = createEvent();
const $counter = createStore(0);

const { tick } = interval({
timeout: 500,
start: startCounter,
stop: stopCounter,
});

$counter.on(tick, (number) => number + 1);
$counter.watch((value) => console.log('COUNTER', value));

startCounter();

setTimeout(() => stopCounter(), 5000);

Try it

@@trigger protocol

interval supports @@trigger protocol. It means that you can use interval whatever you can use trigger with, just do not pass start and stop options.

import { interval } from 'patronum';

somethingThatRequiresTrigger({
trigger: interval({ timeout: 1000 }),
});

For example, you can use interval to refresh data in the Query from the library Farfetched using @@trigger protocol.

import { keepFresh } from '@farfetched/core';
import { interval } from 'patronum';

keepFresh(someQuery, {
// 👇 Query will be refreshed each 1000 ms
triggers: [interval({ timeout: 1000 })],
});
+ + \ No newline at end of file diff --git a/methods/not/index.html b/methods/not/index.html index 47db6c8d..d3b9142f 100644 --- a/methods/not/index.html +++ b/methods/not/index.html @@ -1,18 +1,18 @@ - + - -not | effector patronum - - + +not | effector patronum + + -
-

not

since

patronum 1.11.0

import { not } from 'patronum';
// or
import { not } from 'patronum/not';

Motivation

The method allows to apply boolean NOT to a value. +

+

not

since

patronum 1.11.0

import { not } from 'patronum';
// or
import { not } from 'patronum/not';

Motivation

The method allows to apply boolean NOT to a value. Actually converts any "falsey" value into true (null, 0, empty string). -But undefined is not present, because Store cannot hold it inside.

Formulae

$result = not($value);
  • $result store contains false if $value contains any "truthy" value, otherwise there will be true

Arguments

  • $value: Store<T> — Any value, that required to be "inverted"

Returns

  • $result: Store<boolean>

Example

const $isFinished = createStore(false);
const $stillGoingOn = not($isFinished);

console.assert(true === $stillGoingOn.getState());

Try it

Alternative

const $isFinished = createStore(false);
const $stillGoingOn = $isFinished.map((isFinished) => !isFinished);

console.assert(true === $stillGoingOn.getState());
- - +But undefined is not present, because Store cannot hold it inside.

Formulae

$result = not($value);
  • $result store contains false if $value contains any "truthy" value, otherwise there will be true

Arguments

  • $value: Store<T> — Any value, that required to be "inverted"

Returns

  • $result: Store<boolean>

Example

const $isFinished = createStore(false);
const $stillGoingOn = not($isFinished);

console.assert(true === $stillGoingOn.getState());

Try it

Alternative

const $isFinished = createStore(false);
const $stillGoingOn = $isFinished.map((isFinished) => !isFinished);

console.assert(true === $stillGoingOn.getState());
+ + \ No newline at end of file diff --git a/methods/once/index.html b/methods/once/index.html index 277148e5..434a46e2 100644 --- a/methods/once/index.html +++ b/methods/once/index.html @@ -1,18 +1,18 @@ - + - -once | effector patronum - - + +once | effector patronum + + -
-

once

import { once } from 'patronum';
// or
import { once } from 'patronum/once';

target = once(source)

Motivation

The method allows to do something only on the first ever trigger of source. -It is useful to trigger effects or other logic only once per application's lifetime.

Formulae

target = once(source);
  • When source is triggered, launch target with data from source, but only once.

Arguments

  • source (Event<T> | Effect<T> | Store<T>) — Source unit, data from this unit is used by target.

Returns

  • target Event<T> — The event that will be triggered exactly once after source is triggered.

Example

const messageReceived = createEvent<string>();
const firstMessageReceived = once(messageReceived);

firstMessageReceived.watch((message) =>
console.log('First message received:', message),
);

messageReceived('Hello'); // First message received: Hello
messageReceived('World');

Alternative

import { createGate } from 'effector-react';

const PageGate = createGate();

sample({
source: once(PageGate.open),
target: fetchDataFx,
});

target = once({ source, reset })

Motivation

This overload may receive reset in addition to source. If reset is fired, -target will be allowed to trigger one more time, when source is called.

Formulae

target = once({ source, reset });
  • When source is triggered, launch target with data from source, but only once.
  • When reset is triggered, let once be reset to the initial state and allow target to be triggered again upon source being called.

Arguments

  • source (Event<T> | Effect<T> | Store<T>) — Source unit, data from this unit is used by target.
  • reset (Event | Effect | Store) — A unit that resets once to the initial state, allowing target to be triggered again.

Returns

  • target Event<T> — The event that will be triggered once after source is triggered, until once is reset by calling reset.

Example

import { createGate } from 'effector-react';

const PageGate = createGate();

sample({
source: once({
source: PageGate.open,
reset: fetchDataFx.fail,
}),
target: fetchDataFx,
});
- - +
+

once

import { once } from 'patronum';
// or
import { once } from 'patronum/once';

target = once(source)

Motivation

The method allows to do something only on the first ever trigger of source. +It is useful to trigger effects or other logic only once per application's lifetime.

Formulae

target = once(source);
  • When source is triggered, launch target with data from source, but only once.

Arguments

  • source (Event<T> | Effect<T> | Store<T>) — Source unit, data from this unit is used by target.

Returns

  • target Event<T> — The event that will be triggered exactly once after source is triggered.

Example

const messageReceived = createEvent<string>();
const firstMessageReceived = once(messageReceived);

firstMessageReceived.watch((message) =>
console.log('First message received:', message),
);

messageReceived('Hello'); // First message received: Hello
messageReceived('World');

Alternative

import { createGate } from 'effector-react';

const PageGate = createGate();

sample({
source: once(PageGate.open),
target: fetchDataFx,
});

target = once({ source, reset })

Motivation

This overload may receive reset in addition to source. If reset is fired, +target will be allowed to trigger one more time, when source is called.

Formulae

target = once({ source, reset });
  • When source is triggered, launch target with data from source, but only once.
  • When reset is triggered, let once be reset to the initial state and allow target to be triggered again upon source being called.

Arguments

  • source (Event<T> | Effect<T> | Store<T>) — Source unit, data from this unit is used by target.
  • reset (Event | Effect | Store) — A unit that resets once to the initial state, allowing target to be triggered again.

Returns

  • target Event<T> — The event that will be triggered once after source is triggered, until once is reset by calling reset.

Example

import { createGate } from 'effector-react';

const PageGate = createGate();

sample({
source: once({
source: PageGate.open,
reset: fetchDataFx.fail,
}),
target: fetchDataFx,
});
+ + \ No newline at end of file diff --git a/methods/or/index.html b/methods/or/index.html index ee75a568..be0de267 100644 --- a/methods/or/index.html +++ b/methods/or/index.html @@ -1,17 +1,17 @@ - + - -or | effector patronum - - + +or | effector patronum + + -
-

or

since

patronum 1.11.0

import { or } from 'patronum';
// or
import { or } from 'patronum/or';

Motivation

The method allows to check each passed store for truthy values. -It can be compared with if (a || b || c || d).

Formulae

$result = or(...stores);
  • $result store contains true if at least one of passed store contains "truthy" value.

Arguments

The method receives any amount of arguments.

  • ...stores: Array<Store<T>> — Each argument must be store with a value of any kind.

Returns

  • $result: Store<boolean> — The store contains false if each passed store in stores contains "falsey" value

Example

const $isAuthorized = createStore(true);
const $immediateOrder = createStore(false);
const $mocksForDemo = createStore(false);

const $allowedToShow = or($isAuthorized, $immediateOrder, $mocksForDemo);
console.assert(true === $allowedToShow.getState());

Try it

Alternative

import { combine, createSTore } from 'effector';

const $isAuthorized = createStore(true);
const $immediateOrder = createStore(false);
const $mocksForDemo = createStore(false);

const $allowedToShow = combine(
$isAuthorized,
$immediateOrder,
$mocksForDemo,
(isAuthorized, immediateOrder, mocksForDemo) =>
isAuthorized || immediateOrder || mocksForDemo,
);
console.assert(true === $allowedToShow.getState());
- - +
+

or

since

patronum 1.11.0

import { or } from 'patronum';
// or
import { or } from 'patronum/or';

Motivation

The method allows to check each passed store for truthy values. +It can be compared with if (a || b || c || d).

Formulae

$result = or(...stores);
  • $result store contains true if at least one of passed store contains "truthy" value.

Arguments

The method receives any amount of arguments.

  • ...stores: Array<Store<T>> — Each argument must be store with a value of any kind.

Returns

  • $result: Store<boolean> — The store contains false if each passed store in stores contains "falsey" value

Example

const $isAuthorized = createStore(true);
const $immediateOrder = createStore(false);
const $mocksForDemo = createStore(false);

const $allowedToShow = or($isAuthorized, $immediateOrder, $mocksForDemo);
console.assert(true === $allowedToShow.getState());

Try it

Alternative

import { combine, createSTore } from 'effector';

const $isAuthorized = createStore(true);
const $immediateOrder = createStore(false);
const $mocksForDemo = createStore(false);

const $allowedToShow = combine(
$isAuthorized,
$immediateOrder,
$mocksForDemo,
(isAuthorized, immediateOrder, mocksForDemo) =>
isAuthorized || immediateOrder || mocksForDemo,
);
console.assert(true === $allowedToShow.getState());
+ + \ No newline at end of file diff --git a/methods/pending/index.html b/methods/pending/index.html index 9a96909f..c6be14b8 100644 --- a/methods/pending/index.html +++ b/methods/pending/index.html @@ -1,21 +1,22 @@ - + - -pending | effector patronum - - + +pending | effector patronum + + -
-

pending

import { pending } from 'patronum';
// or
import { pending } from 'patronum/pending';

pending({ effects: [] })

Motivation

This overload allows to read pending state of passed effects. It is usef when -you want to show loading state of the whole application.

Formulae

$inProcess = pending({ effects: [fx1, fx2], of: Strategy });
  • When effects pending state, result will be true
  • The of parameter selects strategy

Arguments

  1. effects (Array<Effect<any, any, any>>) - array of any effects
  2. of ("some" | "every") — Optional. Select strategy of combining pendings -of differents effects. Default "some"
since

The of argument was added since patronum 1.1.0

Returns

  • $inProcess (Store<boolean>) - Store with boolean state

Example

import { createEffect } from 'effector';
import { pending } from 'patronum/pending';

const loadFirst = createEffect(() => Promise.resolve(null));
const loadSecond = createEffect(() => Promise.resolve(2));
const $processing = pending({ effects: [loadFirst, loadSecond] });

$processing.watch((processing) => console.info(`processing: ${processing}`));
// => processing: false

loadFirst();
loadSecond();
// => processing: true

pending({ domain })

since

patronum 1.1.0

Motivation

This overload allows to read pending state of created effects in the domain. It -is usef when you want to show loading state of the whole application.

Formulae

$inProcess = pending({ domain, of: Strategy });
  • When an effect created in the domain in pending state, result will be true
  • The of parameter selects strategy

Arguments

  1. domain (Domain) - Effector domain with at least one effect
  2. of ("some" | "every") — Optional. Select strategy of combining pendings -of differents effects. Default "some"

Returns

  • $inProcess (Store<boolean>) - Store with boolean state

Example

import { createDomain } from 'effector';
import { pending } from 'patronum/pending';

const app = createDomain();
const loadFirst = app.createEffect(() => Promise.resolve(null));
const loadSecond = app.createEffect(() => Promise.resolve(2));
const $processing = pending({ domain: app });

$processing.watch((processing) => console.info(`processing: ${processing}`));
// => processing: false

loadFirst();
loadSecond();
// => processing: true

Strategy

There available two options:

  • some — default strategy when of parameter is not provided. At least one -effect must be in pending state.
  • every — each effect must be in pending state.

Example

import { createEffect } from 'effector';
import { pending } from 'patronum/pending';

const loadFirst = createEffect(() => Promise.resolve(null));
const loadSecond = createEffect(() => Promise.resolve(2));

const $pending = pending({ effects: [loadFirst, loadSecond], of: 'every' });

// When no effects is loading, $pending will be true

// If only one is loading, also will be false
loadFirst();

// But after running the second effect, $pending will be true
loadSecond();

$pending.watch(console.log); // true
- - +
+

pending

import { pending } from 'patronum';
// or
import { pending } from 'patronum/pending';

pendings(effects)

since

patronum 2.1.0 +Use pending({ effects: [] }) with with patronum < 2.1.0

Motivation

This overload allows to read pending state of passed effects. It is usef when +you want to show loading state of the whole application.

Formulae

$inProcess = pending([fx1, fx2]);
  • When some of effects are in pending state, result will be true

Arguments

  1. effects (Array<Effect<any, any, any>>) - array of any effects

Returns

  • $inProcess (Store<boolean>) - Store with boolean state

Example

import { createEffect } from 'effector';
import { pending } from 'patronum/pending';

const loadFirstFx = createEffect(() => Promise.resolve(null));
const loadSecondFx = createEffect(() => Promise.resolve(2));
const $processing = pending([loadFirstFx, loadSecondFx]);

$processing.watch((processing) => console.info(`processing: ${processing}`));
// => processing: false

loadFirstFx();
loadSecondFx();
// => processing: true

pending({ effects: [] })

Motivation

This overload recieves effects and optional of strategy as an object. Useful when need to change strategy

Formulae

$inProcess = pending({ effects: [fx1, fx2], of: Strategy });
  • When effects pending state, result will be true
  • The of parameter selects strategy

Arguments

  1. effects (Array<Effect<any, any, any>>) - array of any effects
  2. of ("some" | "every") — Optional. Select strategy of combining pendings +of differents effects. Default "some"
since

The of argument was added since patronum 1.1.0

Returns

  • $inProcess (Store<boolean>) - Store with boolean state

Example: show processing only when all effects are pending

import { createEffect } from 'effector';
import { pending } from 'patronum/pending';

const loadFirstFx = createEffect(() => Promise.resolve(null));
const loadSecondFx = createEffect(() => Promise.resolve(2));
const $processing = pending({
effects: [loadFirstFx, loadSecondFx],
of: 'every',
});

$processing.watch((processing) => console.info(`processing: ${processing}`));
// => processing: false

loadFirstFx();
// => processing is still false
loadSecondFx();
// => processing: true

pending({ domain })

since

patronum 1.1.0

Motivation

This overload allows to read pending state of created effects in the domain. It +is usef when you want to show loading state of the whole application.

Formulae

$inProcess = pending({ domain, of: Strategy });
  • When an effect created in the domain in pending state, result will be true
  • The of parameter selects strategy

Arguments

  1. domain (Domain) - Effector domain with at least one effect
  2. of ("some" | "every") — Optional. Select strategy of combining pendings +of differents effects. Default "some"

Returns

  • $inProcess (Store<boolean>) - Store with boolean state

Example

import { createDomain } from 'effector';
import { pending } from 'patronum/pending';

const app = createDomain();
const loadFirstFx = app.createEffect(() => Promise.resolve(null));
const loadSecondFx = app.createEffect(() => Promise.resolve(2));
const $processing = pending({ domain: app });

$processing.watch((processing) => console.info(`processing: ${processing}`));
// => processing: false

loadFirstFx();
loadSecondFx();
// => processing: true

Strategy

There available two options:

  • some — default strategy when of parameter is not provided. At least one +effect must be in pending state.
  • every — each effect must be in pending state.

Example

import { createEffect } from 'effector';
import { pending } from 'patronum/pending';

const loadFirstFx = createEffect(() => Promise.resolve(null));
const loadSecondFx = createEffect(() => Promise.resolve(2));

const $pending = pending({ effects: [loadFirstFx, loadSecondFx], of: 'every' });

// When no effects is loading, $pending will be true

// If only one is loading, also will be false
loadFirstFx();

// But after running the second effect, $pending will be true
loadSecondFx();

$pending.watch(console.log); // true
+ + \ No newline at end of file diff --git a/methods/previous/index.html b/methods/previous/index.html new file mode 100644 index 00000000..62cad018 --- /dev/null +++ b/methods/previous/index.html @@ -0,0 +1,16 @@ + + + + + +previous | effector patronum + + + + +
+

previous

since

patronum 2.1.0

import { previous } from 'patronum';
// or
import { previous } from 'patronum/previous-value';

Motivation

The method allows to get previous value of given store. Usually need for analytics

Formulae

$target = previous($source);
$target = previous($source, 'initial value');

Arguments

  1. $source ([Store]) - source store
  2. defaultValue (optional) - default value for $target store, if not passed, null will be used

Returns

  • $target ([Store]) - new store that contain previous value of $source after first update and null or default value (if passed) before that

Example

Push analytics with route transition:

import { createStore, createEvent, createEffect, sample } from 'effector';
import { previous } from 'patronum';

const openNewRoute = createEvent<string>();
const $currentRoute = createStore('main_page');
const $previousRoute = previous($currentRoute);

const sendRouteTransitionFx = createEffect(async ({ prevRoute, nextRoute }) => {
console.log(prevRoute, '->', newRoute)
await fetch(...)
});

sample({clock: openNewRoute, target: $currentRoute});

sample({
clock: openNewRoute,
source: {
prevRoute: $previousRoute,
nextRoute: $currentRoute,
},
target: sendRouteTransitionFx,
});

openNewRoute('messages');
// main_page -> messages
openNewRoute('chats');
// messages -> chats
+ + + + \ No newline at end of file diff --git a/methods/reset/index.html b/methods/reset/index.html index 916ec009..91fe452e 100644 --- a/methods/reset/index.html +++ b/methods/reset/index.html @@ -1,16 +1,16 @@ - + - -reset | effector patronum - - + +reset | effector patronum + + -
-

reset

since

patronum 1.7.0

import { reset } from 'patronum';
// or
import { reset } from 'patronum/reset';

reset({ clock, target })

Motivation

The method allow to reset many stores by a single line

Formulae

reset({ clock, target });
  • When clock is triggered, reset store/stores in target to the initial value.

Arguments

  1. clock: Unit<any> | Array<Unit<any>> — Any kind of units is accepted (Store, Event, Effect).
  2. target: Store<any> | Array<Store<any>> — Each of these stores will be reset to the initial values when clock is happened.

Example

import { createEvent, createStore } from 'effector';
import { reset } from 'patronum/reset';

const pageUnmounted = createEvent();
const userSessionFinished = createEvent();

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

reset({
clock: [pageUnmounted, userSessionFinished],
target: [$post, $comments, $draftComment],
});
import { createStore } from 'effector';
import { reset } from 'patronum/reset';

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

const resetEvent = reset({ target: [$post, $comments, $draftComment] });

Try it

Alternative

First variant is writing each reset by yourself:

$post.reset([pageUnmounted, userSessionFinished]);
$comments.reset([pageUnmounted, userSessionFinished]);
$draftComment.reset([pageUnmounted, userSessionFinished]);

There has another way — use domain:

import { createDomain, createStore } from 'effector';
const resetOnSomeCases = createDomain();

const $post = resetOnSomeCases.createStore(null);
const $comments = resetOnSomeCases.createStore([]);
const $draftComment = resetOnSomeCases.createStore('');

resetOnSomeCases.onCreateStore((store) => {
store.reset([pageUnmounted, userSessionFinished]);
});

reset({ target })

Motivation

The method allow to reset many stores by a single line with no clock passing

since

The clock argument became optional since patronum 1.15.0

Formulae

const resetEvent = reset({ target });
  • When resetEvent is triggered, reset store/stores in target to the initial value.

Arguments

  1. target: Store<any> | Array<Store<any>> — Each of these stores will be reset to the initial values when resetEvent is triggered.

Returns

  • resetEvent (Event<void>) — New event that reset store/stores in target.

Example

import { createEvent, createStore } from 'effector';
import { reset } from 'patronum/reset';

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

const resetEvent = reset({ target: [$post, $comments, $draftComment] });

Alternative

Write reset event by yourself:

import { createEvent, createStore } from 'effector';
import { reset } from 'patronum/reset';

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

const resetEvent = createEvent();

reset({
clock: resetEvent,
target: [$post, $comments, $draftComment],
});
- - +
+

reset

since

patronum 1.7.0

import { reset } from 'patronum';
// or
import { reset } from 'patronum/reset';

reset({ clock, target })

Motivation

The method allow to reset many stores by a single line

Formulae

reset({ clock, target });
  • When clock is triggered, reset store/stores in target to the initial value.

Arguments

  1. clock: Unit<any> | Array<Unit<any>> — Any kind of units is accepted (Store, Event, Effect).
  2. target: Store<any> | Array<Store<any>> — Each of these stores will be reset to the initial values when clock is happened.

Example

import { createEvent, createStore } from 'effector';
import { reset } from 'patronum/reset';

const pageUnmounted = createEvent();
const userSessionFinished = createEvent();

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

reset({
clock: [pageUnmounted, userSessionFinished],
target: [$post, $comments, $draftComment],
});
import { createStore } from 'effector';
import { reset } from 'patronum/reset';

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

const resetEvent = reset({ target: [$post, $comments, $draftComment] });

Try it

Alternative

First variant is writing each reset by yourself:

$post.reset([pageUnmounted, userSessionFinished]);
$comments.reset([pageUnmounted, userSessionFinished]);
$draftComment.reset([pageUnmounted, userSessionFinished]);

There has another way — use domain:

import { createDomain, createStore } from 'effector';
const resetOnSomeCases = createDomain();

const $post = resetOnSomeCases.createStore(null);
const $comments = resetOnSomeCases.createStore([]);
const $draftComment = resetOnSomeCases.createStore('');

resetOnSomeCases.onCreateStore((store) => {
store.reset([pageUnmounted, userSessionFinished]);
});

reset({ target })

Motivation

The method allow to reset many stores by a single line with no clock passing

since

The clock argument became optional since patronum 1.15.0

Formulae

const resetEvent = reset({ target });
  • When resetEvent is triggered, reset store/stores in target to the initial value.

Arguments

  1. target: Store<any> | Array<Store<any>> — Each of these stores will be reset to the initial values when resetEvent is triggered.

Returns

  • resetEvent (Event<void>) — New event that reset store/stores in target.

Example

import { createEvent, createStore } from 'effector';
import { reset } from 'patronum/reset';

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

const resetEvent = reset({ target: [$post, $comments, $draftComment] });

Alternative

Write reset event by yourself:

import { createEvent, createStore } from 'effector';
import { reset } from 'patronum/reset';

const $post = createStore(null);
const $comments = createStore([]);
const $draftComment = createStore('');

const resetEvent = createEvent();

reset({
clock: resetEvent,
target: [$post, $comments, $draftComment],
});
+ + \ No newline at end of file diff --git a/methods/reshape/index.html b/methods/reshape/index.html index cf1b48a8..7c46185f 100644 --- a/methods/reshape/index.html +++ b/methods/reshape/index.html @@ -1,17 +1,17 @@ - + - -reshape | effector patronum - - + +reshape | effector patronum + + -
-

reshape

import { reshape } from 'patronum';
// or
import { reshape } from 'patronum/reshape';

result = reshape({ source, shape })

Motivation

This method allows to create many stores from single store at once. -It useful when you want to read many properties from object to different stores.

Formulae

result = reshape({ source, shape });
  • Call each function in shape object with data from source, and create store with the same name as key in shape
  • If function in shape returns undefined, the same store will contain null, because store cannot contain undefined.

Arguments

  1. source (Store) — Source store, data from this unit passed to each function in shape
  2. shape ({ [key: string]: (payload: T) => any }) — Object of functions. Function receives payload of source as single argument, should return any value.

Returns

  • result ({ [key: string]: Store<any> }) — Object of stores, that created with the same structure as shape, with data from passed functions

Examples

Creates much stores from single string

import { createStore } from 'effector';
import { reshape } from 'patronum/reshape';

const $original = createStore<string>('Example');

const result = reshape({
source: $original,
shape: {
length: (string) => string.length,
lowercase: (string) => string.toLowerCase(),
uppercase: (string) => string.toUpperCase(),
},
});

// result.length: Store<number>;
// result.lowercase: Store<string>;
// result.uppercase: Store<string>;

result.length.watch((length) => console.log('String length:', length));
result.lowercase.watch((lowercase) => console.log('lowercase:', lowercase));

Destructure object

import { createStore } from 'effector';
import { reshape } from 'patronum/reshape';

const $user = createStore({
name: 'Sergey',
lastname: 'Sova',
age: 26,
});

const { name, lastname, age } = reshape({
source: $user,
shape: {
name: (user) => user.name,
lastname: (user) => user.lastname,
age: ({ age }) => age,
},
});

name.watch((name) => console.info('name updated', name));
lastname.watch((lastname) => console.info('lastname updated', lastname));
age.watch((age) => console.info('age updated', age));

// => name updated Sergey
// => lastname updated Sova
// => age updated 26
- - +
+

reshape

import { reshape } from 'patronum';
// or
import { reshape } from 'patronum/reshape';

result = reshape({ source, shape })

Motivation

This method allows to create many stores from single store at once. +It useful when you want to read many properties from object to different stores.

Formulae

result = reshape({ source, shape });
  • Call each function in shape object with data from source, and create store with the same name as key in shape
  • If function in shape returns undefined, the same store will contain null, because store cannot contain undefined.

Arguments

  1. source (Store) — Source store, data from this unit passed to each function in shape
  2. shape ({ [key: string]: (payload: T) => any }) — Object of functions. Function receives payload of source as single argument, should return any value.

Returns

  • result ({ [key: string]: Store<any> }) — Object of stores, that created with the same structure as shape, with data from passed functions

Examples

Creates much stores from single string

import { createStore } from 'effector';
import { reshape } from 'patronum/reshape';

const $original = createStore<string>('Example');

const result = reshape({
source: $original,
shape: {
length: (string) => string.length,
lowercase: (string) => string.toLowerCase(),
uppercase: (string) => string.toUpperCase(),
},
});

// result.length: Store<number>;
// result.lowercase: Store<string>;
// result.uppercase: Store<string>;

result.length.watch((length) => console.log('String length:', length));
result.lowercase.watch((lowercase) => console.log('lowercase:', lowercase));

Destructure object

import { createStore } from 'effector';
import { reshape } from 'patronum/reshape';

const $user = createStore({
name: 'Sergey',
lastname: 'Sova',
age: 26,
});

const { name, lastname, age } = reshape({
source: $user,
shape: {
name: (user) => user.name,
lastname: (user) => user.lastname,
age: ({ age }) => age,
},
});

name.watch((name) => console.info('name updated', name));
lastname.watch((lastname) => console.info('lastname updated', lastname));
age.watch((age) => console.info('age updated', age));

// => name updated Sergey
// => lastname updated Sova
// => age updated 26
+ + \ No newline at end of file diff --git a/methods/snapshot/index.html b/methods/snapshot/index.html index 3a73de98..be349c0c 100644 --- a/methods/snapshot/index.html +++ b/methods/snapshot/index.html @@ -1,17 +1,17 @@ - + - -snapshot | effector patronum - - + +snapshot | effector patronum + + -
-

snapshot

since

patronum 1.7.0

import { snapshot } from 'patronum';
// or
import { snapshot } from 'patronum/snapshot';

result = snapshot({ source, clock, fn })

Motivation

This method allows to copy any store on optional trigger unit. -It useful when you want to save previous state of store before some actions.

Formulae

result = snapshot({ source, clock, fn });
  • Call fn with data from source while clock triggered, and create store with the value
  • If fn returns undefined, the update will be skipped.

Arguments

  1. source (Store) — Source store, data from this unit passed to fn
  2. clock (Event, Effect, Store) — Trigger unit
  3. fn ((value: T) => U) — Transformation function

Returns

  • result (Store) — Copied store

Examples

Exact copy of store

import { createStore } from 'effector';
import { snapshot } from 'patronum/snapshot';

const $original = createStore<string>('Example');

const $copy = snapshot({ source: $original });

Exact copy on trigger

import { restore, createEvent } from 'effector';
import { snapshot } from 'patronum/snapshot';

const changeText = createEvent<string>();
const createSnapshot = createEvent();

const $original = restore(changeText, 'Example');

const $snapshot = snapshot({
source: $original,
clock: createSnapshot,
});

changeText('New text');

// $original -> Store with "New text"
// $snapshot -> Store with "Example"

createSnapshot();

// $original -> Store with "New text"
// $snapshot -> Store with "New text"

Copy on trigger with transformation

import { restore, createEvent } from 'effector';
import { snapshot } from 'patronum/snapshot';

const changeText = createEvent<string>();
const createSnapshot = createEvent();

const $original = restore(changeText, 'Example');

const $lengthSnapshot = snapshot({
source: $original,
clock: createSnapshot,
fn: (text) => text.length,
});

// $original -> Store with "Example"
// $lengthSnapshot -> Store with 7 (length of "Example")

changeText('New long text');

// $original -> Store with "New long text"
// $lengthSnapshot -> Store with 7 (length of "Example")

createSnapshot();

// $original -> Store with "New long text"
// $lengthSnapshot -> Store with 13 (length of "New long text")
- - +
+

snapshot

since

patronum 1.7.0

import { snapshot } from 'patronum';
// or
import { snapshot } from 'patronum/snapshot';

result = snapshot({ source, clock, fn })

Motivation

This method allows to copy any store on optional trigger unit. +It useful when you want to save previous state of store before some actions.

Formulae

result = snapshot({ source, clock, fn });
  • Call fn with data from source while clock triggered, and create store with the value
  • If fn returns undefined, the update will be skipped.

Arguments

  1. source (Store) — Source store, data from this unit passed to fn
  2. clock (Event, Effect, Store) — Trigger unit
  3. fn ((value: T) => U) — Transformation function

Returns

  • result (Store) — Copied store

Examples

Exact copy of store

import { createStore } from 'effector';
import { snapshot } from 'patronum/snapshot';

const $original = createStore<string>('Example');

const $copy = snapshot({ source: $original });

Exact copy on trigger

import { restore, createEvent } from 'effector';
import { snapshot } from 'patronum/snapshot';

const changeText = createEvent<string>();
const createSnapshot = createEvent();

const $original = restore(changeText, 'Example');

const $snapshot = snapshot({
source: $original,
clock: createSnapshot,
});

changeText('New text');

// $original -> Store with "New text"
// $snapshot -> Store with "Example"

createSnapshot();

// $original -> Store with "New text"
// $snapshot -> Store with "New text"

Copy on trigger with transformation

import { restore, createEvent } from 'effector';
import { snapshot } from 'patronum/snapshot';

const changeText = createEvent<string>();
const createSnapshot = createEvent();

const $original = restore(changeText, 'Example');

const $lengthSnapshot = snapshot({
source: $original,
clock: createSnapshot,
fn: (text) => text.length,
});

// $original -> Store with "Example"
// $lengthSnapshot -> Store with 7 (length of "Example")

changeText('New long text');

// $original -> Store with "New long text"
// $lengthSnapshot -> Store with 7 (length of "Example")

createSnapshot();

// $original -> Store with "New long text"
// $lengthSnapshot -> Store with 13 (length of "New long text")
+ + \ No newline at end of file diff --git a/methods/some/index.html b/methods/some/index.html index c8698d00..15db65dd 100644 --- a/methods/some/index.html +++ b/methods/some/index.html @@ -1,19 +1,19 @@ - + - -some | effector patronum - - + +some | effector patronum + + -
-

some

import { some } from 'patronum';
// or
import { some } from 'patronum/some';

some({ predicate: Function, stores })

Motivation

Method calculates boolean value if at least one state of the store satisfies the condition in predicate. -It is useful to check that user filled at least a single field.

Formulae

$result = some({ predicate: (value) => true, stores });
  • read it as: has some predicate at at least one store
  • $result will be true if each at least predicate on each store value from values returns true, otherwise it will be false

Arguments

  1. predicate ((value: T) => boolean) — Function to check store value
  2. stores (Array<Store<T>>) — List of stores

Return

  • $result (Store<boolean>)true if at least one store corresponds to predicate

Example

const $width = createStore(440);
const $height = createStore(820);

const $tooBig = some({
predicate: (size) => size > 800,
stores: [$width, $height],
});

console.assert(true === $tooBig.getState());

some({ predicate: value, stores })

Motivation

This overload compares each store to specific value in predicate. -It is useful when you write combine with || very often, for example to create an invalid form flag.

Formulae

$result = some({ predicate: value, stores });
  • $result will be true if at least one value in stores equals value, otherwise it will be false

Arguments

  1. predicate (T) — Data to compare stores values with
  2. stores (Array<Store<T>>) — List of stores to compare with value
  3. type of predicate and stores should should be the same

Return

  • $result (Store<boolean>)true if at least one store contains value

Example

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormFailed = some({
predicate: false,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(false === $isFormFailed.getState());

some({ predicate: Store, stores })

since

patronum 1.8.0

Motivation

This overload compares each store to specific value in store predicate. -It is useful when you write combine with || very often, for example to create an invalid form flag.

Formulae

$result = some({ predicate: $value, stores });
  • $result will be true if at least one value in stores equals value in $value, otherwise it will be false

Arguments

  1. predicate (Store<T>) — Store contains value to compare values from stores with
  2. stores (Array<Store<T>>) — List of stores to compare with value
  3. type of value and stores should be the same

Return

  • $result (Store<boolean>)true if at least one store contains value

Example

const $allowToCompare = createStore(true);

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormFailed = some({
predicate: $allowToCompare,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(false === $isFormFailed.getState());

Shorthands

$result = some(stores, value);
$result = some(stores, (value) => false);
$result = some(stores, $predicate);

Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form.

Arguments

  1. stores (Array<Store<T>>) — List of stores to compare with predicate in the second argument
  2. predicate (Store<T> | (value: T) => boolean | T) — Predicate to compare with
- - +
+

some

import { some } from 'patronum';
// or
import { some } from 'patronum/some';

some({ predicate: Function, stores })

Motivation

Method calculates boolean value if at least one state of the store satisfies the condition in predicate. +It is useful to check that user filled at least a single field.

Formulae

$result = some({ predicate: (value) => true, stores });
  • read it as: has some predicate at at least one store
  • $result will be true if each at least predicate on each store value from values returns true, otherwise it will be false

Arguments

  1. predicate ((value: T) => boolean) — Function to check store value
  2. stores (Array<Store<T>>) — List of stores

Return

  • $result (Store<boolean>)true if at least one store corresponds to predicate

Example

const $width = createStore(440);
const $height = createStore(820);

const $tooBig = some({
predicate: (size) => size > 800,
stores: [$width, $height],
});

console.assert(true === $tooBig.getState());

some({ predicate: value, stores })

Motivation

This overload compares each store to specific value in predicate. +It is useful when you write combine with || very often, for example to create an invalid form flag.

Formulae

$result = some({ predicate: value, stores });
  • $result will be true if at least one value in stores equals value, otherwise it will be false

Arguments

  1. predicate (T) — Data to compare stores values with
  2. stores (Array<Store<T>>) — List of stores to compare with value
  3. type of predicate and stores should should be the same

Return

  • $result (Store<boolean>)true if at least one store contains value

Example

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormFailed = some({
predicate: false,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(false === $isFormFailed.getState());

some({ predicate: Store, stores })

since

patronum 1.8.0

Motivation

This overload compares each store to specific value in store predicate. +It is useful when you write combine with || very often, for example to create an invalid form flag.

Formulae

$result = some({ predicate: $value, stores });
  • $result will be true if at least one value in stores equals value in $value, otherwise it will be false

Arguments

  1. predicate (Store<T>) — Store contains value to compare values from stores with
  2. stores (Array<Store<T>>) — List of stores to compare with value
  3. type of value and stores should be the same

Return

  • $result (Store<boolean>)true if at least one store contains value

Example

const $allowToCompare = createStore(true);

const $isPasswordCorrect = createStore(true);
const $isEmailCorrect = createStore(true);

const $isFormFailed = some({
predicate: $allowToCompare,
stores: [$isPasswordCorrect, $isEmailCorrect],
});

console.assert(false === $isFormFailed.getState());

Shorthands

$result = some(stores, value);
$result = some(stores, (value) => false);
$result = some(stores, $predicate);

Shorthand have the same rules as the main overrides, just it uses positional arguments instead of object-form.

Arguments

  1. stores (Array<Store<T>>) — List of stores to compare with predicate in the second argument
  2. predicate (Store<T> | (value: T) => boolean | T) — Predicate to compare with
+ + \ No newline at end of file diff --git a/methods/split-map/index.html b/methods/split-map/index.html index 6c660d0d..4d50899b 100644 --- a/methods/split-map/index.html +++ b/methods/split-map/index.html @@ -1,17 +1,17 @@ - + - -splitMap | effector patronum - - + +splitMap | effector patronum + + -
-

splitMap

import { splitMap } from 'patronum';
// or
import { splitMap } from 'patronum/split-map';

shape = splitMap({ source, cases })

Motivation

The method is a combination of split and map. -It is useful when you want add some kind of pattern matching.

Formulae

shape = splitMap({ source, cases });
  • On each source trigger, call each function in cases object one after another until function returns non undefined, and call event in shape with the same name as function in cases object.
  • If no function returned value event __ in shape should be triggered

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit passed to each function in cases object and __ event in shape as is
  2. cases ({ [key: string]: (payload: T) => any | void }) — Object of functions. Function receives one argument is a payload from source, should return any value or undefined

Returns

  • shape ({ [key: string]: Event<any>; __: Event<T> }) — Object of events, with the same structure as cases, but with the default event __, that triggered when each other function returns undefined

Examples

Extract passed fields from optional object

import { createEvent } from 'effector';
import { splitMap } from 'patronum/split-map';

const event = createEvent<object>();

const shape = splitMap({
source: event,
cases: {
getType: (input) => input.type,
getDemo: (input) => input.demo,
},
});

shape.getType.watch((type) => console.log('TYPE', type));
shape.getDemo.watch((demo) => console.log('DEMO', demo));
shape.__.watch((other) => console.log('OTHER', other));

event({ type: 'demo' });
// => TYPE demo

event({ demo: 5 });
// => DEMO 5

event({});
// => OTHER {}

Split WebSocket events to effector events

import { createEvent } from 'effector';
import { splitMap } from 'patronum/split-map';

type WSEvent =
| { type: 'init'; key: string }
| { type: 'increment'; count: number; name: string }
| { type: 'reset'; name: string };

export const websocketEventReceived = createEvent<WSEvent>();

const { init, increment, reset, __ } = splitMap({
source: websocketEventReceived,
cases: {
init: (event) => {
if (event.type === 'init') return event.key;
},
increment: ({ type, ...payload }) => {
if (type === 'increment') return payload;
},
reset: ({ type, name }) => {
if (type === 'reset') return name;
},
},
});

__.watch((payload) => {
console.warn('Unknown type:', payload.type);
});

increment.watch((payload) => {
console.info('should be incremented', payload.count, payload.name);
});

websocketEventReceived({ type: 'increment', name: 'demo', count: 5 });
// => should be incremented 5 'demo'

websocketEventReceived({ type: 'bang', random: 'unknown' });
// => Unknown type: 'bang'
- - +
+

splitMap

import { splitMap } from 'patronum';
// or
import { splitMap } from 'patronum/split-map';

shape = splitMap({ source, cases })

Motivation

The method is a combination of split and map. +It is useful when you want add some kind of pattern matching.

Formulae

shape = splitMap({ source, cases });
  • On each source trigger, call each function in cases object one after another until function returns non undefined, and call event in shape with the same name as function in cases object.
  • If no function returned value event __ in shape should be triggered

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit passed to each function in cases object and __ event in shape as is
  2. cases ({ [key: string]: (payload: T) => any | void }) — Object of functions. Function receives one argument is a payload from source, should return any value or undefined

Returns

  • shape ({ [key: string]: Event<any>; __: Event<T> }) — Object of events, with the same structure as cases, but with the default event __, that triggered when each other function returns undefined

Examples

Extract passed fields from optional object

import { createEvent } from 'effector';
import { splitMap } from 'patronum/split-map';

const event = createEvent<object>();

const shape = splitMap({
source: event,
cases: {
getType: (input) => input.type,
getDemo: (input) => input.demo,
},
});

shape.getType.watch((type) => console.log('TYPE', type));
shape.getDemo.watch((demo) => console.log('DEMO', demo));
shape.__.watch((other) => console.log('OTHER', other));

event({ type: 'demo' });
// => TYPE demo

event({ demo: 5 });
// => DEMO 5

event({});
// => OTHER {}

Split WebSocket events to effector events

import { createEvent } from 'effector';
import { splitMap } from 'patronum/split-map';

type WSEvent =
| { type: 'init'; key: string }
| { type: 'increment'; count: number; name: string }
| { type: 'reset'; name: string };

export const websocketEventReceived = createEvent<WSEvent>();

const { init, increment, reset, __ } = splitMap({
source: websocketEventReceived,
cases: {
init: (event) => {
if (event.type === 'init') return event.key;
},
increment: ({ type, ...payload }) => {
if (type === 'increment') return payload;
},
reset: ({ type, name }) => {
if (type === 'reset') return name;
},
},
});

__.watch((payload) => {
console.warn('Unknown type:', payload.type);
});

increment.watch((payload) => {
console.info('should be incremented', payload.count, payload.name);
});

websocketEventReceived({ type: 'increment', name: 'demo', count: 5 });
// => should be incremented 5 'demo'

websocketEventReceived({ type: 'bang', random: 'unknown' });
// => Unknown type: 'bang'
+ + \ No newline at end of file diff --git a/methods/spread/index.html b/methods/spread/index.html index f27cb1b2..200ac511 100644 --- a/methods/spread/index.html +++ b/methods/spread/index.html @@ -1,18 +1,19 @@ - + - -spread | effector patronum - - + +spread | effector patronum + + -
-

spread

import { spread } from 'patronum';
// or
import { spread } from 'patronum/spread';

spread({ source, targets })

Motivation

This method allows to trigger many target at once, if they match the source structure. -It is useful when you need to destructure object and save values to different stores.

Formulae

spread({ source, targets: { field: target, ... } })
  • When source is triggered with object, extract field from data, and trigger target
  • targets can have multiple properties
  • If the source was triggered with non-object, nothing would be happening
  • If source is triggered with object but without propertpy field, target for this field will not be triggered

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data passed to it should be an object with fields from targets
  2. targets (Record<string, Event<T> | Store<T> | Effect<T>>) — Flat object which key is key in source payload, and value is unit to store value to.

Example

Save fields of payload to different stores

import { createStore, createEvent } from 'effector';
import { spread } from 'patronum/spread';

const $first = createStore('');
const $last = createStore('');

const formReceived = createEvent();

spread({
source: formReceived,
targets: {
first: $first,
last: $last,
},
});

$first.watch((first) => console.log('First name', first));
$last.watch((last) => console.log('Last name', last));

formReceived({ first: 'Sergey', last: 'Sova' });
// => First name Sergey
// => Last name Sova

formReceived({ first: 'Patronum' });
// => First name Patronum

Call events on store changes

import { createStore, createEvent } from 'effector';
import { spread } from 'patronum/spread';

const save = createEvent();
const $form = createStore(null).on(save, (_, form) => form);

const firstNameChanged = createEvent();
const lastNameChanged = createEvent();

spread({
source: $form,
targets: {
first: firstNameChanged,
last: lastNameChanged,
},
});

firstNameChanged.watch((first) => console.log('First name', first));
lastNameChanged.watch((last) => console.log('Last name', last));

save({ first: 'Sergey', last: 'Sova' });
// => First name Sergey
// => Last name Sova

save(null);
// Nothing, because store is null

source = spread({ targets })

Motivation

This overload creates event source that should be triggered and returns it. -It is useful to pass source immediately to another method as argument.

Formulae

source = spread({ targets: { field: target, ... } })
  • When source is triggered with object, extract field from data, and trigger target
  • targets can have multiple properties
  • If the source was triggered with non-object, nothing would be happening
  • If source is triggered with object but without propertpy field, target for this field will not be triggered

Arguments

  1. targets (Record<string, Event<T> | Store<T> | Effect<T>>) — Flat object which key is key in source payload, and value is unit to store value to.

Returns

  • source (Event<T> | Store<T> | Effect<T>) — Source unit, data passed to it should be an object with fields from targets

Example

Conditionally save value to stores

import { createStore, createEvent, guard } from 'effector';
import { spread } from 'patronum/spread';

const $first = createStore('');
const $last = createStore('');

const formReceived = createEvent();

guard({
source: formReceived,
filter: (form) => form.first.length > 0 && form.last.length > 0,
target: spread({
targets: {
first: $first,
last: $last,
},
}),
});

$first.watch((first) => console.log('First name', first));
$last.watch((last) => console.log('Last name', last));

formReceived({ first: '', last: '' });
// Nothing, because filter returned true

formReceived({ first: 'Hello', last: 'World' });
// => First name Hello
// => Last name World

Nested spreading

const trigger = createEvent();

const $targetA = createStore('');
const $targetB = createStore(0);
const $targetC = createStore(false);

spread({
source: trigger,
targets: {
first: $targetA,
second: spread({
targets: {
foo: $targetB,
bar: $targetC,
},
}),
},
});

$targetA.watch((payload) => console.log('targetA', payload));
$targetB.watch((payload) => console.log('targetB', payload));
$targetC.watch((payload) => console.log('targetC', payload));

trigger({
first: 'Hello',
second: {
foo: 200,
bar: true,
},
});
// => targetA Hello
// => targetB 200
// => targetC true
- - +
+

spread

import { spread } from 'patronum';
// or
import { spread } from 'patronum/spread';

source = spread(targets)

since

patronum 2.1.0 +Use spread({ targets }) with patronum < 2.1.0

Motivation

This method allows to trigger many target at once, if they match the source structure. +It is useful when you need to destructure object and save values to different stores.

Formulae

source = spread({ field: target, ... })
  • When source is triggered with object, extract field from data, and trigger target
  • targets can have multiple properties
  • If the source was triggered with non-object, nothing would be happening
  • If source is triggered with object but without propertpy field, target for this field will not be triggered

Arguments

  1. targets (Record<string, Event<T> | Store<T> | Effect<T>>) — Flat object which key is key in source payload, and value is unit to store value to.

Returns

  • source (Event<T>) — Source event, data passed to it should be an object with fields from targets

Example

Conditionally save value to stores

import { createStore, createEvent, sample } from 'effector';
import { spread } from 'patronum';

const $first = createStore('');
const $last = createStore('');

const formReceived = createEvent();

sample({
source: formReceived,
filter: (form) => form.first.length > 0 && form.last.length > 0,
target: spread({
first: $first,
last: $last,
}),
});

$first.watch((first) => console.log('First name', first));
$last.watch((last) => console.log('Last name', last));

formReceived({ first: '', last: '' });
// Nothing, because filter returned true

formReceived({ first: 'Hello', last: 'World' });
// => First name Hello
// => Last name World

Nested spreading

const $targetA = createStore('');
const $targetB = createStore(0);
const $targetC = createStore(false);

const trigger = spread({
first: $targetA,
second: spread({
foo: $targetB,
bar: $targetC,
}),
});

$targetA.watch((payload) => console.log('targetA', payload));
$targetB.watch((payload) => console.log('targetB', payload));
$targetC.watch((payload) => console.log('targetC', payload));

trigger({
first: 'Hello',
second: {
foo: 200,
bar: true,
},
});
// => targetA Hello
// => targetB 200
// => targetC true

spread({ source, targets })

Motivation

This method allows to trigger many target at once, if they match the source structure. +It is useful when you need to destructure object and save values to different stores.

Formulae

spread({ source, targets: { field: target, ... } })
  • When source is triggered with object, extract field from data, and trigger target
  • targets can have multiple properties
  • If the source was triggered with non-object, nothing would be happening
  • If source is triggered with object but without propertpy field, target for this field will not be triggered

Arguments

  1. source (Event<T> | Store<T> | Effect<T>) — Source unit, data passed to it should be an object with fields from targets
  2. targets (Record<string, Event<T> | Store<T> | Effect<T>>) — Flat object which key is key in source payload, and value is unit to store value to.

Example

Save fields of payload to different stores

import { createStore, createEvent } from 'effector';
import { spread } from 'patronum';

const $first = createStore('');
const $last = createStore('');

const formReceived = createEvent();

spread({
source: formReceived,
targets: {
first: $first,
last: $last,
},
});

$first.watch((first) => console.log('First name', first));
$last.watch((last) => console.log('Last name', last));

formReceived({ first: 'Sergey', last: 'Sova' });
// => First name Sergey
// => Last name Sova

formReceived({ first: 'Patronum' });
// => First name Patronum

Call events on store changes

import { createStore, createEvent } from 'effector';
import { spread } from 'patronum/spread';

const save = createEvent();
const $form = createStore(null).on(save, (_, form) => form);

const firstNameChanged = createEvent();
const lastNameChanged = createEvent();

spread({
source: $form,
targets: {
first: firstNameChanged,
last: lastNameChanged,
},
});

firstNameChanged.watch((first) => console.log('First name', first));
lastNameChanged.watch((last) => console.log('Last name', last));

save({ first: 'Sergey', last: 'Sova' });
// => First name Sergey
// => Last name Sova

save(null);
// Nothing, because store is null

source = spread({ targets })

Motivation

This overload recieves targets as an object. May be useful for additional clarity, but it's longer to write

Formulae

source = spread({ targets: { field: target, ... } })
  • When source is triggered with object, extract field from data, and trigger target
  • targets can have multiple properties
  • If the source was triggered with non-object, nothing would be happening
  • If source is triggered with object but without propertpy field, target for this field will not be triggered

Arguments

  1. targets (Record<string, Event<T> | Store<T> | Effect<T>>) — Flat object which key is key in source payload, and value is unit to store value to.

Returns

  • source (Event<T>) — Source event, data passed to it should be an object with fields from targets
+ + \ No newline at end of file diff --git a/methods/status/index.html b/methods/status/index.html index 0090eecb..8e93bcb7 100644 --- a/methods/status/index.html +++ b/methods/status/index.html @@ -1,17 +1,18 @@ - + - -status | effector patronum - - + +status | effector patronum + + -
-

status

import { status } from 'patronum';
// or
import { status } from 'patronum/status';

Motivation

This method returns current status of effect as store with string enumeration. -It is useful to show correct state of process in UI.

Formulae

$status = status({ effect, defaultValue });
  • When status is run, set defaultValue value to $status
  • When effect is called, set pending status.
  • When effect is succeeded, set done status.
  • When effect is failed, set fail status.

Arguments

  1. effect (Effect<P, R>) — any effect, that you need to watch status
  2. defaultValue ('initial' | 'pending' | 'done' | 'fail') optional — when $status initializes, set initial value for it. By default value is "initial"

Returns

  • $status (Store<'initial' | 'pending' | 'done' | 'fail'>) — Store that saves current state of the effects

Note: use can manually reset status, just use $status.reset(event)

Example

Successful effect call changing status to "done"

import { createEvent, createEffect } from 'effector';
import { status } from 'patronum/status';

const effect = createEffect(() => Promise.resolve(null));
const $status = status({ effect });

$status.watch((value) => console.log(`status: ${value}`));
// => status: "initial"

effect();
// => status: "pending"
// => status: "done"

Initial status

import { createEvent, createEffect } from 'effector';
import { status } from 'patronum/status';

const effect = createEffect(() => Promise.resolve(null));
const $status = status({ effect, defaultValue: 'pending' });

$status.watch((value) => console.log(`status: ${value}`));
// => status: "pending"

effect();
// Nothing, because $status is already pending
// => status: "done"

Clear (reset) status

import { createEvent, createEffect } from 'effector';
import { status } from 'patronum/status';

const reset = createEvent();
const effect = createEffect(
() => new Promise((resolve) => setTimeout(resolve, 100)),
);

const $status = status({ effect });
$status.reset(reset);

$status.watch((value) => console.log(`status: ${value}`));
// => status: "initial"

effect();
// => status: "pending"
// => status: "done"

reset();
// => status: "initial"
- - +
+

status

import { status } from 'patronum';
// or
import { status } from 'patronum/status';

Motivation

This method returns current status of effect as store with string enumeration. +It is useful to show correct state of process in UI.

Formulae

$status = status(effect);
$status = status({ effect, defaultValue });
  • When status is run, set defaultValue value to $status
  • When effect is called, set pending status.
  • When effect is succeeded, set done status.
  • When effect is failed, set fail status.
note

Shorthand status(effect) is available since patronum 2.1.0 +Use status({ effect }) with patronum < 2.1.0

Arguments

  1. effect (Effect<P, R>) — any effect, that you need to watch status
  2. defaultValue ('initial' | 'pending' | 'done' | 'fail') optional — when $status initializes, set initial value for it. By default value is "initial"

Returns

  • $status (Store<'initial' | 'pending' | 'done' | 'fail'>) — Store that saves current state of the effects

Note: use can manually reset status, just use $status.reset(event)

Example

Successful effect call changing status to "done"

import { createEvent, createEffect } from 'effector';
import { status } from 'patronum/status';

const effect = createEffect(() => Promise.resolve(null));
const $status = status({ effect });

$status.watch((value) => console.log(`status: ${value}`));
// => status: "initial"

effect();
// => status: "pending"
// => status: "done"

Initial status

import { createEvent, createEffect } from 'effector';
import { status } from 'patronum/status';

const effect = createEffect(() => Promise.resolve(null));
const $status = status({ effect, defaultValue: 'pending' });

$status.watch((value) => console.log(`status: ${value}`));
// => status: "pending"

effect();
// Nothing, because $status is already pending
// => status: "done"

Clear (reset) status

import { createEvent, createEffect } from 'effector';
import { status } from 'patronum/status';

const reset = createEvent();
const effect = createEffect(() => new Promise((resolve) => setTimeout(resolve, 100)));

const $status = status({ effect });
$status.reset(reset);

$status.watch((value) => console.log(`status: ${value}`));
// => status: "initial"

effect();
// => status: "pending"
// => status: "done"

reset();
// => status: "initial"
+ + \ No newline at end of file diff --git a/methods/throttle/index.html b/methods/throttle/index.html index 27ef9838..41e4b14f 100644 --- a/methods/throttle/index.html +++ b/methods/throttle/index.html @@ -1,18 +1,19 @@ - + - -throttle | effector patronum - - + +throttle | effector patronum + + -
-

throttle

import { throttle } from 'patronum';
// or
import { throttle } from 'patronum/throttle';

target = throttle({ source, timeout })

Motivation

This method allows to trigger target in equal timeouts regardless of source trigger frequency. -It is useful in live search in UI.

Formulae

target = throttle({ source, timeout });
  • Triggers target at most once per timeout after triggering source

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit used by the target
  2. timeout (number | Store<number>) — time to wait before trigger target after last trigger or source trigger

Returns

  • target (Event) — new event, that triggered each time after triggering source with argument from source

Usage

Create event that should be throttled:

import { createEvent } from 'effector';

const someHappened = createEvent<number>();

Create throttled event from it:

import { throttle } from 'patronum/throttle';

const THROTTLE_TIMEOUT_IN_MS = 200;

const throttled = throttle({
source: someHappened,
timeout: THROTTLE_TIMEOUT_IN_MS,
});

When you call someHappened it will make throttled call the throttled event:

throttled.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// after 200 ms after first call
// => someHappened now 4

Also you can use Effect and Store as trigger. throttle always returns Event:

const event = createEvent<number>();
const throttledEvent: Event<number> = throttle({ source: event, timeout: 100 });

const fx = createEffect<number, void>();
const throttledEffect: Event<number> = throttle({ source: fx, timeout: 100 });

const $store = createStore<number>(0);
const throttledStore: Event<number> = throttle({
source: $store,
timeout: 100,
});

throttle({ source, timeout, target })

Motivation

This overload allows to receive target instead of returning it. -This is useful when you already have a unit that should be triggered.

Formulae

throttle({ source, timeout, target });
  • Triggers target at most once per timeout after triggering source

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit used by the target
  2. timeout (number | Store<number>) — time to wait before trigger target after last trigger or source trigger
  3. target (Event | Store | Effect) — Target unit, that triggered each time after triggering source with argument from source

Returns

Usage

const change = createEvent();
const $source = createStore(0).on(change, (state) => state + 1);

const $dumped = createStore(0);
$dumped.watch((payload) => {
localStorage.setItem('dump', JSON.stringify(payload));
});

throttle({ source: $source, timeout: 40, target: $dumped });

change();
change();
change();

// after 40ms after first call, 3 will be saved to localStorage

Example with timeout as store

The new timeout will be used after the previous is over (if there was a delayed target trigger when the timeout store changed).

import { createEvent } from 'effector';
import { throttle } from 'patronum/throttle';

const someHappened = createEvent<number>();
const changeTimeout = createEvent<number>();
const $timeout = createStore(200).on(changeTimeout, (_, value) => value);

const throttled = throttle({
source: someHappened,
timeout: $timeout,
});
throttled.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
changeTimeout(300); // will be used for next timeout
someHappened(2);

setTimout(() => {
// console.log: someHappened now 2
someHappened(3);
someHappened(4);
}, 200);

setTimeout(() => {
// console.log: someHappened now 4
}, 500);
- - +
+

throttle

import { throttle } from 'patronum';
// or
import { throttle } from 'patronum/throttle';

target = throttle(source, timeout)

Motivation

This method allows to trigger target in equal timeouts regardless of source trigger frequency. +It is useful in live search in UI.

since

patronum 2.1.0 +Use throttle({ source, timeout }) with patronum < 2.1.0

Formulae

target = throttle(source, timeout);
  • Triggers target at most once per timeout after triggering source

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit used by the target
  2. timeout (number | Store<number>) — time to wait before trigger target after last trigger or source trigger

Returns

  • target (Event) — new event, that triggered each time after triggering source with argument from source

Usage

Create event that should be throttled:

import { createEvent } from 'effector';

const someHappened = createEvent<number>();

Create throttled event from it:

import { throttle } from 'patronum';

const THROTTLE_TIMEOUT_IN_MS = 200;

const throttled = throttle(someHappened, THROTTLE_TIMEOUT_IN_MS);

When you call someHappened it will make throttled call the throttled event:

throttled.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// after 200 ms after first call
// => someHappened now 4

Also you can use Effect and Store as trigger. throttle always returns Event:

const event = createEvent<number>();
const throttledEvent: Event<number> = throttle(event, 100);

const fx = createEffect<number, void>();
const throttledEffect: Event<number> = throttle(fx, 100);

const $store = createStore<number>(0);
const throttledStore: Event<number> = throttle($store, 100);

throttle({ source, timeout, target })

Motivation

This overload allows to receive target instead of returning it. +This is useful when you already have a unit that should be triggered.

Formulae

throttle({ source, timeout, target });
  • Triggers target at most once per timeout after triggering source

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit used by the target
  2. timeout (number | Store<number>) — time to wait before trigger target after last trigger or source trigger
  3. target (Event | Store | Effect) — Target unit, that triggered each time after triggering source with argument from source

Returns

Usage

const change = createEvent();
const $source = createStore(0).on(change, (state) => state + 1);

const $dumped = createStore(0);
$dumped.watch((payload) => {
localStorage.setItem('dump', JSON.stringify(payload));
});

throttle({ source: $source, timeout: 40, target: $dumped });

change();
change();
change();

// after 40ms after first call, 3 will be saved to localStorage

Example with timeout as store

The new timeout will be used after the previous is over (if there was a delayed target trigger when the timeout store changed).

import { createEvent } from 'effector';
import { throttle } from 'patronum';

const someHappened = createEvent<number>();
const changeTimeout = createEvent<number>();
const $timeout = createStore(200).on(changeTimeout, (_, value) => value);

const throttled = throttle({
source: someHappened,
timeout: $timeout,
});
throttled.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
changeTimeout(300); // will be used for next timeout
someHappened(2);

setTimout(() => {
// console.log: someHappened now 2
someHappened(3);
someHappened(4);
}, 200);

setTimeout(() => {
// console.log: someHappened now 4
}, 500);

target = throttle({ source, timeout })

Motivation

This overload recieves source and timeout as an object. May be useful for additional clarity, but it's longer to write

Formulae

target = throttle({ source, timeout });
  • Triggers target at most once per timeout after triggering source

Arguments

  1. source (Event | Store | Effect) — Source unit, data from this unit used by the target
  2. timeout (number | Store<number>) — time to wait before trigger target after last trigger or source trigger

Returns

  • target (Event) — new event, that triggered each time after triggering source with argument from source

Usage

Create event that should be throttled:

import { createEvent } from 'effector';

const someHappened = createEvent<number>();

Create throttled event from it:

import { throttle } from 'patronum';

const THROTTLE_TIMEOUT_IN_MS = 200;

const throttled = throttle({
source: someHappened,
timeout: THROTTLE_TIMEOUT_IN_MS,
});

When you call someHappened it will make throttled call the throttled event:

throttled.watch((payload) => {
console.info('someHappened now', payload);
});

someHappened(1);
someHappened(2);
someHappened(3);
someHappened(4);

// after 200 ms after first call
// => someHappened now 4

Also you can use Effect and Store as trigger. throttle always returns Event:

const event = createEvent<number>();
const throttledEvent: Event<number> = throttle({ source: event, timeout: 100 });

const fx = createEffect<number, void>();
const throttledEffect: Event<number> = throttle({ source: fx, timeout: 100 });

const $store = createStore<number>(0);
const throttledStore: Event<number> = throttle({
source: $store,
timeout: 100,
});
+ + \ No newline at end of file diff --git a/methods/time/index.html b/methods/time/index.html index 8fd3bc9c..7a942382 100644 --- a/methods/time/index.html +++ b/methods/time/index.html @@ -1,19 +1,21 @@ - + - -time | effector patronum - - + +time | effector patronum + + -
-

time

since

patronum 1.7.0

import { time } from 'patronum';
// or
import { time } from 'patronum/time';

Motivation

The method allow to read current time just as an effector method.

Formulae

$time = time({ clock, getNow, initial });
  • Initialize $time with initial, if not present call getNow, if not present call Date.now()
  • When clock is triggered, call getNow to update $time with results, if not present use Date.now()

Arguments

  1. clock: Event<any> | Effect<any, any, any> | Store<any> — The unit triggers time reading and updates $time store
  2. getNow?: () => Time — A custom function to read time when clock triggers. Must be synchronous.
  3. initial?: Time — Initial state for $time store. If not passed getNow is called.

Time is a generic type argument used for overriding time reader function. By default, is is number

Returns

$time: Store<Time> — Store contains unix timestamp snapshot, updates when clock triggers. +

+

time

import { time } from 'patronum';
// or
import { time } from 'patronum/time';

time(clock)

since

patronum 2.1.0 +Use time({ clock }) with patronum < 2.1.0

Motivation

The method allow to read current time and write it to store

Formulae

$time = time(clock);
  • Initialize $time with Date.now()
  • When clock is triggered, call Date.now() to update $time with results

Arguments

  1. clock: Event<any> | Effect<any, any, any> | Store<any> — The unit triggers time reading and updates $time store

Time is a generic type argument used for overriding time reader function. By default, is is number

Returns

$time: Store<Time> — Store contains unix timestamp snapshot, updates when clock triggers. +Initialized with Date.now()

Example

import { time } from 'patronum';

const tick = createEvent();
const $time = time(tick);

$time.watch((time) => console.log('time', time));
// => time 1660293358847

tick();
// => time 1660293358848
await new Promise((res) => setTimeout(res, 100));
tick();
// => 1660293358952

Try it

time({clock, getNow, initial})

since

patronum 1.7.0

Motivation

The method allow to read current time and write it to store. Object form allows to use additional parameters: getNow and initial

Formulae

$time = time({ clock, getNow, initial });
  • Initialize $time with initial, if not present call getNow, if not present call Date.now()
  • When clock is triggered, call getNow to update $time with results, if not present use Date.now()

Arguments

  1. clock: Event<any> | Effect<any, any, any> | Store<any> — The unit triggers time reading and updates $time store
  2. getNow: () => Time — Optional. A custom function to read time when clock triggers. Must be synchronous.
  3. initial: Time — Optional. Initial state for $time store. If not passed getNow is called.

Time is a generic type argument used for overriding time reader function. By default, is is number

Returns

$time: Store<Time> — Store contains unix timestamp snapshot, updates when clock triggers. If getNow is overrided, contains value this function returns. By default, it is number. -Initialized with initial, by default, it is Date.now()

Example

import { time } from 'patronum';

const tick = createEvent();
const $time = time({ clock: tick });

$time.watch((time) => console.log('time', time));
// => time 1660293358847

tick();
// => time 1660293358848
await new Promise((res) => setTimeout(res, 100));
tick();
// => 1660293358952

Try it

- - +Initialized with initial, by default, it is Date.now()

Example

import { time } from 'patronum';

const tick = createEvent();
const $time = time({ clock: tick });

$time.watch((time) => console.log('time', time));
// => time 1660293358847

tick();
// => time 1660293358848
await new Promise((res) => setTimeout(res, 100));
tick();
// => 1660293358952

Try it

+ + \ No newline at end of file diff --git a/search/index.html b/search/index.html index 5896afb0..b6bdbb64 100644 --- a/search/index.html +++ b/search/index.html @@ -1,16 +1,16 @@ - + - -Search the documentation | effector patronum - - + +Search the documentation | effector patronum + + -
-

Search the documentation

- - +
+

Search the documentation

+ + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index eab75c1f..ba440fcf 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://patronum.effector.dev/docs/installationweekly0.5https://patronum.effector.dev/docs/migration-guideweekly0.5https://patronum.effector.dev/searchweekly0.5https://patronum.effector.dev/methods/weekly0.5https://patronum.effector.dev/methods/and/weekly0.5https://patronum.effector.dev/methods/combine-events/weekly0.5https://patronum.effector.dev/methods/condition/weekly0.5https://patronum.effector.dev/methods/debounce/weekly0.5https://patronum.effector.dev/methods/debug/weekly0.5https://patronum.effector.dev/methods/delay/weekly0.5https://patronum.effector.dev/methods/either/weekly0.5https://patronum.effector.dev/methods/empty/weekly0.5https://patronum.effector.dev/methods/equals/weekly0.5https://patronum.effector.dev/methods/every/weekly0.5https://patronum.effector.dev/methods/format/weekly0.5https://patronum.effector.dev/methods/in-flight/weekly0.5https://patronum.effector.dev/methods/interval/weekly0.5https://patronum.effector.dev/methods/not/weekly0.5https://patronum.effector.dev/methods/once/weekly0.5https://patronum.effector.dev/methods/or/weekly0.5https://patronum.effector.dev/methods/pending/weekly0.5https://patronum.effector.dev/methods/reset/weekly0.5https://patronum.effector.dev/methods/reshape/weekly0.5https://patronum.effector.dev/methods/snapshot/weekly0.5https://patronum.effector.dev/methods/some/weekly0.5https://patronum.effector.dev/methods/split-map/weekly0.5https://patronum.effector.dev/methods/spread/weekly0.5https://patronum.effector.dev/methods/status/weekly0.5https://patronum.effector.dev/methods/throttle/weekly0.5https://patronum.effector.dev/methods/time/weekly0.5https://patronum.effector.dev/weekly0.5 \ No newline at end of file +https://patronum.effector.dev/docs/installationweekly0.5https://patronum.effector.dev/docs/migration-guideweekly0.5https://patronum.effector.dev/searchweekly0.5https://patronum.effector.dev/methods/weekly0.5https://patronum.effector.dev/methods/and/weekly0.5https://patronum.effector.dev/methods/combine-events/weekly0.5https://patronum.effector.dev/methods/condition/weekly0.5https://patronum.effector.dev/methods/debounce/weekly0.5https://patronum.effector.dev/methods/debug/weekly0.5https://patronum.effector.dev/methods/delay/weekly0.5https://patronum.effector.dev/methods/either/weekly0.5https://patronum.effector.dev/methods/empty/weekly0.5https://patronum.effector.dev/methods/equals/weekly0.5https://patronum.effector.dev/methods/every/weekly0.5https://patronum.effector.dev/methods/format/weekly0.5https://patronum.effector.dev/methods/in-flight/weekly0.5https://patronum.effector.dev/methods/interval/weekly0.5https://patronum.effector.dev/methods/not/weekly0.5https://patronum.effector.dev/methods/once/weekly0.5https://patronum.effector.dev/methods/or/weekly0.5https://patronum.effector.dev/methods/pending/weekly0.5https://patronum.effector.dev/methods/previous/weekly0.5https://patronum.effector.dev/methods/reset/weekly0.5https://patronum.effector.dev/methods/reshape/weekly0.5https://patronum.effector.dev/methods/snapshot/weekly0.5https://patronum.effector.dev/methods/some/weekly0.5https://patronum.effector.dev/methods/split-map/weekly0.5https://patronum.effector.dev/methods/spread/weekly0.5https://patronum.effector.dev/methods/status/weekly0.5https://patronum.effector.dev/methods/throttle/weekly0.5https://patronum.effector.dev/methods/time/weekly0.5https://patronum.effector.dev/weekly0.5 \ No newline at end of file