summaryrefslogtreecommitdiff
path: root/backend/show_order_details.en.html
diff options
context:
space:
mode:
Diffstat (limited to 'backend/show_order_details.en.html')
-rw-r--r--backend/show_order_details.en.html4899
1 files changed, 4899 insertions, 0 deletions
diff --git a/backend/show_order_details.en.html b/backend/show_order_details.en.html
new file mode 100644
index 000000000..dafb2320c
--- /dev/null
+++ b/backend/show_order_details.en.html
@@ -0,0 +1,4899 @@
+
+<!doctype html>
+<html>
+ <head>
+ <meta charSet="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><noscript><meta http-equiv="refresh" content="1" /></noscript><title>Status of your order for {{ order_summary }}</title><script>
+ var contractTermsStr = '{{{contract_terms_json}}}';
+ </script>
+ <style>/*!
+ Pure v2.0.3
+ Copyright 2013 Yahoo!
+ Licensed under the BSD License.
+ https://github.com/pure-cs s/pure/blob/master/LICENSE.md
+*/
+/*!
+ normalize.cs s v | MIT License | git.io/normalize
+ Copyright (c) Nicolas Gallagher and Jonathan Neal
+*/
+/*! normalize.cs s v8.0.1 | MIT License | github.com/necolas/normalize.cs s */
+
+.talerbar {
+ text-align: center;
+}
+
+html {
+ line-height: 1.15;
+ -webkit-text-size-adjust: 100%;
+}
+body {
+ margin: 0;
+}
+main {
+ display: block;
+}
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+hr {
+ -webkit-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+ overflow: visible;
+}
+pre {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+a {
+ background-color: transparent;
+}
+abbr[title] {
+ border-bottom: none;
+ text-decoration: underline;
+ -webkit-text-decoration: underline dotted;
+ text-decoration: underline dotted;
+}
+b,
+strong {
+ font-weight: bolder;
+}
+code,
+kbd,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+small {
+ font-size: 80%;
+}
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+sub {
+ bottom: -0.25em;
+}
+sup {
+ top: -0.5em;
+}
+img {
+ border-style: none;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit;
+ font-size: 100%;
+ line-height: 1.15;
+ margin: 0;
+}
+button,
+input {
+ overflow: visible;
+}
+button,
+select {
+ text-transform: none;
+}
+[type="button"],
+[type="reset"],
+[type="submit"],
+button {
+ -webkit-appearance: button;
+}
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner,
+button::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring,
+button:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+legend {
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ color: inherit;
+ display: table;
+ max-width: 100%;
+ padding: 0;
+ white-space: normal;
+}
+progress {
+ vertical-align: baseline;
+}
+textarea {
+ overflow: auto;
+}
+[type="checkbox"],
+[type="radio"] {
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 0;
+}
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+[type="search"] {
+ -webkit-appearance: textfield;
+ outline-offset: -2px;
+}
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ font: inherit;
+}
+details {
+ display: block;
+}
+summary {
+ display: list-item;
+}
+template {
+ display: none;
+}
+[hidden] {
+ display: none;
+}
+html {
+ font-family: sans-serif;
+}
+.hidden,
+[hidden] {
+ display: none !important;
+}
+.pure-img {
+ max-width: 100%;
+ height: auto;
+ display: block;
+}
+.pure-g {
+ letter-spacing: -0.31em;
+ text-rendering: optimizespeed;
+ font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-flow: row wrap;
+ flex-flow: row wrap;
+ -ms-flex-line-pack: start;
+ align-content: flex-start;
+}
+@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
+ table .pure-g {
+ display: block;
+ }
+}
+.opera-only :-o-prefocus,
+.pure-g {
+ word-spacing: -0.43em;
+}
+.pure-u {
+ display: inline-block;
+ letter-spacing: normal;
+ word-spacing: normal;
+ vertical-align: top;
+ text-rendering: auto;
+}
+.pure-g [class*="pure-u"] {
+ font-family: sans-serif;
+}
+.pure-u-1,
+.pure-u-1-1,
+.pure-u-1-12,
+.pure-u-1-2,
+.pure-u-1-24,
+.pure-u-1-3,
+.pure-u-1-4,
+.pure-u-1-5,
+.pure-u-1-6,
+.pure-u-1-8,
+.pure-u-10-24,
+.pure-u-11-12,
+.pure-u-11-24,
+.pure-u-12-24,
+.pure-u-13-24,
+.pure-u-14-24,
+.pure-u-15-24,
+.pure-u-16-24,
+.pure-u-17-24,
+.pure-u-18-24,
+.pure-u-19-24,
+.pure-u-2-24,
+.pure-u-2-3,
+.pure-u-2-5,
+.pure-u-20-24,
+.pure-u-21-24,
+.pure-u-22-24,
+.pure-u-23-24,
+.pure-u-24-24,
+.pure-u-3-24,
+.pure-u-3-4,
+.pure-u-3-5,
+.pure-u-3-8,
+.pure-u-4-24,
+.pure-u-4-5,
+.pure-u-5-12,
+.pure-u-5-24,
+.pure-u-5-5,
+.pure-u-5-6,
+.pure-u-5-8,
+.pure-u-6-24,
+.pure-u-7-12,
+.pure-u-7-24,
+.pure-u-7-8,
+.pure-u-8-24,
+.pure-u-9-24 {
+ display: inline-block;
+ letter-spacing: normal;
+ word-spacing: normal;
+ vertical-align: top;
+ text-rendering: auto;
+}
+.pure-u-1-24 {
+ width: 4.1667%;
+}
+.pure-u-1-12,
+.pure-u-2-24 {
+ width: 8.3333%;
+}
+.pure-u-1-8,
+.pure-u-3-24 {
+ width: 12.5%;
+}
+.pure-u-1-6,
+.pure-u-4-24 {
+ width: 16.6667%;
+}
+.pure-u-1-5 {
+ width: 20%;
+}
+.pure-u-5-24 {
+ width: 20.8333%;
+}
+.pure-u-1-4,
+.pure-u-6-24 {
+ width: 25%;
+}
+.pure-u-7-24 {
+ width: 29.1667%;
+}
+.pure-u-1-3,
+.pure-u-8-24 {
+ width: 33.3333%;
+}
+.pure-u-3-8,
+.pure-u-9-24 {
+ width: 37.5%;
+}
+.pure-u-2-5 {
+ width: 40%;
+}
+.pure-u-10-24,
+.pure-u-5-12 {
+ width: 41.6667%;
+}
+.pure-u-11-24 {
+ width: 45.8333%;
+}
+.pure-u-1-2,
+.pure-u-12-24 {
+ width: 50%;
+}
+.pure-u-13-24 {
+ width: 54.1667%;
+}
+.pure-u-14-24,
+.pure-u-7-12 {
+ width: 58.3333%;
+}
+.pure-u-3-5 {
+ width: 60%;
+}
+.pure-u-15-24,
+.pure-u-5-8 {
+ width: 62.5%;
+}
+.pure-u-16-24,
+.pure-u-2-3 {
+ width: 66.6667%;
+}
+.pure-u-17-24 {
+ width: 70.8333%;
+}
+.pure-u-18-24,
+.pure-u-3-4 {
+ width: 75%;
+}
+.pure-u-19-24 {
+ width: 79.1667%;
+}
+.pure-u-4-5 {
+ width: 80%;
+}
+.pure-u-20-24,
+.pure-u-5-6 {
+ width: 83.3333%;
+}
+.pure-u-21-24,
+.pure-u-7-8 {
+ width: 87.5%;
+}
+.pure-u-11-12,
+.pure-u-22-24 {
+ width: 91.6667%;
+}
+.pure-u-23-24 {
+ width: 95.8333%;
+}
+.pure-u-1,
+.pure-u-1-1,
+.pure-u-24-24,
+.pure-u-5-5 {
+ width: 100%;
+}
+.pure-button {
+ display: inline-block;
+ line-height: normal;
+ white-space: nowrap;
+ vertical-align: middle;
+ text-align: center;
+ cursor: pointer;
+ -webkit-user-drag: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.pure-button::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+.pure-button-group {
+ letter-spacing: -0.31em;
+ text-rendering: optimizespeed;
+}
+.opera-only :-o-prefocus,
+.pure-button-group {
+ word-spacing: -0.43em;
+}
+.pure-button-group .pure-button {
+ letter-spacing: normal;
+ word-spacing: normal;
+ vertical-align: top;
+ text-rendering: auto;
+}
+.pure-button {
+ font-family: inherit;
+ font-size: 100%;
+ padding: 0.5em 1em;
+ color: rgba(0, 0, 0, 0.8);
+ border: none transparent;
+ background-color: #e6e6e6;
+ text-decoration: none;
+ border-radius: 2px;
+}
+.pure-button-hover,
+.pure-button:focus,
+.pure-button:hover {
+ background-image: -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ from(transparent),
+ color-stop(40%, rgba(0, 0, 0, 0.05)),
+ to(rgba(0, 0, 0, 0.1))
+ );
+ background-image: linear-gradient(
+ transparent,
+ rgba(0, 0, 0, 0.05) 40%,
+ rgba(0, 0, 0, 0.1)
+ );
+}
+.pure-button:focus {
+ outline: 0;
+}
+.pure-button-active,
+.pure-button:active {
+ -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset,
+ 0 0 6px rgba(0, 0, 0, 0.2) inset;
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset,
+ 0 0 6px rgba(0, 0, 0, 0.2) inset;
+ border-color: #000;
+}
+.pure-button-disabled,
+.pure-button-disabled:active,
+.pure-button-disabled:focus,
+.pure-button-disabled:hover,
+.pure-button[disabled] {
+ border: none;
+ background-image: none;
+ opacity: 0.4;
+ cursor: not-allowed;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ pointer-events: none;
+}
+.pure-button-hidden {
+ display: none;
+}
+.pure-button-primary,
+.pure-button-selected,
+a.pure-button-primary,
+a.pure-button-selected {
+ background-color: #0078e7;
+ color: #fff;
+}
+.pure-button-group .pure-button {
+ margin: 0;
+ border-radius: 0;
+ border-right: 1px solid rgba(0, 0, 0, 0.2);
+}
+.pure-button-group .pure-button:first-child {
+ border-top-left-radius: 2px;
+ border-bottom-left-radius: 2px;
+}
+.pure-button-group .pure-button:last-child {
+ border-top-right-radius: 2px;
+ border-bottom-right-radius: 2px;
+ border-right: none;
+}
+.pure-form input[type="color"],
+.pure-form input[type="date"],
+.pure-form input[type="datetime-local"],
+.pure-form input[type="datetime"],
+.pure-form input[type="email"],
+.pure-form input[type="month"],
+.pure-form input[type="number"],
+.pure-form input[type="password"],
+.pure-form input[type="search"],
+.pure-form input[type="tel"],
+.pure-form input[type="text"],
+.pure-form input[type="time"],
+.pure-form input[type="url"],
+.pure-form input[type="week"],
+.pure-form select,
+.pure-form textarea {
+ padding: 0.5em 0.6em;
+ display: inline-block;
+ border: 1px solid #ccc;
+ -webkit-box-shadow: inset 0 1px 3px #ddd;
+ box-shadow: inset 0 1px 3px #ddd;
+ border-radius: 4px;
+ vertical-align: middle;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.pure-form input:not([type]) {
+ padding: 0.5em 0.6em;
+ display: inline-block;
+ border: 1px solid #ccc;
+ -webkit-box-shadow: inset 0 1px 3px #ddd;
+ box-shadow: inset 0 1px 3px #ddd;
+ border-radius: 4px;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.pure-form input[type="color"] {
+ padding: 0.2em 0.5em;
+}
+.pure-form input[type="color"]:focus,
+.pure-form input[type="date"]:focus,
+.pure-form input[type="datetime-local"]:focus,
+.pure-form input[type="datetime"]:focus,
+.pure-form input[type="email"]:focus,
+.pure-form input[type="month"]:focus,
+.pure-form input[type="number"]:focus,
+.pure-form input[type="password"]:focus,
+.pure-form input[type="search"]:focus,
+.pure-form input[type="tel"]:focus,
+.pure-form input[type="text"]:focus,
+.pure-form input[type="time"]:focus,
+.pure-form input[type="url"]:focus,
+.pure-form input[type="week"]:focus,
+.pure-form select:focus,
+.pure-form textarea:focus {
+ outline: 0;
+ border-color: #129fea;
+}
+.pure-form input:not([type]):focus {
+ outline: 0;
+ border-color: #129fea;
+}
+.pure-form input[type="checkbox"]:focus,
+.pure-form input[type="file"]:focus,
+.pure-form input[type="radio"]:focus {
+ outline: thin solid #129fea;
+ outline: 1px auto #129fea;
+}
+.pure-form .pure-checkbox,
+.pure-form .pure-radio {
+ margin: 0.5em 0;
+ display: block;
+}
+.pure-form input[type="color"][disabled],
+.pure-form input[type="date"][disabled],
+.pure-form input[type="datetime-local"][disabled],
+.pure-form input[type="datetime"][disabled],
+.pure-form input[type="email"][disabled],
+.pure-form input[type="month"][disabled],
+.pure-form input[type="number"][disabled],
+.pure-form input[type="password"][disabled],
+.pure-form input[type="search"][disabled],
+.pure-form input[type="tel"][disabled],
+.pure-form input[type="text"][disabled],
+.pure-form input[type="time"][disabled],
+.pure-form input[type="url"][disabled],
+.pure-form input[type="week"][disabled],
+.pure-form select[disabled],
+.pure-form textarea[disabled] {
+ cursor: not-allowed;
+ background-color: #eaeded;
+ color: #cad2d3;
+}
+.pure-form input:not([type])[disabled] {
+ cursor: not-allowed;
+ background-color: #eaeded;
+ color: #cad2d3;
+}
+.pure-form input[readonly],
+.pure-form select[readonly],
+.pure-form textarea[readonly] {
+ background-color: #eee;
+ color: #777;
+ border-color: #ccc;
+}
+.pure-form input:focus:invalid,
+.pure-form select:focus:invalid,
+.pure-form textarea:focus:invalid {
+ color: #b94a48;
+ border-color: #e9322d;
+}
+.pure-form input[type="checkbox"]:focus:invalid:focus,
+.pure-form input[type="file"]:focus:invalid:focus,
+.pure-form input[type="radio"]:focus:invalid:focus {
+ outline-color: #e9322d;
+}
+.pure-form select {
+ height: 2.25em;
+ border: 1px solid #ccc;
+ background-color: #fff;
+}
+.pure-form select[multiple] {
+ height: auto;
+}
+.pure-form label {
+ margin: 0.5em 0 0.2em;
+}
+.pure-form fieldset {
+ margin: 0;
+ padding: 0.35em 0 0.75em;
+ border: 0;
+}
+.pure-form legend {
+ display: block;
+ width: 100%;
+ padding: 0.3em 0;
+ margin-bottom: 0.3em;
+ color: #333;
+ border-bottom: 1px solid #e5e5e5;
+}
+.pure-form-stacked input[type="color"],
+.pure-form-stacked input[type="date"],
+.pure-form-stacked input[type="datetime-local"],
+.pure-form-stacked input[type="datetime"],
+.pure-form-stacked input[type="email"],
+.pure-form-stacked input[type="file"],
+.pure-form-stacked input[type="month"],
+.pure-form-stacked input[type="number"],
+.pure-form-stacked input[type="password"],
+.pure-form-stacked input[type="search"],
+.pure-form-stacked input[type="tel"],
+.pure-form-stacked input[type="text"],
+.pure-form-stacked input[type="time"],
+.pure-form-stacked input[type="url"],
+.pure-form-stacked input[type="week"],
+.pure-form-stacked label,
+.pure-form-stacked select,
+.pure-form-stacked textarea {
+ display: block;
+ margin: 0.25em 0;
+}
+.pure-form-stacked input:not([type]) {
+ display: block;
+ margin: 0.25em 0;
+}
+.pure-form-aligned input,
+.pure-form-aligned select,
+.pure-form-aligned textarea,
+.pure-form-message-inline {
+ display: inline-block;
+ vertical-align: middle;
+}
+.pure-form-aligned textarea {
+ vertical-align: top;
+}
+.pure-form-aligned .pure-control-group {
+ margin-bottom: 0.5em;
+}
+.pure-form-aligned .pure-control-group label {
+ text-align: right;
+ display: inline-block;
+ vertical-align: middle;
+ width: 10em;
+ margin: 0 1em 0 0;
+}
+.pure-form-aligned .pure-controls {
+ margin: 1.5em 0 0 11em;
+}
+.pure-form .pure-input-rounded,
+.pure-form input.pure-input-rounded {
+ border-radius: 2em;
+ padding: 0.5em 1em;
+}
+.pure-form .pure-group fieldset {
+ margin-bottom: 10px;
+}
+.pure-form .pure-group input,
+.pure-form .pure-group textarea {
+ display: block;
+ padding: 10px;
+ margin: 0 0 -1px;
+ border-radius: 0;
+ position: relative;
+ top: -1px;
+}
+.pure-form .pure-group input:focus,
+.pure-form .pure-group textarea:focus {
+ z-index: 3;
+}
+.pure-form .pure-group input:first-child,
+.pure-form .pure-group textarea:first-child {
+ top: 1px;
+ border-radius: 4px 4px 0 0;
+ margin: 0;
+}
+.pure-form .pure-group input:first-child:last-child,
+.pure-form .pure-group textarea:first-child:last-child {
+ top: 1px;
+ border-radius: 4px;
+ margin: 0;
+}
+.pure-form .pure-group input:last-child,
+.pure-form .pure-group textarea:last-child {
+ top: -2px;
+ border-radius: 0 0 4px 4px;
+ margin: 0;
+}
+.pure-form .pure-group button {
+ margin: 0.35em 0;
+}
+.pure-form .pure-input-1 {
+ width: 100%;
+}
+.pure-form .pure-input-3-4 {
+ width: 75%;
+}
+.pure-form .pure-input-2-3 {
+ width: 66%;
+}
+.pure-form .pure-input-1-2 {
+ width: 50%;
+}
+.pure-form .pure-input-1-3 {
+ width: 33%;
+}
+.pure-form .pure-input-1-4 {
+ width: 25%;
+}
+.pure-form-message-inline {
+ display: inline-block;
+ padding-left: 0.3em;
+ color: #666;
+ vertical-align: middle;
+ font-size: 0.875em;
+}
+.pure-form-message {
+ display: block;
+ color: #666;
+ font-size: 0.875em;
+}
+@media only screen and (max-width: 480px) {
+ .pure-form button[type="submit"] {
+ margin: 0.7em 0 0;
+ }
+ .pure-form input:not([type]),
+ .pure-form input[type="color"],
+ .pure-form input[type="date"],
+ .pure-form input[type="datetime-local"],
+ .pure-form input[type="datetime"],
+ .pure-form input[type="email"],
+ .pure-form input[type="month"],
+ .pure-form input[type="number"],
+ .pure-form input[type="password"],
+ .pure-form input[type="search"],
+ .pure-form input[type="tel"],
+ .pure-form input[type="text"],
+ .pure-form input[type="time"],
+ .pure-form input[type="url"],
+ .pure-form input[type="week"],
+ .pure-form label {
+ margin-bottom: 0.3em;
+ display: block;
+ }
+ .pure-group input:not([type]),
+ .pure-group input[type="color"],
+ .pure-group input[type="date"],
+ .pure-group input[type="datetime-local"],
+ .pure-group input[type="datetime"],
+ .pure-group input[type="email"],
+ .pure-group input[type="month"],
+ .pure-group input[type="number"],
+ .pure-group input[type="password"],
+ .pure-group input[type="search"],
+ .pure-group input[type="tel"],
+ .pure-group input[type="text"],
+ .pure-group input[type="time"],
+ .pure-group input[type="url"],
+ .pure-group input[type="week"] {
+ margin-bottom: 0;
+ }
+ .pure-form-aligned .pure-control-group label {
+ margin-bottom: 0.3em;
+ text-align: left;
+ display: block;
+ width: 100%;
+ }
+ .pure-form-aligned .pure-controls {
+ margin: 1.5em 0 0 0;
+ }
+ .pure-form-message,
+ .pure-form-message-inline {
+ display: block;
+ font-size: 0.75em;
+ padding: 0.2em 0 0.8em;
+ }
+}
+.pure-menu {
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.pure-menu-fixed {
+ position: fixed;
+ left: 0;
+ top: 0;
+ z-index: 3;
+}
+.pure-menu-item,
+.pure-menu-list {
+ position: relative;
+}
+.pure-menu-list {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+.pure-menu-item {
+ padding: 0;
+ margin: 0;
+ height: 100%;
+}
+.pure-menu-heading,
+.pure-menu-link {
+ display: block;
+ text-decoration: none;
+ white-space: nowrap;
+}
+.pure-menu-horizontal {
+ width: 100%;
+ white-space: nowrap;
+}
+.pure-menu-horizontal .pure-menu-list {
+ display: inline-block;
+}
+.pure-menu-horizontal .pure-menu-heading,
+.pure-menu-horizontal .pure-menu-item,
+.pure-menu-horizontal .pure-menu-separator {
+ display: inline-block;
+ vertical-align: middle;
+}
+.pure-menu-item .pure-menu-item {
+ display: block;
+}
+.pure-menu-children {
+ display: none;
+ position: absolute;
+ left: 100%;
+ top: 0;
+ margin: 0;
+ padding: 0;
+ z-index: 3;
+}
+.pure-menu-horizontal .pure-menu-children {
+ left: 0;
+ top: auto;
+ width: inherit;
+}
+.pure-menu-active > .pure-menu-children,
+.pure-menu-allow-hover:hover > .pure-menu-children {
+ display: block;
+ position: absolute;
+}
+.pure-menu-has-children > .pure-menu-link:after {
+ padding-left: 0.5em;
+ content: "\25B8";
+ font-size: small;
+}
+.pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after {
+ content: "\25BE";
+}
+.pure-menu-scrollable {
+ overflow-y: scroll;
+ overflow-x: hidden;
+}
+.pure-menu-scrollable .pure-menu-list {
+ display: block;
+}
+.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list {
+ display: inline-block;
+}
+.pure-menu-horizontal.pure-menu-scrollable {
+ white-space: nowrap;
+ overflow-y: hidden;
+ overflow-x: auto;
+ padding: 0.5em 0;
+}
+.pure-menu-horizontal .pure-menu-children .pure-menu-separator,
+.pure-menu-separator {
+ background-color: #ccc;
+ height: 1px;
+ margin: 0.3em 0;
+}
+.pure-menu-horizontal .pure-menu-separator {
+ width: 1px;
+ height: 1.3em;
+ margin: 0 0.3em;
+}
+.pure-menu-horizontal .pure-menu-children .pure-menu-separator {
+ display: block;
+ width: auto;
+}
+.pure-menu-heading {
+ text-transform: uppercase;
+ color: #565d64;
+}
+.pure-menu-link {
+ color: #777;
+}
+.pure-menu-children {
+ background-color: #fff;
+}
+.pure-menu-disabled,
+.pure-menu-heading,
+.pure-menu-link {
+ padding: 0.5em 1em;
+}
+.pure-menu-disabled {
+ opacity: 0.5;
+}
+.pure-menu-disabled .pure-menu-link:hover {
+ background-color: transparent;
+}
+.pure-menu-active > .pure-menu-link,
+.pure-menu-link:focus,
+.pure-menu-link:hover {
+ background-color: #eee;
+}
+.pure-menu-selected > .pure-menu-link,
+.pure-menu-selected > .pure-menu-link:visited {
+ color: #000;
+}
+.pure-table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ empty-cells: show;
+ border: 1px solid #cbcbcb;
+}
+.pure-table caption {
+ color: #000;
+ font: italic 85%/1 arial, sans-serif;
+ padding: 1em 0;
+ text-align: center;
+}
+.pure-table td,
+.pure-table th {
+ border-left: 1px solid #cbcbcb;
+ border-width: 0 0 0 1px;
+ font-size: inherit;
+ margin: 0;
+ overflow: visible;
+ padding: 0.5em 1em;
+}
+.pure-table thead {
+ background-color: #e0e0e0;
+ color: #000;
+ text-align: left;
+ vertical-align: bottom;
+}
+.pure-table td {
+ background-color: transparent;
+}
+.pure-table-odd td {
+ background-color: #f2f2f2;
+}
+.pure-table-striped tr:nth-child(2n-1) td {
+ background-color: #f2f2f2;
+}
+.pure-table-bordered td {
+ border-bottom: 1px solid #cbcbcb;
+}
+.pure-table-bordered tbody > tr:last-child > td {
+ border-bottom-width: 0;
+}
+.pure-table-horizontal td,
+.pure-table-horizontal th {
+ border-width: 0 0 1px 0;
+ border-bottom: 1px solid #cbcbcb;
+}
+.pure-table-horizontal tbody > tr:last-child > td {
+ border-bottom-width: 0;
+}
+/*!
+ Pure v2.0.3
+ Copyright 2013 Yahoo!
+ Licensed under the BSD License.
+ https://github.com/pure-ss/pure/blob/master/LICENSE.md
+*/
+/*!
+ normalize.cs v | MIT License | git.io/normalize
+ Copyright (c) Nicolas Gallagher and Jonathan Neal
+*/
+/*! normalize.ss v8.0.1 | MIT License | github.com/necolas/normalize.cs */
+
+.talerbar {
+ text-align: center;
+}
+.tt {
+ font-family: "Lucida Console", Monaco, monospace;
+}
+.content {
+ overflow-x: auto;
+ padding-left: 15%;
+ padding-right: 15%;
+}
+.qr {
+ margin: auto;
+ text-align: center;
+}
+.qrtext {
+ width: max-content;
+ margin: auto;
+ transition: font-size 0.2s;
+ font-family: "Lucida Console", Monaco, monospace;
+ font-size: 0.5em;
+}
+.qrtext:hover {
+ font-size: 1em;
+}
+.talerbar {
+ margin: 0;
+ bottom: 0;
+ background-color: #033;
+ color: white;
+ width: 100%;
+ padding: 1em;
+ overflow: auto;
+}
+body {
+ overflow-y: scroll;
+}
+@media (min-width: 500px) {
+ .content {
+ padding-bottom: 2em;
+ overflow-y: auto;
+ }
+}
+#main a:link,
+#main a:visited,
+#main a:hover,
+#main a:active {
+ color: black;
+}.q1ma0zxq{margin:auto;text-align:center;width:340px;}
+.fef0x5t{text-align:center;background-color:#033;color:white;padding:1em;overflow:auto;}.fef0x5t > p > a:link,.fef0x5t > p > a:visited,.fef0x5t > p > a:hover,.fef0x5t > p > a:active{color:white;}
+.p1b3vqup{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;min-height:100vh;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.p1b3vqup a:link,.p1b3vqup a:visited,.p1b3vqup a:hover,.p1b3vqup a:active{color:black;}.p1b3vqup section{text-align:center;width:600px;margin-bottom:auto;}.p1b3vqup section:not(:first-of-type){margin-top:2em;}.p1b3vqup > header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;text-align:center;}.p1b3vqup > footer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;width:100%;margin-bottom:0px;}
+.c1gnd3xp{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}
+.wpwjmk{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;text-transform:var(--wpwjmk-0);font-family:inherit;font-size:100%;padding:0.5em 1em;color:#444;color:rgba(0,0,0,0.8);border:1px solid #999;border:none rgba(0,0,0,0);background-color:'#e6e6e6';-webkit-text-decoration:none;text-decoration:none;border-radius:2px;background-color:#e6e6e6;border-radius:4px;text-shadow:0 1px 1px rgba(0,0,0,0.2);box-shadow:0 0 0 1px rgba(0,0,0,0.15) inset, 0 0 6px rgba(0,0,0,0.2) inset;border-color:#000;}.wpwjmk:focus{outline:0;}.wpwjmk:disabled{border:none;background-image:none;-webkit-filter:alpha(opacity=40);filter:alpha(opacity=40);opacity:0.4;cursor:not-allowed;box-shadow:none;pointer-events:none;}.wpwjmk:hover{-webkit-filter:alpha(opacity=90);filter:alpha(opacity=90);background-image:linear-gradient( transparent, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.1) );}
+.i1pkgksb{border-radius:0.25em;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:1em;border:solid 1px #b8daff;background-color:#cce5ff;color:#004085;}
+.t2c81u8{text-align:left;}.t2c81u8 dt{font-weight:bold;margin-top:1em;}.t2c81u8 dd{margin-inline-start:0px;}
+.t1mav7fx{text-align:left;}.t1mav7fx dt{font-weight:bold;display:inline-block;width:30%;}.t1mav7fx dd{margin-inline-start:0px;display:inline-block;width:70%;}
+/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3NlYmFzam0vV29yay90YWxlci93YWxsZXQtY29yZS9wYWNrYWdlcy9tZXJjaGFudC1iYWNrZW5kLXVpL3NyYy9zdHlsZWQvaW5kZXgudHN4Il0sIm5hbWVzIjpbIi5xMW1hMHp4cSIsIi5mZWYweDV0IiwiLnAxYjN2cXVwIiwiLmMxZ25kM3hwIiwiLndwd2ptayIsIi5pMXBrZ2tzYiIsIi50MmM4MXU4IiwiLnQxbWF2N2Z4Il0sIm1hcHBpbmdzIjoiQUFvQmFBO0FBS0FDO0FBY0FDO0FBdUNBQztBQUlBQztBQXVEQUM7QUFVQUM7QUFVQUMiLCJmaWxlIjoiL2hvbWUvc2ViYXNqbS9Xb3JrL3RhbGVyL3dhbGxldC1jb3JlL3BhY2thZ2VzL21lcmNoYW50LWJhY2tlbmQtdWkvc3JjL3N0eWxlZC9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIEdOVSBUYWxlclxuIChDKSAyMDIxIFRhbGVyIFN5c3RlbXMgUy5BLlxuXG4gR05VIFRhbGVyIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQgdW5kZXIgdGhlXG4gdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZVxuIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDMsIG9yIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uXG5cbiBHTlUgVGFsZXIgaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQgQU5ZXG4gV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1JcbiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy5cblxuIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFsb25nIHdpdGhcbiBHTlUgVGFsZXI7IHNlZSB0aGUgZmlsZSBDT1BZSU5HLiAgSWYgbm90LCBzZWUgPGh0dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+XG4gKi9cbi8qKlxuKlxuKiBAYXV0aG9yIFNlYmFzdGlhbiBKYXZpZXIgTWFyY2hhbm8gKHNlYmFzam0pXG4qL1xuaW1wb3J0IHsgc3R5bGVkIH0gZnJvbSAnQGxpbmFyaWEvcmVhY3QnO1xuZXhwb3J0IGNvbnN0IFFSUGxhY2Vob2xkZXIgPSBzdHlsZWQuZGl2IGBcbiAgbWFyZ2luOiBhdXRvO1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIHdpZHRoOiAzNDBweDsgXG5gO1xuZXhwb3J0IGNvbnN0IEZvb3RlckJhciA9IHN0eWxlZC5mb290ZXIgYFxuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGJhY2tncm91bmQtY29sb3I6ICMwMzM7XG4gIGNvbG9yOiB3aGl0ZTtcbiAgcGFkZGluZzogMWVtO1xuICBvdmVyZmxvdzogYXV0bztcblxuICAmID4gcCA+IGE6bGluayxcbiAgJiA+IHAgPiBhOnZpc2l0ZWQsXG4gICYgPiBwID4gYTpob3ZlcixcbiAgJiA+IHAgPiBhOmFjdGl2ZSB7XG4gICAgY29sb3I6IHdoaXRlO1xuICB9XG5gO1xuZXhwb3J0IGNvbnN0IFBhZ2UgPSBzdHlsZWQuZGl2IGBcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICBtaW4taGVpZ2h0OiAxMDB2aDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgXG4gIGE6bGluayxcbiAgYTp2aXNpdGVkLFxuICBhOmhvdmVyLFxuICBhOmFjdGl2ZSB7XG4gICAgY29sb3I6IGJsYWNrO1xuICB9XG4gIFxuICBzZWN0aW9uIHtcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgd2lkdGg6IDYwMHB4O1xuICAgIC8qIG1hcmdpbjogYXV0bzsgKi9cbiAgICAvKiBtYXJnaW4tdG9wOiAwcHg7ICovXG4gICAgbWFyZ2luLWJvdHRvbTogYXV0bztcbiAgICAvKiBvdmVyZmxvdzogYXV0bzsgKi9cbiAgfVxuICBzZWN0aW9uOm5vdCg6Zmlyc3Qtb2YtdHlwZSkge1xuICAgIG1hcmdpbi10b3A6IDJlbTtcbiAgfVxuICAmID4gaGVhZGVyIHtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgfVxuICAmID4gZm9vdGVyIHtcbiAgICBkaXNwbGF5OiBmbGV4OyAgICBcbiAgICBmbGV4LWRpcmVjdGlvbjogcm93O1xuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYXJvdW5kO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIG1hcmdpbi1ib3R0b206IDBweDtcbiAgfVxuYDtcbmV4cG9ydCBjb25zdCBDZW50ZXIgPSBzdHlsZWQuZGl2IGBcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5gO1xuZXhwb3J0IGNvbnN0IFdhbGxldExpbmsgPSBzdHlsZWQuYSBgXG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgem9vbTogMTtcbiAgbGluZS1oZWlnaHQ6IG5vcm1hbDtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcbiAgdGV4dC1hbGlnbjogY2VudGVyO1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIHVzZXItc2VsZWN0OiBub25lO1xuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICB0ZXh0LXRyYW5zZm9ybTogJHsoeyB1cHBlckNhc2VkIH0pID0+IHVwcGVyQ2FzZWQgPyAndXBwZXJjYXNlJyA6ICdub25lJ307XG5cbiAgZm9udC1mYW1pbHk6IGluaGVyaXQ7XG4gIGZvbnQtc2l6ZTogMTAwJTtcbiAgcGFkZGluZzogMC41ZW0gMWVtO1xuICBjb2xvcjogIzQ0NDsgLyogcmdiYSBub3Qgc3VwcG9ydGVkIChJRSA4KSAqL1xuICBjb2xvcjogcmdiYSgwLCAwLCAwLCAwLjgpOyAvKiByZ2JhIHN1cHBvcnRlZCAqL1xuICBib3JkZXI6IDFweCBzb2xpZCAjOTk5OyAvKklFIDYvNy84Ki9cbiAgYm9yZGVyOiBub25lIHJnYmEoMCwgMCwgMCwgMCk7IC8qSUU5ICsgZXZlcnl0aGluZyBlbHNlKi9cbiAgYmFja2dyb3VuZC1jb2xvcjogJyNlNmU2ZTYnO1xuICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gIGJvcmRlci1yYWRpdXM6IDJweDtcblxuICA6Zm9jdXMge1xuICAgIG91dGxpbmU6IDA7XG4gIH1cblxuICAmOmRpc2FibGVkIHtcbiAgICBib3JkZXI6IG5vbmU7XG4gICAgYmFja2dyb3VuZC1pbWFnZTogbm9uZTtcbiAgICAvKiBjc3NsaW50IGlnbm9yZTpzdGFydCAqL1xuICAgIGZpbHRlcjogYWxwaGEob3BhY2l0eT00MCk7XG4gICAgLyogY3NzbGludCBpZ25vcmU6ZW5kICovXG4gICAgb3BhY2l0eTogMC40O1xuICAgIGN1cnNvcjogbm90LWFsbG93ZWQ7XG4gICAgYm94LXNoYWRvdzogbm9uZTtcbiAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgfVxuXG4gIDpob3ZlciB7XG4gICAgZmlsdGVyOiBhbHBoYShvcGFjaXR5PTkwKTtcbiAgICBiYWNrZ3JvdW5kLWltYWdlOiBsaW5lYXItZ3JhZGllbnQoXG4gICAgICB0cmFuc3BhcmVudCxcbiAgICAgIHJnYmEoMCwgMCwgMCwgMC4wNSkgNDAlLFxuICAgICAgcmdiYSgwLCAwLCAwLCAwLjEpXG4gICAgKTtcbiAgfVxuXG4gIGJhY2tncm91bmQtY29sb3I6ICNlNmU2ZTY7XG4gIGJvcmRlci1yYWRpdXM6IDRweDtcbiAgdGV4dC1zaGFkb3c6IDAgMXB4IDFweCByZ2JhKDAsIDAsIDAsIDAuMik7XG4gIGJveC1zaGFkb3c6IDAgMCAwIDFweCByZ2JhKDAsIDAsIDAsIDAuMTUpIGluc2V0LFxuICAgIDAgMCA2cHggcmdiYSgwLCAwLCAwLCAwLjIpIGluc2V0O1xuICBib3JkZXItY29sb3I6ICMwMDA7XG5gO1xuZXhwb3J0IGNvbnN0IEluZm9Cb3ggPSBzdHlsZWQuZGl2IGBcbiAgYm9yZGVyLXJhZGl1czogMC4yNWVtO1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAvKiBtYXJnaW46IDAuNWVtOyAqL1xuICBwYWRkaW5nOiAxZW07XG4gIC8qIHdpZHRoOiAxMDAlOyAqL1xuICBib3JkZXI6c29saWQgMXB4ICNiOGRhZmY7XG4gIGJhY2tncm91bmQtY29sb3I6I2NjZTVmZjtcbiAgY29sb3I6IzAwNDA4NTtcbmA7XG5leHBvcnQgY29uc3QgVGFibGVFeHBhbmRlZCA9IHN0eWxlZC5kbCBgXG4gIHRleHQtYWxpZ246IGxlZnQ7XG4gIGR0IHtcbiAgICBmb250LXdlaWdodDogYm9sZDtcbiAgICBtYXJnaW4tdG9wOiAxZW07XG4gIH1cbiAgZGQge1xuICAgIG1hcmdpbi1pbmxpbmUtc3RhcnQ6IDBweDtcbiAgfVxuYDtcbmV4cG9ydCBjb25zdCBUYWJsZVNpbXBsZSA9IHN0eWxlZC5kbCBgXG4gIHRleHQtYWxpZ246IGxlZnQ7XG4gIGR0IHtcbiAgICBmb250LXdlaWdodDogYm9sZDtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgd2lkdGg6MzAlO1xuICB9XG4gIGRkIHtcbiAgICBtYXJnaW4taW5saW5lLXN0YXJ0OiAwcHg7XG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgIHdpZHRoOjcwJTtcbiAgfVxuYDtcbiJdfQ==*/</style>
+ </head>
+ <script id="built_time_data">
+ </script>
+ <body>
+ <div class="p1b3vqup"><header><h1>Details of order {{ contract_terms.order_id }}</h1></header><section>{{#refund_amount}}<section><div class="i1pkgksb"><b>Refunded:</b> The merchant refunded you <b>{{ refund_amount }}</b>.</div></section>{{/refund_amount}}<section><dl class="t2c81u8"><dt>Order summary:</dt><dd>{{ contract_terms.summary }}</dd><dt>Amount paid:</dt><dd>{{ contract_terms.amount }}</dd><dt>Order date:</dt><dd>{{ contract_terms.timestamp_str }} </dd><dt>Merchant name:</dt><dd>{{ contract_terms.merchant.name }}</dd></dl></section>{{#contract_terms.hasProducts}}<section><h2>Products purchased</h2><dl class="t1mav7fx">{{#contract_terms.products}}<p>{{description}}</p><dl><dt>Quantity:</dt><dd>{{quantity}}</dd><dt>Price:</dt><dd>{{price}}</dd>{{#hasTaxes}}{{#taxes}}<dt>{{name}}</dt><dd>{{tax}}</dd>{{/taxes}}{{/hasTaxes}}{{#delivery_date}}<dt>Delivered on:</dt><dd>{{ delivery_date_str }} </dd>{{/delivery_date}}{{#unit}}<dt>Product unit:</dt><dd>{{.}}</dd>{{/unit}}{{#product_id}}<dt>Product ID:</dt><dd>{{.}}</dd>{{/product_id}}</dl>{{/contract_terms.products}}</dl></section>{{/contract_terms.hasProducts}}{{#contract_terms.has_delivery_info}}<section><h2>Delivery information</h2><dl class="t2c81u8">{{#contract_terms.delivery_date}}<dt>Delivery date:</dt><dd>{{ contract_terms.delivery_date_str }} </dd>{{/contract_terms.delivery_date}}{{#contract_terms.delivery_location}}<dt>Delivery address:</dt>{{#contract_terms.delivery_location.building_name}}<dd>{{ contract_terms.delivery_location.building_name }} {{ contract_terms.delivery_location.building_number }}</dd>{{/contract_terms.delivery_location.building_name}}{{#contract_terms.delivery_location.country}}<dd>{{ contract_terms.delivery_location.country }} {{ contract_terms.delivery_location.country_subdivision }}</dd>{{/contract_terms.delivery_location.country}}{{#contract_terms.delivery_location.district}}<dd>{{ contract_terms.delivery_location.district }}</dd>{{/contract_terms.delivery_location.district}}{{#contract_terms.delivery_location.post_code}}<dd>{{ contract_terms.delivery_location.post_code }}</dd>{{/contract_terms.delivery_location.post_code}}{{#contract_terms.delivery_location.street}}<dd>{{ contract_terms.delivery_location.street }}</dd>{{/contract_terms.delivery_location.street}}{{#contract_terms.delivery_location.town}}<dd>{{ contract_terms.delivery_location.town }}</dd>{{/contract_terms.delivery_location.town}}{{#contract_terms.delivery_location.town_location}}<dd>{{ contract_terms.delivery_location.town_location }}</dd>{{/contract_terms.delivery_location.town_location}}{{/contract_terms.delivery_location}}</dl></section>{{/contract_terms.has_delivery_info}}<section><h2>Full payment information</h2><dl class="t2c81u8"><dt>Amount paid:</dt><dd>{{ contract_terms.amount }}</dd><dt>Wire transfer method:</dt><dd>{{ contract_terms.wire_method }}</dd><dt>Payment deadline:</dt><dd>{{ contract_terms.pay_deadline_str }} </dd><dt>Exchange transfer deadline:</dt><dd>{{ contract_terms.wire_transfer_deadline_str }} </dd><dt>Maximum deposit fee:</dt><dd>{{ contract_terms.max_fee }}</dd><dt>Maximum wire fee:</dt><dd>{{ contract_terms.max_wire_fee }}</dd><dt>Wire fee amortization:</dt><dd>{{ contract_terms.wire_fee_amortization }} transactions</dd></dl></section><section><h2>Refund information</h2><dl class="t2c81u8"><dt>Refund deadline:</dt><dd>{{ contract_terms.refund_deadline_str }} </dd>{{#contract_terms.auto_refund}}<dt>Attempt autorefund for:</dt><dd>{{ contract_terms.auto_refund_str }} </dd>{{/contract_terms.auto_refund}}</dl></section><section><h2>Additional order details</h2><dl class="t2c81u8"><dt>Public reorder URL:</dt><dd> -- not defined yet -- </dd>{{#contract_terms.fulfillment_url}}<dt>Fulfillment URL:</dt><dd>{{ contract_terms.fulfillment_url }}</dd>{{/contract_terms.fulfillment_url}}</dl></section><section><h2>Full merchant information</h2><dl class="t2c81u8"><dt>Merchant name:</dt><dd>{{ contract_terms.merchant.name }}</dd><dt>Merchant address:</dt>{{#contract_terms.merchant.address.building_name}}<dd>{{ contract_terms.merchant.address.building_name }} {{ contract_terms.merchant.address.building_number }}</dd>{{/contract_terms.merchant.address.building_name}}{{#contract_terms.merchant.address.country}}<dd>{{ contract_terms.merchant.address.country }} {{ contract_terms.merchant.address.country_subdivision }}</dd>{{/contract_terms.merchant.address.country}}{{#contract_terms.merchant.address.district}}<dd>{{ contract_terms.merchant.address.district }}</dd>{{/contract_terms.merchant.address.district}}{{#contract_terms.merchant.address.post_code}}<dd>{{ contract_terms.merchant.address.post_code }}</dd>{{/contract_terms.merchant.address.post_code}}{{#contract_terms.merchant.address.street}}<dd>{{ contract_terms.merchant.address.street }}</dd>{{/contract_terms.merchant.address.street}}{{#contract_terms.merchant.address.town}}<dd>{{ contract_terms.merchant.address.town }}</dd>{{/contract_terms.merchant.address.town}}{{#contract_terms.merchant.address.town_location}}<dd>{{ contract_terms.merchant.address.town_location }}</dd>{{/contract_terms.merchant.address.town_location}}<dt>Merchant's jurisdiction:</dt>{{#contract_terms.merchant.jurisdiction.building_name}}<dd>{{ contract_terms.merchant.jurisdiction.building_name }} {{ contract_terms.merchant.jurisdiction.building_number }}</dd>{{/contract_terms.merchant.jurisdiction.building_name}}{{#contract_terms.merchant.jurisdiction.country}}<dd>{{ contract_terms.merchant.jurisdiction.country }} {{ contract_terms.merchant.jurisdiction.country_subdivision }}</dd>{{/contract_terms.merchant.jurisdiction.country}}{{#contract_terms.merchant.jurisdiction.district}}<dd>{{ contract_terms.merchant.jurisdiction.district }}</dd>{{/contract_terms.merchant.jurisdiction.district}}{{#contract_terms.merchant.jurisdiction.post_code}}<dd>{{ contract_terms.merchant.jurisdiction.post_code }}</dd>{{/contract_terms.merchant.jurisdiction.post_code}}{{#contract_terms.merchant.jurisdiction.street}}<dd>{{ contract_terms.merchant.jurisdiction.street }}</dd>{{/contract_terms.merchant.jurisdiction.street}}{{#contract_terms.merchant.jurisdiction.town}}<dd>{{ contract_terms.merchant.jurisdiction.town }}</dd>{{/contract_terms.merchant.jurisdiction.town}}{{#contract_terms.merchant.jurisdiction.town_location}}<dd>{{ contract_terms.merchant.jurisdiction.town_location }}</dd>{{/contract_terms.merchant.jurisdiction.town_location}}<dt>Merchant URI:</dt><dd>{{ contract_terms.merchant_base_url }}</dd><dt>Merchant's public key:</dt><dd>{{ contract_terms.merchant_pub }}</dd></dl></section>{{#contract_terms.hasAuditors}}<section><h2>Auditors accepted by the merchant</h2><dl class="t2c81u8">{{#contract_terms.auditors}}<p>{{name}}</p><dt>Auditor's public key:</dt><dd>{{auditor_pub}}</dd><dt>Auditor's URL:</dt><dd>{{url}}</dd>{{/contract_terms.auditors}}</dl></section>{{/contract_terms.hasAuditors}}{{#contract_terms.hasExchanges}}<section><h2>Exchanges accepted by the merchant</h2><dl class="t2c81u8">{{#contract_terms.exchanges}}<dt>Exchange's URL:</dt><dd>{{url}}</dd><dt>Public key:</dt><dd>{{master_pub}}</dd>{{/contract_terms.exchanges}}</dl></section>{{/contract_terms.hasExchanges}}</section><footer class="fef0x5t"><p><a href="https://taler.net/">Learn more about GNU Taler on our website.</a><p>Copyright © 2014—2021 Taler Systems SA</p></p></footer></div>
+ <script>var page = (function (exports) {
+ 'use strict';
+
+ function toInteger(dirtyNumber) {
+ if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
+ return NaN;
+ }
+
+ var number = Number(dirtyNumber);
+
+ if (isNaN(number)) {
+ return number;
+ }
+
+ return number < 0 ? Math.ceil(number) : Math.floor(number);
+ }
+
+ function requiredArgs(required, args) {
+ if (args.length < required) {
+ throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
+ }
+ }
+
+ function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
+ /**
+ * @name toDate
+ * @category Common Helpers
+ * @summary Convert the given argument to an instance of Date.
+ *
+ * @description
+ * Convert the given argument to an instance of Date.
+ *
+ * If the argument is an instance of Date, the function returns its clone.
+ *
+ * If the argument is a number, it is treated as a timestamp.
+ *
+ * If the argument is none of the above, the function returns Invalid Date.
+ *
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
+ *
+ * @param {Date|Number} argument - the value to convert
+ * @returns {Date} the parsed date in the local time zone
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // Clone the date:
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
+ * //=> Tue Feb 11 2014 11:30:30
+ *
+ * @example
+ * // Convert the timestamp to date:
+ * const result = toDate(1392098430000)
+ * //=> Tue Feb 11 2014 11:30:30
+ */
+
+ function toDate(argument) {
+ requiredArgs(1, arguments);
+ var argStr = Object.prototype.toString.call(argument); // Clone the date
+
+ if (argument instanceof Date || _typeof$2(argument) === 'object' && argStr === '[object Date]') {
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
+ return new Date(argument.getTime());
+ } else if (typeof argument === 'number' || argStr === '[object Number]') {
+ return new Date(argument);
+ } else {
+ if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
+ // eslint-disable-next-line no-console
+ console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
+
+ console.warn(new Error().stack);
+ }
+
+ return new Date(NaN);
+ }
+ }
+
+ /**
+ * @name addDays
+ * @category Day Helpers
+ * @summary Add the specified number of days to the given date.
+ *
+ * @description
+ * Add the specified number of days to the given date.
+ *
+ * @param {Date|Number} date - the date to be changed
+ * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
+ * @returns {Date} - the new date with the days added
+ * @throws {TypeError} - 2 arguments required
+ *
+ * @example
+ * // Add 10 days to 1 September 2014:
+ * const result = addDays(new Date(2014, 8, 1), 10)
+ * //=> Thu Sep 11 2014 00:00:00
+ */
+
+ function addDays(dirtyDate, dirtyAmount) {
+ requiredArgs(2, arguments);
+ var date = toDate(dirtyDate);
+ var amount = toInteger(dirtyAmount);
+
+ if (isNaN(amount)) {
+ return new Date(NaN);
+ }
+
+ if (!amount) {
+ // If 0 days, no-op to avoid changing times in the hour before end of DST
+ return date;
+ }
+
+ date.setDate(date.getDate() + amount);
+ return date;
+ }
+
+ /**
+ * @name addMonths
+ * @category Month Helpers
+ * @summary Add the specified number of months to the given date.
+ *
+ * @description
+ * Add the specified number of months to the given date.
+ *
+ * @param {Date|Number} date - the date to be changed
+ * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
+ * @returns {Date} the new date with the months added
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // Add 5 months to 1 September 2014:
+ * const result = addMonths(new Date(2014, 8, 1), 5)
+ * //=> Sun Feb 01 2015 00:00:00
+ */
+
+ function addMonths(dirtyDate, dirtyAmount) {
+ requiredArgs(2, arguments);
+ var date = toDate(dirtyDate);
+ var amount = toInteger(dirtyAmount);
+
+ if (isNaN(amount)) {
+ return new Date(NaN);
+ }
+
+ if (!amount) {
+ // If 0 months, no-op to avoid changing times in the hour before end of DST
+ return date;
+ }
+
+ var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for
+ // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
+ // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
+ // want except that dates will wrap around the end of a month, meaning that
+ // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
+ // we'll default to the end of the desired month by adding 1 to the desired
+ // month and using a date of 0 to back up one day to the end of the desired
+ // month.
+
+ var endOfDesiredMonth = new Date(date.getTime());
+ endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
+ var daysInMonth = endOfDesiredMonth.getDate();
+
+ if (dayOfMonth >= daysInMonth) {
+ // If we're already at the end of the month, then this is the correct date
+ // and we're done.
+ return endOfDesiredMonth;
+ } else {
+ // Otherwise, we now know that setting the original day-of-month value won't
+ // cause an overflow, so set the desired day-of-month. Note that we can't
+ // just set the date of `endOfDesiredMonth` because that object may have had
+ // its time changed in the unusual case where where a DST transition was on
+ // the last day of the month and its local time was in the hour skipped or
+ // repeated next to a DST transition. So we use `date` instead which is
+ // guaranteed to still have the original time.
+ date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
+ return date;
+ }
+ }
+
+ function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
+
+ /**
+ * @name add
+ * @category Common Helpers
+ * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.
+ *
+ * @description
+ * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.
+ *
+ * @param {Date|Number} date - the date to be changed
+ * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
+ *
+ * | Key | Description |
+ * |----------------|------------------------------------|
+ * | years | Amount of years to be added |
+ * | months | Amount of months to be added |
+ * | weeks | Amount of weeks to be added |
+ * | days | Amount of days to be added |
+ * | hours | Amount of hours to be added |
+ * | minutes | Amount of minutes to be added |
+ * | seconds | Amount of seconds to be added |
+ *
+ * All values default to 0
+ *
+ * @returns {Date} the new date with the seconds added
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // Add the following duration to 1 September 2014, 10:19:50
+ * const result = add(new Date(2014, 8, 1, 10, 19, 50), {
+ * years: 2,
+ * months: 9,
+ * weeks: 1,
+ * days: 7,
+ * hours: 5,
+ * minutes: 9,
+ * seconds: 30,
+ * })
+ * //=> Thu Jun 15 2017 15:29:20
+ */
+ function add(dirtyDate, duration) {
+ requiredArgs(2, arguments);
+ if (!duration || _typeof$1(duration) !== 'object') return new Date(NaN);
+ var years = duration.years ? toInteger(duration.years) : 0;
+ var months = duration.months ? toInteger(duration.months) : 0;
+ var weeks = duration.weeks ? toInteger(duration.weeks) : 0;
+ var days = duration.days ? toInteger(duration.days) : 0;
+ var hours = duration.hours ? toInteger(duration.hours) : 0;
+ var minutes = duration.minutes ? toInteger(duration.minutes) : 0;
+ var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Add years and months
+
+ var date = toDate(dirtyDate);
+ var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date; // Add weeks and days
+
+ var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds
+
+ var minutesToAdd = minutes + hours * 60;
+ var secondsToAdd = seconds + minutesToAdd * 60;
+ var msToAdd = secondsToAdd * 1000;
+ var finalDate = new Date(dateWithDays.getTime() + msToAdd);
+ return finalDate;
+ }
+
+ /**
+ * @name addMilliseconds
+ * @category Millisecond Helpers
+ * @summary Add the specified number of milliseconds to the given date.
+ *
+ * @description
+ * Add the specified number of milliseconds to the given date.
+ *
+ * @param {Date|Number} date - the date to be changed
+ * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
+ * @returns {Date} the new date with the milliseconds added
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
+ * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
+ * //=> Thu Jul 10 2014 12:45:30.750
+ */
+
+ function addMilliseconds(dirtyDate, dirtyAmount) {
+ requiredArgs(2, arguments);
+ var timestamp = toDate(dirtyDate).getTime();
+ var amount = toInteger(dirtyAmount);
+ return new Date(timestamp + amount);
+ }
+
+ var defaultOptions = {};
+ function getDefaultOptions() {
+ return defaultOptions;
+ }
+
+ /**
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
+ * They usually appear for dates that denote time before the timezones were introduced
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
+ * and GMT+01:00:00 after that date)
+ *
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
+ * which would lead to incorrect calculations.
+ *
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
+ */
+ function getTimezoneOffsetInMilliseconds(date) {
+ var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
+ utcDate.setUTCFullYear(date.getFullYear());
+ return date.getTime() - utcDate.getTime();
+ }
+
+ /**
+ * @name startOfDay
+ * @category Day Helpers
+ * @summary Return the start of a day for the given date.
+ *
+ * @description
+ * Return the start of a day for the given date.
+ * The result will be in the local timezone.
+ *
+ * @param {Date|Number} date - the original date
+ * @returns {Date} the start of a day
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // The start of a day for 2 September 2014 11:55:00:
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
+ * //=> Tue Sep 02 2014 00:00:00
+ */
+
+ function startOfDay(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ date.setHours(0, 0, 0, 0);
+ return date;
+ }
+
+ var MILLISECONDS_IN_DAY$1 = 86400000;
+ /**
+ * @name differenceInCalendarDays
+ * @category Day Helpers
+ * @summary Get the number of calendar days between the given dates.
+ *
+ * @description
+ * Get the number of calendar days between the given dates. This means that the times are removed
+ * from the dates and then the difference in days is calculated.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of calendar days
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many calendar days are between
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
+ * const result = differenceInCalendarDays(
+ * new Date(2012, 6, 2, 0, 0),
+ * new Date(2011, 6, 2, 23, 0)
+ * )
+ * //=> 366
+ * // How many calendar days are between
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
+ * const result = differenceInCalendarDays(
+ * new Date(2011, 6, 3, 0, 1),
+ * new Date(2011, 6, 2, 23, 59)
+ * )
+ * //=> 1
+ */
+
+ function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var startOfDayLeft = startOfDay(dirtyDateLeft);
+ var startOfDayRight = startOfDay(dirtyDateRight);
+ var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);
+ var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight); // Round the number of days to the nearest integer
+ // because the number of milliseconds in a day is not constant
+ // (e.g. it's different in the day of the daylight saving time clock shift)
+
+ return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY$1);
+ }
+
+ /**
+ * @name compareAsc
+ * @category Common Helpers
+ * @summary Compare the two dates and return -1, 0 or 1.
+ *
+ * @description
+ * Compare the two dates and return 1 if the first date is after the second,
+ * -1 if the first date is before the second or 0 if dates are equal.
+ *
+ * @param {Date|Number} dateLeft - the first date to compare
+ * @param {Date|Number} dateRight - the second date to compare
+ * @returns {Number} the result of the comparison
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // Compare 11 February 1987 and 10 July 1989:
+ * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
+ * //=> -1
+ *
+ * @example
+ * // Sort the array of dates:
+ * const result = [
+ * new Date(1995, 6, 2),
+ * new Date(1987, 1, 11),
+ * new Date(1989, 6, 10)
+ * ].sort(compareAsc)
+ * //=> [
+ * // Wed Feb 11 1987 00:00:00,
+ * // Mon Jul 10 1989 00:00:00,
+ * // Sun Jul 02 1995 00:00:00
+ * // ]
+ */
+
+ function compareAsc(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var dateLeft = toDate(dirtyDateLeft);
+ var dateRight = toDate(dirtyDateRight);
+ var diff = dateLeft.getTime() - dateRight.getTime();
+
+ if (diff < 0) {
+ return -1;
+ } else if (diff > 0) {
+ return 1; // Return 0 if diff is 0; return NaN if diff is NaN
+ } else {
+ return diff;
+ }
+ }
+
+ /**
+ * Days in 1 week.
+ *
+ * @name daysInWeek
+ * @constant
+ * @type {number}
+ * @default
+ */
+ /**
+ * Milliseconds in 1 minute
+ *
+ * @name millisecondsInMinute
+ * @constant
+ * @type {number}
+ * @default
+ */
+
+ var millisecondsInMinute = 60000;
+ /**
+ * Milliseconds in 1 hour
+ *
+ * @name millisecondsInHour
+ * @constant
+ * @type {number}
+ * @default
+ */
+
+ var millisecondsInHour = 3600000;
+
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+ /**
+ * @name isDate
+ * @category Common Helpers
+ * @summary Is the given value a date?
+ *
+ * @description
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
+ *
+ * @param {*} value - the value to check
+ * @returns {boolean} true if the given value is a date
+ * @throws {TypeError} 1 arguments required
+ *
+ * @example
+ * // For a valid date:
+ * const result = isDate(new Date())
+ * //=> true
+ *
+ * @example
+ * // For an invalid date:
+ * const result = isDate(new Date(NaN))
+ * //=> true
+ *
+ * @example
+ * // For some value:
+ * const result = isDate('2014-02-31')
+ * //=> false
+ *
+ * @example
+ * // For an object:
+ * const result = isDate({})
+ * //=> false
+ */
+
+ function isDate(value) {
+ requiredArgs(1, arguments);
+ return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
+ }
+
+ /**
+ * @name isValid
+ * @category Common Helpers
+ * @summary Is the given date valid?
+ *
+ * @description
+ * Returns false if argument is Invalid Date and true otherwise.
+ * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
+ * Invalid Date is a Date, whose time value is NaN.
+ *
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
+ *
+ * @param {*} date - the date to check
+ * @returns {Boolean} the date is valid
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // For the valid date:
+ * const result = isValid(new Date(2014, 1, 31))
+ * //=> true
+ *
+ * @example
+ * // For the value, convertable into a date:
+ * const result = isValid(1393804800000)
+ * //=> true
+ *
+ * @example
+ * // For the invalid date:
+ * const result = isValid(new Date(''))
+ * //=> false
+ */
+
+ function isValid(dirtyDate) {
+ requiredArgs(1, arguments);
+
+ if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
+ return false;
+ }
+
+ var date = toDate(dirtyDate);
+ return !isNaN(Number(date));
+ }
+
+ /**
+ * @name differenceInCalendarMonths
+ * @category Month Helpers
+ * @summary Get the number of calendar months between the given dates.
+ *
+ * @description
+ * Get the number of calendar months between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of calendar months
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many calendar months are between 31 January 2014 and 1 September 2014?
+ * const result = differenceInCalendarMonths(
+ * new Date(2014, 8, 1),
+ * new Date(2014, 0, 31)
+ * )
+ * //=> 8
+ */
+
+ function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var dateLeft = toDate(dirtyDateLeft);
+ var dateRight = toDate(dirtyDateRight);
+ var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();
+ var monthDiff = dateLeft.getMonth() - dateRight.getMonth();
+ return yearDiff * 12 + monthDiff;
+ }
+
+ /**
+ * @name differenceInCalendarYears
+ * @category Year Helpers
+ * @summary Get the number of calendar years between the given dates.
+ *
+ * @description
+ * Get the number of calendar years between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of calendar years
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many calendar years are between 31 December 2013 and 11 February 2015?
+ * const result = differenceInCalendarYears(
+ * new Date(2015, 1, 11),
+ * new Date(2013, 11, 31)
+ * )
+ * //=> 2
+ */
+
+ function differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var dateLeft = toDate(dirtyDateLeft);
+ var dateRight = toDate(dirtyDateRight);
+ return dateLeft.getFullYear() - dateRight.getFullYear();
+ }
+
+ // for accurate equality comparisons of UTC timestamps that end up
+ // having the same representation in local time, e.g. one hour before
+ // DST ends vs. the instant that DST ends.
+
+ function compareLocalAsc(dateLeft, dateRight) {
+ var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();
+
+ if (diff < 0) {
+ return -1;
+ } else if (diff > 0) {
+ return 1; // Return 0 if diff is 0; return NaN if diff is NaN
+ } else {
+ return diff;
+ }
+ }
+ /**
+ * @name differenceInDays
+ * @category Day Helpers
+ * @summary Get the number of full days between the given dates.
+ *
+ * @description
+ * Get the number of full day periods between two dates. Fractional days are
+ * truncated towards zero.
+ *
+ * One "full day" is the distance between a local time in one day to the same
+ * local time on the next or previous day. A full day can sometimes be less than
+ * or more than 24 hours if a daylight savings change happens between two dates.
+ *
+ * To ignore DST and only measure exact 24-hour periods, use this instead:
+ * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.
+ *
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of full days according to the local timezone
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many full days are between
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
+ * const result = differenceInDays(
+ * new Date(2012, 6, 2, 0, 0),
+ * new Date(2011, 6, 2, 23, 0)
+ * )
+ * //=> 365
+ * // How many full days are between
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
+ * const result = differenceInDays(
+ * new Date(2011, 6, 3, 0, 1),
+ * new Date(2011, 6, 2, 23, 59)
+ * )
+ * //=> 0
+ * // How many full days are between
+ * // 1 March 2020 0:00 and 1 June 2020 0:00 ?
+ * // Note: because local time is used, the
+ * // result will always be 92 days, even in
+ * // time zones where DST starts and the
+ * // period has only 92*24-1 hours.
+ * const result = differenceInDays(
+ * new Date(2020, 5, 1),
+ * new Date(2020, 2, 1)
+ * )
+ //=> 92
+ */
+
+
+ function differenceInDays(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var dateLeft = toDate(dirtyDateLeft);
+ var dateRight = toDate(dirtyDateRight);
+ var sign = compareLocalAsc(dateLeft, dateRight);
+ var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));
+ dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
+ // If so, result must be decreased by 1 in absolute value
+
+ var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);
+ var result = sign * (difference - isLastDayNotFull); // Prevent negative zero
+
+ return result === 0 ? 0 : result;
+ }
+
+ /**
+ * @name differenceInMilliseconds
+ * @category Millisecond Helpers
+ * @summary Get the number of milliseconds between the given dates.
+ *
+ * @description
+ * Get the number of milliseconds between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of milliseconds
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many milliseconds are between
+ * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?
+ * const result = differenceInMilliseconds(
+ * new Date(2014, 6, 2, 12, 30, 21, 700),
+ * new Date(2014, 6, 2, 12, 30, 20, 600)
+ * )
+ * //=> 1100
+ */
+
+ function differenceInMilliseconds(dateLeft, dateRight) {
+ requiredArgs(2, arguments);
+ return toDate(dateLeft).getTime() - toDate(dateRight).getTime();
+ }
+
+ var roundingMap = {
+ ceil: Math.ceil,
+ round: Math.round,
+ floor: Math.floor,
+ trunc: function trunc(value) {
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
+ } // Math.trunc is not supported by IE
+
+ };
+ var defaultRoundingMethod = 'trunc';
+ function getRoundingMethod(method) {
+ return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
+ }
+
+ /**
+ * @name differenceInHours
+ * @category Hour Helpers
+ * @summary Get the number of hours between the given dates.
+ *
+ * @description
+ * Get the number of hours between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @param {Object} [options] - an object with options.
+ * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)
+ * @returns {Number} the number of hours
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?
+ * const result = differenceInHours(
+ * new Date(2014, 6, 2, 19, 0),
+ * new Date(2014, 6, 2, 6, 50)
+ * )
+ * //=> 12
+ */
+
+ function differenceInHours(dateLeft, dateRight, options) {
+ requiredArgs(2, arguments);
+ var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInHour;
+ return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
+ }
+
+ /**
+ * @name differenceInMinutes
+ * @category Minute Helpers
+ * @summary Get the number of minutes between the given dates.
+ *
+ * @description
+ * Get the signed number of full (rounded towards 0) minutes between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @param {Object} [options] - an object with options.
+ * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)
+ * @returns {Number} the number of minutes
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?
+ * const result = differenceInMinutes(
+ * new Date(2014, 6, 2, 12, 20, 0),
+ * new Date(2014, 6, 2, 12, 7, 59)
+ * )
+ * //=> 12
+ *
+ * @example
+ * // How many minutes are between 10:01:59 and 10:00:00
+ * const result = differenceInMinutes(
+ * new Date(2000, 0, 1, 10, 0, 0),
+ * new Date(2000, 0, 1, 10, 1, 59)
+ * )
+ * //=> -1
+ */
+
+ function differenceInMinutes(dateLeft, dateRight, options) {
+ requiredArgs(2, arguments);
+ var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;
+ return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
+ }
+
+ /**
+ * @name endOfDay
+ * @category Day Helpers
+ * @summary Return the end of a day for the given date.
+ *
+ * @description
+ * Return the end of a day for the given date.
+ * The result will be in the local timezone.
+ *
+ * @param {Date|Number} date - the original date
+ * @returns {Date} the end of a day
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // The end of a day for 2 September 2014 11:55:00:
+ * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
+ * //=> Tue Sep 02 2014 23:59:59.999
+ */
+
+ function endOfDay(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ date.setHours(23, 59, 59, 999);
+ return date;
+ }
+
+ /**
+ * @name endOfMonth
+ * @category Month Helpers
+ * @summary Return the end of a month for the given date.
+ *
+ * @description
+ * Return the end of a month for the given date.
+ * The result will be in the local timezone.
+ *
+ * @param {Date|Number} date - the original date
+ * @returns {Date} the end of a month
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // The end of a month for 2 September 2014 11:55:00:
+ * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
+ * //=> Tue Sep 30 2014 23:59:59.999
+ */
+
+ function endOfMonth(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ var month = date.getMonth();
+ date.setFullYear(date.getFullYear(), month + 1, 0);
+ date.setHours(23, 59, 59, 999);
+ return date;
+ }
+
+ /**
+ * @name isLastDayOfMonth
+ * @category Month Helpers
+ * @summary Is the given date the last day of a month?
+ *
+ * @description
+ * Is the given date the last day of a month?
+ *
+ * @param {Date|Number} date - the date to check
+ * @returns {Boolean} the date is the last day of a month
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // Is 28 February 2014 the last day of a month?
+ * const result = isLastDayOfMonth(new Date(2014, 1, 28))
+ * //=> true
+ */
+
+ function isLastDayOfMonth(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ return endOfDay(date).getTime() === endOfMonth(date).getTime();
+ }
+
+ /**
+ * @name differenceInMonths
+ * @category Month Helpers
+ * @summary Get the number of full months between the given dates.
+ *
+ * @description
+ * Get the number of full months between the given dates using trunc as a default rounding method.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of full months
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many full months are between 31 January 2014 and 1 September 2014?
+ * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))
+ * //=> 7
+ */
+
+ function differenceInMonths(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var dateLeft = toDate(dirtyDateLeft);
+ var dateRight = toDate(dirtyDateRight);
+ var sign = compareAsc(dateLeft, dateRight);
+ var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));
+ var result; // Check for the difference of less than month
+
+ if (difference < 1) {
+ result = 0;
+ } else {
+ if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {
+ // This will check if the date is end of Feb and assign a higher end of month date
+ // to compare it with Jan
+ dateLeft.setDate(30);
+ }
+
+ dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full
+ // If so, result must be decreased by 1 in absolute value
+
+ var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month
+
+ if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {
+ isLastMonthNotFull = false;
+ }
+
+ result = sign * (difference - Number(isLastMonthNotFull));
+ } // Prevent negative zero
+
+
+ return result === 0 ? 0 : result;
+ }
+
+ /**
+ * @name differenceInSeconds
+ * @category Second Helpers
+ * @summary Get the number of seconds between the given dates.
+ *
+ * @description
+ * Get the number of seconds between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @param {Object} [options] - an object with options.
+ * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)
+ * @returns {Number} the number of seconds
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many seconds are between
+ * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?
+ * const result = differenceInSeconds(
+ * new Date(2014, 6, 2, 12, 30, 20, 0),
+ * new Date(2014, 6, 2, 12, 30, 7, 999)
+ * )
+ * //=> 12
+ */
+
+ function differenceInSeconds(dateLeft, dateRight, options) {
+ requiredArgs(2, arguments);
+ var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;
+ return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
+ }
+
+ /**
+ * @name differenceInYears
+ * @category Year Helpers
+ * @summary Get the number of full years between the given dates.
+ *
+ * @description
+ * Get the number of full years between the given dates.
+ *
+ * @param {Date|Number} dateLeft - the later date
+ * @param {Date|Number} dateRight - the earlier date
+ * @returns {Number} the number of full years
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // How many full years are between 31 December 2013 and 11 February 2015?
+ * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))
+ * //=> 1
+ */
+
+ function differenceInYears(dirtyDateLeft, dirtyDateRight) {
+ requiredArgs(2, arguments);
+ var dateLeft = toDate(dirtyDateLeft);
+ var dateRight = toDate(dirtyDateRight);
+ var sign = compareAsc(dateLeft, dateRight);
+ var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight)); // Set both dates to a valid leap year for accurate comparison when dealing
+ // with leap days
+
+ dateLeft.setFullYear(1584);
+ dateRight.setFullYear(1584); // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full
+ // If so, result must be decreased by 1 in absolute value
+
+ var isLastYearNotFull = compareAsc(dateLeft, dateRight) === -sign;
+ var result = sign * (difference - Number(isLastYearNotFull)); // Prevent negative zero
+
+ return result === 0 ? 0 : result;
+ }
+
+ /**
+ * @name subMilliseconds
+ * @category Millisecond Helpers
+ * @summary Subtract the specified number of milliseconds from the given date.
+ *
+ * @description
+ * Subtract the specified number of milliseconds from the given date.
+ *
+ * @param {Date|Number} date - the date to be changed
+ * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
+ * @returns {Date} the new date with the milliseconds subtracted
+ * @throws {TypeError} 2 arguments required
+ *
+ * @example
+ * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
+ * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
+ * //=> Thu Jul 10 2014 12:45:29.250
+ */
+
+ function subMilliseconds(dirtyDate, dirtyAmount) {
+ requiredArgs(2, arguments);
+ var amount = toInteger(dirtyAmount);
+ return addMilliseconds(dirtyDate, -amount);
+ }
+
+ var MILLISECONDS_IN_DAY = 86400000;
+ function getUTCDayOfYear(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ var timestamp = date.getTime();
+ date.setUTCMonth(0, 1);
+ date.setUTCHours(0, 0, 0, 0);
+ var startOfYearTimestamp = date.getTime();
+ var difference = timestamp - startOfYearTimestamp;
+ return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
+ }
+
+ function startOfUTCISOWeek(dirtyDate) {
+ requiredArgs(1, arguments);
+ var weekStartsOn = 1;
+ var date = toDate(dirtyDate);
+ var day = date.getUTCDay();
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
+ date.setUTCDate(date.getUTCDate() - diff);
+ date.setUTCHours(0, 0, 0, 0);
+ return date;
+ }
+
+ function getUTCISOWeekYear(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ var year = date.getUTCFullYear();
+ var fourthOfJanuaryOfNextYear = new Date(0);
+ fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
+ fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
+ var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
+ var fourthOfJanuaryOfThisYear = new Date(0);
+ fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
+ fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
+ var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
+
+ if (date.getTime() >= startOfNextYear.getTime()) {
+ return year + 1;
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
+ return year;
+ } else {
+ return year - 1;
+ }
+ }
+
+ function startOfUTCISOWeekYear(dirtyDate) {
+ requiredArgs(1, arguments);
+ var year = getUTCISOWeekYear(dirtyDate);
+ var fourthOfJanuary = new Date(0);
+ fourthOfJanuary.setUTCFullYear(year, 0, 4);
+ fourthOfJanuary.setUTCHours(0, 0, 0, 0);
+ var date = startOfUTCISOWeek(fourthOfJanuary);
+ return date;
+ }
+
+ var MILLISECONDS_IN_WEEK$1 = 604800000;
+ function getUTCISOWeek(dirtyDate) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer
+ // because the number of milliseconds in a week is not constant
+ // (e.g. it's different in the week of the daylight saving time clock shift)
+
+ return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
+ }
+
+ function startOfUTCWeek(dirtyDate, options) {
+ var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+
+ requiredArgs(1, arguments);
+ var defaultOptions = getDefaultOptions();
+ var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
+
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
+ }
+
+ var date = toDate(dirtyDate);
+ var day = date.getUTCDay();
+ var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
+ date.setUTCDate(date.getUTCDate() - diff);
+ date.setUTCHours(0, 0, 0, 0);
+ return date;
+ }
+
+ function getUTCWeekYear(dirtyDate, options) {
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ var year = date.getUTCFullYear();
+ var defaultOptions = getDefaultOptions();
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
+
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
+ }
+
+ var firstWeekOfNextYear = new Date(0);
+ firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
+ firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
+ var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
+ var firstWeekOfThisYear = new Date(0);
+ firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
+ firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
+ var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
+
+ if (date.getTime() >= startOfNextYear.getTime()) {
+ return year + 1;
+ } else if (date.getTime() >= startOfThisYear.getTime()) {
+ return year;
+ } else {
+ return year - 1;
+ }
+ }
+
+ function startOfUTCWeekYear(dirtyDate, options) {
+ var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
+
+ requiredArgs(1, arguments);
+ var defaultOptions = getDefaultOptions();
+ var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
+ var year = getUTCWeekYear(dirtyDate, options);
+ var firstWeek = new Date(0);
+ firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
+ firstWeek.setUTCHours(0, 0, 0, 0);
+ var date = startOfUTCWeek(firstWeek, options);
+ return date;
+ }
+
+ var MILLISECONDS_IN_WEEK = 604800000;
+ function getUTCWeek(dirtyDate, options) {
+ requiredArgs(1, arguments);
+ var date = toDate(dirtyDate);
+ var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer
+ // because the number of milliseconds in a week is not constant
+ // (e.g. it's different in the week of the daylight saving time clock shift)
+
+ return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
+ }
+
+ function addLeadingZeros(number, targetLength) {
+ var sign = number < 0 ? '-' : '';
+ var output = Math.abs(number).toString();
+
+ while (output.length < targetLength) {
+ output = '0' + output;
+ }
+
+ return sign + output;
+ }
+
+ /*
+ * | | Unit | | Unit |
+ * |-----|--------------------------------|-----|--------------------------------|
+ * | a | AM, PM | A* | |
+ * | d | Day of month | D | |
+ * | h | Hour [1-12] | H | Hour [0-23] |
+ * | m | Minute | M | Month |
+ * | s | Second | S | Fraction of second |
+ * | y | Year (abs) | Y | |
+ *
+ * Letters marked by * are not implemented but reserved by Unicode standard.
+ */
+
+ var formatters$2 = {
+ // Year
+ y: function y(date, token) {
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
+ // | Year | y | yy | yyy | yyyy | yyyyy |
+ // |----------|-------|----|-------|-------|-------|
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
+ var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
+
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
+ },
+ // Month
+ M: function M(date, token) {
+ var month = date.getUTCMonth();
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
+ },
+ // Day of the month
+ d: function d(date, token) {
+ return addLeadingZeros(date.getUTCDate(), token.length);
+ },
+ // AM or PM
+ a: function a(date, token) {
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
+
+ switch (token) {
+ case 'a':
+ case 'aa':
+ return dayPeriodEnumValue.toUpperCase();
+
+ case 'aaa':
+ return dayPeriodEnumValue;
+
+ case 'aaaaa':
+ return dayPeriodEnumValue[0];
+
+ case 'aaaa':
+ default:
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
+ }
+ },
+ // Hour [1-12]
+ h: function h(date, token) {
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
+ },
+ // Hour [0-23]
+ H: function H(date, token) {
+ return addLeadingZeros(date.getUTCHours(), token.length);
+ },
+ // Minute
+ m: function m(date, token) {
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
+ },
+ // Second
+ s: function s(date, token) {
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
+ },
+ // Fraction of second
+ S: function S(date, token) {
+ var numberOfDigits = token.length;
+ var milliseconds = date.getUTCMilliseconds();
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
+ return addLeadingZeros(fractionalSeconds, token.length);
+ }
+ };
+ var formatters$3 = formatters$2;
+
+ var dayPeriodEnum = {
+ am: 'am',
+ pm: 'pm',
+ midnight: 'midnight',
+ noon: 'noon',
+ morning: 'morning',
+ afternoon: 'afternoon',
+ evening: 'evening',
+ night: 'night'
+ };
+
+ /*
+ * | | Unit | | Unit |
+ * |-----|--------------------------------|-----|--------------------------------|
+ * | a | AM, PM | A* | Milliseconds in day |
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
+ * | d | Day of month | D | Day of year |
+ * | e | Local day of week | E | Day of week |
+ * | f | | F* | Day of week in month |
+ * | g* | Modified Julian day | G | Era |
+ * | h | Hour [1-12] | H | Hour [0-23] |
+ * | i! | ISO day of week | I! | ISO week of year |
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
+ * | k | Hour [1-24] | K | Hour [0-11] |
+ * | l* | (deprecated) | L | Stand-alone month |
+ * | m | Minute | M | Month |
+ * | n | | N | |
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
+ * | p! | Long localized time | P! | Long localized date |
+ * | q | Stand-alone quarter | Q | Quarter |
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
+ * | s | Second | S | Fraction of second |
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
+ * | u | Extended year | U* | Cyclic year |
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
+ * | w | Local week of year | W* | Week of month |
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
+ * | y | Year (abs) | Y | Local week-numbering year |
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
+ *
+ * Letters marked by * are not implemented but reserved by Unicode standard.
+ *
+ * Letters marked by ! are non-standard, but implemented by date-fns:
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
+ * i.e. 7 for Sunday, 1 for Monday, etc.
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
+ * `R` is supposed to be used in conjunction with `I` and `i`
+ * for universal ISO week-numbering date, whereas
+ * `Y` is supposed to be used in conjunction with `w` and `e`
+ * for week-numbering date specific to the locale.
+ * - `P` is long localized date format
+ * - `p` is long localized time format
+ */
+ var formatters = {
+ // Era
+ G: function G(date, token, localize) {
+ var era = date.getUTCFullYear() > 0 ? 1 : 0;
+
+ switch (token) {
+ // AD, BC
+ case 'G':
+ case 'GG':
+ case 'GGG':
+ return localize.era(era, {
+ width: 'abbreviated'
+ });
+ // A, B
+
+ case 'GGGGG':
+ return localize.era(era, {
+ width: 'narrow'
+ });
+ // Anno Domini, Before Christ
+
+ case 'GGGG':
+ default:
+ return localize.era(era, {
+ width: 'wide'
+ });
+ }
+ },
+ // Year
+ y: function y(date, token, localize) {
+ // Ordinal number
+ if (token === 'yo') {
+ var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
+
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
+ return localize.ordinalNumber(year, {
+ unit: 'year'
+ });
+ }
+
+ return formatters$3.y(date, token);
+ },
+ // Local week-numbering year
+ Y: function Y(date, token, localize, options) {
+ var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)
+
+ var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year
+
+ if (token === 'YY') {
+ var twoDigitYear = weekYear % 100;
+ return addLeadingZeros(twoDigitYear, 2);
+ } // Ordinal number
+
+
+ if (token === 'Yo') {
+ return localize.ordinalNumber(weekYear, {
+ unit: 'year'
+ });
+ } // Padding
+
+
+ return addLeadingZeros(weekYear, token.length);
+ },
+ // ISO week-numbering year
+ R: function R(date, token) {
+ var isoWeekYear = getUTCISOWeekYear(date); // Padding
+
+ return addLeadingZeros(isoWeekYear, token.length);
+ },
+ // Extended year. This is a single number designating the year of this calendar system.
+ // The main difference between `y` and `u` localizers are B.C. years:
+ // | Year | `y` | `u` |
+ // |------|-----|-----|
+ // | AC 1 | 1 | 1 |
+ // | BC 1 | 1 | 0 |
+ // | BC 2 | 2 | -1 |
+ // Also `yy` always returns the last two digits of a year,
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
+ u: function u(date, token) {
+ var year = date.getUTCFullYear();
+ return addLeadingZeros(year, token.length);
+ },
+ // Quarter
+ Q: function Q(date, token, localize) {
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
+
+ switch (token) {
+ // 1, 2, 3, 4
+ case 'Q':
+ return String(quarter);
+ // 01, 02, 03, 04
+
+ case 'QQ':
+ return addLeadingZeros(quarter, 2);
+ // 1st, 2nd, 3rd, 4th
+
+ case 'Qo':
+ return localize.ordinalNumber(quarter, {
+ unit: 'quarter'
+ });
+ // Q1, Q2, Q3, Q4
+
+ case 'QQQ':
+ return localize.quarter(quarter, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
+
+ case 'QQQQQ':
+ return localize.quarter(quarter, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // 1st quarter, 2nd quarter, ...
+
+ case 'QQQQ':
+ default:
+ return localize.quarter(quarter, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Stand-alone quarter
+ q: function q(date, token, localize) {
+ var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
+
+ switch (token) {
+ // 1, 2, 3, 4
+ case 'q':
+ return String(quarter);
+ // 01, 02, 03, 04
+
+ case 'qq':
+ return addLeadingZeros(quarter, 2);
+ // 1st, 2nd, 3rd, 4th
+
+ case 'qo':
+ return localize.ordinalNumber(quarter, {
+ unit: 'quarter'
+ });
+ // Q1, Q2, Q3, Q4
+
+ case 'qqq':
+ return localize.quarter(quarter, {
+ width: 'abbreviated',
+ context: 'standalone'
+ });
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
+
+ case 'qqqqq':
+ return localize.quarter(quarter, {
+ width: 'narrow',
+ context: 'standalone'
+ });
+ // 1st quarter, 2nd quarter, ...
+
+ case 'qqqq':
+ default:
+ return localize.quarter(quarter, {
+ width: 'wide',
+ context: 'standalone'
+ });
+ }
+ },
+ // Month
+ M: function M(date, token, localize) {
+ var month = date.getUTCMonth();
+
+ switch (token) {
+ case 'M':
+ case 'MM':
+ return formatters$3.M(date, token);
+ // 1st, 2nd, ..., 12th
+
+ case 'Mo':
+ return localize.ordinalNumber(month + 1, {
+ unit: 'month'
+ });
+ // Jan, Feb, ..., Dec
+
+ case 'MMM':
+ return localize.month(month, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // J, F, ..., D
+
+ case 'MMMMM':
+ return localize.month(month, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // January, February, ..., December
+
+ case 'MMMM':
+ default:
+ return localize.month(month, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Stand-alone month
+ L: function L(date, token, localize) {
+ var month = date.getUTCMonth();
+
+ switch (token) {
+ // 1, 2, ..., 12
+ case 'L':
+ return String(month + 1);
+ // 01, 02, ..., 12
+
+ case 'LL':
+ return addLeadingZeros(month + 1, 2);
+ // 1st, 2nd, ..., 12th
+
+ case 'Lo':
+ return localize.ordinalNumber(month + 1, {
+ unit: 'month'
+ });
+ // Jan, Feb, ..., Dec
+
+ case 'LLL':
+ return localize.month(month, {
+ width: 'abbreviated',
+ context: 'standalone'
+ });
+ // J, F, ..., D
+
+ case 'LLLLL':
+ return localize.month(month, {
+ width: 'narrow',
+ context: 'standalone'
+ });
+ // January, February, ..., December
+
+ case 'LLLL':
+ default:
+ return localize.month(month, {
+ width: 'wide',
+ context: 'standalone'
+ });
+ }
+ },
+ // Local week of year
+ w: function w(date, token, localize, options) {
+ var week = getUTCWeek(date, options);
+
+ if (token === 'wo') {
+ return localize.ordinalNumber(week, {
+ unit: 'week'
+ });
+ }
+
+ return addLeadingZeros(week, token.length);
+ },
+ // ISO week of year
+ I: function I(date, token, localize) {
+ var isoWeek = getUTCISOWeek(date);
+
+ if (token === 'Io') {
+ return localize.ordinalNumber(isoWeek, {
+ unit: 'week'
+ });
+ }
+
+ return addLeadingZeros(isoWeek, token.length);
+ },
+ // Day of the month
+ d: function d(date, token, localize) {
+ if (token === 'do') {
+ return localize.ordinalNumber(date.getUTCDate(), {
+ unit: 'date'
+ });
+ }
+
+ return formatters$3.d(date, token);
+ },
+ // Day of year
+ D: function D(date, token, localize) {
+ var dayOfYear = getUTCDayOfYear(date);
+
+ if (token === 'Do') {
+ return localize.ordinalNumber(dayOfYear, {
+ unit: 'dayOfYear'
+ });
+ }
+
+ return addLeadingZeros(dayOfYear, token.length);
+ },
+ // Day of week
+ E: function E(date, token, localize) {
+ var dayOfWeek = date.getUTCDay();
+
+ switch (token) {
+ // Tue
+ case 'E':
+ case 'EE':
+ case 'EEE':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // T
+
+ case 'EEEEE':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // Tu
+
+ case 'EEEEEE':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'formatting'
+ });
+ // Tuesday
+
+ case 'EEEE':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Local day of week
+ e: function e(date, token, localize, options) {
+ var dayOfWeek = date.getUTCDay();
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
+
+ switch (token) {
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
+ case 'e':
+ return String(localDayOfWeek);
+ // Padded numerical value
+
+ case 'ee':
+ return addLeadingZeros(localDayOfWeek, 2);
+ // 1st, 2nd, ..., 7th
+
+ case 'eo':
+ return localize.ordinalNumber(localDayOfWeek, {
+ unit: 'day'
+ });
+
+ case 'eee':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // T
+
+ case 'eeeee':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // Tu
+
+ case 'eeeeee':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'formatting'
+ });
+ // Tuesday
+
+ case 'eeee':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Stand-alone local day of week
+ c: function c(date, token, localize, options) {
+ var dayOfWeek = date.getUTCDay();
+ var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
+
+ switch (token) {
+ // Numerical value (same as in `e`)
+ case 'c':
+ return String(localDayOfWeek);
+ // Padded numerical value
+
+ case 'cc':
+ return addLeadingZeros(localDayOfWeek, token.length);
+ // 1st, 2nd, ..., 7th
+
+ case 'co':
+ return localize.ordinalNumber(localDayOfWeek, {
+ unit: 'day'
+ });
+
+ case 'ccc':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'standalone'
+ });
+ // T
+
+ case 'ccccc':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'standalone'
+ });
+ // Tu
+
+ case 'cccccc':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'standalone'
+ });
+ // Tuesday
+
+ case 'cccc':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'standalone'
+ });
+ }
+ },
+ // ISO day of week
+ i: function i(date, token, localize) {
+ var dayOfWeek = date.getUTCDay();
+ var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
+
+ switch (token) {
+ // 2
+ case 'i':
+ return String(isoDayOfWeek);
+ // 02
+
+ case 'ii':
+ return addLeadingZeros(isoDayOfWeek, token.length);
+ // 2nd
+
+ case 'io':
+ return localize.ordinalNumber(isoDayOfWeek, {
+ unit: 'day'
+ });
+ // Tue
+
+ case 'iii':
+ return localize.day(dayOfWeek, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+ // T
+
+ case 'iiiii':
+ return localize.day(dayOfWeek, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+ // Tu
+
+ case 'iiiiii':
+ return localize.day(dayOfWeek, {
+ width: 'short',
+ context: 'formatting'
+ });
+ // Tuesday
+
+ case 'iiii':
+ default:
+ return localize.day(dayOfWeek, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // AM or PM
+ a: function a(date, token, localize) {
+ var hours = date.getUTCHours();
+ var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
+
+ switch (token) {
+ case 'a':
+ case 'aa':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+
+ case 'aaa':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ }).toLowerCase();
+
+ case 'aaaaa':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+
+ case 'aaaa':
+ default:
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // AM, PM, midnight, noon
+ b: function b(date, token, localize) {
+ var hours = date.getUTCHours();
+ var dayPeriodEnumValue;
+
+ if (hours === 12) {
+ dayPeriodEnumValue = dayPeriodEnum.noon;
+ } else if (hours === 0) {
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
+ } else {
+ dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
+ }
+
+ switch (token) {
+ case 'b':
+ case 'bb':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+
+ case 'bbb':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ }).toLowerCase();
+
+ case 'bbbbb':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+
+ case 'bbbb':
+ default:
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // in the morning, in the afternoon, in the evening, at night
+ B: function B(date, token, localize) {
+ var hours = date.getUTCHours();
+ var dayPeriodEnumValue;
+
+ if (hours >= 17) {
+ dayPeriodEnumValue = dayPeriodEnum.evening;
+ } else if (hours >= 12) {
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
+ } else if (hours >= 4) {
+ dayPeriodEnumValue = dayPeriodEnum.morning;
+ } else {
+ dayPeriodEnumValue = dayPeriodEnum.night;
+ }
+
+ switch (token) {
+ case 'B':
+ case 'BB':
+ case 'BBB':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'abbreviated',
+ context: 'formatting'
+ });
+
+ case 'BBBBB':
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'narrow',
+ context: 'formatting'
+ });
+
+ case 'BBBB':
+ default:
+ return localize.dayPeriod(dayPeriodEnumValue, {
+ width: 'wide',
+ context: 'formatting'
+ });
+ }
+ },
+ // Hour [1-12]
+ h: function h(date, token, localize) {
+ if (token === 'ho') {
+ var hours = date.getUTCHours() % 12;
+ if (hours === 0) hours = 12;
+ return localize.ordinalNumber(hours, {
+ unit: 'hour'
+ });
+ }
+
+ return formatters$3.h(date, token);
+ },
+ // Hour [0-23]
+ H: function H(date, token, localize) {
+ if (token === 'Ho') {
+ return localize.ordinalNumber(date.getUTCHours(), {
+ unit: 'hour'
+ });
+ }
+
+ return formatters$3.H(date, token);
+ },
+ // Hour [0-11]
+ K: function K(date, token, localize) {
+ var hours = date.getUTCHours() % 12;
+
+ if (token === 'Ko') {
+ return localize.ordinalNumber(hours, {
+ unit: 'hour'
+ });
+ }
+
+ return addLeadingZeros(hours, token.length);
+ },
+ // Hour [1-24]
+ k: function k(date, token, localize) {
+ var hours = date.getUTCHours();
+ if (hours === 0) hours = 24;
+
+ if (token === 'ko') {
+ return localize.ordinalNumber(hours, {
+ unit: 'hour'
+ });
+ }
+
+ return addLeadingZeros(hours, token.length);
+ },
+ // Minute
+ m: function m(date, token, localize) {
+ if (token === 'mo') {
+ return localize.ordinalNumber(date.getUTCMinutes(), {
+ unit: 'minute'
+ });
+ }
+
+ return formatters$3.m(date, token);
+ },
+ // Second
+ s: function s(date, token, localize) {
+ if (token === 'so') {
+ return localize.ordinalNumber(date.getUTCSeconds(), {
+ unit: 'second'
+ });
+ }
+
+ return formatters$3.s(date, token);
+ },
+ // Fraction of second
+ S: function S(date, token) {
+ return formatters$3.S(date, token);
+ },
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
+ X: function X(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+
+ if (timezoneOffset === 0) {
+ return 'Z';
+ }
+
+ switch (token) {
+ // Hours and optional minutes
+ case 'X':
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
+ // Hours, minutes and optional seconds without `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `XX`
+
+ case 'XXXX':
+ case 'XX':
+ // Hours and minutes without `:` delimiter
+ return formatTimezone(timezoneOffset);
+ // Hours, minutes and optional seconds with `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `XXX`
+
+ case 'XXXXX':
+ case 'XXX': // Hours and minutes with `:` delimiter
+
+ default:
+ return formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
+ x: function x(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+
+ switch (token) {
+ // Hours and optional minutes
+ case 'x':
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
+ // Hours, minutes and optional seconds without `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `xx`
+
+ case 'xxxx':
+ case 'xx':
+ // Hours and minutes without `:` delimiter
+ return formatTimezone(timezoneOffset);
+ // Hours, minutes and optional seconds with `:` delimiter
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
+ // so this token always has the same output as `xxx`
+
+ case 'xxxxx':
+ case 'xxx': // Hours and minutes with `:` delimiter
+
+ default:
+ return formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Timezone (GMT)
+ O: function O(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+
+ switch (token) {
+ // Short
+ case 'O':
+ case 'OO':
+ case 'OOO':
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
+ // Long
+
+ case 'OOOO':
+ default:
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Timezone (specific non-location)
+ z: function z(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timezoneOffset = originalDate.getTimezoneOffset();
+
+ switch (token) {
+ // Short
+ case 'z':
+ case 'zz':
+ case 'zzz':
+ return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
+ // Long
+
+ case 'zzzz':
+ default:
+ return 'GMT' + formatTimezone(timezoneOffset, ':');
+ }
+ },
+ // Seconds timestamp
+ t: function t(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timestamp = Math.floor(originalDate.getTime() / 1000);
+ return addLeadingZeros(timestamp, token.length);
+ },
+ // Milliseconds timestamp
+ T: function T(date, token, _localize, options) {
+ var originalDate = options._originalDate || date;
+ var timestamp = originalDate.getTime();
+ return addLeadingZeros(timestamp, token.length);
+ }
+ };
+
+ function formatTimezoneShort(offset, dirtyDelimiter) {
+ var sign = offset > 0 ? '-' : '+';
+ var absOffset = Math.abs(offset);
+ var hours = Math.floor(absOffset / 60);
+ var minutes = absOffset % 60;
+
+ if (minutes === 0) {
+ return sign + String(hours);
+ }
+
+ var delimiter = dirtyDelimiter || '';
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
+ }
+
+ function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
+ if (offset % 60 === 0) {
+ var sign = offset > 0 ? '-' : '+';
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
+ }
+
+ return formatTimezone(offset, dirtyDelimiter);
+ }
+
+ function formatTimezone(offset, dirtyDelimiter) {
+ var delimiter = dirtyDelimiter || '';
+ var sign = offset > 0 ? '-' : '+';
+ var absOffset = Math.abs(offset);
+ var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
+ var minutes = addLeadingZeros(absOffset % 60, 2);
+ return sign + hours + delimiter + minutes;
+ }
+
+ var formatters$1 = formatters;
+
+ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
+ switch (pattern) {
+ case 'P':
+ return formatLong.date({
+ width: 'short'
+ });
+
+ case 'PP':
+ return formatLong.date({
+ width: 'medium'
+ });
+
+ case 'PPP':
+ return formatLong.date({
+ width: 'long'
+ });
+
+ case 'PPPP':
+ default:
+ return formatLong.date({
+ width: 'full'
+ });
+ }
+ };
+
+ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
+ switch (pattern) {
+ case 'p':
+ return formatLong.time({
+ width: 'short'
+ });
+
+ case 'pp':
+ return formatLong.time({
+ width: 'medium'
+ });
+
+ case 'ppp':
+ return formatLong.time({
+ width: 'long'
+ });
+
+ case 'pppp':
+ default:
+ return formatLong.time({
+ width: 'full'
+ });
+ }
+ };
+
+ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
+ var datePattern = matchResult[1];
+ var timePattern = matchResult[2];
+
+ if (!timePattern) {
+ return dateLongFormatter(pattern, formatLong);
+ }
+
+ var dateTimeFormat;
+
+ switch (datePattern) {
+ case 'P':
+ dateTimeFormat = formatLong.dateTime({
+ width: 'short'
+ });
+ break;
+
+ case 'PP':
+ dateTimeFormat = formatLong.dateTime({
+ width: 'medium'
+ });
+ break;
+
+ case 'PPP':
+ dateTimeFormat = formatLong.dateTime({
+ width: 'long'
+ });
+ break;
+
+ case 'PPPP':
+ default:
+ dateTimeFormat = formatLong.dateTime({
+ width: 'full'
+ });
+ break;
+ }
+
+ return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
+ };
+
+ var longFormatters = {
+ p: timeLongFormatter,
+ P: dateTimeLongFormatter
+ };
+ var longFormatters$1 = longFormatters;
+
+ var protectedDayOfYearTokens = ['D', 'DD'];
+ var protectedWeekYearTokens = ['YY', 'YYYY'];
+ function isProtectedDayOfYearToken(token) {
+ return protectedDayOfYearTokens.indexOf(token) !== -1;
+ }
+ function isProtectedWeekYearToken(token) {
+ return protectedWeekYearTokens.indexOf(token) !== -1;
+ }
+ function throwProtectedError(token, format, input) {
+ if (token === 'YYYY') {
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ } else if (token === 'YY') {
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ } else if (token === 'D') {
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ } else if (token === 'DD') {
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
+ }
+ }
+
+ var formatDistanceLocale = {
+ lessThanXSeconds: {
+ one: 'less than a second',
+ other: 'less than {{count}} seconds'
+ },
+ xSeconds: {
+ one: '1 second',
+ other: '{{count}} seconds'
+ },
+ halfAMinute: 'half a minute',
+ lessThanXMinutes: {
+ one: 'less than a minute',
+ other: 'less than {{count}} minutes'
+ },
+ xMinutes: {
+ one: '1 minute',
+ other: '{{count}} minutes'
+ },
+ aboutXHours: {
+ one: 'about 1 hour',
+ other: 'about {{count}} hours'
+ },
+ xHours: {
+ one: '1 hour',
+ other: '{{count}} hours'
+ },
+ xDays: {
+ one: '1 day',
+ other: '{{count}} days'
+ },
+ aboutXWeeks: {
+ one: 'about 1 week',
+ other: 'about {{count}} weeks'
+ },
+ xWeeks: {
+ one: '1 week',
+ other: '{{count}} weeks'
+ },
+ aboutXMonths: {
+ one: 'about 1 month',
+ other: 'about {{count}} months'
+ },
+ xMonths: {
+ one: '1 month',
+ other: '{{count}} months'
+ },
+ aboutXYears: {
+ one: 'about 1 year',
+ other: 'about {{count}} years'
+ },
+ xYears: {
+ one: '1 year',
+ other: '{{count}} years'
+ },
+ overXYears: {
+ one: 'over 1 year',
+ other: 'over {{count}} years'
+ },
+ almostXYears: {
+ one: 'almost 1 year',
+ other: 'almost {{count}} years'
+ }
+ };
+
+ var formatDistance = function formatDistance(token, count, options) {
+ var result;
+ var tokenValue = formatDistanceLocale[token];
+
+ if (typeof tokenValue === 'string') {
+ result = tokenValue;
+ } else if (count === 1) {
+ result = tokenValue.one;
+ } else {
+ result = tokenValue.other.replace('{{count}}', count.toString());
+ }
+
+ if (options !== null && options !== void 0 && options.addSuffix) {
+ if (options.comparison && options.comparison > 0) {
+ return 'in ' + result;
+ } else {
+ return result + ' ago';
+ }
+ }
+
+ return result;
+ };
+
+ var formatDistance$1 = formatDistance;
+
+ function buildFormatLongFn(args) {
+ return function () {
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ // TODO: Remove String()
+ var width = options.width ? String(options.width) : args.defaultWidth;
+ var format = args.formats[width] || args.formats[args.defaultWidth];
+ return format;
+ };
+ }
+
+ var dateFormats = {
+ full: 'EEEE, MMMM do, y',
+ long: 'MMMM do, y',
+ medium: 'MMM d, y',
+ short: 'MM/dd/yyyy'
+ };
+ var timeFormats = {
+ full: 'h:mm:ss a zzzz',
+ long: 'h:mm:ss a z',
+ medium: 'h:mm:ss a',
+ short: 'h:mm a'
+ };
+ var dateTimeFormats = {
+ full: "{{date}} 'at' {{time}}",
+ long: "{{date}} 'at' {{time}}",
+ medium: '{{date}}, {{time}}',
+ short: '{{date}}, {{time}}'
+ };
+ var formatLong = {
+ date: buildFormatLongFn({
+ formats: dateFormats,
+ defaultWidth: 'full'
+ }),
+ time: buildFormatLongFn({
+ formats: timeFormats,
+ defaultWidth: 'full'
+ }),
+ dateTime: buildFormatLongFn({
+ formats: dateTimeFormats,
+ defaultWidth: 'full'
+ })
+ };
+ var formatLong$1 = formatLong;
+
+ var formatRelativeLocale = {
+ lastWeek: "'last' eeee 'at' p",
+ yesterday: "'yesterday at' p",
+ today: "'today at' p",
+ tomorrow: "'tomorrow at' p",
+ nextWeek: "eeee 'at' p",
+ other: 'P'
+ };
+
+ var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
+ return formatRelativeLocale[token];
+ };
+
+ var formatRelative$1 = formatRelative;
+
+ function buildLocalizeFn(args) {
+ return function (dirtyIndex, options) {
+ var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';
+ var valuesArray;
+
+ if (context === 'formatting' && args.formattingValues) {
+ var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
+ var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
+ } else {
+ var _defaultWidth = args.defaultWidth;
+
+ var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
+
+ valuesArray = args.values[_width] || args.values[_defaultWidth];
+ }
+
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
+
+ return valuesArray[index];
+ };
+ }
+
+ var eraValues = {
+ narrow: ['B', 'A'],
+ abbreviated: ['BC', 'AD'],
+ wide: ['Before Christ', 'Anno Domini']
+ };
+ var quarterValues = {
+ narrow: ['1', '2', '3', '4'],
+ abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
+ wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
+ }; // Note: in English, the names of days of the week and months are capitalized.
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
+ // Generally, formatted dates should look like they are in the middle of a sentence,
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
+
+ var monthValues = {
+ narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
+ abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
+ };
+ var dayValues = {
+ narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
+ short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
+ abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
+ };
+ var dayPeriodValues = {
+ narrow: {
+ am: 'a',
+ pm: 'p',
+ midnight: 'mi',
+ noon: 'n',
+ morning: 'morning',
+ afternoon: 'afternoon',
+ evening: 'evening',
+ night: 'night'
+ },
+ abbreviated: {
+ am: 'AM',
+ pm: 'PM',
+ midnight: 'midnight',
+ noon: 'noon',
+ morning: 'morning',
+ afternoon: 'afternoon',
+ evening: 'evening',
+ night: 'night'
+ },
+ wide: {
+ am: 'a.m.',
+ pm: 'p.m.',
+ midnight: 'midnight',
+ noon: 'noon',
+ morning: 'morning',
+ afternoon: 'afternoon',
+ evening: 'evening',
+ night: 'night'
+ }
+ };
+ var formattingDayPeriodValues = {
+ narrow: {
+ am: 'a',
+ pm: 'p',
+ midnight: 'mi',
+ noon: 'n',
+ morning: 'in the morning',
+ afternoon: 'in the afternoon',
+ evening: 'in the evening',
+ night: 'at night'
+ },
+ abbreviated: {
+ am: 'AM',
+ pm: 'PM',
+ midnight: 'midnight',
+ noon: 'noon',
+ morning: 'in the morning',
+ afternoon: 'in the afternoon',
+ evening: 'in the evening',
+ night: 'at night'
+ },
+ wide: {
+ am: 'a.m.',
+ pm: 'p.m.',
+ midnight: 'midnight',
+ noon: 'noon',
+ morning: 'in the morning',
+ afternoon: 'in the afternoon',
+ evening: 'in the evening',
+ night: 'at night'
+ }
+ };
+
+ var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
+ var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
+ // if they are different for different grammatical genders,
+ // use `options.unit`.
+ //
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
+ // 'day', 'hour', 'minute', 'second'.
+
+ var rem100 = number % 100;
+
+ if (rem100 > 20 || rem100 < 10) {
+ switch (rem100 % 10) {
+ case 1:
+ return number + 'st';
+
+ case 2:
+ return number + 'nd';
+
+ case 3:
+ return number + 'rd';
+ }
+ }
+
+ return number + 'th';
+ };
+
+ var localize = {
+ ordinalNumber: ordinalNumber,
+ era: buildLocalizeFn({
+ values: eraValues,
+ defaultWidth: 'wide'
+ }),
+ quarter: buildLocalizeFn({
+ values: quarterValues,
+ defaultWidth: 'wide',
+ argumentCallback: function argumentCallback(quarter) {
+ return quarter - 1;
+ }
+ }),
+ month: buildLocalizeFn({
+ values: monthValues,
+ defaultWidth: 'wide'
+ }),
+ day: buildLocalizeFn({
+ values: dayValues,
+ defaultWidth: 'wide'
+ }),
+ dayPeriod: buildLocalizeFn({
+ values: dayPeriodValues,
+ defaultWidth: 'wide',
+ formattingValues: formattingDayPeriodValues,
+ defaultFormattingWidth: 'wide'
+ })
+ };
+ var localize$1 = localize;
+
+ function buildMatchFn(args) {
+ return function (string) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var width = options.width;
+ var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
+ var matchResult = string.match(matchPattern);
+
+ if (!matchResult) {
+ return null;
+ }
+
+ var matchedString = matchResult[0];
+ var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
+ var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
+ return pattern.test(matchedString);
+ }) : findKey(parsePatterns, function (pattern) {
+ return pattern.test(matchedString);
+ });
+ var value;
+ value = args.valueCallback ? args.valueCallback(key) : key;
+ value = options.valueCallback ? options.valueCallback(value) : value;
+ var rest = string.slice(matchedString.length);
+ return {
+ value: value,
+ rest: rest
+ };
+ };
+ }
+
+ function findKey(object, predicate) {
+ for (var key in object) {
+ if (object.hasOwnProperty(key) && predicate(object[key])) {
+ return key;
+ }
+ }
+
+ return undefined;
+ }
+
+ function findIndex(array, predicate) {
+ for (var key = 0; key < array.length; key++) {
+ if (predicate(array[key])) {
+ return key;
+ }
+ }
+
+ return undefined;
+ }
+
+ function buildMatchPatternFn(args) {
+ return function (string) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var matchResult = string.match(args.matchPattern);
+ if (!matchResult) return null;
+ var matchedString = matchResult[0];
+ var parseResult = string.match(args.parsePattern);
+ if (!parseResult) return null;
+ var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
+ value = options.valueCallback ? options.valueCallback(value) : value;
+ var rest = string.slice(matchedString.length);
+ return {
+ value: value,
+ rest: rest
+ };
+ };
+ }
+
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
+ var parseOrdinalNumberPattern = /\d+/i;
+ var matchEraPatterns = {
+ narrow: /^(b|a)/i,
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
+ wide: /^(before christ|before common era|anno domini|common era)/i
+ };
+ var parseEraPatterns = {
+ any: [/^b/i, /^(a|c)/i]
+ };
+ var matchQuarterPatterns = {
+ narrow: /^[1234]/i,
+ abbreviated: /^q[1234]/i,
+ wide: /^[1234](th|st|nd|rd)? quarter/i
+ };
+ var parseQuarterPatterns = {
+ any: [/1/i, /2/i, /3/i, /4/i]
+ };
+ var matchMonthPatterns = {
+ narrow: /^[jfmasond]/i,
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
+ };
+ var parseMonthPatterns = {
+ narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
+ any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
+ };
+ var matchDayPatterns = {
+ narrow: /^[smtwf]/i,
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
+ };
+ var parseDayPatterns = {
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
+ };
+ var matchDayPeriodPatterns = {
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
+ };
+ var parseDayPeriodPatterns = {
+ any: {
+ am: /^a/i,
+ pm: /^p/i,
+ midnight: /^mi/i,
+ noon: /^no/i,
+ morning: /morning/i,
+ afternoon: /afternoon/i,
+ evening: /evening/i,
+ night: /night/i
+ }
+ };
+ var match = {
+ ordinalNumber: buildMatchPatternFn({
+ matchPattern: matchOrdinalNumberPattern,
+ parsePattern: parseOrdinalNumberPattern,
+ valueCallback: function valueCallback(value) {
+ return parseInt(value, 10);
+ }
+ }),
+ era: buildMatchFn({
+ matchPatterns: matchEraPatterns,
+ defaultMatchWidth: 'wide',
+ parsePatterns: parseEraPatterns,
+ defaultParseWidth: 'any'
+ }),
+ quarter: buildMatchFn({
+ matchPatterns: matchQuarterPatterns,
+ defaultMatchWidth: 'wide',
+ parsePatterns: parseQuarterPatterns,
+ defaultParseWidth: 'any',
+ valueCallback: function valueCallback(index) {
+ return index + 1;
+ }
+ }),
+ month: buildMatchFn({
+ matchPatterns: matchMonthPatterns,
+ defaultMatchWidth: 'wide',
+ parsePatterns: parseMonthPatterns,
+ defaultParseWidth: 'any'
+ }),
+ day: buildMatchFn({
+ matchPatterns: matchDayPatterns,
+ defaultMatchWidth: 'wide',
+ parsePatterns: parseDayPatterns,
+ defaultParseWidth: 'any'
+ }),
+ dayPeriod: buildMatchFn({
+ matchPatterns: matchDayPeriodPatterns,
+ defaultMatchWidth: 'any',
+ parsePatterns: parseDayPeriodPatterns,
+ defaultParseWidth: 'any'
+ })
+ };
+ var match$1 = match;
+
+ /**
+ * @type {Locale}
+ * @category Locales
+ * @summary English locale (United States).
+ * @language English
+ * @iso-639-2 eng
+ * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
+ * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
+ */
+ var locale = {
+ code: 'en-US',
+ formatDistance: formatDistance$1,
+ formatLong: formatLong$1,
+ formatRelative: formatRelative$1,
+ localize: localize$1,
+ match: match$1,
+ options: {
+ weekStartsOn: 0
+ /* Sunday */
+ ,
+ firstWeekContainsDate: 1
+ }
+ };
+ var defaultLocale = locale;
+
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
+ // (one of the certain letters followed by `o`)
+ // - (\w)\1* matches any sequences of the same letter
+ // - '' matches two quote characters in a row
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
+ // except a single quote symbol, which ends the sequence.
+ // Two quote characters do not end the sequence.
+ // If there is no matching single quote
+ // then the sequence will continue until the end of the string.
+ // - . matches any single character unmatched by previous parts of the RegExps
+
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
+
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
+ var escapedStringRegExp = /^'([^]*?)'?$/;
+ var doubleQuoteRegExp = /''/g;
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
+ /**
+ * @name format
+ * @category Common Helpers
+ * @summary Format the date.
+ *
+ * @description
+ * Return the formatted date string in the given format. The result may vary by locale.
+ *
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ *
+ * The characters wrapped between two single quotes characters (') are escaped.
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
+ * (see the last example)
+ *
+ * Format of the string is based on Unicode Technical Standard #35:
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
+ * with a few additions (see note 7 below the table).
+ *
+ * Accepted patterns:
+ * | Unit | Pattern | Result examples | Notes |
+ * |---------------------------------|---------|-----------------------------------|-------|
+ * | Era | G..GGG | AD, BC | |
+ * | | GGGG | Anno Domini, Before Christ | 2 |
+ * | | GGGGG | A, B | |
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
+ * | | yy | 44, 01, 00, 17 | 5 |
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
+ * | | yyyyy | ... | 3,5 |
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
+ * | | YY | 44, 01, 00, 17 | 5,8 |
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
+ * | | YYYYY | ... | 3,5 |
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
+ * | | RRRRR | ... | 3,5,7 |
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
+ * | | uu | -43, 01, 1900, 2017 | 5 |
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
+ * | | uuuuu | ... | 3,5 |
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
+ * | | QQ | 01, 02, 03, 04 | |
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
+ * | | qq | 01, 02, 03, 04 | |
+ * | | qqq | Q1, Q2, Q3, Q4 | |
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
+ * | | MM | 01, 02, ..., 12 | |
+ * | | MMM | Jan, Feb, ..., Dec | |
+ * | | MMMM | January, February, ..., December | 2 |
+ * | | MMMMM | J, F, ..., D | |
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
+ * | | LL | 01, 02, ..., 12 | |
+ * | | LLL | Jan, Feb, ..., Dec | |
+ * | | LLLL | January, February, ..., December | 2 |
+ * | | LLLLL | J, F, ..., D | |
+ * | Local week of year | w | 1, 2, ..., 53 | |
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
+ * | | ww | 01, 02, ..., 53 | |
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
+ * | | II | 01, 02, ..., 53 | 7 |
+ * | Day of month | d | 1, 2, ..., 31 | |
+ * | | do | 1st, 2nd, ..., 31st | 7 |
+ * | | dd | 01, 02, ..., 31 | |
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
+ * | | DDD | 001, 002, ..., 365, 366 | |
+ * | | DDDD | ... | 3 |
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
+ * | | EEEEE | M, T, W, T, F, S, S | |
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
+ * | | io | 1st, 2nd, ..., 7th | 7 |
+ * | | ii | 01, 02, ..., 07 | 7 |
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
+ * | | ee | 02, 03, ..., 01 | |
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
+ * | | eeeee | M, T, W, T, F, S, S | |
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
+ * | | cc | 02, 03, ..., 01 | |
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
+ * | | ccccc | M, T, W, T, F, S, S | |
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
+ * | AM, PM | a..aa | AM, PM | |
+ * | | aaa | am, pm | |
+ * | | aaaa | a.m., p.m. | 2 |
+ * | | aaaaa | a, p | |
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
+ * | | bbb | am, pm, noon, midnight | |
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
+ * | | bbbbb | a, p, n, mi | |
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
+ * | | BBBB | at night, in the morning, ... | 2 |
+ * | | BBBBB | at night, in the morning, ... | |
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
+ * | | hh | 01, 02, ..., 11, 12 | |
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
+ * | | HH | 00, 01, 02, ..., 23 | |
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
+ * | | KK | 01, 02, ..., 11, 00 | |
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
+ * | | kk | 24, 01, 02, ..., 23 | |
+ * | Minute | m | 0, 1, ..., 59 | |
+ * | | mo | 0th, 1st, ..., 59th | 7 |
+ * | | mm | 00, 01, ..., 59 | |
+ * | Second | s | 0, 1, ..., 59 | |
+ * | | so | 0th, 1st, ..., 59th | 7 |
+ * | | ss | 00, 01, ..., 59 | |
+ * | Fraction of second | S | 0, 1, ..., 9 | |
+ * | | SS | 00, 01, ..., 99 | |
+ * | | SSS | 000, 001, ..., 999 | |
+ * | | SSSS | ... | 3 |
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
+ * | | XX | -0800, +0530, Z | |
+ * | | XXX | -08:00, +05:30, Z | |
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
+ * | | xx | -0800, +0530, +0000 | |
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
+ * | Seconds timestamp | t | 512969520 | 7 |
+ * | | tt | ... | 3,7 |
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
+ * | | TT | ... | 3,7 |
+ * | Long localized date | P | 04/29/1453 | 7 |
+ * | | PP | Apr 29, 1453 | 7 |
+ * | | PPP | April 29th, 1453 | 7 |
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
+ * | Long localized time | p | 12:00 AM | 7 |
+ * | | pp | 12:00:00 AM | 7 |
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
+ * Notes:
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
+ * are the same as "stand-alone" units, but are different in some languages.
+ * "Formatting" units are declined according to the rules of the language
+ * in the context of a date. "Stand-alone" units are always nominative singular:
+ *
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
+ *
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
+ *
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
+ * the single quote characters (see below).
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
+ * the output will be the same as default pattern for this unit, usually
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
+ * are marked with "2" in the last column of the table.
+ *
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
+ *
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
+ *
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
+ *
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
+ *
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
+ *
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
+ * The output will be padded with zeros to match the length of the pattern.
+ *
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
+ *
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
+ * These tokens represent the shortest form of the quarter.
+ *
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
+ *
+ * | Year | `y` | `u` |
+ * |------|-----|-----|
+ * | AC 1 | 1 | 1 |
+ * | BC 1 | 1 | 0 |
+ * | BC 2 | 2 | -1 |
+ *
+ * Also `yy` always returns the last two digits of a year,
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
+ *
+ * | Year | `yy` | `uu` |
+ * |------|------|------|
+ * | 1 | 01 | 01 |
+ * | 14 | 14 | 14 |
+ * | 376 | 76 | 376 |
+ * | 1453 | 53 | 1453 |
+ *
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
+ * except local week-numbering years are dependent on `options.weekStartsOn`
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
+ * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
+ *
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
+ * so right now these tokens fall back to GMT timezones.
+ *
+ * 7. These patterns are not in the Unicode Technical Standard #35:
+ * - `i`: ISO day of week
+ * - `I`: ISO week of year
+ * - `R`: ISO week-numbering year
+ * - `t`: seconds timestamp
+ * - `T`: milliseconds timestamp
+ * - `o`: ordinal number modifier
+ * - `P`: long localized date
+ * - `p`: long localized time
+ *
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ *
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ *
+ * @param {Date|Number} date - the original date
+ * @param {String} format - the string of tokens
+ * @param {Object} [options] - an object with options.
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
+ * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
+ * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
+ * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
+ * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ * @returns {String} the formatted date string
+ * @throws {TypeError} 2 arguments required
+ * @throws {RangeError} `date` must not be Invalid Date
+ * @throws {RangeError} `options.locale` must contain `localize` property
+ * @throws {RangeError} `options.locale` must contain `formatLong` property
+ * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
+ * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
+ * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
+ * @throws {RangeError} format string contains an unescaped latin alphabet character
+ *
+ * @example
+ * // Represent 11 February 2014 in middle-endian format:
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
+ * //=> '02/11/2014'
+ *
+ * @example
+ * // Represent 2 July 2014 in Esperanto:
+ * import { eoLocale } from 'date-fns/locale/eo'
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
+ * locale: eoLocale
+ * })
+ * //=> '2-a de julio 2014'
+ *
+ * @example
+ * // Escape string by single quote characters:
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
+ * //=> "3 o'clock"
+ */
+
+ function format(dirtyDate, dirtyFormatStr, options) {
+ var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
+
+ requiredArgs(2, arguments);
+ var formatStr = String(dirtyFormatStr);
+ var defaultOptions = getDefaultOptions();
+ var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
+ var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
+
+ if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
+ throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
+ }
+
+ var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
+
+ if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
+ throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
+ }
+
+ if (!locale.localize) {
+ throw new RangeError('locale must contain localize property');
+ }
+
+ if (!locale.formatLong) {
+ throw new RangeError('locale must contain formatLong property');
+ }
+
+ var originalDate = toDate(dirtyDate);
+
+ if (!isValid(originalDate)) {
+ throw new RangeError('Invalid time value');
+ } // Convert the date in system timezone to the same date in UTC+00:00 timezone.
+ // This ensures that when UTC functions will be implemented, locales will be compatible with them.
+ // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
+
+
+ var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
+ var utcDate = subMilliseconds(originalDate, timezoneOffset);
+ var formatterOptions = {
+ firstWeekContainsDate: firstWeekContainsDate,
+ weekStartsOn: weekStartsOn,
+ locale: locale,
+ _originalDate: originalDate
+ };
+ var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
+ var firstCharacter = substring[0];
+
+ if (firstCharacter === 'p' || firstCharacter === 'P') {
+ var longFormatter = longFormatters$1[firstCharacter];
+ return longFormatter(substring, locale.formatLong);
+ }
+
+ return substring;
+ }).join('').match(formattingTokensRegExp).map(function (substring) {
+ // Replace two single quote characters with one single quote character
+ if (substring === "''") {
+ return "'";
+ }
+
+ var firstCharacter = substring[0];
+
+ if (firstCharacter === "'") {
+ return cleanEscapedString(substring);
+ }
+
+ var formatter = formatters$1[firstCharacter];
+
+ if (formatter) {
+ if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
+ }
+
+ if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
+ throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
+ }
+
+ return formatter(utcDate, substring, locale.localize, formatterOptions);
+ }
+
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
+ throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
+ }
+
+ return substring;
+ }).join('');
+ return result;
+ }
+
+ function cleanEscapedString(input) {
+ var matched = input.match(escapedStringRegExp);
+
+ if (!matched) {
+ return input;
+ }
+
+ return matched[1].replace(doubleQuoteRegExp, "'");
+ }
+
+ var defaultFormat = ['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds'];
+ /**
+ * @name formatDuration
+ * @category Common Helpers
+ * @summary Formats a duration in human-readable format
+ *
+ * @description
+ * Return human-readable duration string i.e. "9 months 2 days"
+ *
+ * @param {Duration} duration - the duration to format
+ * @param {Object} [options] - an object with options.
+ * @param {string[]} [options.format=['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds']] - the array of units to format
+ * @param {boolean} [options.zero=false] - should zeros be included in the output?
+ * @param {string} [options.delimiter=' '] - delimiter string
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
+ * @returns {string} the formatted date string
+ * @throws {TypeError} 1 argument required
+ *
+ * @example
+ * // Format full duration
+ * formatDuration({
+ * years: 2,
+ * months: 9,
+ * weeks: 1,
+ * days: 7,
+ * hours: 5,
+ * minutes: 9,
+ * seconds: 30
+ * })
+ * //=> '2 years 9 months 1 week 7 days 5 hours 9 minutes 30 seconds'
+ *
+ * @example
+ * // Format partial duration
+ * formatDuration({ months: 9, days: 2 })
+ * //=> '9 months 2 days'
+ *
+ * @example
+ * // Customize the format
+ * formatDuration(
+ * {
+ * years: 2,
+ * months: 9,
+ * weeks: 1,
+ * days: 7,
+ * hours: 5,
+ * minutes: 9,
+ * seconds: 30
+ * },
+ * { format: ['months', 'weeks'] }
+ * ) === '9 months 1 week'
+ *
+ * @example
+ * // Customize the zeros presence
+ * formatDuration({ years: 0, months: 9 })
+ * //=> '9 months'
+ * formatDuration({ years: 0, months: 9 }, { zero: true })
+ * //=> '0 years 9 months'
+ *
+ * @example
+ * // Customize the delimiter
+ * formatDuration({ years: 2, months: 9, weeks: 3 }, { delimiter: ', ' })
+ * //=> '2 years, 9 months, 3 weeks'
+ */
+
+ function formatDuration(duration, options) {
+ var _ref, _options$locale, _options$format, _options$zero, _options$delimiter;
+
+ if (arguments.length < 1) {
+ throw new TypeError("1 argument required, but only ".concat(arguments.length, " present"));
+ }
+
+ var defaultOptions = getDefaultOptions();
+ var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
+ var format = (_options$format = options === null || options === void 0 ? void 0 : options.format) !== null && _options$format !== void 0 ? _options$format : defaultFormat;
+ var zero = (_options$zero = options === null || options === void 0 ? void 0 : options.zero) !== null && _options$zero !== void 0 ? _options$zero : false;
+ var delimiter = (_options$delimiter = options === null || options === void 0 ? void 0 : options.delimiter) !== null && _options$delimiter !== void 0 ? _options$delimiter : ' ';
+
+ if (!locale.formatDistance) {
+ return '';
+ }
+
+ var result = format.reduce(function (acc, unit) {
+ var token = "x".concat(unit.replace(/(^.)/, function (m) {
+ return m.toUpperCase();
+ }));
+ var value = duration[unit];
+
+ if (typeof value === 'number' && (zero || duration[unit])) {
+ return acc.concat(locale.formatDistance(token, value));
+ }
+
+ return acc;
+ }, []).join(delimiter);
+ return result;
+ }
+
+ /**
+ * @name intervalToDuration
+ * @category Common Helpers
+ * @summary Convert interval to duration
+ *
+ * @description
+ * Convert a interval object to a duration object.
+ *
+ * @param {Interval} interval - the interval to convert to duration
+ *
+ * @returns {Duration} The duration Object
+ * @throws {TypeError} Requires 2 arguments
+ * @throws {RangeError} `start` must not be Invalid Date
+ * @throws {RangeError} `end` must not be Invalid Date
+ *
+ * @example
+ * // Get the duration between January 15, 1929 and April 4, 1968.
+ * intervalToDuration({
+ * start: new Date(1929, 0, 15, 12, 0, 0),
+ * end: new Date(1968, 3, 4, 19, 5, 0)
+ * })
+ * // => { years: 39, months: 2, days: 20, hours: 7, minutes: 5, seconds: 0 }
+ */
+
+ function intervalToDuration(interval) {
+ requiredArgs(1, arguments);
+ var start = toDate(interval.start);
+ var end = toDate(interval.end);
+ if (isNaN(start.getTime())) throw new RangeError('Start Date is invalid');
+ if (isNaN(end.getTime())) throw new RangeError('End Date is invalid');
+ var duration = {};
+ duration.years = Math.abs(differenceInYears(end, start));
+ var sign = compareAsc(end, start);
+ var remainingMonths = add(start, {
+ years: sign * duration.years
+ });
+ duration.months = Math.abs(differenceInMonths(end, remainingMonths));
+ var remainingDays = add(remainingMonths, {
+ months: sign * duration.months
+ });
+ duration.days = Math.abs(differenceInDays(end, remainingDays));
+ var remainingHours = add(remainingDays, {
+ days: sign * duration.days
+ });
+ duration.hours = Math.abs(differenceInHours(end, remainingHours));
+ var remainingMinutes = add(remainingHours, {
+ hours: sign * duration.hours
+ });
+ duration.minutes = Math.abs(differenceInMinutes(end, remainingMinutes));
+ var remainingSeconds = add(remainingMinutes, {
+ minutes: sign * duration.minutes
+ });
+ duration.seconds = Math.abs(differenceInSeconds(end, remainingSeconds));
+ return duration;
+ }
+
+ var n$1,l$2,u$2,t$1,o$2,r$1,f$2={},e$1=[],c$2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s$2(n,l){for(var u in l)n[u]=l[u];return n}function a$2(n){var l=n.parentNode;l&&l.removeChild(n);}function h$2(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n$1.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$2(l,f,t,o,null)}function v$2(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$2:r};return null==r&&null!=l$2.vnode&&l$2.vnode(f),f}function y$2(){return {current:null}}function p$2(n){return n.children}function d$2(n,l){this.props=n,this.context=l;}function _$2(n,l){if(null==l)return n.__?_$2(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$2(n):null}function k$3(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$3(n)}}function b$2(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$3.__r++||o$2!==l$2.debounceRendering)&&((o$2=l$2.debounceRendering)||setTimeout)(g$3);}function g$3(){for(var n;g$3.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s$2({},t)).__v=t.__v+1,j$3(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$2(t):o,t.__h),z$2(u,t),t.__e!=o&&k$3(t)));});}function w$3(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$2(null,k,null,null,k):Array.isArray(k)?v$2(p$2,{children:k},null,null,null):k.__b>0?v$2(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$3(n,k,d=d||f$2,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$2(k,s,n):s=A$3(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$2(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N$1(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M$1(w[h],w[++h],w[++h]);}function m$2(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$2(i,l,u):A$3(u,i,i,t,i.__e,l));return l}function x$3(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){x$3(n,l);}):l.push(n)),l}function A$3(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C$2(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H$1(n,o,l[o],u[o],i);}function $$1(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$2.test(l)?u:u+"px";}function H$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$2:I$1,o):n.removeEventListener(l,o?T$2:I$1,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I$1(n){this.l[n.type+!1](l$2.event?l$2.event(n):n);}function T$2(n){this.l[n.type+!0](l$2.event?l$2.event(n):n);}function j$3(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$2.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$2(g,x),h.constructor=T,h.render=O$2),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s$2({},h.__s)),s$2(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$2.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s$2(s$2({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$2&&null==a.key?a.props.children:a,w$3(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L$1(i.__e,u,i,t,o,r,f,c);(a=l$2.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$2.__e(n,u,i);}}function z$2(n,u){l$2.__c&&l$2.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$2.__e(n,u.__v);}});}function L$1(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n$1.call(l.childNodes),h=(y=i.props||f$2).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C$2(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$3(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_$2(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$2(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H$1(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H$1(l,"checked",k,y.checked,!1));}return l}function M$1(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$2.__e(n,i);}}function N$1(n,u,i){var t,o;if(l$2.unmount&&l$2.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M$1(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$2.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N$1(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$2(n.__e),n.__=n.__e=n.__d=void 0;}function O$2(n,l,u){return this.constructor(n,u)}function P$1(u,i,t){var o,r,e;l$2.__&&l$2.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$3(i,u=(!o&&t||i).__k=h$2(p$2,null,[u]),r||f$2,f$2,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n$1.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$2(e,u);}function S$1(n,l){P$1(n,l,S$1);}function q$2(l,u,i){var t,o,r,f=s$2({},l.props);for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];return arguments.length>2&&(f.children=arguments.length>3?n$1.call(arguments,2):i),v$2(l.type,f,t||l.key,o||l.ref,null)}function B$2(n,l){var u={__c:l="__cC"+r$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(b$2);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n$1=e$1.slice,l$2={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$2=0,d$2.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s$2({},this.state),"function"==typeof n&&(n=n(s$2({},u),this.props)),n&&s$2(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$2(this));},d$2.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$2(this));},d$2.prototype.render=p$2,t$1=[],g$3.__r=0,r$1=0;
+
+ var n=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o$1=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,i$1=/[\s\n\\/='"\0<>]/,l$1=/^xlink:?./,a$1=/["&<]/;function s$1(e){if(!1===a$1.test(e+=""))return e;for(var t=0,r=0,n="",o="";r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}r!==t&&(n+=e.slice(t,r)),n+=o,t=r+1;}return r!==t&&(n+=e.slice(t,r)),n}var f$1=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},u$1=function(e,t,r){return String(e).length>(t||40)||!r&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},c$1={},_$1=/([A-Z])/g;function p$1(e){var t="";for(var r in e){var o=e[r];null!=o&&""!==o&&(t&&(t+=" "),t+="-"==r[0]?r:c$1[r]||(c$1[r]=r.replace(_$1,"-$1").toLowerCase()),t="number"==typeof o&&!1===n.test(r)?t+": "+o+"px;":t+": "+o+";");}return t||void 0}function d$1(e,t){return Array.isArray(t)?t.reduce(d$1,e):null!=t&&!1!==t&&e.push(t),e}function v$1(){this.__d=!0;}function h$1(e,t){return {__v:e,context:t,props:e.props,setState:v$1,forceUpdate:v$1,__d:!0,__h:[]}}function g$2(e,t){var r=e.contextType,n=r&&t[r.__c];return null!=r?n?n.props.value:r.__:t}var y$1=[];function m$1(r,n,a,c,_,v){if(null==r||"boolean"==typeof r)return "";if("object"!=typeof r)return "function"==typeof r?"":s$1(r);var b=a.pretty,x=b&&"string"==typeof b?b:"\t";if(Array.isArray(r)){for(var k="",S=0;S<r.length;S++)b&&S>0&&(k+="\n"),k+=m$1(r[S],n,a,c,_,v);return k}if(void 0!==r.constructor)return "";var w,C=r.type,O=r.props,j=!1;if("function"==typeof C){if(j=!0,!a.shallow||!c&&!1!==a.renderRootComponent){if(C===p$2){var A=[];return d$1(A,r.props.children),m$1(A,n,a,!1!==a.shallowHighOrder,_,v)}var F,H=r.__c=h$1(r,n);l$2.__b&&l$2.__b(r);var M=l$2.__r;if(C.prototype&&"function"==typeof C.prototype.render){var L=g$2(C,n);(H=r.__c=new C(O,L)).__v=r,H._dirty=H.__d=!0,H.props=O,null==H.state&&(H.state={}),null==H._nextState&&null==H.__s&&(H._nextState=H.__s=H.state),H.context=L,C.getDerivedStateFromProps?H.state=Object.assign({},H.state,C.getDerivedStateFromProps(H.props,H.state)):H.componentWillMount&&(H.componentWillMount(),H.state=H._nextState!==H.state?H._nextState:H.__s!==H.state?H.__s:H.state),M&&M(r),F=H.render(H.props,H.state,H.context);}else for(var T=g$2(C,n),E=0;H.__d&&E++<25;)H.__d=!1,M&&M(r),F=C.call(r.__c,O,T);return H.getChildContext&&(n=Object.assign({},n,H.getChildContext())),l$2.diffed&&l$2.diffed(r),m$1(F,n,a,!1!==a.shallowHighOrder,_,v)}C=(w=C).displayName||w!==Function&&w.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var r=-1,n=y$1.length;n--;)if(y$1[n]===e){r=n;break}r<0&&(r=y$1.push(e)-1),t="UnnamedComponent"+r;}return t}(w);}var $,D,N="<"+C;if(O){var P=Object.keys(O);a&&!0===a.sortAttributes&&P.sort();for(var W=0;W<P.length;W++){var I=P[W],R=O[I];if("children"!==I){if(!i$1.test(I)&&(a&&a.allAttributes||"key"!==I&&"ref"!==I&&"__self"!==I&&"__source"!==I)){if("defaultValue"===I)I="value";else if("defaultChecked"===I)I="checked";else if("defaultSelected"===I)I="selected";else if("className"===I){if(void 0!==O.class)continue;I="class";}else _&&l$1.test(I)&&(I=I.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===I){if(O.for)continue;I="for";}"style"===I&&R&&"object"==typeof R&&(R=p$1(R)),"a"===I[0]&&"r"===I[1]&&"boolean"==typeof R&&(R=String(R));var U=a.attributeHook&&a.attributeHook(I,R,n,a,j);if(U||""===U)N+=U;else if("dangerouslySetInnerHTML"===I)D=R&&R.__html;else if("textarea"===C&&"value"===I)$=R;else if((R||0===R||""===R)&&"function"!=typeof R){if(!(!0!==R&&""!==R||(R=I,a&&a.xml))){N=N+" "+I;continue}if("value"===I){if("select"===C){v=R;continue}"option"===C&&v==R&&void 0===O.selected&&(N+=" selected");}N=N+" "+I+'="'+s$1(R)+'"';}}}else $=R;}}if(b){var V=N.replace(/\n\s*/," ");V===N||~V.indexOf("\n")?b&&~N.indexOf("\n")&&(N+="\n"):N=V;}if(N+=">",i$1.test(C))throw new Error(C+" is not a valid HTML tag name in "+N);var q,z=o$1.test(C)||a.voidElements&&a.voidElements.test(C),Z=[];if(D)b&&u$1(D)&&(D="\n"+x+f$1(D,x)),N+=D;else if(null!=$&&d$1(q=[],$).length){for(var B=b&&~N.indexOf("\n"),G=!1,J=0;J<q.length;J++){var K=q[J];if(null!=K&&!1!==K){var Q=m$1(K,n,a,!0,"svg"===C||"foreignObject"!==C&&_,v);if(b&&!B&&u$1(Q)&&(B=!0),Q)if(b){var X=Q.length>0&&"<"!=Q[0];G&&X?Z[Z.length-1]+=Q:Z.push(Q),G=X;}else Z.push(Q);}}if(b&&B)for(var Y=Z.length;Y--;)Z[Y]="\n"+x+f$1(Z[Y],x);}if(Z.length||D)N+=Z.join("");else if(a&&a.xml)return N.substring(0,N.length-1)+" />";return !z||q||D?(b&&~N.indexOf("\n")&&(N+="\n"),N=N+"</"+C+">"):N=N.replace(/>$/," />"),N}var b$1={shallow:!0};S.render=S;var x$2=function(e,t){return S(e,t,b$1)},k$2=[];function S(n,o,i){o=o||{};var l=l$2.__s;l$2.__s=!0;var a,s=h$2(p$2,null);return s.__k=[n],a=i&&(i.pretty||i.voidElements||i.sortAttributes||i.shallow||i.allAttributes||i.xml||i.attributeHook)?m$1(n,o,i):F$2(n,o,!1,void 0,s),l$2.__c&&l$2.__c(n,k$2),l$2.__s=l,k$2.length=0,a}function w$2(e){return null==e||"boolean"==typeof e?null:"string"==typeof e||"number"==typeof e||"bigint"==typeof e?h$2(null,null,e):e}function C$1(e,t){return "className"===e?"class":"htmlFor"===e?"for":"defaultValue"===e?"value":"defaultChecked"===e?"checked":"defaultSelected"===e?"selected":t&&l$1.test(e)?e.toLowerCase().replace(/^xlink:?/,"xlink:"):e}function O$1(e,t){return "style"===e&&null!=t&&"object"==typeof t?p$1(t):"a"===e[0]&&"r"===e[1]&&"boolean"==typeof t?String(t):t}var j$2=Array.isArray,A$2=Object.assign;function F$2(r,n,l,a,f){if(null==r||!0===r||!1===r||""===r)return "";if("object"!=typeof r)return "function"==typeof r?"":s$1(r);if(j$2(r)){var u="";f.__k=r;for(var c=0;c<r.length;c++)u+=F$2(r[c],n,l,a,f),r[c]=w$2(r[c]);return u}if(void 0!==r.constructor)return "";r.__=f,l$2.__b&&l$2.__b(r);var _=r.type,p=r.props;if("function"==typeof _){var d;if(_===p$2)d=p.children;else {d=_.prototype&&"function"==typeof _.prototype.render?function(e,r){var n=e.type,o=g$2(n,r),i=new n(e.props,o);e.__c=i,i.__v=e,i.__d=!0,i.props=e.props,null==i.state&&(i.state={}),null==i.__s&&(i.__s=i.state),i.context=o,n.getDerivedStateFromProps?i.state=A$2({},i.state,n.getDerivedStateFromProps(i.props,i.state)):i.componentWillMount&&(i.componentWillMount(),i.state=i.__s!==i.state?i.__s:i.state);var l=l$2.__r;return l&&l(e),i.render(i.props,i.state,i.context)}(r,n):function(e,r){var n,o=h$1(e,r),i=g$2(e.type,r);e.__c=o;for(var l=l$2.__r,a=0;o.__d&&a++<25;)o.__d=!1,l&&l(e),n=e.type.call(o,e.props,i);return n}(r,n);var v=r.__c;v.getChildContext&&(n=A$2({},n,v.getChildContext()));}var y=F$2(d=null!=d&&d.type===p$2&&null==d.key?d.props.children:d,n,l,a,r);return l$2.diffed&&l$2.diffed(r),r.__=void 0,l$2.unmount&&l$2.unmount(r),y}var m,b,x="<";if(x+=_,p)for(var k in m=p.children,p){var S=p[k];if(!("key"===k||"ref"===k||"__self"===k||"__source"===k||"children"===k||"className"===k&&"class"in p||"htmlFor"===k&&"for"in p||i$1.test(k)))if(S=O$1(k=C$1(k,l),S),"dangerouslySetInnerHTML"===k)b=S&&S.__html;else if("textarea"===_&&"value"===k)m=S;else if((S||0===S||""===S)&&"function"!=typeof S){if(!0===S||""===S){S=k,x=x+" "+k;continue}if("value"===k){if("select"===_){a=S;continue}"option"!==_||a!=S||"selected"in p||(x+=" selected");}x=x+" "+k+'="'+s$1(S)+'"';}}var H=x;if(x+=">",i$1.test(_))throw new Error(_+" is not a valid HTML tag name in "+x);var M="",L=!1;if(b)M+=b,L=!0;else if("string"==typeof m)M+=s$1(m),L=!0;else if(j$2(m)){r.__k=m;for(var T=0;T<m.length;T++){var E=m[T];if(m[T]=w$2(E),null!=E&&!1!==E){var $=F$2(E,n,"svg"===_||"foreignObject"!==_&&l,a,r);$&&(M+=$,L=!0);}}}else if(null!=m&&!1!==m&&!0!==m){r.__k=[w$2(m)];var D=F$2(m,n,"svg"===_||"foreignObject"!==_&&l,a,r);D&&(M+=D,L=!0);}if(l$2.diffed&&l$2.diffed(r),r.__=void 0,l$2.unmount&&l$2.unmount(r),L)x+=M;else if(o$1.test(_))return H+" />";return x+"</"+_+">"}S.shallowRender=x$2;
+
+ function memoize(fn) {
+ var cache = {};
+ return function (arg) {
+ if (cache[arg] === undefined) cache[arg] = fn(arg);
+ return cache[arg];
+ };
+ }
+
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
+
+ var index = memoize(function (prop) {
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
+ /* o */
+ && prop.charCodeAt(1) === 110
+ /* n */
+ && prop.charCodeAt(2) < 91;
+ }
+ /* Z+1 */
+ );
+
+ var t,r,u,i,o=0,f=[],c=[],e=l$2.__b,a=l$2.__r,v=l$2.diffed,l=l$2.__c,m=l$2.unmount;function d(t,u){l$2.__h&&l$2.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o=1,y(B$1,n)}function y(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B$1(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){r.u=!0;var f=r.shouldComponentUpdate;r.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$2.__s&&z$1(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function s(u,i){var o=d(t++,4);!l$2.__s&&z$1(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o));}function _(n){return o=5,F$1(function(){return {current:n}},[])}function A$1(n,t,r){o=6,s(function(){return "function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n));}function F$1(n,r){var u=d(t++,7);return z$1(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T$1(n,t){return o=8,F$1(function(){return n},t)}function q$1(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function x$1(t,r){l$2.useDebugValue&&l$2.useDebugValue(r?r(t):t);}function V$1(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++;}return n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k$1),t.__H.__h.forEach(w$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l$2.__e(r,t.__v);}}l$2.__b=function(n){r=null,e&&e(n);},l$2.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k$1),i.__h.forEach(w$1),i.__h=[])),u=r;},l$2.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$2.requestAnimationFrame||((i=l$2.requestAnimationFrame)||j$1)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$2.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k$1),t.__h=t.__h.filter(function(n){return !n.__||w$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$2.__e(u,t.__v);}}),l&&l(t,r);},l$2.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$2.__e(r,u.__v));};var g$1="function"==typeof requestAnimationFrame;function j$1(n){var t,r=function(){clearTimeout(u),g$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g$1&&(t=requestAnimationFrame(r));}function k$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w$1(n){var t=r;n.__c=n.__(),r=t;}function z$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B$1(n,t){return "function"==typeof t?t(n):t}
+
+ function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function E(n,t){return n===t&&(0!==n||1/n==1/t)||n!=n&&t!=t}function w(n){this.props=n;}function R(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return !r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,h$2(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(w.prototype=new d$2).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var x=l$2.__b;l$2.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),x&&x(n);};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=N,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var A=function(n,t){return null==n?null:x$3(x$3(n).map(t))},O={map:A,forEach:A,count:function(n){return n?x$3(n).length:0},only:function(n){var t=x$3(n);if(1!==t.length)throw "Children.only";return t[0]},toArray:x$3},T=l$2.__e;l$2.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r);};var I=l$2.unmount;function L(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)})),n}function U(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return U(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function D(){this.__u=0,this.t=null,this.__b=null;}function F(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n;},function(n){u=n;}),u)throw u;if(!r)throw e;return h$2(r,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null;}l$2.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),I&&I(n);},(D.prototype=new d$2).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=F(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=U(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},D.prototype.componentWillUnmount=function(){this.t=[];},D.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=L(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&h$2(p$2,null,n.fallback);return i&&(i.__h=null),[h$2(p$2,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function P(n){return this.getChildContext=function(){return n.context},n.children}function $(n){var e=this,r=n.i;e.componentWillUnmount=function(){P$1(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),P$1(h$2(P,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount();}function j(n,e){var r=h$2($,{__v:n,i:e});return r.containerInfo=e,r}(V.prototype=new d$2).__a=function(n){var t=this,e=F(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u();};e?e(o):o();}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=x$3(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H="undefined"!=typeof document,Z=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function Y(n,t,e){return null==t.__k&&(t.textContent=""),P$1(n,t),"function"==typeof e&&e(),n?n.__c:null}function q(n,t,e){return S$1(n,t),"function"==typeof e&&e(),n?n.__c:null}d$2.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(d$2.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var G=l$2.event;function J(){}function K(){return this.cancelBubble}function Q(){return this.defaultPrevented}l$2.event=function(n){return G&&(n=G(n)),n.persist=J,n.isPropagationStopped=K,n.isDefaultPrevented=Q,n.nativeEvent=n};var X,nn={configurable:!0,get:function(){return this.class}},tn=l$2.vnode;l$2.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];H&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Z(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&B.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l);}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=x$3(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==t&&null!=u.defaultValue&&(u.value=x$3(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),n.props=u,e.class!=e.className&&(nn.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",nn));}n.$$typeof=z,tn&&tn(n);};var en=l$2.__r;l$2.__r=function(n){en&&en(n),X=n.__c;};var rn={ReactCurrentDispatcher:{current:{readContext:function(n){return X.__n[n.__c].props.value}}}};function on(n){return h$2.bind(null,n)}function ln(n){return !!n&&n.$$typeof===z}function cn(n){return ln(n)?q$2.apply(null,arguments):n}function fn(n){return !!n.__k&&(P$1(null,n),!0)}function an(n){return n&&(n.base||1===n.nodeType&&n)||null}var sn=function(n,t){return n(t)},hn=function(n,t){return n(t)},vn=p$2;function dn(n){n();}function pn(n){return n}function mn(){return [!1,dn]}var yn=s;function _n(n,t){var e=t(),r=p({h:{__:e,v:t}}),u=r[0].h,o=r[1];return s(function(){u.__=e,u.v=t,E(u.__,t())||o({h:u});},[n,e,t]),h(function(){return E(u.__,u.v())||o({h:u}),n(function(){E(u.__,u.v())||o({h:u});})},[n]),e}var bn={useState:p,useId:V$1,useReducer:y,useEffect:h,useLayoutEffect:s,useInsertionEffect:yn,useTransition:mn,useDeferredValue:pn,useSyncExternalStore:_n,startTransition:dn,useRef:_,useImperativeHandle:A$1,useMemo:F$1,useCallback:T$1,useContext:q$1,useDebugValue:x$1,version:"17.0.2",Children:O,render:Y,hydrate:q,unmountComponentAtNode:fn,createPortal:j,createElement:h$2,createContext:B$2,createFactory:on,cloneElement:cn,createRef:y$2,Fragment:p$2,isValidElement:ln,findDOMNode:an,Component:d$2,PureComponent:w,memo:R,forwardRef:k,flushSync:hn,unstable_batchedUpdates:sn,StrictMode:vn,Suspense:D,SuspenseList:V,lazy:M,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:rn};
+
+ /**
+ * Takes a list of class names and filters for truthy ones, joining them into a single class name for convenience.
+ * eg.
+ * ```js
+ * cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
+ * ```
+ * If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
+ *
+ * ```js
+ * cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
+ * ```
+ *
+ * @returns the combined, space separated class names that can be applied directly to the class attribute
+ */
+ const cx = function cx() {
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
+ .call(arguments).filter(Boolean);
+ const atomicClasses = {};
+ const nonAtomicClasses = [];
+ presentClassNames.forEach(arg => {
+ // className could be the output of a previous cx call, so split by ' ' first
+ const individualClassNames = arg ? arg.split(' ') : [];
+ individualClassNames.forEach(className => {
+ if (className.startsWith('atm_')) {
+ const [, keyHash] = className.split('_');
+ atomicClasses[keyHash] = className;
+ } else {
+ nonAtomicClasses.push(className);
+ }
+ });
+ });
+ const result = []; // eslint-disable-next-line no-restricted-syntax
+
+ for (const keyHash in atomicClasses) {
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
+ result.push(atomicClasses[keyHash]);
+ }
+ }
+
+ result.push(...nonAtomicClasses);
+ return result.join(' ');
+ };
+
+ var cx$1 = cx;
+
+ /* eslint-disable @typescript-eslint/no-explicit-any */
+
+ const isCapital = ch => ch.toUpperCase() === ch;
+
+ const filterKey = keys => key => keys.indexOf(key) === -1;
+
+ const omit = (obj, keys) => {
+ const res = {};
+ Object.keys(obj).filter(filterKey(keys)).forEach(key => {
+ res[key] = obj[key];
+ });
+ return res;
+ };
+
+ function filterProps(component, props, omitKeys) {
+ const filteredProps = omit(props, omitKeys); // Check if it's an HTML tag and not a custom element
+
+ if (typeof component === 'string' && component.indexOf('-') === -1 && !isCapital(component[0])) {
+ Object.keys(filteredProps).forEach(key => {
+ if (!index(key)) {
+ // Don't pass through invalid attributes to HTML elements
+ delete filteredProps[key];
+ }
+ });
+ }
+
+ return filteredProps;
+ }
+
+ const warnIfInvalid = (value, componentName) => {
+ };
+
+ function styled(tag) {
+ return options => {
+
+ const render = (props, ref) => {
+ const {
+ as: component = tag,
+ class: className
+ } = props;
+ const filteredProps = filterProps(component, props, ['as', 'class']);
+ filteredProps.ref = ref;
+ filteredProps.className = options.atomic ? cx$1(options.class, filteredProps.className || className) : cx$1(filteredProps.className || className, options.class);
+ const {
+ vars
+ } = options;
+
+ if (vars) {
+ const style = {}; // eslint-disable-next-line guard-for-in,no-restricted-syntax
+
+ for (const name in vars) {
+ const variable = vars[name];
+ const result = variable[0];
+ const unit = variable[1] || '';
+ const value = typeof result === 'function' ? result(props) : result;
+ warnIfInvalid(value, options.name);
+ style[`--${name}`] = `${value}${unit}`;
+ }
+
+ const ownStyle = filteredProps.style || {};
+ const keys = Object.keys(ownStyle);
+
+ if (keys.length > 0) {
+ keys.forEach(key => {
+ style[key] = ownStyle[key];
+ });
+ }
+
+ filteredProps.style = style;
+ }
+
+ if (tag.__linaria && tag !== component) {
+ // If the underlying tag is a styled component, forward the `as` prop
+ // Otherwise the styles from the underlying component will be ignored
+ filteredProps.as = component;
+ return /*#__PURE__*/bn.createElement(tag, filteredProps);
+ }
+
+ return /*#__PURE__*/bn.createElement(component, filteredProps);
+ };
+
+ const Result = bn.forwardRef ? /*#__PURE__*/bn.forwardRef(render) : // React.forwardRef won't available on older React versions and in Preact
+ // Fallback to a innerRef prop in that case
+ props => {
+ const rest = omit(props, ['innerRef']);
+ return render(rest, props.innerRef);
+ };
+ Result.displayName = options.name; // These properties will be read by the babel plugin for interpolation
+
+ Result.__linaria = {
+ className: options.class,
+ extends: tag
+ };
+ return Result;
+ };
+ }
+
+ var styled$1 = styled;
+
+ /*
+ This file is part of GNU Taler
+ (C) 2021 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+ const FooterBar = /*#__PURE__*/styled$1('footer')({
+ name: "FooterBar",
+ class: "fef0x5t"
+ });
+ const Page = /*#__PURE__*/styled$1('div')({
+ name: "Page",
+ class: "p1b3vqup"
+ });
+ const InfoBox = /*#__PURE__*/styled$1('div')({
+ name: "InfoBox",
+ class: "i1pkgksb"
+ });
+ const TableExpanded = /*#__PURE__*/styled$1('dl')({
+ name: "TableExpanded",
+ class: "t2c81u8"
+ });
+ const TableSimple = /*#__PURE__*/styled$1('dl')({
+ name: "TableSimple",
+ class: "t1mav7fx"
+ });
+
+ /*
+ This file is part of GNU Taler
+ (C) 2021 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+ function Footer() {
+ return (h$2(FooterBar, null,
+ h$2("p", null,
+ h$2("a", { href: "https://taler.net/" }, "Learn more about GNU Taler on our website."),
+ h$2("p", null, "Copyright \u00A9 2014\u20142021 Taler Systems SA"))));
+ }
+
+ /*
+ This file is part of GNU Taler
+ (C) 2021 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+ function Head({ order_summary }) {
+ return (h$2(p$2, null,
+ h$2("meta", { charSet: "UTF-8" }),
+ h$2("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }),
+ h$2("noscript", null,
+ h$2("meta", { "http-equiv": "refresh", content: "1" })),
+ h$2("title", null,
+ "Status of your order for",
+ " ",
+ order_summary ? order_summary : `{{ order_summary }}`),
+ h$2("script", null, `
+ var contractTermsStr = '{{{contract_terms_json}}}';
+ `)));
+ }
+ function Location({ templateName, location, btr, }) {
+ //FIXME: mustache strings show be constructed in a way that ends in the final output of the html but is not present in the
+ // javascript code, otherwise when mustache render engine run over the html it will also replace string in the javascript code
+ // that is made to run when the browser has javascript enable leading into undefined behavior.
+ // that's why in the next fields we are using concatenations to build the mustache placeholder.
+ return (h$2(p$2, null,
+ btr && `{{` + `#${templateName}.building_name}}`,
+ h$2("dd", null,
+ (location === null || location === void 0 ? void 0 : location.building_name) ||
+ (btr && `{{ ${templateName}.building_name }}`),
+ " ",
+ (location === null || location === void 0 ? void 0 : location.building_number) ||
+ (btr && `{{ ${templateName}.building_number }}`)),
+ btr && `{{` + `/${templateName}.building_name}}`,
+ btr && `{{` + `#${templateName}.country}}`,
+ h$2("dd", null,
+ (location === null || location === void 0 ? void 0 : location.country) || (btr && `{{ ${templateName}.country }}`),
+ " ",
+ (location === null || location === void 0 ? void 0 : location.country_subdivision) ||
+ (btr && `{{ ${templateName}.country_subdivision }}`)),
+ btr && `{{` + `/${templateName}.country}}`,
+ btr && `{{` + `#${templateName}.district}}`,
+ h$2("dd", null, (location === null || location === void 0 ? void 0 : location.district) || (btr && `{{ ${templateName}.district }}`)),
+ btr && `{{` + `/${templateName}.district}}`,
+ btr && `{{` + `#${templateName}.post_code}}`,
+ h$2("dd", null, (location === null || location === void 0 ? void 0 : location.post_code) || (btr && `{{ ${templateName}.post_code }}`)),
+ btr && `{{` + `/${templateName}.post_code}}`,
+ btr && `{{` + `#${templateName}.street}}`,
+ h$2("dd", null, (location === null || location === void 0 ? void 0 : location.street) || (btr && `{{ ${templateName}.street }}`)),
+ btr && `{{` + `/${templateName}.street}}`,
+ btr && `{{` + `#${templateName}.town}}`,
+ h$2("dd", null, (location === null || location === void 0 ? void 0 : location.town) || (btr && `{{ ${templateName}.town }}`)),
+ btr && `{{` + `/${templateName}.town}}`,
+ btr && `{{` + `#${templateName}.town_location}}`,
+ h$2("dd", null, (location === null || location === void 0 ? void 0 : location.town_location) ||
+ (btr && `{{ ${templateName}.town_location }}`)),
+ btr && `{{` + `/${templateName}.town_location}}`));
+ }
+ function ShowOrderDetails({ order_summary, refund_amount, contract_terms, btr, }) {
+ const productList = btr
+ ? [{}]
+ : (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.products) || [];
+ const auditorsList = btr
+ ? [{}]
+ : (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.auditors) || [];
+ const exchangesList = btr
+ ? [{}]
+ : (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.exchanges) || [];
+ const hasDeliveryInfo = btr ||
+ !!(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_date) ||
+ !!(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_location);
+ return (h$2(Page, null,
+ h$2("header", null,
+ h$2("h1", null,
+ "Details of order",
+ " ",
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.order_id) || `{{ contract_terms.order_id }}`)),
+ h$2("section", null,
+ btr && `{{#refund_amount}}`,
+ (btr || refund_amount) && (h$2("section", null,
+ h$2(InfoBox, null,
+ h$2("b", null, "Refunded:"),
+ " The merchant refunded you",
+ " ",
+ h$2("b", null, refund_amount || `{{ refund_amount }}`),
+ "."))),
+ btr && `{{/refund_amount}}`,
+ h$2("section", null,
+ h$2(TableExpanded, null,
+ h$2("dt", null, "Order summary:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.summary) || `{{ contract_terms.summary }}`),
+ h$2("dt", null, "Amount paid:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.amount) || `{{ contract_terms.amount }}`),
+ h$2("dt", null, "Order date:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.timestamp)
+ ? (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.timestamp.t_s) != "never"
+ ? format(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.timestamp.t_s, "dd MMM yyyy HH:mm:ss")
+ : "never"
+ : `{{ contract_terms.timestamp_str }}`,
+ " "),
+ h$2("dt", null, "Merchant name:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.merchant.name) ||
+ `{{ contract_terms.merchant.name }}`))),
+ btr && `{{#contract_terms.hasProducts}}`,
+ !productList.length ? null : (h$2("section", null,
+ h$2("h2", null, "Products purchased"),
+ h$2(TableSimple, null,
+ btr && "{{" + "#contract_terms.products" + "}}",
+ productList.map((p, i) => {
+ const taxList = btr
+ ? [{}]
+ : p.taxes || [];
+ return (h$2(p$2, { key: i },
+ h$2("p", null, p.description || `{{description}}`),
+ h$2("dl", null,
+ h$2("dt", null, "Quantity:"),
+ h$2("dd", null, p.quantity || `{{quantity}}`),
+ h$2("dt", null, "Price:"),
+ h$2("dd", null, p.price || `{{price}}`),
+ btr && `{{#hasTaxes}}`,
+ !taxList.length ? null : (h$2(p$2, null,
+ btr && "{{" + "#taxes" + "}}",
+ taxList.map((t, i) => {
+ return (h$2(p$2, { key: i },
+ h$2("dt", null, t.name || `{{name}}`),
+ h$2("dd", null, t.tax || `{{tax}}`)));
+ }),
+ btr && "{{" + "/taxes" + "}}")),
+ btr && `{{/hasTaxes}}`,
+ btr && `{{#delivery_date}}`,
+ (btr || p.delivery_date) && (h$2(p$2, null,
+ h$2("dt", null, "Delivered on:"),
+ h$2("dd", null,
+ p.delivery_date
+ ? p.delivery_date.t_s != "never"
+ ? format(p.delivery_date.t_s, "dd MMM yyyy HH:mm:ss")
+ : "never"
+ : `{{ delivery_date_str }}`,
+ " "))),
+ btr && `{{/delivery_date}}`,
+ btr && `{{#unit}}`,
+ (btr || p.unit) && (h$2(p$2, null,
+ h$2("dt", null, "Product unit:"),
+ h$2("dd", null, p.unit || `{{.}}`))),
+ btr && `{{/unit}}`,
+ btr && `{{#product_id}}`,
+ (btr || p.product_id) && (h$2(p$2, null,
+ h$2("dt", null, "Product ID:"),
+ h$2("dd", null, p.product_id || `{{.}}`))),
+ btr && `{{/product_id}}`)));
+ }),
+ btr && "{{" + "/contract_terms.products" + "}}"))),
+ btr && `{{/contract_terms.hasProducts}}`,
+ btr && `{{#contract_terms.has_delivery_info}}`,
+ !hasDeliveryInfo ? null : (h$2("section", null,
+ h$2("h2", null, "Delivery information"),
+ h$2(TableExpanded, null,
+ btr && `{{#contract_terms.delivery_date}}`,
+ (btr || (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_date)) && (h$2(p$2, null,
+ h$2("dt", null, "Delivery date:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_date)
+ ? (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_date.t_s) != "never"
+ ? format(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_date.t_s, "dd MMM yyyy HH:mm:ss")
+ : "never"
+ : `{{ contract_terms.delivery_date_str }}`,
+ " "))),
+ btr && `{{/contract_terms.delivery_date}}`,
+ btr && `{{#contract_terms.delivery_location}}`,
+ (btr || (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_location)) && (h$2(p$2, null,
+ h$2("dt", null, "Delivery address:"),
+ h$2(Location, { btr: btr, location: contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.delivery_location, templateName: "contract_terms.delivery_location" }))),
+ btr && `{{/contract_terms.delivery_location}}`))),
+ btr && `{{/contract_terms.has_delivery_info}}`,
+ h$2("section", null,
+ h$2("h2", null, "Full payment information"),
+ h$2(TableExpanded, null,
+ h$2("dt", null, "Amount paid:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.amount) || `{{ contract_terms.amount }}`),
+ h$2("dt", null, "Wire transfer method:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.wire_method) ||
+ `{{ contract_terms.wire_method }}`),
+ h$2("dt", null, "Payment deadline:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.pay_deadline)
+ ? (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.pay_deadline.t_s) != "never"
+ ? format(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.pay_deadline.t_s, "dd MMM yyyy HH:mm:ss")
+ : "never"
+ : `{{ contract_terms.pay_deadline_str }}`,
+ " "),
+ h$2("dt", null, "Exchange transfer deadline:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.wire_transfer_deadline)
+ ? (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.wire_transfer_deadline.t_s) != "never"
+ ? format(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.wire_transfer_deadline.t_s, "dd MMM yyyy HH:mm:ss")
+ : "never"
+ : `{{ contract_terms.wire_transfer_deadline_str }}`,
+ " "),
+ h$2("dt", null, "Maximum deposit fee:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.max_fee) || `{{ contract_terms.max_fee }}`),
+ h$2("dt", null, "Maximum wire fee:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.max_wire_fee) ||
+ `{{ contract_terms.max_wire_fee }}`),
+ h$2("dt", null, "Wire fee amortization:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.wire_fee_amortization) ||
+ `{{ contract_terms.wire_fee_amortization }}`,
+ " ",
+ "transactions"))),
+ h$2("section", null,
+ h$2("h2", null, "Refund information"),
+ h$2(TableExpanded, null,
+ h$2("dt", null, "Refund deadline:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.refund_deadline)
+ ? (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.refund_deadline.t_s) != "never"
+ ? format(contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.refund_deadline.t_s, "dd MMM yyyy HH:mm:ss")
+ : "never"
+ : `{{ contract_terms.refund_deadline_str }}`,
+ " "),
+ btr && `{{#contract_terms.auto_refund}}`,
+ (btr || (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.auto_refund)) && (h$2(p$2, null,
+ h$2("dt", null, "Attempt autorefund for:"),
+ h$2("dd", null,
+ (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.auto_refund)
+ ? (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.auto_refund.d_us) != "forever"
+ ? formatDuration(intervalToDuration({
+ start: 0,
+ end: contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.auto_refund.d_us,
+ }))
+ : "forever"
+ : `{{ contract_terms.auto_refund_str }}`,
+ " "))),
+ btr && `{{/contract_terms.auto_refund}}`)),
+ h$2("section", null,
+ h$2("h2", null, "Additional order details"),
+ h$2(TableExpanded, null,
+ h$2("dt", null, "Public reorder URL:"),
+ h$2("dd", null, " -- not defined yet -- "),
+ btr && `{{#contract_terms.fulfillment_url}}`,
+ (btr || (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.fulfillment_url)) && (h$2(p$2, null,
+ h$2("dt", null, "Fulfillment URL:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.fulfillment_url) ||
+ (btr && `{{ contract_terms.fulfillment_url }}`)))),
+ btr && `{{/contract_terms.fulfillment_url}}`)),
+ h$2("section", null,
+ h$2("h2", null, "Full merchant information"),
+ h$2(TableExpanded, null,
+ h$2("dt", null, "Merchant name:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.merchant.name) ||
+ `{{ contract_terms.merchant.name }}`),
+ h$2("dt", null, "Merchant address:"),
+ h$2(Location, { btr: btr, location: contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.merchant.address, templateName: "contract_terms.merchant.address" }),
+ h$2("dt", null, "Merchant's jurisdiction:"),
+ h$2(Location, { btr: btr, location: contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.merchant.jurisdiction, templateName: "contract_terms.merchant.jurisdiction" }),
+ h$2("dt", null, "Merchant URI:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.merchant_base_url) ||
+ `{{ contract_terms.merchant_base_url }}`),
+ h$2("dt", null, "Merchant's public key:"),
+ h$2("dd", null, (contract_terms === null || contract_terms === void 0 ? void 0 : contract_terms.merchant_pub) ||
+ `{{ contract_terms.merchant_pub }}`))),
+ btr && `{{#contract_terms.hasAuditors}}`,
+ !auditorsList.length ? null : (h$2("section", null,
+ h$2("h2", null, "Auditors accepted by the merchant"),
+ h$2(TableExpanded, null,
+ btr && "{{" + "#contract_terms.auditors" + "}}",
+ auditorsList.map((p, i) => {
+ return (h$2(p$2, { key: i },
+ h$2("p", null, p.name || `{{name}}`),
+ h$2("dt", null, "Auditor's public key:"),
+ h$2("dd", null, p.auditor_pub || `{{auditor_pub}}`),
+ h$2("dt", null, "Auditor's URL:"),
+ h$2("dd", null, p.url || `{{url}}`)));
+ }),
+ btr && "{{" + "/contract_terms.auditors" + "}}"))),
+ btr && `{{/contract_terms.hasAuditors}}`,
+ btr && `{{#contract_terms.hasExchanges}}`,
+ !exchangesList.length ? null : (h$2("section", null,
+ h$2("h2", null, "Exchanges accepted by the merchant"),
+ h$2(TableExpanded, null,
+ btr && "{{" + "#contract_terms.exchanges" + "}}",
+ exchangesList.map((p, i) => {
+ return (h$2(p$2, { key: i },
+ h$2("dt", null, "Exchange's URL:"),
+ h$2("dd", null, p.url || `{{url}}`),
+ h$2("dt", null, "Public key:"),
+ h$2("dd", null, p.master_pub || `{{master_pub}}`)));
+ }),
+ btr && "{{" + "/contract_terms.exchanges" + "}}"))),
+ btr && `{{/contract_terms.hasExchanges}}`),
+ h$2(Footer, null)));
+ }
+ function mount() {
+ try {
+ const fromLocation = new URL(window.location.href).searchParams;
+ const os = fromLocation.get("order_summary") || undefined;
+ if (os) {
+ P$1(h$2(Head, { order_summary: os }), document.head);
+ }
+ const ra = fromLocation.get("refund_amount") || undefined;
+ const ct = fromLocation.get("contract_terms") || undefined;
+ let contractTerms;
+ try {
+ contractTerms = JSON.parse(window.contractTermsStr);
+ }
+ catch (_a) { }
+ P$1(h$2(ShowOrderDetails, { contract_terms: contractTerms, order_summary: os, refund_amount: ra }), document.body);
+ }
+ catch (e) {
+ console.error("got error", e);
+ if (e instanceof Error) {
+ document.body.innerText = `Fatal error: "${e.message}". Please report this bug at https://bugs.gnunet.org/.`;
+ }
+ }
+ }
+ function buildTimeRendering() {
+ return {
+ head: S(h$2(Head, null)),
+ body: S(h$2(ShowOrderDetails, { btr: true })),
+ };
+ }
+
+ exports.ShowOrderDetails = ShowOrderDetails;
+ exports.buildTimeRendering = buildTimeRendering;
+ exports.mount = mount;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+ return exports;
+
+})({});
+</script>
+ <script>page.mount()</script>
+ </body>
+</html> \ No newline at end of file